/* --- ОБЩИЕ СТИЛИ --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #000; color: #fff; scroll-behavior: smooth; overflow-x: hidden;
}

/* --- ХЕДЕР --- */
header {
    position: fixed; top: 0; width: 100%; height: 80px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5%; z-index: 1000; transition: all 0.3s;
}
header.scrolled { background: rgba(0, 0, 0, 1); box-shadow: 0 5px 15px rgba(0,0,0,0.6); }
header.transparent { background: rgba(0, 0, 0, 0.2); }

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}
.logo:hover {
    color: #ffcc00;
    cursor: pointer;
}

.nav-links a {
    color: #fff; text-decoration: none; margin: 0 18px;
    font-size: 16px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    transition: color 0.3s;
}
.nav-links a:hover { color: #ffcc00; }

.header-right { display: flex; align-items: center; font-weight: 600; }

.btn-call {
    padding: 12px 28px;
    border: none;
    background: #ffcc00;
    color: #000;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s;
}
.btn-call:hover {
    background: #fff; transform: scale(1.05);
}

/* --- СОЦСЕТИ В ШАПКЕ --- */
.header-socials {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-right: 20px;
}

.head-soc {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.3s ease;
    text-decoration: none;
}

.head-soc img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.head-soc.tg:hover { background: #0088cc; transform: scale(1.1); }
.head-soc.wa:hover { background: #25d366; transform: scale(1.1); }

/* --- ГЛАВНЫЙ ЭКРАН (HERO) --- */
.hero {
    height: 100vh;
    background-image: url('../images/image.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); z-index: 1;
}

.hero-text { max-width: 820px; position: relative; z-index: 2; }
.hero-text h1 { font-size: 68px; line-height: 1.05; margin-bottom: 20px; font-weight: 800; letter-spacing: -2.5px; }
.hero-text p { font-size: 24px; margin-bottom: 40px; opacity: 0.95; }
.hero-btn {
    display: inline-block; padding: 18px 52px; font-size: 21px; font-weight: 700;
    background: #ffcc00; color: #000; border: none; border-radius: 50px;
    cursor: pointer; text-decoration: none; transition: all 0.4s ease;
}
.hero-btn:hover { background: #ffd633; transform: translateY(-5px); }

/* --- ОБЩИЙ БЛОК ДЛЯ НАЛОЖЕНИЯ --- */
.content-wrapper {
    background-color: #fff;
    border-radius: 40px 40px 0 0;
    margin-top: 0px;
    position: relative;
    z-index: 10;
    padding-top: 20px;
}

/* --- СЕКЦИЯ СТАТИСТИКИ --- */
.stats-container { padding: 80px 5% 50px 5%; color: #000; background: transparent; }

.stats-grid {
    display: flex;
    gap: 30px;
    justify-content: space-between;
    flex-wrap: nowrap;
    max-width: 1400px;
    margin: 0 auto;
}

.stat-card {
    flex: 1;
    min-height: 160px;
    padding: 30px 40px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.stat-card:nth-child(1) { transform: rotate(-1deg); }
.stat-card:nth-child(2) { transform: rotate(1deg); }
.stat-card:nth-child(3) { transform: rotate(-0.5deg); }
.stat-card:nth-child(4) { transform: rotate(0.5deg); }

.stat-card:hover {
    transform: rotate(0deg) translateY(-8px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.12);
}

.stat-card h2 {
    font-size: 30px;
    margin-bottom: 5px;
    font-weight: 900;
}
.stat-card p {
    font-size: 16px;
    opacity: 0.85;
}

.card-1 { background: #ffffff; border: 1px solid #eee; }
.card-2 { background: #ffcc00; }
.card-3 { background: #ffffff; border: 1px solid #eee; }
.card-4 { background: #1a1a1a; color: #fff; border: none; }

/* --- СЕКЦИЯ ПОРТФОЛИО --- */
.portfolio-section {
    padding: 50px 10% 100px 10%;
    color: #333;
    background: transparent;
}

.portfolio-header {
    margin-bottom: 60px;
    text-align: left;
}

.portfolio-header h3 {
    color: #ffcc00;
    text-transform: uppercase;
    font-size: 22px;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 900;
}

.portfolio-header h2 {
    font-size: 40px;
    line-height: 1.2;
    color: #000;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
}

.portfolio-header mark {
    background: #ffcc00;
    padding: 0 8px;
    border-radius: 4px;
    color: #000;
    font-weight: 700;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.car-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}
.car-card:hover { transform: translateY(-5px); }
.car-card img { width: 100%; height: 220px; object-fit: cover; }
.card-image-container { position: relative; height: 220px; }

.badge-fuel { position: absolute; left: 15px; top: 15px; background: rgba(0,0,0,0.6); padding: 5px 12px; color: #fff; font-size: 12px; border-radius: 4px; }

.card-content { padding: 20px; text-align: center; }
.car-specs { color: #666; margin: 10px 0; font-size: 13px; font-weight: 500; }
.price-box { font-size: 22px; font-weight: 800; margin: 15px 0; color: #000; }

.card-actions { display: flex; gap: 10px; justify-content: center; align-items: center; }

/* Кнопки соцсетей (базовый стиль) */
a.btn-icon { text-decoration: none; }
.btn-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    background: #f8f8f8;
    transition: all 0.3s ease;
}
.btn-icon svg { width: 20px; height: 20px; transition: fill 0.3s ease; }

.btn-tg:hover { background: #0088cc; border-color: #0088cc; transform: scale(1.1); box-shadow: 0 5px 15px rgba(0, 136, 204, 0.4); }
.btn-tg:hover svg { fill: #fff; }

.btn-wa:hover { background: #25d366; border-color: #25d366; transform: scale(1.1); box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4); }
.btn-wa:hover svg { fill: #fff; }

/* Кнопка "Задать вопрос" */
.btn-ask {
    flex-grow: 1;
    padding: 12px;
    border: none;
    background: #eef5ff;
    color: #007bff;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}
.btn-ask:hover { background: #dbeaff; transform: translateY(-2px); }

/* --- ФОРМА ФИЛЬТРАЦИИ --- */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: #f8f8f8;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.filter-group { flex: 1; min-width: 180px; }
.filter-group.double { display: flex; gap: 10px; }
.filter-group input, .filter-group select {
    width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 10px;
    font-size: 14px; color: #333; outline: none; transition: 0.3s;
}
.filter-group input:focus, .filter-group select:focus { border-color: #ffcc00; }

.btn-filter {
    padding: 12px 30px; background: #ffcc00; color: #000; border: none;
    border-radius: 10px; font-weight: 800; cursor: pointer; text-transform: uppercase;
    font-size: 14px; transition: 0.3s; height: 44px;
}
.btn-filter:hover { background: #000; color: #ffcc00; }

/* --- ГОРИЗОНТАЛЬНАЯ КАРУСЕЛЬ --- */
.car-carousel {
    display: flex; gap: 30px; overflow-x: auto; padding-bottom: 20px;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: thin; scrollbar-color: #ffcc00 #eee;
}
.car-carousel::-webkit-scrollbar { height: 8px; }
.car-carousel::-webkit-scrollbar-track { background: #eee; border-radius: 10px; }
.car-carousel::-webkit-scrollbar-thumb { background: #ffcc00; border-radius: 10px; }
.car-carousel .car-card { min-width: 320px; scroll-snap-align: start; flex-shrink: 0; }


/* ========================================================= */
/* --- АДАПТИВ (МЕДИА-ЗАПРОСЫ) ДЛЯ ТЕЛЕФОНОВ И ПЛАНШЕТОВ --- */
/* ========================================================= */

@media (max-width: 992px) {
    /* Планшеты */
    .hero-text h1 { font-size: 50px; }
    .stats-grid { flex-wrap: wrap; }
    .stat-card { flex: 1 1 45%; }
}

@media (max-width: 768px) {
    /* ТЕЛЕФОНЫ */

    /* Хедер (шапка) */
    header {
        position: absolute; /* Убираем фиксацию на телефонах, чтобы не съедало экран */
        height: auto;
        flex-direction: column;
        padding: 20px 5%;
        background: rgba(0, 0, 0, 0.9);
        gap: 15px;
    }
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .nav-links a { margin: 0 10px; font-size: 14px; }
    .header-socials { margin: 0; justify-content: center; width: 100%; }
    .header-right { flex-direction: column; gap: 15px; width: 100%; text-align: center; }
    .btn-call { width: 100%; padding: 15px; font-size: 16px; }

    /* Главный экран (Hero) */
    .hero {
        padding: 160px 5% 50px 5%; /* Отступ сверху, чтобы шапка не перекрывала текст */
        height: auto;
        min-height: 100vh;
        text-align: center;
    }
    .hero-text h1 { font-size: 38px; letter-spacing: -1px; margin-bottom: 15px; }
    .hero-text p { font-size: 18px; margin-bottom: 30px; }
    .hero-btn { width: 100%; box-sizing: border-box; }

    /* Статистика */
    .stats-container { padding: 40px 5% 30px 5%; }
    .stats-grid { flex-direction: column; gap: 15px; }
    .stat-card {
        width: 100%;
        transform: none !important; /* Отключаем наклон карточек для ровного столбца */
        min-height: auto;
        padding: 20px;
    }

    /* Портфолио и заголовок */
    .portfolio-section { padding: 40px 5%; }
    .portfolio-header h2 { font-size: 28px; }
    .portfolio-grid { grid-template-columns: 1fr; /* 1 колонка на телефоне */ }

    /* Форма фильтрации */
    .filter-form { flex-direction: column; padding: 15px; gap: 10px; }
    .filter-group { width: 100%; }
    .filter-group.double { flex-direction: column; gap: 10px; }
    .btn-filter { width: 100%; height: 50px; font-size: 16px; }

    /* Карусель */
    .car-carousel .car-card { min-width: 85vw; /* Карточка занимает 85% ширины экрана телефона */ }
}