/* =========================================
   01. ПЕРЕМЕННЫЕ И БАЗОВЫЕ НАСТРОЙКИ (ТЕМА)
   ========================================= */
:root {
    --primary: #0ea5e9;       
    --primary-hover: #0284c7;
    --primary-light: #e0f2fe;
    --accent: #10b981;        
    --danger: #e11d48; /* Приглушенный красный */       
    --dark: #0f172a;
    --text-main: #334155;
    --text-light: #64748b;
    --bg-body: #f8fafc;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* === ПЕРЕМЕННЫЕ ДЛЯ ГЛАССМОРФИЗМА === */
    --glass-bg-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    --glass-bg-solid: rgba(255, 255, 255, 0.75); /* Для более плотных карточек */
    --glass-filter: blur(25px) saturate(160%);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    
    /* Нейтральные тени для базовых элементов */
    --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
    /* Цветные тени для акцентов (hover, active) */
    --shadow-hover: 0 25px 35px -5px rgba(14, 165, 233, 0.15), 0 15px 15px -5px rgba(14, 165, 233, 0.05);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.3);
    
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Переменные для кейсов */
    --viscous-duration: 1.2s; 
    --viscous-ease: cubic-bezier(0.19, 1.62, 0.2, 0.95); 
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-white: #1e293b;
    --text-main: #f8fafc;
    --text-light: #94a3b8;
    --border: #334155;
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Font Awesome (cdnjs) не задаёт font-display в своих @font-face, из-за чего
   иконки невидимы, пока шрифт не догрузится (PageSpeed: "Используемые шрифты").
   Мы не управляем CDN-стилем, но т.к. этот <link> в head раньше style.css,
   по спецификации побеждает последнее совпавшее правило — переобъявляем
   те же семейства/начертания с font-display: swap на тех же самых файлах. */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-regular-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.woff2') format('woff2');
}

html, body {
    scroll-behavior: smooth;
    overflow-x: hidden !important; 
    width: 100%;
    position: relative;
    overflow-anchor: none; /* Запрещаем браузеру цепляться за элементы и прыгать */
}

/* Доступний режим для користувачів, які просять зменшити рух. JS також
   вимикає AOS, паралакс, tilt і magnetic-ефекти в цьому режимі. */
@media (prefers-reduced-motion: reduce) {
    html, body { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; } /* box-sizing применяется ко всему */

body {
    font-family: 'Manrope', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.7; 
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.75rem; font-weight: 800; color: var(--dark); margin-bottom: 1rem; }
.section-header p { font-size: 1.1rem; color: var(--text-light); max-width: 600px; margin: 0 auto; }
section { padding: 50px 0; }

/* Умный Скролл-бар */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-hover); }

/* =========================================
   02. ГРУППИРОВКА ПОВТОРЯЮЩИХСЯ СТИЛЕЙ
   ========================================= */

/* Общие стили блоков страниц (Герой, Калькулятор, Гарантии) */
.hero, .calculator, .interactive-bg-section {
    position: relative;
    overflow: hidden;
    margin: 15px;
    width: 98%;
    z-index: 1;
    border-radius: 27px;
    align-items: center;
}

.calculator, .interactive-bg-section {
    padding: 40px 0;
    border: 1px solid rgb(155 155 155 / 30%);
    box-shadow: 0 4px 30px rgb(0 0 0 / 25%);
}

.step-indicator, .choice-card, .slider-group, .extra-box,
.counter-item, .summary-receipt, .contact-input-wizard, .bottom-bar {
    backdrop-filter: var(--glass-filter);
    -webkit-backdrop-filter: var(--glass-filter);
    border-radius: 20px;
}

/* Общая рамка для элементов калькулятора */
.choice-card, .slider-group, .extra-box, .counter-item,
.contact-input-wizard, .bottom-bar {
    border: 2px solid #8d8d8d42;
}

/* =========================================
   03. КНОПКИ
   ========================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(135deg, #0ea5e9b8, #0284c742); 
    color: #ffffff; padding: 16px 36px;
    border-radius: 50px; font-weight: 700; font-size: 1.1rem; border: none; cursor: pointer;
    transition: var(--transition); box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.5);
    position: relative; overflow: hidden;
}
.btn::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: auto-glow 6s infinite ease-in-out;
}
.btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 20px 25px -5px rgba(14, 165, 233, 0.4); }
.btn:active { transform: translateY(1px) scale(0.98); box-shadow: 0 5px 10px -5px rgba(14, 165, 233, 0.4); }

.btn-outline { background: transparent; border: 2px solid var(--bg-white); box-shadow: none; }
.btn-outline:hover { background: var(--bg-white); color: var(--dark); }

.magnetic-btn { transition: transform 0.1s linear, box-shadow 0.3s ease; }

/* =========================================
   04. НАВИГАЦИЯ (ШАПКА)
   ========================================= */
.navbar {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(46px);
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    padding: 15px 0;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    position: fixed;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 98%;
    margin-top: 15px;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px; /* Задает аккуратный отступ между кнопкой и переключателем языка */
}
.nav-container {
    position: relative; /* Добавляем это для абсолютного центрирования меню */
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px; /* Задаст минимальный зазор в 15px между всеми соседними элементами в набаре */
}
.logo { font-size: 1.75rem; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.logo i { animation: float 3s ease-in-out infinite; }
.logo-img { height: 35px; width: auto; object-fit: contain; }

.nav-menu { 
    display: flex; 
    gap: 32px; 
    font-weight: 600; 
    /* Новые свойства для строгого центрирования: */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.nav-menu a { color: var(--text-main); transition: var(--transition); position: relative; }
.nav-menu a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 0;
    background-color: var(--primary); transition: width 0.3s ease;
}
.nav-menu a:hover { color: var(--primary); }
.nav-menu a:hover::after { width: 100%; }
.nav-menu .nav-link-active { color: var(--primary); }
.nav-menu .nav-link-active::after { width: 100%; }

/* Адаптивная навигация (Заменена на кнопку звонка) */
.mobile-phone-btn { display: none; }
.mobile-menu-toggle { display: none; }
.mobile-only-btn { display: none; }

@media (max-width: 992px) {
    .navbar { width: 90%; }
    .desktop-btn { display: none; }
    
    /* Стили новой круглой кнопки с телефоном */
    .mobile-phone-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: linear-gradient(135deg, #0ea5e96e, #0284c7a1);
        color: #ffffff;
        border: none;
        border-radius: 50%;
        font-size: 1.15rem;
        cursor: pointer;
        z-index: 1001;
        box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        /* Легкая пульсация фона */
        animation: pulse-tag 2s infinite; 
    }
    
    /* Подхватываем кинематографичную анимацию звонка, которую мы делали ранее */
    .mobile-phone-btn i {
        display: inline-block;
        transform-origin: center center;
        animation: global-phone-ring 2.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
    }

    .mobile-phone-btn:active {
        transform: scale(0.92);
        box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border: 1px solid rgba(255, 255, 255, 0.55);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.45);
        color: var(--dark);
        font-size: 1.2rem;
        cursor: pointer;
        z-index: 1002;
    }
}

@media (max-width: 992px) {
    .mobile-toggle { display: block; }
    .navbar { width: 90%; }
    .desktop-btn { display: none; }
    .nav-menu {
        /* Открытие/закрытие анимируем через transform, а НЕ через right —
           в Safari/WebKit анимация right/left/top на position:fixed элементе
           с backdrop-filter даёт баг компоновки: элемент в закрытом состоянии
           мог оставаться кликабельным поверх шапки, перехватывая тапы по
           .mobile-menu-toggle (в Chrome та же связка рендерится нормально).
           transform — GPU-композитный и chromium/webkit-совместимый способ. */
        position: fixed; top: 90px; right: 14px; width: 280px;
        max-height: min(66vh, 480px);
        left: auto; /* <-- Добавить этот сброс */
        transform: translateX(120%);
        will-change: transform;
        visibility: hidden;
        pointer-events: none;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(32px) saturate(160%); -webkit-backdrop-filter: blur(32px) saturate(160%);
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 26px;
        flex-direction: column; justify-content: center; align-items: center; gap: 22px;
        padding: 28px 20px;
        overflow-y: auto;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, visibility 0.4s;
        opacity: 0;
        /* z-index выше, чем у .navbar (1000) — теперь #navMenu вне стек-контекста
           навбара (см. портал в script.js), поэтому сравнивается напрямую с ним. */
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18); z-index: 1050; display: flex;
    }
    .nav-menu.active {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
        opacity: 1;
    }
    .mobile-only-btn { display: inline-flex; margin-top: 20px; }
    body.menu-open { overflow: hidden; }
}

:where(a, button, input, textarea, select, [role="button"]):focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.75);
    outline-offset: 3px;
}

.service-mega-card { scroll-margin-top: 120px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================
   05. HERO СЕКЦИИ (ГЛАВНАЯ И УСЛУГИ)
   ========================================= */
.hero {
    display: flex; box-shadow: 0 4px 30px rgb(0 0 0 / 62%);
    height: calc(100svh - 20px);
    padding: 40px 0;
    background: #0f172a; /* запасний фон, якщо зображення не завантажилось */
    color: #ffffff;
    overflow: hidden;
    position: relative;
}
/* Рухомий шар фону (для ефекту паралаксу). Фон і градієнт тепер тут, тому паралакс реально працює. */
.hero-bg {
    position: absolute; top: -5%; left: -5%; width: 110%; height: 110%;
    z-index: 0;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.7) 45%, rgba(15, 23, 42, 0.2) 100%),
    url('../Photo/Hero.webp') center/cover;
}
.hero .container { position: relative; z-index: 1; }
.hero-content { max-width: 750px; width: 100%; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 24px; }
.hero h1 span { color: var(--primary); text-shadow: 0 0 30px rgba(14, 165, 233, 0.4); }
.hero p { font-size: clamp(1rem, 1.5vw, 1.25rem); margin-bottom: 40px; color: #e2e8f0; font-weight: 400; line-height: 1.6; }
.hero-actions { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 50px; }
.hero-badges { display: flex; gap: 20px; flex-wrap: wrap; }
.badge {
    background: rgba(255,255,255,0.05); padding: 10px 20px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.95rem; transition: var(--transition);
}
.badge:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }

@media (max-width: 600px) {
    .hero-actions .btn { width: 100%; }
}

/* Герой страницы Услуги */
.hero-services {
    height: 40svh; min-height: 350px; margin-bottom: 0;
    border-radius: 0 0 40px 40px;
}

/* =========================================
   06. АНИМИРОВАННЫЕ ФОНЫ И СОЕДИНИТЕЛИ
   ========================================= */
/* Динамический градиент (Сгустки) */
.ambient-gradient-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 0; pointer-events: none; background: #f8fafc; }
.glow-orbit { position: absolute; top: 50%; left: 50%; width: 1px; height: 1px; display: flex; align-items: center; justify-content: center; }
.orbit-1 { animation: orbit-rotate 10s linear infinite; }
.orbit-2 { animation: orbit-rotate 18s linear infinite reverse; }
.orbit-3 { animation: orbit-rotate 15s linear infinite; }

.ambient-glow { position: absolute; border-radius: 50%; opacity: 0.66; mix-blend-mode: multiply; animation: glow-expand 3s ease-in-out infinite alternate; will-change: scale, opacity; }
.glow-1 { width: 900px; height: 900px; background: radial-gradient(circle, var(--primary) 0%, transparent 65%); transform: translate3d(300px, -200px, 0); animation-delay: 0s; }
.glow-2 { width: 800px; height: 800px; background: radial-gradient(circle, var(--accent) 0%, transparent 65%); transform: translate3d(-350px, 250px, 0); animation-delay: -2s; }
.glow-3 { width: 700px; height: 700px; background: radial-gradient(circle, #38bdf8 0%, transparent 65%); transform: translate3d(200px, 350px, 0); animation-delay: -4s; opacity: 0.3; }

/* Живой переливающийся фон (Fluid Mesh) */
.light-ambient-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 0; pointer-events: none; background: linear-gradient(120deg, #ffffff, #f0f9ff, #f8fafc, #e0f2fe); background-size: 300% 300%; animation: bg-shimmer 15s ease-in-out infinite; }
.fluid-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.7; mix-blend-mode: multiply; animation: fluid-flow 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1); will-change: transform; }
.fluid-1 { width: 800px; height: 800px; background: rgba(14, 165, 233, 0.35); top: -20%; left: -10%; }
.fluid-2 { width: 700px; height: 700px; background: rgba(16, 185, 129, 0.3); bottom: -20%; right: -10%; animation-delay: -5s; animation-duration: 25s; }
.fluid-3 { width: 600px; height: 600px; background: rgba(139, 92, 246, 0.25); top: 40%; left: 30%; animation-delay: -10s; animation-duration: 18s; }
.interactive-glow { position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(14, 165, 233, 0.2) 30%, transparent 70%); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; transition: opacity 0.5s ease; opacity: 0; z-index: 1; mix-blend-mode: screen; will-change: left, top; }
.bg-grid-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background-image: linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px); 
    background-size: 40px 40px; z-index: 2; 
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent); 
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    pointer-events: none !important; /* <-- ИСПРАВЛЕНО: Теперь сетка полностью прозрачна для кликов мыши! */
}

/* aspect-ratio вместо фиксированной height: viewBox 1000x300 = 10/3, поэтому
   контейнер всегда сохраняет те же пропорции, что и path внутри SVG — раньше
   preserveAspectRatio="none" растягивал кривую по-разному на каждой ширине
   экрана (искажение усиливалось на мобильных, где height задавали вручную).
   min-height подстраховывает совсем узкие телефоны, чтобы линия не превращалась
   в еле заметную полоску — пропорция чуть жертвуется, зато связку видно. */
.wave-connector-container { width: 100%; max-width: 1240px; aspect-ratio: 1000 / 300; min-height: 110px; margin: 70px auto 30px; position: relative; z-index: 5; }
.wave-connector-container svg { width: 100%; height: 100%; overflow: visible; }

/* Тусклая базовая линия — «рельс», всегда видна целиком, с бегущим пунктиром
   для лёгкого фонового движения даже вне зоны видимости прогресс-линии. */
.wave-path-base { fill: none; stroke: url(#wave-grad-base); stroke-width: 3; stroke-dasharray: 10 12; stroke-linecap: round; animation: wave-flow 3s linear infinite; }
/* Яркая прогресс-линия поверх — «дорисовывается» по мере скролла (JS выставляет
   stroke-dasharray/-dashoffset в script.js), создавая ощущение прямой связи
   между действием пользователя и анимацией, а не просто зацикленный ролик. */
.wave-path-progress { fill: none; stroke: url(#wave-grad-progress); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(103, 232, 249, 0.55)); }
.wave-pulse { mix-blend-mode: screen; filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.7)); opacity: 0; transition: opacity 0.3s ease; }
.wave-arrow-vertical { filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.6)); animation: arrow-bounce-vertical 2.2s cubic-bezier(0.45, 0, 0.55, 1) infinite; transition: filter 0.4s ease; }
.wave-arrow-vertical.is-near { filter: drop-shadow(0 0 16px rgba(103, 232, 249, 0.9)); }

@media (max-width: 768px) {
    .wave-connector-container { margin-top: 60px; min-height: 90px; }
}

@media (prefers-reduced-motion: reduce) {
    .wave-path-base, .wave-arrow-vertical { animation: none; }
}

/* =========================================
   10. СЕКЦИИ: ЦЕНЫ И ГАРАНТИИ
   ========================================= */
.pricing { background: var(--bg-body); padding-bottom: 20px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.pricing-grid:has(.price-card:hover) .price-card:not(:hover) { opacity: 0.7; transform: scale(0.98); }
.price-card { background: var(--bg-white); border-radius: var(--radius-lg); padding: 50px 40px; border: 1px solid var(--border); transition: var(--transition); position: relative; overflow: hidden; box-shadow: var(--shadow-card); z-index: 1; }
.price-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--border); transition: var(--transition); }
.price-card:hover { transform: translateY(-15px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.price-card:hover::before { background: var(--primary); }
.popular-tag { position: absolute; top: 25px; right: -40px; background: linear-gradient(135deg, var(--accent), #059669); color: white; padding: 8px 45px; transform: rotate(45deg); font-size: 0.85rem; font-weight: 800; letter-spacing: 1px; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); animation: pulse-tag 2s infinite; }
.price-card h3 { font-size: 1.75rem; color: var(--dark); margin-bottom: 15px; }
.price-card .price { font-size: 3rem; font-weight: 800; color: var(--primary); margin-bottom: 30px; line-height: 1; }
.price-card .price span { font-size: 1.1rem; color: var(--text-light); font-weight: 500; }
.price-list li { margin-bottom: 18px; display: flex; align-items: flex-start; gap: 12px; font-weight: 500; }
.price-list li i { color: var(--accent); margin-top: 6px; font-size: 1.1rem; background: rgba(16, 185, 129, 0.1); padding: 4px; border-radius: 50%; }

/* Гарантии */
.guarantees-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.guarantee-card { background: var(--glass-bg-solid); backdrop-filter: var(--glass-filter); -webkit-backdrop-filter: var(--glass-filter); padding: 40px 30px; border-radius: var(--radius-lg); text-align: center; border: 1px solid rgba(255, 255, 255, 0.8); transition: var(--transition); position: relative; overflow: hidden; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05); z-index: 3; }
.guarantee-card::before { content: ''; position: absolute; top: -50px; left: 50%; transform: translateX(-50%) scale(0.5); width: 200px; height: 200px; border-radius: 50%; filter: blur(50px); opacity: 0; z-index: -1; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease; }
.guarantee-card:hover { transform: translateY(-10px); border-color: #ffffff; box-shadow: 0 20px 40px -10px rgba(14, 165, 233, 0.15); }
.guarantee-card:hover::before { opacity: 0.15; transform: translateX(-50%) scale(1.2); }
.guarantee-icon { width: 75px; height: 75px; margin: 0 auto 25px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #94a3b8; background: #ffffff; border-radius: 22px; transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.guarantee-card:hover .guarantee-icon { transform: translateY(-10px) scale(1.1); background: var(--bg-white); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); }
.card-shield::before { background: var(--primary); } .card-shield:hover .guarantee-icon { color: var(--primary); }
.card-eco::before { background: var(--accent); } .card-eco:hover .guarantee-icon { color: var(--accent); }
.card-wallet::before { background: #f59e0b; } .card-wallet:hover .guarantee-icon { color: #f59e0b; }
.card-user::before { background: #8b5cf6; } .card-user:hover .guarantee-icon { color: #8b5cf6; }
.guarantee-card h4 { font-size: 1.25rem; color: var(--dark); margin-bottom: 15px; font-weight: 800; transition: var(--transition); }
.guarantee-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }
.guarantee-card:hover h4 { color: var(--primary); }

/* =========================================
   11. СЕКЦИИ: FAQ И УСЛУГИ (КАРТОЧКИ)
   ========================================= */
.faq { padding: 80px 0; overflow: hidden; }
.faq-layout { display: grid; grid-template-columns: 300px 1fr; gap: 50px; align-items: start; }
.faq-sidebar { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 120px; }
.faq-tab { background: transparent; border: 1px solid var(--border); padding: 16px 20px; border-radius: var(--radius-md); font-family: inherit; font-size: 1.05rem; font-weight: 700; color: var(--text-light); text-align: left; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 12px; }
.faq-tab i { font-size: 1.2rem; transition: var(--transition); }
.faq-tab:hover { background: var(--bg-body); color: var(--dark); border-color: #cbd5e1; }
.faq-tab.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: var(--shadow-glow); transform: translateX(10px); }
.faq-content-area { position: relative; }
.faq-pane { display: none; animation: fade-in-up 0.4s ease-out forwards; }
.faq-pane.active { display: flex; flex-direction: column; gap: 15px; }
.faq-item { background: var(--bg-body); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: var(--transition); }
.faq-item:hover { border-color: var(--primary-light); box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.faq-item.active { border-color: var(--primary); background: var(--bg-white); box-shadow: var(--shadow-hover); }
.faq-question { padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; gap: 20px; }
.faq-question h4 { font-size: 1.1rem; color: var(--dark); font-weight: 700; margin: 0; line-height: 1.4; transition: var(--transition); }
.faq-item.active .faq-question h4 { color: var(--primary); }
.faq-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-white); display: flex; align-items: center; justify-content: center; color: var(--text-light); flex-shrink: 0; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s, color 0.3s; }
.faq-item:hover .faq-icon { background: var(--primary-light); color: var(--primary); }
.faq-item.active .faq-icon { transform: rotate(180deg); background: var(--primary); color: white; }
.faq-answer-wrapper { max-height: 0; overflow: hidden; transition: max-height 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.faq-item.active .faq-answer-wrapper { max-height: 600px; }
.faq-answer p { padding: 0 25px 25px; color: var(--text-light); font-size: 1.05rem; line-height: 1.6; margin: 0; opacity: 0; transition: opacity 0.4s ease; }
.faq-item.active .faq-answer p { opacity: 1; transition-delay: 0.1s; }

/* Услуги (Карточки) */
.srv-card { display: flex; align-items: center; gap: 40px; background: var(--glass-bg-solid); backdrop-filter: var(--glass-filter); -webkit-backdrop-filter: var(--glass-filter); -webkit-backdrop-filter: blur(25px) saturate(150%); border: 1px solid rgba(255, 255, 255, 0.8); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 40px; box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05); transition: var(--transition); position: relative; z-index: 5; }
.srv-card.reverse { flex-direction: row-reverse; }
.srv-card:hover { box-shadow: 0 20px 40px -10px rgba(14, 165, 233, 0.15); border-color: #ffffff; transform: translateY(-5px); }
.srv-img-box { flex: 0 0 45%; aspect-ratio: 4/3; border-radius: calc(var(--radius-lg) - 10px); overflow: hidden; position: relative; box-shadow: var(--shadow-md); }
.srv-img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.srv-card:hover .srv-img-box img { transform: scale(1.08); }
.srv-badge { position: absolute; top: 20px; left: 20px; background: var(--accent); color: white; padding: 8px 16px; border-radius: 30px; font-weight: 700; font-size: 0.85rem; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transform: translateY(-10px); opacity: 0; transition: all 0.4s ease; }
.srv-card:hover .srv-badge { transform: translateY(0); opacity: 1; }
.srv-info { flex: 1; padding: 20px; }
.srv-info h3 { font-size: 2.2rem; color: var(--dark); margin-bottom: 15px; font-weight: 800; }
.srv-desc { font-size: 1.1rem; color: var(--text-light); margin-bottom: 25px; line-height: 1.6; }
.srv-list { margin-bottom: 35px; }
.srv-list li { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 15px; font-weight: 600; color: var(--text-main); transition: var(--transition); padding: 10px; border-radius: var(--radius-sm); }
.srv-list li i { color: var(--primary); margin-top: 4px; font-size: 1.1rem; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.srv-list li:hover { background: rgba(255,255,255,0.8); transform: translateX(10px); box-shadow: 0 4px 10px rgba(0,0,0,0.03); color: var(--primary); }
.srv-list li:hover i { transform: scale(1.3) rotate(10deg); }
.srv-action { display: flex; align-items: center; gap: 30px; padding-top: 20px; border-top: 1px solid rgba(0,0,0,0.05); }
.srv-price { font-size: 1.5rem; font-weight: 800; color: var(--dark); }

@media (max-width: 992px) {
    .srv-card, .srv-card.reverse { flex-direction: column; padding: 15px; gap: 20px; }
    .srv-img-box { width: 100%; flex: auto; }
    .srv-info { padding: 10px; }
    .srv-info h3 { font-size: 1.8rem; }
    .srv-action { flex-direction: column; align-items: flex-start; gap: 15px; }
    .srv-action .btn { width: 100%; }
}

/* =========================================
   12. СЕКЦИИ: ГАЛЕРЕЯ, МОДАЛЬНОЕ ОКНО И КЕЙСЫ
   ========================================= */
.gallery { background: var(--bg-body); }
/* Бенто-раскладка: первая карточка — крупный «герой», 2-я и 3-я — стопкой
   справа. Подпись всегда видна (градиент-подложка), плюс нумерованный бейдж
   и город — читается с одного взгляда. Наклон карточки (.tilt-card) задаёт
   script.js по mousemove, поэтому здесь transform на :hover не трогаем. */
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 200px; gap: 20px; perspective: 1400px; }
.gallery-item {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-card); cursor: pointer;
    transition: box-shadow 0.5s var(--viscous-ease), transform 0.5s var(--viscous-ease);
    will-change: transform;
}
.gallery-item:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
.gallery-item:nth-child(2) { grid-column: 2; grid-row: 1; }
.gallery-item:nth-child(3) { grid-column: 2; grid-row: 2; }
.gallery-item:hover, .gallery-item:active { box-shadow: 0 25px 55px rgba(14, 165, 233, 0.22); }
.gallery-item::before {
    content: ''; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 40%, rgba(15, 23, 42, 0.85) 100%);
    pointer-events: none;
}
/* Тонкое свечение по контуру при наведении — премиальный акцент без лишнего веса */
.gallery-item::after {
    content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit;
    box-shadow: inset 0 0 0 2px rgba(103, 232, 249, 0); pointer-events: none;
    transition: box-shadow 0.5s var(--viscous-ease);
}
.gallery-item:hover::after, .gallery-item:active::after { box-shadow: inset 0 0 0 2px rgba(103, 232, 249, 0.65); }

.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease; opacity: 0; }
.gallery-item img.loaded { opacity: 1; }
.gallery-item:hover img, .gallery-item:active img { transform: scale(1.1); }

.gallery-badge {
    position: absolute; z-index: 2; top: 16px; left: 16px;
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px;
    color: #fff; font-size: 0.78rem; font-weight: 800;
    background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.gallery-open {
    position: absolute; z-index: 2; top: 16px; right: 16px;
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px;
    color: #fff; background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0; transform: translateY(-6px);
    transition: all 0.5s var(--viscous-ease);
}
.gallery-item:hover .gallery-open, .gallery-item:active .gallery-open { opacity: 1; transform: translateY(0); }

.gallery-content { position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 18px; transition: transform 0.5s var(--viscous-ease); }
.gallery-item:hover .gallery-content, .gallery-item:active .gallery-content { transform: translateY(-3px); }
.gallery-eyebrow { display: block; margin-bottom: 4px; color: #a5f3fc; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.gallery-label { color: #fff; font-weight: 800; font-size: 1.08rem; letter-spacing: -0.01em; }

.gallery-view-all { display: flex; justify-content: center; margin-top: 34px; }
.gallery-view-all-link { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border: 2px solid var(--border); border-radius: 50px; color: var(--dark); font-weight: 800; font-size: 0.98rem; transition: var(--transition); }
.gallery-view-all-link i { transition: transform 0.3s ease; }
.gallery-view-all-link:hover { border-color: var(--primary); color: var(--primary-hover); background: var(--primary-light); }
.gallery-view-all-link:hover i { transform: translateX(4px); }

@media (max-width: 860px) {
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 16px; }
    .gallery-item, .gallery-item:nth-child(1), .gallery-item:nth-child(2), .gallery-item:nth-child(3) { grid-column: 1; grid-row: auto; aspect-ratio: 4 / 3; }
    /* На тачскрине ховера нет — иконка и бейдж видны всегда, наклон (mousemove) сам не сработает */
    .gallery-open { opacity: 1; transform: translateY(0); width: 36px; height: 36px; }
    .gallery-badge { width: 30px; height: 30px; font-size: 0.72rem; }
}
@media (max-width: 420px) {
    .gallery-eyebrow { font-size: 0.68rem; }
    .gallery-label { font-size: 0.98rem; }
    .gallery-content { left: 15px; right: 15px; bottom: 14px; }
}

/* Pop-up окно кейсов */
.case-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(0px); -webkit-backdrop-filter: blur(0px); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; padding: 20px; perspective: 2000px; transition: opacity var(--viscous-duration) ease, visibility var(--viscous-duration) ease, backdrop-filter 1.5s ease; }
.case-modal.active { opacity: 1; visibility: visible; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.case-modal-content { background: var(--bg-white); width: 100%; max-width: 1000px; border-radius: var(--radius-lg); overflow: hidden; position: relative; box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.6); transform: translateY(150px) scale(0.6) rotateX(-25deg); opacity: 0; transform-origin: bottom center; transition: transform var(--viscous-duration) var(--viscous-ease), opacity var(--viscous-duration) ease; will-change: transform, opacity; }
.case-modal.active .case-modal-content { transform: translateY(0) scale(1) rotateX(0deg); opacity: 1; }
.case-modal-close { position: absolute; top: 15px; right: 15px; z-index: 10; width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--bg-body); color: var(--text-main); font-size: 1.2rem; cursor: pointer; transition: 0.5s var(--viscous-ease); }
.case-modal-close:hover { background: var(--danger); color: white; transform: rotate(180deg) scale(1.1); }
.case-layout { display: grid; grid-template-columns: 1.2fr 1fr; }
.case-gallery { background: #f8fafc; padding: 25px; border-right: 1px solid var(--border); }
.case-main-img-box { width: 100%; aspect-ratio: 16/10; border-radius: var(--radius-md); overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow-md); }
.case-main-img-box img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s ease; }
.case-thumbnails { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.case-thumbnails::-webkit-scrollbar { height: 6px; }
.case-thumbnails::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 3px; }
.case-thumb { width: 90px; height: 70px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; border: 3px solid transparent; transition: 0.4s var(--viscous-ease); opacity: 0.6; flex-shrink: 0; }
.case-thumb img { width: 100%; height: 100%; object-fit: cover; }
.case-thumb:hover { opacity: 0.9; }
.case-thumb.active { border-color: var(--primary); opacity: 1; transform: translateY(-3px) scale(1.03); }
.case-info { padding: 50px 40px; display: flex; flex-direction: column; }
.case-info h3 { font-size: 2.2rem; color: var(--dark); margin-bottom: 12px; font-weight: 800; line-height: 1.1; }
.case-meta { color: var(--primary); font-weight: 700; font-size: 1.1rem; margin-bottom: 25px; display: flex; align-items: center; gap: 8px; }
.case-divider { width: 50px; height: 5px; background: var(--accent); margin-bottom: 25px; border-radius: 2.5px; }
.case-info p { color: var(--text-light); font-size: 1.1rem; line-height: 1.8; font-weight: 500; flex-grow: 1; }
.case-order-btn { width: 100%; margin-top: 40px; text-align: center; justify-content: center; }

@media (max-width: 768px) {
    .case-layout { grid-template-columns: 1fr; }
    .case-gallery { border-right: none; border-bottom: 1px solid var(--border); padding: 15px; }
    .case-main-img-box { aspect-ratio: 16/9; margin-bottom: 15px; }
    .case-thumbnails { gap: 10px; }
    .case-thumb { width: 70px; height: 55px; }
    .case-info { padding: 30px 20px; }
    .case-info h3 { font-size: 1.8rem; }
}

/* =========================================
   13. СЕКЦИИ: КОМАНДА, КОНТАКТЫ И ФУТЕР
   ========================================= */
/* Команда */
.team { background: var(--bg-white); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; }
.team-card { text-align: center; padding: 40px 30px; border: 1px solid var(--border); border-radius: var(--radius-lg); transition: var(--transition); background: var(--bg-white); box-shadow: var(--shadow-card); }
.team-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-10px); border-color: var(--primary-light); }
.team-photo { width: 140px; height: 140px; border-radius: 50%; margin: 0 auto 25px; background: var(--border); overflow: hidden; border: 4px solid var(--primary-light); transition: var(--transition); }
.team-card:hover .team-photo { border-color: var(--primary); transform: scale(1.05); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card h4 { font-size: 1.4rem; color: var(--dark); font-weight: 800; margin-bottom: 5px; }
.team-card p { color: var(--text-light); font-weight: 600; font-size: 1rem; margin-bottom: 15px; }
.stars { color: #f59e0b; font-size: 1.1rem; background: #fffbeb; padding: 6px 12px; border-radius: 20px; display: inline-block; font-weight: 700; }

/* Контакты */
.contact { background: linear-gradient(135deg, var(--dark), #1e293b); background-color: var(--dark); color: var(--bg-white); position: relative; overflow: hidden; }
.contact::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjEiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiLz48L3N2Zz4='); }
.contact .section-header h2 { color: var(--bg-white); }
.contact-form-main { max-width: 650px; margin: 0 auto; background: rgba(255,255,255,0.03); padding: 50px; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.05); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); position: relative; z-index: 1; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.contact-input-main { width: 100%; padding: 18px 20px; margin-bottom: 25px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-md); color: white; font-family: inherit; font-size: 1.1rem; outline: none; transition: var(--transition); }
.contact-input-main::placeholder { color: #94a3b8; }
.contact-input-main:focus { border-color: var(--primary); background: rgba(255,255,255,0.1); box-shadow: 0 0 15px rgba(14, 165, 233, 0.3), inset 0 2px 4px rgba(0,0,0,0.1); transform: translateY(-2px); }

/* Подвал */
footer { background: #020617; color: #94a3b8; padding: 80px 0 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 50px; margin-bottom: 50px; }
.footer-title { color: white; font-size: 1.3rem; margin-bottom: 25px; font-weight: 800;}
.footer-links li { margin-bottom: 15px; }
.footer-links a { transition: var(--transition); display: inline-block; }
.footer-links a:hover { color: var(--primary); transform: translateX(5px); }
.copyright { text-align: center; padding-top: 30px; border-top: 1px solid #1e293b; font-size: 0.9rem; }

/* =========================================
   FAB: МЕНЮ МЕССЕНДЖЕРОВ
   ========================================= */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fab {
    width: 65px;
    height: 65px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.4s ease;
    animation: pulse-fab 2s infinite;
    position: relative;
    z-index: 2;
}

.fab i {
    transition: transform 0.4s ease;
}

/* Состояние, когда меню открыто */
.fab-container.active .fab {
    animation: none;
    background: var(--danger); /* Краснеет */
    box-shadow: 0 5px 15px rgba(225, 29, 72, 0.4);
}

.fab-container.active .fab i {
    /* Меняем иконку диалога на импровизированный крестик через поворот */
    transform: rotate(135deg) scale(1.2);
    content: "\f00d"; /* Иконка крестика FontAwesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.fab-menu {
    position: absolute;
    bottom: 80px; /* Выше главной кнопки */
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.fab-container.active .fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.fab-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab-item:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* Фирменные цвета мессенджеров */
.fab-telegram { background: #229ED9; }
.fab-viber { background: #7360F2; }
.fab-whatsapp { background: #25D366; }
.fab-phone { background: var(--primary); }

@media (max-width: 768px) {
    .fab-container {
        right: 15px;
        bottom: 15px;
    }
}

/* =========================================
   15. ДОПОЛНИТЕЛЬНАЯ АДАПТАЦИЯ ДЛЯ СМАРТФОНОВ
   ========================================= */
@media (max-width: 768px) {
    /* 1. Глобальные отступы и типографика */
    section { 60px 0 !important; }
    .section-header { margin-bottom: 2.5rem; }
    .section-header h2 { font-size: 2rem; margin-bottom: 0.5rem; }
    .container { padding: 0 16px; }

    /* 2. Решаем проблему 98% + margin (чтобы блоки не распирали экран) */
    .hero, .calculator, .interactive-bg-section {
        width: calc(100% - 20px) !important;
        margin: 10px auto !important;
    }

    /* 3. Жестко фиксируем Navbar, чтобы он не уплывал вправо */
    .navbar {
        width: calc(100% - 20px) !important;
        left: 10px !important;
        transform: none !important;
        margin-top: 10px;
    }

    /* 4. Защита текста от вылезания в нижней панели калькулятора */
    .stats-display { gap: 5px !important; }
    .stat-item { min-width: 0; flex-shrink: 1; border-left: none !important; padding-left: 0 !important;}
    .stat-value { font-size: 1.1rem !important; }
    .stat-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .nav-buttons .btn { padding: 12px 10px; font-size: 0.95rem; }

    /* 5. Исправляем возможный вылет полей в форме обратной связи */
    .contact-form-wizard, .contact-form-main { max-width: 100%; overflow: hidden; box-sizing: border-box; }

    /* 6. Секция FAQ: горизонтальный свайп-бар */
    .faq-layout { grid-template-columns: 1fr; gap: 20px; }
    .faq-sidebar {
        position: relative; top: 0; flex-direction: row; overflow-x: auto;
        padding-bottom: 10px; -ms-overflow-style: none; scrollbar-width: none;
    }
    .faq-sidebar::-webkit-scrollbar { display: none; }
    .faq-tab { white-space: nowrap; flex-shrink: 0; padding: 12px 16px; font-size: 0.95rem; }

    /* 7. Калькулятор: улучшаем карточки и счетчики */
    .choice-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
    .choice-card { padding: 20px 10px; }
    .choice-card i { font-size: 1.5rem; }
    .counter-grid, .extras-grid { grid-template-columns: 1fr; }
    .counter-item { padding: 12px 15px; }

    /* 8. Тарифы и Гарантии */
    .price-card { padding: 40px 25px; }
    .popular-tag { right: -50px; font-size: 0.75rem; padding: 6px 40px; }
    .guarantee-card { padding: 30px 20px; }
    .tilt-card { transform: none !important; }

    /* 9. Подвал и Контакты */
    .contact-form-main { padding: 35px 20px; }
    .footer-grid { gap: 30px; text-align: center; }
    .footer-grid > div { display: flex; flex-direction: column; align-items: center; }
    .footer-links a { display: block; padding: 5px 0; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    
    .progress-container { padding: 0 5px; }
    .step-indicator { width: 36px; height: 36px; font-size: 0.9rem; }
    .step-indicator.active { transform: scale(1.1); }
    .progress-line, .progress-line-fill { left: 15px; right: 15px; }

    .summary-receipt { padding: 25px 15px; }
    .receipt-line { font-size: 0.9rem; }
    .receipt-line.total { font-size: 1.2rem; }
    .receipt-line.total span.price { font-size: 1.5rem; }
}

/* =========================================
   СТИЛИ ДЛЯ РУЧНОГО ВВОДА (INPUT NUMBER)
   ========================================= */
.slider-input-wrapper {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.slider-num-input {
    width: 75px;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 4px 10px rgba(14,165,233,0.2);
    background: transparent;
    border: none;
    border-bottom: 2px dashed transparent;
    outline: none;
    font-family: inherit;
    padding: 0;
    transition: var(--transition);
}

.slider-num-input:focus {
    border-bottom: 2px dashed var(--primary); /* Подчеркивание при вводе */
}

/* Убираем стандартные стрелочки у input type="number" во всех браузерах */
.slider-num-input::-webkit-outer-spin-button,
.slider-num-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.slider-num-input[type=number] {
    -moz-appearance: textfield;
}

/* =======================================================
   ОБНОВЛЕННАЯ КНОПКА ЗАКАЗА С ПУЛЬСИРУЮЩИМ СИЯНИЕМ
   ======================================================= */
.btn-order {
    position: fixed;
    bottom: 35px;
    right: 130px;
    border-radius: 50px;
    border: none;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    animation: global-btn-pulse 2s infinite;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(135deg, #0ea5e9b8, #0284c742);
    color: #ffffff;
    padding: 16px 36px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(46px);
}

/* Эффект при наведении мыши (приостанавливает агрессивный пульс и делает кнопку статично ярче) */
.btn-order:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.6);
    animation-play-state: paused; /* Пауза анимации при ховере для удобства клика */
}

.btn-order i {
    display: inline-block; /* Обязательно, чтобы корректно работали наклоны и масштабирование */
    transform-origin: center center;
    /* Запускаем детальный цикл звонка каждые 2.5 секунды */
    animation: global-phone-ring 2.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
}

/* =======================================================
   ДЕТАЛЬНАЯ КИНЕМАТОГРАФИЧНАЯ АНИМАЦИЯ ТЕЛЕФОННОГО ЗВОНКА
   ======================================================= */
@keyframes global-phone-ring {
    /* 0% - 35%: Фаза активного вибрирующего звонка */
    0%, 35% { transform: rotate(0) scale(1); filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
    3% { transform: rotate(-18deg) scale(1.25); filter: drop-shadow(0 0 8px rgba(255,255,255,0.6)); }
    6% { transform: rotate(16deg) scale(1.25); }
    9% { transform: rotate(-16deg) scale(1.25); }
    12% { transform: rotate(14deg) scale(1.25); }
    15% { transform: rotate(-14deg) scale(1.25); }
    18% { transform: rotate(12deg) scale(1.25); }
    21% { transform: rotate(-12deg) scale(1.25); }
    24% { transform: rotate(10deg) scale(1.2); }
    27% { transform: rotate(-10deg) scale(1.2); }
    30% { transform: rotate(5deg) scale(1.1); }
    33% { transform: rotate(-5deg) scale(1.1); }
    
    /* 36% - 100%: Тягучая естественная пауза ("ожидание гудка") с эффектом мягкого покачивания */
    36% { transform: rotate(0) scale(1); filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
    50% { transform: translateY(-3px) scale(1.05); } /* Трубка слегка приподнимается */
    65% { transform: translateY(0) scale(1); }
    100% { transform: rotate(0) scale(1); }
}
.btn-order-text {
    display: inline;
}

/* КИНЕМАТОГРАФИЧНЫЙ ПУЛЬС: Создает расширяющуюся световую волну вокруг кнопки */
@keyframes global-btn-pulse {
    0% {
        box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4), 
                    0 0 0 0 rgba(14, 165, 233, 0.5);
    }
    70% {
        box-shadow: 0 15px 30px rgba(14, 165, 233, 0.5), 
                    0 0 0 18px rgba(14, 165, 233, 0); /* Волна увеличивается и полностью тает */
    }
    100% {
        box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4), 
                    0 0 0 0 rgba(14, 165, 233, 0);
    }
}

/* Адаптация под смартфоны */
@media (max-width: 768px) {
    .btn-order {
        right: 30px;
        bottom: 110px; /* Ровно НАД кнопкой Whatsapp */
        width: 65px;
        height: 65px;
        border-radius: 50%; /* На мобилке превращается в идеальный пульсирующий круг */
        padding: 0;
        justify-content: center;
        font-size: 1.4rem;
    }
    
    .btn-order-text {
        display: none; /* Скрываем текст на смартфонах */
    }

    /* Умный сдвиг вверх, когда на смартфоне всплывает нижняя панель калькулятора */
    body:has(.bottom-bar.show) .fab {
        transform: translateY(-130px); /* Поднимаем еще выше */
        z-index: 10000 !important; /* Принудительно вытаскиваем поверх панели */
    }
    body:has(.bottom-bar.show) .btn-order {
        transform: translateY(-130px); /* Поднимаем еще выше */
        z-index: 10000 !important; /* Принудительно вытаскиваем поверх панели */
    }
    body:has(.bottom-bar.show) .btn-order:hover {
        transform: translateY(-133px) scale(1.03);
        z-index: 10000 !important;
    }
}

/* =======================================================
   ПЕРЕКЛЮЧАТЕЛЬ ЯЗЫКОВ (LANG SWITCHER)
   ======================================================= */
.lang-switcher {
    position: relative;
    margin-left: 0; /* <-- Убираем лишний отступ */
    z-index: 1005;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--dark);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.6);
}

.lang-current img, .lang-option img {
    width: 22px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.lang-current i {
    font-size: 0.75rem;
    color: var(--text-light);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-switcher.active .lang-current i {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 130%;
    right: 0; /* ИСПРАВЛЕНО: выравниваем по правому краю, чтобы меню не уходило за экран */
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.1);
    border: 1px solid var(--border);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 160px;
}

.lang-switcher.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: background 0.2s, color 0.2s;
}

.lang-option:hover, .lang-option.selected {
    background: var(--primary-light);
    color: var(--primary);
}

/* Адаптивность для мобильных */
@media (max-width: 992px) {
    .lang-switcher {
        margin-right: 15px;
        margin-left: auto; /* Прижимаем к кнопке телефона на мобильных */
    }
    .lang-current span { display: none; } /* Скрываем текст UK/EN на смартфонах */
    .lang-current { padding: 8px 10px; }
    .lang-dropdown { left: auto; right: 0; } 
}

/* =======================================================
   СТИЛІ ДЛЯ ЮРИДИЧНОГО ТЕКСТУ (ОФЕРТА)
   ======================================================= */
.legal-text-container {
    max-height: 40vh; /* Займає не більше 40% висоти екрану */
    overflow-y: auto;
    padding-right: 15px;
    margin: 20px 0 25px 0;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
    padding-top: 15px;
    padding-bottom: 15px;
}

.legal-text-container h4 {
    margin: 15px 0 5px;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.05rem;
}

.legal-text-container h4:first-child {
    margin-top: 0;
}

.legal-text-container p {
    margin-bottom: 10px;
    color: var(--text-light);
}

/* Кастомний скроллбар спеціально для тексту договору */
.legal-text-container::-webkit-scrollbar {
    width: 6px;
}
.legal-text-container::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-radius: 4px;
}
.legal-text-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

/* =======================================================
   ВИЗУАЛЬНАЯ ПОДСКАЗКА ДЛЯ ГАЛЕРЕИ НА МОБИЛЬНЫХ (TAP TO VIEW)
   ======================================================= */
@media (max-width: 768px) {
    /* На тачскрине ховера нет — иконка расширения видна всегда, с мягкой
       пульсацией как подсказка «натисни, щоб переглянути». */
    .gallery-item::after {
        opacity: 1 !important;
        transform: translateY(0) !important;
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
        animation: pulse-gallery-icon 2s infinite ease-in-out;
        background: rgba(14, 165, 233, 0.85);
    }

    .gallery-label { font-size: 0.92rem; bottom: 14px; left: 16px; right: 16px; }
}

/* Анимация пульсации белым свечением для иконки галереи */
@keyframes pulse-gallery-icon {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* =========================================
   UX: более конверсионный первый экран
   ========================================= */
.hero-proof-line {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: -20px 0 32px;
}

.hero-proof-line div {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #f8fafc;
    font-weight: 700;
    font-size: 0.95rem;
}

.hero-proof-line i {
    color: var(--accent);
}

@media (max-width: 600px) {
    .hero-proof-line {
        flex-direction: column;
        margin-top: -10px;
    }

    .hero-proof-line div {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   UX: группировка типов уборки на шаге 3
   ========================================= */
.cleaning-group {
    margin-bottom: 34px;
}

.cleaning-group:last-child {
    margin-bottom: 0;
}

.cleaning-group-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-hover);
    font-weight: 800;
    font-size: 0.95rem;
}

.cleaning-group-title i {
    color: var(--primary);
}

/* Прямоугольные компактные плитки формата прибирання (шаг 3):
   иконка слева, заголовок + описание — в два ряда справа.
   CSS Grid с явным размещением, разметку карточек не трогаем. */
.cleaning-choice-grid .choice-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 1px;
    align-items: center;
    text-align: left;
    padding: 12px 16px;
}

.cleaning-choice-grid .choice-card > i,
.cleaning-choice-grid .choice-card > .moving-box-wrapper,
.cleaning-choice-grid .choice-card > .clinking-glasses,
.cleaning-choice-grid .choice-card > .dripping-drops,
.cleaning-choice-grid .choice-card > .special-heart-wrapper {
    grid-column: 1;
    grid-row: 1 / 3;
    justify-self: center;
    margin-bottom: 0;
}

.cleaning-choice-grid .choice-card > i {
    font-size: 1.7rem;
}

.cleaning-choice-grid .choice-card h4 {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.cleaning-choice-grid .choice-card p {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.76rem;
}

@media (max-width: 600px) {
    .cleaning-group-title {
        width: 100%;
        justify-content: center;
    }
    .cleaning-choice-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* =========================================
   UX: финальная форма и доверие
   ========================================= */
.field-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-wrap.full {
    grid-column: 1 / -1;
}

.field-wrap textarea.contact-input-wizard {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.field-error {
    min-height: 18px;
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 700;
    padding-left: 6px;
}

.offer-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
}

.offer-check input {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.offer-check button {
    border: none;
    background: transparent;
    color: var(--primary);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.offer-error {
    display: block;
    margin-top: 4px;
}

/* =========================================
   FIX: стрелка категорий на шаге 4 без Font Awesome
   ========================================= */
.extra-category-title {
    cursor: pointer;
}

.category-chevron {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
    font-family: Arial, sans-serif !important;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;

    transition: transform 0.3s ease, background 0.3s ease;
}

.extra-category.active-category .category-chevron {
    transform: rotate(180deg);
    background: rgba(14, 165, 233, 0.18);
}

/* =========================================
   UX: зоны обслуживания
   ========================================= */
.service-area {
    position: relative;
    overflow: hidden;
}

.section-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-hover);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.service-area-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 24px;
}

.service-area-card {
    display: flex;
    gap: 20px;
    padding: 30px;
    border: 1px solid rgba(14, 165, 233, 0.14);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-card);
}

.service-area-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.2);
    font-size: 1.25rem;
}

.service-area-card h3 {
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 1.25rem;
}

.service-area-card p {
    color: var(--text-light);
    line-height: 1.65;
}

.area-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 12px;
}

.area-chips span {
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-hover);
    font-weight: 800;
}

.service-area-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    color: var(--text-main);
    font-weight: 700;
}

.service-area-cta i,
.service-area-cta a { color: var(--primary); }
.service-area-cta a { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

/* =========================================
   UX: поля, ошибки и сообщения форм
   ========================================= */
.form-label {
    display: block;
    margin: 0 0 7px 4px;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 800;
}

select.contact-input-wizard { appearance: auto; cursor: pointer; }
.contact-input-wizard.field-invalid,
.contact-input-main.field-invalid {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1) !important;
}

.form-status {
    display: none;
    width: 100%;
    margin-top: 14px;
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 0.92rem;
    font-weight: 750;
    line-height: 1.45;
}

.form-status.is-visible { display: flex; align-items: flex-start; gap: 9px; }
.form-status.is-error { color: #9f1239; background: #fff1f2; border: 1px solid #fecdd3; }
.form-status.is-success { color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; }
.form-status-dark.is-error { color: #fecdd3; background: rgba(225, 29, 72, 0.16); border-color: rgba(251, 113, 133, 0.35); }
.form-status-dark.is-success { color: #a7f3d0; background: rgba(16, 185, 129, 0.16); border-color: rgba(52, 211, 153, 0.35); }

.contact-field { width: 100%; }
.contact-field .contact-input-main { margin-bottom: 5px; }
.contact-field .field-error { display: block; margin-bottom: 12px; color: #fda4af; }
.modal-schedule-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.mobile-menu-contact { display: none; }

/* =========================================
   UX: переработанный мобильный первый экран и шапка
   ========================================= */
@media (max-width: 992px) {
    .mobile-phone-btn { display: none !important; }
    .nav-right { gap: 8px; }
    .nav-menu { width: min(300px, calc(100% - 24px)); }
    .mobile-menu-contact {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        color: var(--primary) !important;
        font-weight: 800;
    }
}

@media (max-width: 600px) {
    .navbar { border-radius: 22px; }
    .navbar .nav-container { gap: 8px; }
    .navbar .logo-img { height: 32px; max-width: 118px; }
    .lang-current { padding: 10px 11px; }
    .mobile-menu-toggle { border-radius: 13px; }

    body .hero:not(.hero-services) {
        /* На мобильном не привязываем высоту к vh/svh-юнитам — в Safari iOS
           комбинация flex + min-height в svh даёт баг с неверным расчётом
           высоты, из-за которого нижняя кнопка обрезалась overflow:hidden.
           Высота теперь целиком определяется контентом — обрезать нечего. */
        height: auto !important;
        min-height: 0;
        padding: 112px 0 38px !important;
        align-items: stretch;
    }

    body .hero:not(.hero-services) .container {
        display: flex;
        align-items: center;
    }

    body .hero:not(.hero-services) .hero-content {
        margin: 0 !important;
        padding: 0;
    }

    body .hero:not(.hero-services) h1 {
        margin-bottom: 18px;
        font-size: clamp(2rem, 10vw, 2.35rem);
        line-height: 1.12;
    }

    body .hero:not(.hero-services) p {
        margin-bottom: 26px;
        line-height: 1.55;
    }

    body .hero:not(.hero-services) .hero-proof-line {
        gap: 8px;
        margin: 0 0 24px;
    }

    body .hero:not(.hero-services) .hero-proof-line div {
        padding: 9px 14px;
        font-size: 0.88rem;
    }

    body .hero:not(.hero-services) .hero-actions {
        gap: 11px;
        margin: 0;
    }

    body .hero:not(.hero-services) .hero-actions .btn {
        min-height: 52px;
        padding: 14px 18px;
    }

    .service-area-grid { grid-template-columns: 1fr; gap: 14px; }
    .service-area-card { gap: 14px; padding: 20px; }
    .service-area-icon { width: 46px; height: 46px; flex-basis: 46px; border-radius: 14px; }
    .service-area-card h3 { font-size: 1.1rem; }
    .service-area-card p { font-size: 0.92rem; }
    .service-area-cta { align-items: flex-start; flex-wrap: wrap; text-align: center; }
    .modal-schedule-grid { grid-template-columns: 1fr; }

    .fab-container {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(18px) scale(0.9);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    }
    .fab-container.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }
    body:has(.bottom-bar.show) .fab-container,
    body:has(.case-modal.active) .fab-container,
    body.menu-open .fab-container {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

@media (max-width: 420px) {
    .lang-current span { display: none; }
    .lang-current { min-width: 44px; justify-content: center; gap: 6px; }
}

@media (max-width: 350px) {
    body .hero:not(.hero-services) {
        min-height: auto;
        padding-top: 104px !important;
        padding-bottom: 28px !important;
    }
    body .hero:not(.hero-services) h1 { font-size: 1.9rem; }
    body .hero:not(.hero-services) p { font-size: 0.94rem; }
    body .hero:not(.hero-services) .hero-actions .btn { font-size: 0.92rem; }
}

/* =========================================
   UI refresh: логотип, компактный checkout и popup-окна
   ========================================= */
.navbar .logo-img {
    width: auto;
    height: 44px;
    max-width: 156px;
    object-fit: contain;
}

.footer-grid .logo-img {
    width: auto;
    height: 50px;
    max-width: 180px;
}

#step-5 .step-title {
    margin-bottom: 20px;
    font-size: 1.55rem;
}

.checkout-compact-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.35fr);
    align-items: start;
    gap: 20px;
}

.checkout-compact-grid .summary-receipt {
    padding: 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
}

.checkout-compact-grid .summary-receipt::before,
.checkout-compact-grid .summary-receipt::after {
    width: 20px;
    height: 20px;
    top: -10px;
}

.checkout-compact-grid .summary-receipt::before { left: -10px; }
.checkout-compact-grid .summary-receipt::after { right: -10px; }

.checkout-compact-grid .receipt-line {
    gap: 12px;
    margin-bottom: 9px;
    font-size: 0.92rem;
    line-height: 1.35;
}

.checkout-compact-grid .receipt-line.total {
    margin-top: 16px;
    padding-top: 16px;
    font-size: 1.05rem;
}

.checkout-compact-grid .receipt-line.total span.price {
    font-size: 1.45rem;
}

.checkout-compact-grid .contact-form-wizard {
    margin-top: 0;
    gap: 11px 12px;
}

#step-5 .contact-input-wizard {
    padding: 12px 14px;
    font-size: 0.94rem;
    border-radius: 13px;
}

#step-5 textarea.contact-input-wizard {
    min-height: 68px;
    resize: vertical;
}

#step-5 .form-label {
    margin-bottom: 4px;
    font-size: 0.78rem;
}

#step-5 .field-error { font-size: 0.76rem; }
#step-5 .offer-check { margin-top: 14px; }
#step-5 .form-status { margin-top: 8px; }

/* Исправление закрытия формы заказа: кнопка не должна перекрывать первое поле. */
#orderModal .case-modal-content {
    position: relative;
}

#orderModal .case-modal-close {
    top: 12px;
    right: 12px;
    z-index: 20;
    background: #ffffff;
    color: var(--dark);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}

/* =========================================================
   КОНСТРУКТОР: визуальные улучшения (2026)
   ========================================================= */

/* ---- 1. Плавное поочерёдное появление контента шага ---- */
@keyframes wizItemIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
.step-card.active-step > .step-title,
.step-card.active-step > .service-search,
.step-card.active-step .choice-card,
.step-card.active-step > .cleaning-group,
.step-card.active-step > .slider-row,
.step-card.active-step > .slider-group,
.step-card.active-step > p,
.step-card.active-step > .extra-category,
.step-card.active-step > .checkout-lead,
.step-card.active-step .checkout-col,
.step-card.active-step > .trust-badges {
    animation: wizItemIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
/* Лесенка задержек */
.step-card.active-step > .step-title { animation-delay: 0.02s; }
.step-card.active-step > .service-search { animation-delay: 0.08s; }
.step-card.active-step > .checkout-lead { animation-delay: 0.08s; }
/* choice-card (шаги 1, 3) — по порядку внутри своей сетки */
.step-card.active-step .choice-card:nth-child(1) { animation-delay: 0.10s; }
.step-card.active-step .choice-card:nth-child(2) { animation-delay: 0.16s; }
.step-card.active-step .choice-card:nth-child(3) { animation-delay: 0.22s; }
.step-card.active-step .choice-card:nth-child(4) { animation-delay: 0.28s; }
.step-card.active-step .choice-card:nth-child(5) { animation-delay: 0.34s; }
.step-card.active-step .choice-card:nth-child(6) { animation-delay: 0.40s; }
/* группы шага 3 (title = 1-й ребёнок, группы — 2-й и 3-й) */
.step-card.active-step > .cleaning-group:nth-child(2) { animation-delay: 0.10s; }
.step-card.active-step > .cleaning-group:nth-child(3) { animation-delay: 0.18s; }
/* колонки чекаута (шаг 5) */
.step-card.active-step .checkout-col:nth-child(1) { animation-delay: 0.12s; }
.step-card.active-step .checkout-col:nth-child(2) { animation-delay: 0.18s; }
.step-card.active-step > .trust-badges { animation-delay: 0.28s; }
/* категории шага 4: перед ними стоят title + поиск + пустое-сообщение,
   поэтому первая категория — это 4-й ребёнок */
.step-card.active-step > .extra-category:nth-child(4)  { animation-delay: 0.12s; }
.step-card.active-step > .extra-category:nth-child(5)  { animation-delay: 0.17s; }
.step-card.active-step > .extra-category:nth-child(6)  { animation-delay: 0.22s; }
.step-card.active-step > .extra-category:nth-child(7)  { animation-delay: 0.27s; }
.step-card.active-step > .extra-category:nth-child(8)  { animation-delay: 0.32s; }
.step-card.active-step > .extra-category:nth-child(9)  { animation-delay: 0.37s; }
.step-card.active-step > .extra-category:nth-child(10) { animation-delay: 0.42s; }

/* ---- 2. Подписи под шагами в прогресс-баре ---- */
.step-caption {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    transition: color 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.step-indicator.active .step-caption { color: var(--primary); font-weight: 700; }
.step-indicator.completed .step-caption { color: var(--primary); }
@media (max-width: 600px) {
    .step-caption { font-size: 0.62rem; top: calc(100% + 5px); }
}
@media (max-width: 420px) {
    /* Показываем подпись только у активного шага, чтобы не наезжали друг на друга */
    .step-caption { opacity: 0; }
    .step-indicator.active .step-caption { opacity: 1; }
}

/* ---- 3. Поиск/фильтр услуг (шаг 4) ---- */
.service-search {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 auto 18px;
    max-width: 520px;
}
.service-search-icon {
    position: absolute;
    left: 16px;
    color: var(--primary);
    font-size: 0.95rem;
    pointer-events: none;
}
.service-search-input {
    width: 100%;
    padding: 13px 42px 13px 42px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--dark);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.service-search-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}
.service-search-clear {
    position: absolute;
    right: 10px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.18);
    color: var(--text-main);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.service-search-clear:hover { background: rgba(14, 165, 233, 0.18); transform: scale(1.08); }
.service-search-empty {
    margin: 4px auto 14px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.92rem;
    font-weight: 500;
}
/* ---- 4. Явное состояние выбранных counter-item / toggle-box ---- */
#step-4 .counter-item.has-count,
#step-4 .extra-box.selected {
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.08);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.16);
}
#step-4 .counter-item.has-count .counter-icon,
#step-4 .extra-box.selected i {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #06b6d4);
}
#step-4 .counter-item.has-count .counter-icon i { color: #fff; }
#step-4 .counter-item.has-count .counter-value {
    color: var(--primary);
    font-weight: 800;
}
/* маленькая «галочка» на выбранном тогле */
#step-4 .extra-box { position: relative; }
#step-4 .extra-box.selected::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.72rem;
    color: var(--primary);
}

/* ---- Уважение к prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
    .step-card.active-step > .step-title,
    .step-card.active-step > .service-search,
    .step-card.active-step .choice-card,
    .step-card.active-step > .cleaning-group,
    .step-card.active-step > .slider-row,
    .step-card.active-step > .slider-group,
    .step-card.active-step > p,
    .step-card.active-step > .extra-category,
    .step-card.active-step > .checkout-lead,
    .step-card.active-step .checkout-col,
    .step-card.active-step > .trust-badges { animation: none; }
    .cat-count-badge.show { animation: none; }
    #barTotal { transition: none; }
}

/* ---- Тонкий noise/grain-оверлей: убирает «плоскость» градиентов ---- */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) { body::after { opacity: 0.025; } }

/* ---- Конфетти-канвас при успешной заявке ---- */
.confetti-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10050;
    pointer-events: none;
}

/* ---- Cookie-банер ---- */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%) translateY(20px);
    z-index: 10040;
    width: min(94vw, 720px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 16px 20px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}
.cookie-banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 300px;
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
}
.cookie-banner-text i { color: var(--primary); font-size: 1.3rem; flex-shrink: 0; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
    padding: 10px 18px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.cookie-btn-decline { border: 1px solid rgba(148, 163, 184, 0.4); background: transparent; color: var(--text-main); }
.cookie-btn-decline:hover { background: rgba(148, 163, 184, 0.12); }
.cookie-btn-accept { border: none; background: linear-gradient(135deg, var(--primary), #0284c7); color: #fff; box-shadow: 0 8px 18px rgba(14, 165, 233, 0.3); }
.cookie-btn-accept:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(14, 165, 233, 0.4); }
@media (max-width: 560px) {
    .cookie-banner { bottom: 12px; }
    .cookie-banner-inner { padding: 14px 16px; }
    .cookie-banner-actions { width: 100%; }
    .cookie-btn { flex: 1; }
}

/* ---- Honeypot (ловушка для ботов): полностью скрыт от людей ---- */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* =========================================================
   Адаптивный контраст текста верхнего меню (стеклянный навбар):
   тёмный фон под меню -> белый текст, светлый фон -> тёмный.
   JS выставляет класс .nav-on-dark / .nav-on-light на .navbar.
   Только для десктопа: на мобиле меню — отдельная панель-оверлей.
   ========================================================= */
@media (min-width: 993px) {
    .navbar .nav-menu > a:not(.btn),
    .navbar .lang-current > span { transition: color .35s ease; }

    .navbar.nav-on-dark .nav-menu > a:not(.btn),
    .navbar.nav-on-dark .lang-current > span { color: #ffffff !important; }

    .navbar.nav-on-light .nav-menu > a:not(.btn),
    .navbar.nav-on-light .lang-current > span { color: #0f172a !important; }

    /* активный пункт всегда акцентный, в обоих режимах */
    .navbar.nav-on-dark .nav-menu > a.nav-link-active,
    .navbar.nav-on-light .nav-menu > a.nav-link-active { color: var(--primary) !important; }
}

/* =========================================================
   МОБИЛЬНЫЕ МОДАЛЬНЫЕ ОКНА: высота viewport и клавиатура
   ========================================================= */
@media (max-width: 768px) {
    .case-modal {
        box-sizing: border-box;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        padding: max(8px, env(safe-area-inset-top))
                 max(8px, env(safe-area-inset-right))
                 max(8px, env(safe-area-inset-bottom))
                 max(8px, env(safe-area-inset-left));
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .case-modal-content {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
        margin: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scroll-padding-top: 58px;
    }

    .order-modal-content,
    .legal-modal-content,
    .case-gallery-modal-content,
    .order-modal-layout,
    .order-modal-form,
    .order-modal-form .field-wrap {
        min-width: 0;
    }

    .order-modal-form input,
    .order-modal-form select,
    .order-modal-form textarea {
        box-sizing: border-box;
        max-width: 100%;
        min-width: 0;
    }

    .cookie-banner {
        bottom: max(12px, env(safe-area-inset-bottom));
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
}

/* Маленькая высота экрана: оставляем место для клавиатуры и адресной строки. */
@media (max-width: 768px) and (max-height: 600px) {
    .case-modal {
        align-items: flex-start;
    }

    .case-modal-content {
        max-height: calc(100vh - 8px);
        max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 8px);
    }

    .order-modal-intro {
        padding: 15px 16px 12px;
    }

    .order-modal-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 7px;
        border-radius: 11px;
    }

    .order-modal-intro h3 {
        margin-bottom: 6px;
        font-size: 1.22rem;
    }

    .order-modal-intro p {
        margin-bottom: 8px;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .order-modal-benefits {
        display: none;
    }

    .order-modal-form {
        gap: 8px;
        padding: 13px 14px 15px;
    }

    .order-modal-form .contact-input-wizard {
        padding: 10px 12px;
    }

    .order-modal-form textarea {
        min-height: 54px;
    }

    .legal-modal-content {
        padding: 14px 12px 12px;
    }

    .legal-modal-content .legal-text-container {
        max-height: 38dvh;
        margin: 9px 0;
    }
}

/* ==========================================================================
   АКЦІЯ: знижка на перше замовлення (відео-блок після першого екрана)
   ========================================================================== */
.offer-promo {
    position: relative;
    padding: 90px 0;
    overflow: hidden;
}

.offer-promo-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 56px;
    align-items: center;
}

/* h2 отримує великий кегль лише всередині .section-header,
   тому для заголовка акції задаємо розмір явно. */
.offer-promo-title {
    margin: 0 0 18px;
    color: var(--dark);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.1;
}

.offer-promo-text > p {
    max-width: 52ch;
    margin: 0 0 26px;
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.65;
}

.offer-promo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.offer-promo-list li {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text-main);
    font-weight: 600;
}

.offer-promo-list i {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent);
    font-size: 0.7rem;
}

.offer-promo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* .btn-outline розрахована на тёмный герой: біла рамка + білий текст.
   На світлому фоні акції вона зливається з фоном, тому перефарбовуємо. */
.offer-promo .btn-outline {
    border-color: var(--primary);
    color: var(--primary-hover);
}

.offer-promo .btn-outline:hover {
    background: var(--primary);
    color: var(--bg-white);
}

/* --- Відео у вертикальній рамці --- */
.offer-promo-media {
    display: flex;
    justify-content: center;
}

.offer-promo-frame {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--dark);
    box-shadow: var(--shadow-card);
}

.offer-promo-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    .offer-promo { padding: 70px 0; }
    .offer-promo-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .offer-promo-title { font-size: 2rem; }
    .offer-promo-text { text-align: center; }
    .offer-promo-text > p { margin-inline: auto; }
    .offer-promo-list,
    .offer-promo-actions { justify-content: center; }
    .offer-promo-frame { max-width: 280px; }
}

@media (max-width: 480px) {
    .offer-promo-actions .btn { width: 100%; justify-content: center; }
}
