/* 1. БАЗОВЫЕ НАСТРОЙКИ */
:root {
    --dark: #1e1e1e;
    --accent: #e30613;
    --white: #ffffff;
    --gray: #f4f4f4;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. ШАПКА (HEADER) */
header {
    background: var(--white);
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo img {
    height: 100px;
    width: auto;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.1));
}

.logo-text {
    font-size: 46px;
    font-weight: 800;
    color: var(--dark);
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: -1px;
}

.logo-first-letter {
    color: var(--accent);
}

@media (max-width: 480px) {
    .logo img { height: 60px; }
    .logo-text { font-size: 32px; }
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
}

.btn-call {
    text-decoration: none;
    color: var(--dark);
    border: 2px solid var(--dark);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-call:hover {
    background: var(--dark);
    color: var(--white);
}

/* 3. ГЛАВНЫЙ ЭКРАН (HERO) */
.hero {
    height: 85vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
                url('img/Vorota_GlavEcran.png') no-repeat center/cover;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero h1 {
    font-size: clamp(22px, 4.2vw, 52px); /* Масштабируемый размер */
    line-height: 1.1;
    margin-bottom: 30px;
    font-weight: 800;
    text-transform: uppercase;
}

.accent {
    color: var(--accent);
    display: inline; /* Убираем block, чтобы не было лишних переносов */
}

/* На мобильных телефонах (вертикальных) текст может быть слишком длинным для одной строки, 
   поэтому немного уменьшим шрифт для них */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 20px; 
    }
}

.hero-content {
    max-width: 900px;
}

.hero-btns { display: flex; gap: 20px; margin-top: 35px; }

.btn-main {
    background: var(--accent);
    color: var(--white);
    padding: 16px 35px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 5px;
    display: inline-block;
}

.btn-secondary {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 14px 35px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
}

/* 4. СЕКЦИИ ОБЩЕЕ */
section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title hr { width: 60px; height: 4px; background: var(--accent); border: none; margin: 10px auto; }
.section-title p { color: #666; font-size: 18px; }

/* 5. БЛОК ПРЕИМУЩЕСТВА (БЕЗ ЭМОДЗИ + УВЕЛИЧЕННЫЙ ТЕКСТ) */
.benefits {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)),
                url('img/AHAHAH.png') no-repeat center/cover;
    color: var(--white);
    position: relative;
    padding: 100px 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
    z-index: 10;
}

.benefit-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 40px 20px; /* Увеличено для баланса без иконок */
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s, background 0.3s;
    color: var(--white);
}

.benefit-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
}

.benefit-item h3 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1.6rem; /* Увеличенный заголовок */
    font-weight: 700;
}

.benefit-item p {
    font-size: 16px; /* Увеличенный текст описания */
    margin: 0;
    line-height: 1.5;
}

.benefits .section-title h2 { color: var(--white); }
.benefits .section-title p { color: rgba(255,255,255,0.8); font-size: 18px; }

@media (max-width: 1024px) {
    .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .benefits-grid { grid-template-columns: 1fr; }
}

/* 6. ПРОДУКЦИЯ */


/* 6. ПРОДУКЦИЯ */
.products {
    background-color: var(--gray);
    padding: 80px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.product-img img { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
}

.product-info { 
    padding: 25px; 
    flex-grow: 1;
}

/* Адаптивность для сетки продукции */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2х2 на средних экранах */
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr; /* 1 колонка на мобильных */
    }
}

/* 7. ПРОИЗВОДСТВО */
.production { 
    background: var(--white); 
    padding: 80px 0;
}

.production-flex { 
    display: flex; 
    align-items: center; 
    justify-content: center; /* Центрируем контент */
    gap: 80px; /* Увеличиваем расстояние между видео и текстом */
    margin-bottom: 100px; 
}

/* ФИКСИРУЕМ РАЗМЕР ВИДЕО */
.production-video-container {
    flex: 0 0 450px; /* Видео всегда будет 450px в ширину */
    max-width: 100%; /* Но не шире экрана на мобилках */
    border-radius: 15px;
    overflow: hidden;
    line-height: 0;
    box-shadow: 15px 15px 0 var(--accent);
}

.production-video-container video { 
    width: 100%; 
    height: 300px; /* Фиксируем высоту для аккуратности */
    object-fit: cover; /* Обрезает края, чтобы видео не искажалось */
    display: block;
}

/* Чередование */
.production-flex.reverse { flex-direction: row-reverse; }

/* Зеркальная тень для второго видео */
.production-flex.reverse .production-video-container {
    box-shadow: -15px 15px 0 var(--accent);
}

.production-content { 
    flex: 1; 
    max-width: 500px; /* Ограничиваем ширину текста, чтобы он не растягивался */
}

/* Адаптив для мобилок */
@media (max-width: 992px) {
    .production-flex, .production-flex.reverse { 
        flex-direction: column; 
        gap: 40px;
    }
    .production-video-container {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px; /* На мобилках чуть меньше */
        box-shadow: 10px 10px 0 var(--accent) !important;
    }
    .production-video-container video {
        height: 250px;
    }
}
/* 8. КОНТАКТЫ */
.feedback { background: var(--dark); color: var(--white); text-align: center; }
.contact-details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin: 50px 0; }
.contact-item a { color: var(--white); text-decoration: none; font-size: 20px; font-weight: 700; display: block; }
.contact-item strong { display: block; color: var(--accent); margin-bottom: 5px; }

/* 9. АНИМАЦИИ ПРИ СКРОЛЛЕ */
/* 9. АНИМАЦИИ ПРИ СКРОЛЛЕ */
.reveal {
    position: relative;
    opacity: 0;
    transition: all 0.8s ease-out; /* Чуть ускорил для отзывчивости */
    will-change: transform, opacity;
}

/* Направления вылета */
.fade-bottom { transform: translateY(40px); }
.fade-left { transform: translateX(-50px); } /* Уменьшил до 50px для стабильности */
.fade-right { transform: translateX(50px); }

/* Активное состояние */
.reveal.active {
    opacity: 1;
    transform: translate(0, 0) !important;
}

/* Адаптив для анимаций: на маленьких экранах лучше все заменить на fade-bottom */
@media (max-width: 768px) {
    .fade-left, .fade-right {
        transform: translateY(30px); /* Чтобы блоки не вылетали сбоку на телефонах */
        transition-delay: 0s !important;
    }
}
/* 10. АДАПТИВНОСТЬ */
@media (max-width: 992px) {
    .production-flex { flex-direction: column; text-align: center; }
    .header-flex { flex-direction: column; gap: 20px; }
}

@media (max-width: 600px) {
    /* 1. Делаем шапку максимально компактной по высоте */
    header {
        padding: 5px 0;
    }

    .header-flex {
        gap: 10px; /* Уменьшаем зазор между лого, меню и кнопкой */
    }

    /* 2. Навигация: строго в одну строку без переносов */
    nav ul {
        display: flex;
        flex-direction: row; /* Только в ряд */
        flex-wrap: nowrap;   /* Запрещаем перенос на вторую строку */
        gap: 8px;           /* Минимальное расстояние между пунктами */
        justify-content: center;
        padding: 0;
    }

    /* 3. Уменьшаем текст, чтобы он влез в ширину экрана */
    nav a {
        font-size: 11px;    /* Уменьшенный шрифт для мобилок */
        white-space: nowrap; /* Магическое свойство: запрещает разрыв "О компании" */
        letter-spacing: -0.3px; /* Немного сужаем буквы для экономии места */
    }

    /* 4. Уменьшаем кнопку "Заказать звонок", чтобы она не вытесняла меню */
    .btn-call {
        padding: 5px 12px;
        font-size: 11px;
    }

    /* 5. Дополнительно уменьшаем логотип, если всё равно тесно */
    .logo img {
        height: 40px !important;
    }
    .logo-text {
        font-size: 22px !important;
    }
}

/* СТИЛИ ДЛЯ БЛОКА "КАК ЭТО РАБОТАЕТ" */
.how-it-works {
    background-color: var(--white);
    padding: 100px 0;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 20px;
}

.steps-line {
    position: absolute;
    top: 35px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 10px;
}

.step-number {
    width: 30px;
    height: 30px;
    background: var(--dark);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 25px;
    border: 4px solid var(--white);
    box-shadow: 0 0 0 2px var(--gray); /* Чтобы кружок не сливался с фоном */
}

.step-content p {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--dark);
    margin: 0;
}

/* --- АДАПТИВ ДЛЯ МОБИЛОК (2х2) --- */
@media (max-width: 768px) {
    .steps-container {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Две колонки */
        gap: 40px 10px;                /* Отступы между шагами */
        padding-top: 20px;
    }

    .steps-line {
        display: none; /* Скрываем линию, она не подходит для сетки */
    }

    .step-item {
        padding: 0;
    }

    .step-number {
        margin-bottom: 15px;
        width: 40px;  /* Чуть увеличим для удобства нажатия пальцем */
        height: 40px;
        font-size: 16px;
    }

    .step-content p {
        font-size: 13px;
        max-width: 140px; /* Чтобы текст не разъезжался слишком широко */
        margin: 0 auto;
    }
}

/* СТИЛИ БЛОКА "КОМУ ПОДХОДИТ" */
.target-audience {
    background-color: var(--gray);
    padding: 80px 0;
}

.audience-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin-top: 40px;
}

.audience-item {
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.audience-img img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 15px;
}

.audience-info h3 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 20px;
}

.check-list-audience {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.check-list-audience li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    font-size: 15px;
    color: #444;
}

.check-list-audience li::before {
    content: "●";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 18px;
}

.audience-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent);
}

/* ЛИНИЯ ПРОГРЕССА В ШАПКЕ */
#scroll-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--accent);
    z-index: 1001;
    transition: width 0.1s ease-out;
}

/* О КОМПАНИИ ТЕКСТ */
.about-text p {
    font-size: 22px;
    line-height: 1.7;
    color: #1a1a1a;
    margin-bottom: 25px;
    text-align: center;
}

.about-text p strong {
    color: var(--accent);
}

@media (max-width: 768px) {
    .about-text p { font-size: 18px; }
}
/* 11. СТИЛИ БЛОКА "КОМУ ПОДХОДИТ" */
.target-audience {
    background-color: var(--gray);
    padding: 80px 0;
}

.audience-grid {
    display: flex;
    flex-direction: column;
    gap: 40px; /* Отступ между карточками */
    margin-top: 40px;
}

.audience-item {
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* ЭТОТ КЛАСС ОТВЕЧАЕТ ЗА ЧЕРЕДОВАНИЕ */
.audience-item.reverse {
    flex-direction: row-reverse;
}

.audience-img {
    flex: 1; /* Ровно половина ширины */
}

.audience-img img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    display: block;
}

.audience-info {
    flex: 1; /* Ровно половина ширины */
}

.audience-info h3 {
    font-size: 32px;
    color: var(--dark);
    margin-bottom: 20px;
    font-weight: 800;
}

/* Адаптив: на мобилках всегда Фото сверху, Текст снизу */
@media (max-width: 992px) {
    .audience-item, .audience-item.reverse {
        flex-direction: column; 
        padding: 20px;
        gap: 25px;
    }
    
    .audience-img img {
        height: 250px;
    }
}

/* Подчеркивание для заголовков h3 в блоке преимуществ */
.benefit-item h3 {
    position: relative;
    display: inline-block; /* Чтобы линия была по ширине текста, а не всего блока */
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.benefit-item h3::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%); /* Центрируем линию */
    width: 50px; /* Ширина линии */
    height: 3px; /* Толщина линии */
    background-color: var(--accent); /* Ваш красный цвет */
}

/* На всякий случай убедимся, что span в h2 подхватывает цвет */
.benefits h2 .logo-first-letter {
    color: var(--accent);
}