@import url('./header.css');
@import url('./cookie.css');
@import url('./search.css');
@import url('./side_menu.css');
@import url('./portfolio.css');
@import url('./about.css');
@import url('./clients.css');
@import url('./promos.css');
@import url('./equipment.css');
@import url('./contacts.css');
@import url('./footer.css');
@import url('./home_story.css');
@import url('./collections_grid.css');
@import url('./featured_block.css');
@import url('./motivational_banner.css');
@import url('./formula_tepla.css');
@import url('./hero_video.css');
@import url('./feature_blocks.css'); 
@import url('./video_widget.css');

:root {
    --primary-color: #6b3f74; 
    --secondary-color: #e2dae6; 
    --accent-color: #9a599c; 
    --bg-pink: #ffe6ee; 
    --text-dark: #222222;
    --text-light: #ffffff;
    --bg-light: #f9f9f9;
    
    --font-base: 'Inter', Helvetica, Arial, sans-serif;
    --font-title: 'Playfair Display', Georgia, serif; 
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-base);
    font-weight: 400;
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* ВАЖНО: Скрываем горизонтальный скролл от вылезающего за край фонового паттерна */
}

h1, h2, h3, h4, h5, h6, .logo a {
    font-family: var(--font-title);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   СЕТКА ГЛАВНОЙ СТРАНИЦЫ
========================================= */
.content {
    max-width: 1440px;
    margin: 30px auto;
    padding: 0 20px;
}

.hero-section-full {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* =========================================
   МОДУЛЬ ПРЯЖИ (ОПИСАНИЕ И ЗАГОЛОВОК)
========================================= */
.yarn-materials-section {
    max-width: 1440px;
    margin: 60px auto;
    padding: 0 20px;
}

/* Фирменная плашка с заголовком */
.yarn-section-header {
    position: relative;
    background-color: var(--primary-color);
    border-radius: 8px;
    padding: 40px 50px;
    margin: 0 auto 40px auto;
    display: flex;
    align-items: center;
    overflow: hidden; 
}

/* Текстовый блок внутри плашки */
.yarn-header-text {
    position: relative;
    z-index: 2;
    max-width: 65%;
    text-align: left;
}

.yarn-section-title {
    font-family: var(--font-title);
    font-size: 38px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.yarn-section-desc {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
}

.yarn-section-desc strong {
    color: #ffffff;
    font-weight: 700;
}

/* Белый логотип-маска справа */
.yarn-header-pattern {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 35%;
    height: 100%;
    background-color: #ffffff; 
    -webkit-mask: url('/assets/img/logo_watermark.svg') no-repeat right center;
    -webkit-mask-size: auto 100%;
    mask: url('/assets/img/logo_watermark.svg') no-repeat right center;
    mask-size: auto 100%;
    z-index: 1;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.yarn-header-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    background-image: url('/assets/img/footer_bg.png');
    background-repeat: repeat;
    background-size: 180px; 
    
    opacity: 0; 
    transition: opacity 0.4s ease;
}

.yarn-header-pattern:hover::before {
    opacity: 0.25; 
}

.yarn-header-pattern:hover {
    transform: scale(1.02);
}

@media (max-width: 992px) {
    .yarn-header-text {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .yarn-section-header {
        padding: 30px 20px;
        flex-direction: column;
        justify-content: center;
    }
    .yarn-header-text {
        max-width: 100%;
        text-align: center;
    }
    .yarn-section-title {
        font-size: 28px;
    }
    .yarn-header-pattern {
        opacity: 0.15;
        width: 100%;
        -webkit-mask-position: center center;
        mask-position: center center;
        pointer-events: none; 
    }
}

/* =========================================
   ПАТТЕРН НА ЗАДНЕМ ФОНЕ (ДЛЯ ВСЕХ СТРАНИЦ КРОМЕ ГЛАВНОЙ)
========================================= */
.page-background-pattern {
    position: absolute;
    top: 15vh; 
    right: -80px; 
    z-index: 1; 
    pointer-events: none; /* Прозрачен для кликов */
    overflow: hidden;
}

.bg-pattern-svg {
    width: 324px; 
    height: auto;
    overflow: visible;
    display: block;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
    pointer-events: auto; /* Реакция курсора для работы анимации */
    cursor: pointer;
}

.bg-living-path {
    stroke-width: 4px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 2000;
    stroke-dashoffset: 0; 
    transition: fill-opacity 0.5s ease, stroke 0.5s ease;
}

/* Базовое состояние */
.bg-color-purple {
    fill: #955A94;
    fill-opacity: 0.3; 
    stroke: transparent;
}

.bg-color-light {
    fill: #E6DFE6;
    fill-opacity: 0.9; 
    stroke: transparent;
}

/* Оживление при наведении на сам паттерн ИЛИ на меню каталога */
.bg-pattern-svg:hover .bg-color-purple,
body:has(.main-nav:hover) .page-background-pattern .bg-color-purple {
    animation: bg-pulsePurple 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.bg-pattern-svg:hover .bg-color-light,
body:has(.main-nav:hover) .page-background-pattern .bg-color-light {
    animation: bg-pulseLight 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Ключевые кадры противофазы для фона */
@keyframes bg-pulsePurple {
    0% { stroke-dashoffset: 2000; fill-opacity: 0.3; stroke: #955A94; }
    50% { stroke-dashoffset: 0; fill-opacity: 1; stroke: transparent; }
    100% { stroke-dashoffset: -2000; fill-opacity: 0.3; stroke: #955A94; }
}

@keyframes bg-pulseLight {
    0% { stroke-dashoffset: 2000; fill-opacity: 0.9; stroke: transparent; }
    50% { stroke-dashoffset: 0; fill-opacity: 0.15; stroke: #955A94; }
    100% { stroke-dashoffset: -2000; fill-opacity: 0.9; stroke: transparent; }
}

@media (max-width: 768px) {
    .page-background-pattern {
        display: none; /* Скрываем на мобильных устройствах */
    }
}