:root {
    --primary: #FFB800;
    --dark: #1A1A1A;
    --gray: #F4F4F4;
    --text: #333;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--text); line-height: 1.6; }

.container, .karkas, .about { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
/* Базовые исправления */
.header { padding: 15px 0; border-bottom: 1px solid #eee; position: relative; background: #fff; z-index: 1000; }
.header-content { display: flex; justify-content: space-between; align-items: center; gap: 20px; }

/* Логотип теперь резиновый */
.logo { max-width: 300px; height: auto; }
.logo img { width: 100%; height: auto; display: block; }

/* Скрываем кнопку бургера на ПК */
.menu-toggle { display: none; font-size: 24px; background: none; border: none; color: var(--primary); cursor: pointer; }

/* Навигация для ПК */
.nav a { margin-left: 20px; text-decoration: none; color: var(--text); font-size: 18px; transition: 0.3s; }
.nav a.active { color: var(--primary); border-bottom: 2px solid var(--primary); }

/* Контакты */
.phone { font-weight: bold; font-size: 22px; white-space: nowrap; }
.phone i { color: var(--primary); margin-right: 5px; }

/* --- МОБИЛЬНАЯ ВЕРСИЯ (Меньше 992px) --- */
@media (max-width: 992px) {
    .menu-toggle { display: block; order: 1; } /* Показываем бургер */
    .logo { max-width: 180px; order: 2; }       /* Логотип по центру или с краю */
    .header-contacts { order: 3; }             /* Контакты в конце */
    
    .phone { font-size: 16px; }                /* Уменьшаем телефон */
    .phone span { display: none; }             /* Если обернуть текст в span, можно скрыть цифры, оставив иконку */

    /* Прячем навигацию и делаем её выпадающей */
    .nav {
        display: none; /* Скрыто по умолчанию */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 20px 0;
        border-top: 1px solid #eee;
    }

    .nav.active { display: flex; } /* Показываем при клике */

    .nav a {
        margin: 10px 20px;
        font-size: 20px;
        padding: 10px 0;
        border-bottom: 1px solid #f9f9f9;
    }
}

/* Совсем мелкие экраны (Телефоны) */
@media (max-width: 480px) {
    .header-content { gap: 10px; }
    .logo { max-width: 140px; }
    .phone { font-size: 14px; }
}

/* Hero Section */
.hero { 
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("images/main_bg.png");
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
}
.hero-content { max-width: 600px; }
.subtitle { color: var(--primary); font-weight: bold; letter-spacing: 1px; }
.hero h1 { font-size: 48px; margin: 20px 0; line-height: 1.1; }
.hero-features { list-style: none; margin: 30px 0; }
.hero-features li { margin-bottom: 10px; }
.hero-features i { color: var(--primary); margin-right: 10px; }

.hero-btns { display: flex; align-items: center; gap: 30px; }
.btn-primary { background: var(--primary); border: none; padding: 15px 30px; border-radius: 5px; font-weight: bold; cursor: pointer; display:none;}
.video-link { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.play-btn { width: 40px; height: 40px; border: 2px solid var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); }

/* Features Bar */
.features-bar { margin-top: -50px; position: relative; z-index: 10; }
.bar-grid { background: white; display: grid; grid-template-columns: repeat(4, 1fr); padding: 30px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.feature-item { display: flex; align-items: center; gap: 15px; }
.feature-item i { font-size: 30px; color: var(--primary); }
.feature-item h4 { font-size: 16px; }
.feature-item p { font-size: 14px; color: #333; margin-top: 4px;}

/* Services */
.section-title { text-align: center; margin: 80px 0 40px; font-size: 32px; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 80px; }
.service-card { border: 1px solid #eee; border-radius: 10px; overflow: hidden; transition: 0.3s; }
.service-vorota { background: url("images/main_vorota.png") no-repeat;}
.service-naves { background: url("images/main_naves.png") no-repeat;}
.service-montazh { background: url("images/main_montazh.png") no-repeat;}
.service-card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.card-img { height: 250px; background-size: cover; position: relative; }
.card-icon { position: absolute; bottom: -20px; left: 20px; background: var(--dark); color: var(--primary); width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 5px; border: 2px solid var(--primary); }
.card-body { padding: 20px; text-align: center; }
.btn-more { background: transparent; border: 1px solid #ddd; padding: 10px 30px; border-radius: 5px; margin-top: 20px; cursor: pointer; display:none;}

/* CTA Section */
.cta-section { background: var(--dark); color: white; padding: 60px 0; }
.cta-flex { display: flex; justify-content: space-between; align-items: center; }
.cta-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 15px; }
.cta-form input { padding: 12px; border-radius: 5px; border: none; background: #2a2a2a; color: white; }
.checkbox-container { grid-column: span 3; font-size: 12px; color: #888; margin-top: 10px; }


/* Контейнер-сетка */
.works-grid {
    display: grid;
    /* Автоматическое создание колонок: минимум 300px, максимум 1fr */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); 
    gap: 20px;
    padding: 20px;
    max-width: 1200px; /* Общая ширина всей галереи */
    margin: 0 auto;    /* Центрируем всю сетку на странице */
}

/* Ссылка-обертка */
.works-card-link {
    text-decoration: none;
    display: block;
    width: 100%;
}

/* Карточка */
.works-card {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3; /* Делает все карточки одинаковой формы (прямоугольные) */
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* Картинка внутри карточки */
.works-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заполняет карточку, лишнее обрезается */
    display: block;
    transition: transform 0.5s ease;
}

/* Остальные стили (плашка, текст) остаются без изменений */
.works-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    padding: 30px 15px 15px 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.works-card:hover .works-info-overlay {
    opacity: 1;
    transform: translateY(0);
}

.works-card:hover .works-image {
    transform: scale(1.1);
}

/* Настройка для маленьких экранов */
@media (max-width: 600px) {
    .works-grid {
        grid-template-columns: 1fr; /* На мобилках строго в одну колонку */
        padding: 10px;
    }
}


/* Общие настройки секции */
.about-section { padding: 60px 0; color: #333; line-height: 1.6; }
.section-title { text-align: center; margin-bottom: 40px; font-size: 32px; }

/* Hero блок (Главное фото и текст) */
.about-hero { 
    display: flex; 
    align-items: center; 
    gap: 40px; 
    margin-bottom: 80px; 
    background: #fdfdfd;
    padding: 30px;
    border-radius: 20px;
}
.about-hero-content { flex: 1; }
.about-hero-image { flex: 1; }
.about-hero-image img { width: 100%; border-radius: 15px; box-shadow: 20px 20px 0 var(--primary); }

.about-badge { color: var(--primary); font-weight: bold; text-transform: uppercase; font-size: 14px; letter-spacing: 1px; }
.about-lead { font-size: 20px; margin: 20px 0; color: #555; }
.about-tags span { display: inline-block; background: #eee; padding: 5px 12px; border-radius: 5px; margin-right: 10px; font-size: 14px; }

/* Карточки преимуществ */
.about-features { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px; 
    margin-bottom: 80px;
}
.feature-card { 
    background: #fff; 
    padding: 30px; 
    border-radius: 12px; 
    border-bottom: 4px solid var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-card i { font-size: 40px; color: var(--primary); margin-bottom: 20px; }
.feature-card h3 { margin-bottom: 15px; font-size: 20px; }

/* Блок экспертности */
.about-expertise { 
    display: flex; 
    background: #2c3e50; 
    color: #fff; 
    padding: 50px; 
    border-radius: 20px; 
    align-items: center;
    margin-bottom: 80px;
}
.expertise-text { flex: 2; }
.expertise-stats { flex: 1; display: flex; justify-content: space-around; text-align: center; }
.stat-item b { display: block; font-size: 40px; color: var(--primary); }
.stat-item span { font-size: 14px; opacity: 0.8; }

/* Рабочий процесс */
.about-workflow { display: flex; gap: 30px; }
.workflow-box { flex: 1; background: #f9f9f9; padding: 35px; border-radius: 15px; }

.steps-list { list-style: none; padding: 0; margin-top: 20px; }
.steps-list li { margin-bottom: 15px; display: flex; align-items: center; }
.steps-list li span { 
    width: 30px; height: 30px; background: var(--primary); color: #fff; 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 50%; margin-right: 15px; font-weight: bold;
}

/* Адаптивность */
@media (max-width: 992px) {
    .about-hero, .about-expertise, .about-workflow { flex-direction: column; text-align: center; }
    .about-hero-image { order: -1; }
    .expertise-stats { margin-top: 30px; width: 100%; }
}