* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    overflow-x: hidden; /* Жесткий запрет на любой горизонтальный скролл всего сайта */
    width: 100%;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%; /* Картинки никогда не будут шире своего родительского блока */
    height: auto;
}

*,
*::before,
*::after {
    min-width: 0;
}

html {
    scrollbar-gutter: stable; /* Резервирует место под скроллбар заранее */
}

body {
    background-color: #ffffff; /* Чистый белый фон для контраста */
    color: #1a1a1a; /* Глубокий черный/угольный цвет для текста */
}

.container {
    width: min(1200px, 100% - 40px);
    margin-inline: auto;
}

p {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Шапка сайта */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    /* Темный полупрозрачный фон */
    background: rgba(18, 18, 18, 0.85); 
    /* Эффект размытия заднего плана (Glassmorphism) для гладкости */
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    /* Толстая оранжевая акцентная линия снизу из image_554828.png */
    border-bottom: 4px solid #e65c00; 
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Контейнер внутри шапки для правильного центрирования элементов */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Стили логотипа (текст или ссылка на главную) */
.logo {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

a.logo:hover {
    color: #ffffff;
    opacity: 0.9;
}

/* Структура навигационного меню */
nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0; /* Отступы управляются через внутренние отступы ссылок для точных разделителей */
}

/* Базовые стили для ссылок */
nav a {
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    padding: 10px 20px;
    display: inline-block;
    transition: color 0.3s ease;
}

/* Состояние активной ссылки (меняется только цвет текста, линию двигает скрипт) */
nav a.active {
    color: #007bff; 
}

/* Вертикальные разделительные линии из image_554828.png */
/* Добавляем тонкие белые полупрозрачные линии после "Услуги" и "Цены" */
nav a[data-target="services"],
nav a[href="prices.html"],
nav a[href="projects.html"],
nav a[href="reviews.html"] {
    border-right: 1px solid rgba(255, 255, 255, 0.4);
}

/* Логика плавающей синей полосы (для главной страницы index.html) */
.nav-underline {
    position: absolute;
    bottom: -4px; /* Лежит ровно поверх оранжевой границы */
    left: 0;
    height: 3px;
    background-color: #007bff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    z-index: 1001;
}

/* Этот класс мгновенно отключает плавность для страниц Цен и Проектов */
.nav-underline.static {
    position: absolute;
    bottom: -4px;              /* Опускает линию ровно на оранжевую плашку */
    left: 0;
    height: 3px;               /* Обязательно: толщина линии */
    background-color: #007bff; /* Обязательно: синий цвет */
    z-index: 1001;             /* Чтобы быть поверх бэкграунда шапки */
    display: block !important; /* На случай, если где-то выставлен display: none */
    transition: none !important; /* Отключение анимации */
}

/* Кнопка действия (CTA) в шапке — попадание в оранжевый цвет из image_554828.png */
.btn-header {
    background-color: #e65c00 !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 8px;
    font-weight: bold;
    margin-left: 20px;
    border-right: none !important; /* Убираем разделитель, если он случайно применился */
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

/* Эффект при наведении на кнопку */
.btn-header:hover {
    background-color: #ff6600 !important;
    transform: translateY(-1px);
}

/* Главный баннер (Hero) */
.hero {
    background: linear-gradient(135deg, #111111 0%, #222222 100%); /* Черно-графитовый градиент */
    color: #ffffff;
    padding: 120px 0;
    text-align: center;
    position: relative;
}

.hero h1 {
    font-size: 46px;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero p {
    font-size: 19px;
    margin-bottom: 40px;
    color: #cccccc;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Основные интерактивные кнопки */
.btn-cta, .btn-cta-large {
    display: inline-block;
    background-color: #e65c00; /* Насыщенный темно-оранжевый */
    color: #ffffff;
    text-decoration: none;
    padding: 16px 36px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 4px;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(230, 92, 0, 0.3);
}

.btn-cta:hover, .btn-cta-large:hover {
    transform: translateY(-2px);
    background-color: #ff6600; /* Яркий оранжевый всплеск при наведении */
    box-shadow: 0 6px 20px rgba(230, 92, 0, 0.5);
}

.btn-cta-large {
    background-color: #111111; /* Черная кнопка в нижнем блоке */
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-cta-large:hover {
    background-color: #222222;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Обновленная сетка: карточки будут выстраиваться по 3 в ряд, а остаток (4 и 5) встанет по центру */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Центрирует элементы в ряду, включая нижние */
    gap: 30px;
}

/* Стили самих карточек */
.card {
    background-color: #f9f9f9;
    padding: 40px 30px;
    border-radius: 4px;

    flex: 1 1 320px;

    max-width: 100%;

    transition: transform .3s, box-shadow .3s;

    border: 1px solid #eeeeee;
    border-bottom: 4px solid #111111;

    display: flex;
    flex-direction: column;

    text-align: left;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-bottom: 4px solid #e65c00;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 20px;
    color: #111111;
}

.card p {
    color: #555555;
    font-size: 15px;
    line-height: 1.6;
}

/* Блок призыва к действию (Нижний блок) */
.cta-block {
    background-color: #e65c00; /* Оранжевый фон всего блока */
    color: #ffffff;
    padding: 90px 0;
    text-align: center;
}

.cta-block h2 {
    font-size: 34px;
    margin-bottom: 20px;
    font-weight: 700;
}

.cta-block p {
    max-width: 650px;
    margin: 0 auto 40px auto;
    color: #ffffff;
    opacity: 0.9;
    font-size: 17px;
    line-height: 1.6;
}

/* Подвал (Footer) */
footer {
    background-color: #111111; /* Строгий черный подвал */
    color: #777777;
    padding: 35px 0;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #222222;
}

.footer-inner p {
    margin: 0 0 8px 0;
}

.footer-contacts a {
    color: #bbbbbb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contacts a:hover {
    color: #e65c00;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    width: 100%;
}

/* 1. ЗАГОЛОВОК VAPIBUILD (Стартовое скрытое состояние) */
.about-section .section-header h2 {
    font-size: 46px;           
    font-weight: 800;           
    color: #111111;             
    letter-spacing: -0.5px;     
    
    /* Элементы анимации: */
    opacity: 0;                  /* Изначально прозрачный */
    transform: translateY(30px); /* Смещен вниз на 30px */
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), 
                transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

/* Настраиваем оранжевую чёрточку под увеличенным заголовком */
.about-section .section-header h2::after {
    content: '';
    display: block;
    width: 80px;                
    height: 4px;                
    background-color: #e65c00;  
    margin: 18px auto 0 auto;   
}

/* Стили секции О Проекте */
.about-section {
    padding: 140px 0 80px 0;
    background-color: #ffffff;
}

.about-grid {
    display: flex;
    gap: 50px;
    align-items: center;
    margin-bottom: 50px;
}

/* 2. БЛОК ТЕКСТА (Стартовое скрытое состояние) */
.about-text {
    flex: 1;
    max-width: 850px;
    margin: 0 auto;
    
    /* Элементы анимации: */
    opacity: 0;                  /* Изначально прозрачный */
    transform: translateY(40px); /* Смещен вниз на 40px */
    /* Задержка 0.2s, чтобы текст выплывал чуть позже заголовка */
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1) 0.2s, 
                transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) 0.2s;
    will-change: opacity, transform;
}

/* Лид-абзац блока «О бюро» */
.about-text .about-lead {
    font-size: 18px;            
    line-height: 1.8;           
    font-weight: 400;           
    color: #333333;             
    max-width: 850px;           
    margin: 30px auto 0 auto;   
    text-align: center;         
}

.about-text .about-lead strong {
    font-weight: 700;           
    color: #111111;             
}

/* ========================================================
   АКТИВАЦИЯ АНИМАЦИИ (Когда JS добавляет класс .visible)
======================================================== */
.about-section.visible .section-header h2 {
    opacity: 1;
    transform: translateY(0); /* Возвращаем в исходную точку */
}

.about-section.visible .about-text {
    opacity: 1;
    transform: translateY(0); /* Возвращаем в исходную точку */
}

/* Блок с фактами / цифрами */
.facts-grid {
    display: flex;
    gap: 20px;
    margin-top: 100px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

/* Состояние, которое добавляет JS */
.facts-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

.fact-card {
    background-color: #f9f9f9;
    border: 1px solid #eeeeee;
    border-bottom: 4px solid #e65c00;
    padding: 25px 20px;
    text-align: center;
    flex: 1;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.fact-card:hover {
    transform: translateY(-3px);
}

.fact-card .number {
    font-size: 36px;
    font-weight: 700;
    color: #e65c00;
    margin-bottom: 5px;
}

.fact-card .label {
    font-size: 14px;
    color: #555555;
    font-weight: 600;
}

/* Стили секции Услуг (корректировка класса из index.html) */
.services-section {
    padding: 100px 0;
    background-color: #ffffff;
}

/* Секция Преимущества */
.advantages-section {
    padding: 100px 0;
    background-color: #fdfdfd;
    border-top: 1px solid #f0f0f0;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.adv-item {
    background: #ffffff;
    padding: 30px 25px;
    border-radius: 4px;
    border: 1px solid #eeeeee;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.adv-item .adv-icon {
    font-size: 32px;
    margin-bottom: 15px;
}

.adv-item h3 {
    font-size: 18px;
    color: #111111;
    margin-bottom: 12px;
    font-weight: 700;
}

.adv-item p {
    font-size: 14.5px;
    color: #666666;
    line-height: 1.6;
}

/* Секция Этапы работы (Таймлайн) */
.workflow-section {
    padding: 100px 0;
    background-color: #ffffff;
}

.timeline {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background-color: #eeeeee;
}

.timeline-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.step-number {
    min-width: 82px;
    height: 40px;
    background-color: #e65c00;
    color: #ffffff;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(230, 92, 0, 0.2);
}

.step-content {
    margin-left: 30px;
    padding-top: 5px;
}

.step-content h3 {
    font-size: 19px;
    color: #111111;
    margin-bottom: 8px;
}

.step-content p {
    font-size: 15px;
    color: #555555;
    line-height: 1.6;
}

/* Секция Часто задаваемые вопросы (FAQ) */
.faq-section {
    padding: 100px 0;
    background-color: #f9f9f9;
    border-top: 1px solid #eeeeee;
}

.faq-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

.faq-section-title {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 34px;
    color: #111111;
    margin: 0 0 20px 0;
}

.faq-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #e65c00;
    margin: 12px auto 0 auto;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #eef0f2;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.faq-item h3 {
    font-size: 16px;
    font-weight: 600;
    padding: 20px 35px;
    margin: 0;
    color: #111111;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.faq-item h3:hover {
    background-color: #fcfcfc;
}

.faq-item h3 span {
    color: #e65c00;
    font-size: 30px;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.faq-answer p {
    padding: 0 25px 20px 25px;
    color: #555555;
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
}

/* Логика открытия аккордеона через JS класс open */
.faq-item.open .faq-answer {
    max-height: 1000px;
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

.faq-item.open h3 span {
    transform: rotate(45deg);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}
.burger span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
}


/* Адаптив для экранов меньше 992px */
@media (max-width: 992px) {
    .burger { display: flex; }

    header {
        padding: 5px 0;
    }

    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        width: 95%;
    }
    
    nav {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(18, 18, 18, 0.95);
        padding: 10px 0;
        text-align: center;
        border-bottom: 4px solid #e65c00;
    }
    
    nav.active { display: flex; }
    
    nav a { 
        padding: 8px; 
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-underline { display: none !important; }
    
    .btn-header { margin: 10px auto; width: 80%; }
}

/* Уточнения только для узких экранов (без полного копипаста nav) */
@media (max-width: 768px) {
    header .container {
        padding: 0 15px;
    }

    nav {
        padding: 20px 0;
    }

    nav a {
        width: 100%;
        padding: 15px 0;
    }

    .facts-grid {
        flex-direction: column;
        gap: 15px;
    }
    .timeline::before {
        left: 25px;
    }
    .step-number {
        min-width: 50px;
        height: 35px;
        font-size: 14px;
    }
    .step-content {
        margin-left: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 92%;
    }
}