/* --- Сброс и базовые стили --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f9f9f9;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Шапка и навигация --- */
.header {
    background-color: #162e2e;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.logo img {
    height: 45px;
    width: auto;
    border-radius: 50%;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.2;
    color: #fff !important; /* Все название белое */
}

.logo-text span {
    color: #fff !important; /* Убираем красный цвет из названия */
}

/* Десктопное меню */
.nav-list {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-list li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: #e63946; /* Красный при наведении и активной странице */
}

/* Элементы справа в шапке */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-weight: 600;
}

.lang-btn {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 2px 4px;
}

.lang-btn.active {
    color: #fff;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #e63946;
    color: #fff;
}

.btn-primary:hover {
    background-color: #d62828;
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff !important; /* Белый цвет телефона в шапке / баннере */
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
}

/* Кнопка бургер-меню по умолчанию скрыта на ПК */
.menu-toggle {
    display: none;
}

/* --- Секция Hero (Главный экран с машинками) --- */
.hero {
    /* Сделали градиент чуть мягче, чтобы картинка была яснее и прозрачнее */
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

/* Телефон в секции Hero — делаем белым */
.hero-buttons .btn-outline {
    color: #fff !important;
}

.hero-buttons .btn-outline i {
    color: #fff !important;
}

/* --- Карточки (Features, Services, Projects) --- */
.section {
    padding: 60px 0;
}

.bg-light {
    background-color: #f4f6f6;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    color: #162e2e;
    margin-bottom: 10px;
}

.features-grid,
.services-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card,
.service-card,
.project-card {
    background: #fff;
    border-radius: 8px;
    padding: 30px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}

.feature-card:hover,
.service-card:hover,
.project-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: #e63946;
    margin-bottom: 20px;
}

.feature-card h3,
.service-card h3,
.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #162e2e;
}

.feature-card p,
.service-card p,
.project-info p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
}

/* Карточки проектов с картинками */
.project-card {
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 20px;
}

.read-more {
    color: #e63946;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.text-center {
    text-align: center;
}

.margin-top-lg {
    margin-top: 40px;
}

/* --- Call to Action --- */
.cta {
    background-color: #162e2e;
    color: #fff;
    text-align: center;
}

.cta h2 {
    color: #fff;
    margin-bottom: 15px;
}

.cta p {
    color: #ccc;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Страница контактов и крупные телефоны красным --- */
.contact-phone-large {
    color: #e63946 !important;
    font-weight: bold;
    font-size: 1.5rem;
}

/* --- Футер --- */
.footer {
    background-color: #102020;
    color: #fff;
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about .logo-footer {
    margin-bottom: 15px;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #e63946;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links ul li a:hover {
    color: #fff;
}

.footer-contact p {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-contact i {
    margin-right: 8px;
    color: #e63946;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #888;
    font-size: 0.85rem;
}

/* --- Модальное окно галереи --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2010;
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    padding: 40px 0;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.modal-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.modal-grid img:hover {
    opacity: 0.8;
}

/* Слайдер / Лайтбокс */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 85%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 15px;
    cursor: pointer;
    border-radius: 4px;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }


/* --- МОБИЛЬНАЯ АДАПТАЦИЯ (Экраны телефонов до 992px) --- */
@media (max-width: 992px) {
    .header-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 15px !important;
        position: relative;
    }

    /* Уменьшаем логотип */
    .logo img {
        height: 36px !important;
    }
    
    .logo-text {
        font-size: 0.85rem !important;
    }

    /* Скрываем десктопное меню по умолчанию */
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #162e2e;
        box-shadow: 0 4px 10px rgba(0,0,0,0.4);
        padding: 20px 0;
        z-index: 1100;
    }

    /* Когда меню открывается по клику на бургер */
    .nav.active {
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }

    .nav-list {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav-list li a {
        font-size: 1.1rem;
    }

    /* Компактный блок справа (языки + кнопка Free Estimate) */
    .header-actions {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .lang-switch {
        font-size: 0.8rem !important;
    }

    .header-actions .btn-primary {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
        white-space: nowrap !important;
    }

    /* Показываем кнопку бургер-меню (три полоски) */
    .menu-toggle {
        display: block !important;
        background: none !important;
        border: none !important;
        color: #fff !important;
        font-size: 1.4rem !important;
        cursor: pointer !important;
        padding: 5px !important;
        margin-left: 5px;
    }
}