/* ========================================= */
/* --- ОБЩИЕ СТИЛИ И ЗАЩИТА ВЕРСТКИ --- */
/* ========================================= */
* { 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;
    word-wrap: break-word; /* ЗАЩИТА: длинные слова не сломают верстку на мобилках */
}

/* ЗАЩИТА: Картинки никогда не будут сплющены */
img {
    max-width: 100%;
    height: auto;
}

/* ========================================= */
/* --- ХЕДЕР (ШАПКА) --- */
/* ========================================= */
header {
    position: fixed; top: 0; left: 0; width: 100%; height: 80px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5%; z-index: 1000; transition: all 0.3s ease-in-out;
}
header.scrolled { background: rgba(0, 0, 0, 0.98); 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: all 0.3s;
    white-space: nowrap; /* Чтобы текст ссылок не переносился криво */
}
.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); }
.head-soc.inst:hover { background: #e1306c; transform: scale(1.1); }

/* --- ВЫПАДАЮЩЕЕ МЕНЮ (DROPDOWN) --- */
.dropdown { position: relative; display: inline-block; }
.dropdown::after { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 25px; background: transparent; z-index: 999; }
.dropdown-content {
    display: none; position: absolute; background-color: #111; min-width: 220px;
    box-shadow: 0px 8px 24px rgba(0,0,0,0.5); z-index: 1000; border-radius: 12px;
    overflow: hidden; top: 100%; left: 0; margin-top: 15px;
}
.dropdown-content a {
    color: #fff !important; padding: 14px 20px; text-decoration: none; display: block;
    font-size: 14px !important; margin: 0 !important; text-transform: none !important;
    transition: background 0.3s, padding-left 0.3s; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background-color: #ffcc00; color: #000 !important; padding-left: 25px; }
.dropdown:hover .dropdown-content { display: block; }

/* ========================================= */
/* --- ГЛАВНЫЙ ЭКРАН (HERO) --- */
/* ========================================= */
.hero {
    min-height: 100vh;
    height: 100dvh; /* ИДЕАЛЬНО ДЛЯ МОБИЛОК */
    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-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
}

/* 1. Блок самой карточки */
.car-card, .part-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Карточка занимает всю высоту ячейки сетки */
    width: 100%;
}
.car-card:hover, .part-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

/* 2. Контейнер для фото (Жесткая фиксация высоты) */
.card-image-container, .part-img-wrap {
    position: relative;
    width: 100%;
    height: 220px; /* Фото всегда 220px в высоту */
    flex-shrink: 0;
    background: #f8f8f8;
    overflow: hidden;
}

/* 3. Само фото (Магия cover) */
.card-image-container img, .part-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Обрезает лишнее, сохраняя пропорции */
    object-position: center; /* Фокус на центре фото */
    display: block;
}

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

/* 4. Контентная часть */
.card-content, .part-content {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Растягивает блок с текстом на оставшееся место */
}

/* Тексты в карточках */
.card-content h3, .part-title { font-size: 18px; font-weight: 800; color: #000; line-height: 1.3; margin-bottom: 5px;}
.part-category { color: #888; font-size: 13px; margin-bottom: 5px; text-transform: uppercase; font-weight: 600; }
.car-specs, .part-compat { color: #666; margin: 10px 0; font-size: 13px; font-weight: 500; }
.price-box, .part-price { font-size: 22px; font-weight: 800; margin: 15px 0; color: #000; }

/* 5. Кнопки (Прижаты к низу) */
.card-actions {
    display: flex; gap: 10px; justify-content: center; align-items: center;
    margin-top: auto; /* Толкает кнопки авто в самый низ */
}
.part-content .btn-ask {
    margin-top: auto; /* Толкает кнопку запчасти в самый низ */
    width: 100%; text-align: center; text-transform: uppercase;
}

/* Иконки и кнопки */
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-inst { border-color: #e1306c; }
.btn-inst:hover { background: #e1306c; transform: scale(1.1); box-shadow: 0 5px 15px rgba(225, 48, 108, 0.4); }
.btn-inst: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;
    text-transform: uppercase; text-align: center; text-decoration: none;
}
.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; display: flex; flex-direction: column; justify-content: flex-end;}
.filter-group.double { display: flex; flex-direction: row; gap: 10px; }
.filter-group input, .filter-group select {
    width: 100%; height: 44px; padding: 0 15px; border: 1px solid #ddd; border-radius: 10px;
    font-size: 16px;
    color: #333; outline: none; transition: 0.3s; background: #fff;
    -webkit-appearance: none;
}
.filter-group select { padding-right: 30px; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.filter-group input[type="number"]::-webkit-outer-spin-button, .filter-group input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filter-group input[type="number"] { -moz-appearance: textfield; }
.filter-group input:focus, .filter-group select:focus { border-color: #ffcc00; box-shadow: 0 0 0 3px rgba(255,204,0,0.2); }

.btn-filter {
    padding: 12px 30px; background: #ffcc00; color: #000; border: none; width: 100%;
    border-radius: 10px; font-weight: 800; cursor: pointer; text-transform: uppercase;
    font-size: 14px; transition: 0.3s; height: 44px; display: flex; align-items: center; justify-content: center;
}
.btn-filter:hover { background: #000; color: #ffcc00; }

/* ========================================= */
/* --- ГОРИЗОНТАЛЬНАЯ КАРУСЕЛЬ (С ЖЕСТКОЙ ШИРИНОЙ КАРТОЧЕК) --- */
/* ========================================= */
.carousel-wrapper { position: relative; display: flex; align-items: center; }
.car-carousel {
    display: flex; gap: 30px; overflow-x: auto; padding-bottom: 20px; width: 100%;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: thin; scrollbar-color: #ffcc00 #eee;
    -webkit-overflow-scrolling: touch;
}
.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 {
    width: 320px;
    min-width: 320px;
    max-width: 320px;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px;
    background: #ffcc00; color: #000; border: none; border-radius: 50%; cursor: pointer;
    z-index: 10; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15); transition: all 0.3s ease;
}
.carousel-btn:hover { background: #000; color: #ffcc00; transform: translateY(-50%) scale(1.1); }
.carousel-btn.left-btn { left: -25px; }
.carousel-btn.right-btn { right: -25px; }

@media (min-width: 769px) {
    .car-carousel::-webkit-scrollbar { display: none; }
    .car-carousel { scrollbar-width: none; -ms-overflow-style: none; }
}

/* ========================================= */
/* --- БЛОК "О НАС" --- */
/* ========================================= */
.about-wrapper { background-color: #f7f7f7; border-radius: 40px 40px 0 0; margin-top: -40px; position: relative; z-index: 15; padding: 80px 10% 120px 10%; }
.about-content { display: flex; gap: 60px; align-items: center; max-width: 1400px; margin: 0 auto; }
.about-text-block { flex: 1; color: #333; }
.about-text-block h2 { font-size: 44px; font-weight: 800; color: #000; margin-bottom: 25px; letter-spacing: -1px; }
.about-text-block p { font-size: 16px; line-height: 1.7; margin-bottom: 15px; color: #444; }
.motto-box { display: inline-block; background: #ffcc00; color: #000; font-weight: 800; font-size: 18px; padding: 15px 25px; border-radius: 12px; margin: 20px 0; box-shadow: 0 10px 20px rgba(255, 204, 0, 0.3); }
.footnotes { font-size: 13px; color: #999; border-top: 1px solid #ddd; padding-top: 15px; margin-top: 15px; }

.about-image-collage { flex: 1; position: relative; height: 650px; width: 100%; }
.about-image-collage img { position: absolute; border-radius: 20px; object-fit: cover; box-shadow: 0 15px 40px rgba(0,0,0,0.15); transition: transform 0.4s ease; }
.about-image-collage img:hover { transform: scale(1.03) translateY(-5px); z-index: 10 !important; }
.img-main { width: 47%; height: 80%; top: 0; left: 0; z-index: 1; }
.img-sub1 { width: 47%; height: 80%; bottom: 0; right: 0; z-index: 2; }
.img-sub2 { width: 40%; height: 35%; top: 32%; left: 30%; z-index: 3; border: 10px solid #f7f7f7; }

/* ========================================= */
/* --- ПРИНЦИПЫ РАБОТЫ --- */
/* ========================================= */
.principles-wrapper {
    background-color: #111; color: #fff; margin-top: -60px; position: relative; z-index: 20;
    clip-path: polygon(0 0, 50% 6vw, 100% 0, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 0, 50% 6vw, 100% 0, 100% 100%, 0 100%);
    padding: 12vw 10% 80px 10%;
}
.principles-header { text-align: center; margin-bottom: 70px; }
.principles-header h2 { font-size: 44px; color: #ffcc00; font-weight: 800; margin-bottom: 20px; letter-spacing: -1px; }
.principles-header p { font-size: 18px; max-width: 800px; margin: 0 auto; color: #ccc; line-height: 1.6; }
.principles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; max-width: 1400px; margin: 0 auto; }
.principle-item { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05); padding: 30px; border-radius: 24px; transition: all 0.4s ease; }
.principle-item:hover { transform: translateY(-10px); background: rgba(255, 255, 255, 0.06); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.img-wrap { width: 100%; height: 250px; border-radius: 16px; overflow: hidden; margin-bottom: 25px; }
.principle-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.principle-item:hover img { transform: scale(1.05); }
.principle-item h4 { font-size: 24px; margin-bottom: 12px; color: #fff; font-weight: 700; }
.principle-item p { color: #aaa; font-size: 16px; line-height: 1.5; }

/* ========================================= */
/* --- КОНТАКТЫ --- */
/* ========================================= */
.contacts-wrapper {
    background-color: #ffcc00; color: #000; margin-top: -60px; position: relative; z-index: 25;
    clip-path: polygon(0 0, 50% 6vw, 100% 0, 100% 100%, 0 100%);
    -webkit-clip-path: polygon(0 0, 50% 6vw, 100% 0, 100% 100%, 0 100%);
    padding: 12vw 10% 100px 10%;
}
.contacts-header { text-align: center; margin-bottom: 60px; }
.contacts-header h2 { font-size: 44px; font-weight: 800; margin-bottom: 20px; letter-spacing: -1px; }
.contacts-header p { font-size: 18px; max-width: 700px; margin: 0 auto; color: #222; line-height: 1.6; }
.contacts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1350px; margin: 0 auto; }
.contact-card {
    background: #ffffff; padding: 30px 15px; border-radius: 24px; text-align: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0; word-wrap: break-word;
}
.contact-card:hover { transform: translateY(-10px); box-shadow: 0 25px 40px rgba(0,0,0,0.15); }
.contact-icon { width: 80px; height: 80px; background: #f7f7f7; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px auto; transition: background 0.3s ease; }
.contact-card:hover .contact-icon { background: #ffcc00; }
.contact-icon svg { width: 34px; height: 34px; }
.contact-card h4 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.contact-card p { font-size: 16px; color: #555; line-height: 1.5; }
.contact-card a { color: #000; text-decoration: none; font-weight: 700; border-bottom: 2px solid transparent; transition: border-color 0.3s; }
.contact-card a:hover { border-color: #000; }

/* ========================================= */
/* --- ПОДВАЛ (FOOTER) --- */
/* ========================================= */
.site-footer { background: #111; color: #888; text-align: center; padding: 30px 20px; font-size: 14px; width: 100%;}
.site-footer a { color: #ffcc00; text-decoration: none; display: inline-block; margin-top: 10px; transition: 0.3s; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ========================================= */
/* --- СОВРЕМЕННОЕ МОДАЛЬНОЕ ОКНО --- */
/* ========================================= */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 999999; align-items: center; justify-content: center; padding: 20px;
}
.modal-content {
    background: #ffffff; padding: 40px; border-radius: 24px; width: 100%; max-width: 460px;
    position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: modalScaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-height: 90vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
@keyframes modalScaleUp { from { transform: scale(0.9) translateY(30px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.close-btn { position: absolute; top: 20px; right: 24px; font-size: 34px; line-height: 1; cursor: pointer; color: #aaa; transition: all 0.3s ease; }
.close-btn:hover { color: #000; transform: rotate(90deg); }

.input-wrapper { margin-bottom: 15px; width: 100%;}
.double-inputs { display: flex; gap: 15px; margin-bottom: 15px; width: 100%;}
.modal-content input, .modal-content select {
    width: 100%; padding: 16px 20px; border-radius: 14px; border: 2px solid #eee; background: #f9f9f9;
    font-size: 16px; color: #333; outline: none; transition: all 0.3s; font-family: inherit; -webkit-appearance: none; box-sizing: border-box;
}
.modal-content select { background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 15px center; background-size: 16px; padding-right: 40px; }
.modal-content input:focus, .modal-content select:focus { border-color: #ffcc00; background: #fff; box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.15); }

.consent-group { display: flex; align-items: flex-start; gap: 12px; margin: 20px 0; }
.consent-group input[type="checkbox"] { width: 22px; height: 22px; cursor: pointer; accent-color: #000; margin-top: 2px; flex-shrink: 0; }
.consent-text { font-size: 13px; color: #777; line-height: 1.5; cursor: pointer; }
.consent-text a { color: #000; text-decoration: underline; font-weight: 600; transition: color 0.3s; }
.consent-text a:hover { color: #ffcc00; }

.btn-submit-modal {
    width: 100%; padding: 18px; background: #ffcc00; color: #000; border: none; border-radius: 14px;
    font-weight: 800; font-size: 16px; text-transform: uppercase; cursor: pointer; transition: all 0.3s;
}
.btn-submit-modal:hover { background: #e6b800; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(255, 204, 0, 0.3); }
/* ========================================================= */
/* --- АДАПТИВ (МЕДИА-ЗАПРОСЫ) ДЛЯ ТЕЛЕФОНОВ И ПЛАНШЕТОВ --- */
/* ========================================================= */

@media (max-width: 1024px) {
    .contacts-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links a { margin: 0 10px; font-size: 14px; }
    .logo { font-size: 24px; }
}

@media (max-width: 992px) {
    .hero-text h1 { font-size: 50px; }
    .stats-grid { flex-wrap: wrap; }
    .stat-card { flex: 1 1 45%; }
    .about-content { flex-direction: column; gap: 40px; }
    .about-image-collage { width: 100%; max-width: 600px; height: 550px; margin: 20px auto 0 auto; }
}

/* Базовые стили для бургера и затемнения (на ПК скрыты) */
.burger { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 10001; }
.burger span { width: 30px; height: 3px; background-color: #fff; transition: 0.3s; border-radius: 3px; }
.burger.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 9999; backdrop-filter: blur(3px); }
.mobile-menu-overlay.active { display: block; }
body.no-scroll { overflow: hidden; }

/* --- ПК ВЕРСИЯ (От 769px и шире) --- */
@media (min-width: 769px) {
    .nav-wrapper {
        display: contents; /* На ПК обертка "растворяется", меню встает в центр ровной линией */
    }
}

/* --- МОБИЛЬНЫЕ ТЕЛЕФОНЫ (До 768px) --- */
@media (max-width: 768px) {

    /* 1. ШАПКА И ВЫЕЗЖАЮЩЕЕ МЕНЮ */
    header {
        position: fixed; height: 70px; flex-direction: row; justify-content: space-between;
        align-items: center; padding: 15px 5%; background: rgba(0, 0, 0, 0.95);
    }
    .burger {
    display: flex;
    margin-left: auto;
    }

    .nav-wrapper {
        position: fixed; top: 0; left: -100%;
        width: 280px;
        height: 100dvh;
        background: #111;
        flex-direction: column; justify-content: flex-start;
        padding: 80px 20px 30px 20px; transition: left 0.4s ease;
        z-index: 10000; overflow-y: auto; display: flex;
    }
    .nav-wrapper.active { left: 0; }

    .nav-links { display: flex; flex-direction: column; width: 100%; padding: 0; margin-bottom: 20px; gap: 0; overflow-x: hidden; }
    .nav-links a {
        display: block;
        font-size: 18px;
        padding: 15px 0;
        margin: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        border-radius: 0;
        background: transparent;
        width: 100%;
        text-align: left;
    }

    .dropdown { width: 100%; }
    .dropdown-content {
        position: static;
        display: none;
        background: #222;
        width: 100%;
        box-shadow: none;
        border-radius: 8px;
        margin-top: 12px;
        margin-bottom: 10px;
        padding: 5px 0;
    }
    .dropdown.active .dropdown-content { display: block; }
    .dropdown-content a { padding: 12px 20px !important; font-size: 16px !important; border-bottom: none; text-align: left; }
    .dropdown:hover .dropdown-content { display: none !important; }

    /* Открываем меню ТОЛЬКО когда сработал JavaScript */
    .dropdown.active .dropdown-content { display: block !important; }
    .header-right {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: left;
    margin-top: 20px;
    padding-top: 20px;
    gap: 0;
    }
    .header-socials { justify-content: flex-start; margin-bottom: 20px; gap: 15px; width: 100%; }
    .btn-call { width: 100%; padding: 15px; font-size: 16px; margin: 0; }

    /* 2. АДАПТИВ ОСТАЛЬНОГО САЙТА */
    .hero { padding: 120px 5% 50px 5%; height: auto; min-height: 100dvh; 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; }

    .car-carousel .car-card { width: 85vw; min-width: 85vw; max-width: 85vw; }
    .carousel-btn { display: none; }

    /* Исправление ползунка цены */
    .filter-form { flex-direction: column; padding: 15px; gap: 10px; }
    .filter-group { width: 100% !important; min-width: 100% !important; }
    .filter-group.double { flex-direction: column; gap: 10px; }
    .btn-filter { width: 100%; height: 50px; font-size: 16px; }
    .slider-container { width: 100%; margin-top: 10px; }
    .range-slider { width: 100%; }

    /* Исправление фото "О нас" */
    .about-wrapper { padding: 50px 5% 100px 5%; }
    .about-text-block h2 { font-size: 34px; }
    .about-content { flex-direction: column; display: flex; }
    .about-text-block { order: 1; }
    .about-image-collage { order: 2; width: 100%; height: 350px; margin-top: 40px; position: relative; display: block; max-width: 600px; margin-left: auto; margin-right: auto; }
    .img-main { width: 50%; height: 80%; top: 0; left: 0; }
    .img-sub1 { width: 50%; height: 80%; bottom: 0; right: 0; }
    .img-sub2 { width: 40%; height: 40%; top: 30%; left: 30%; border-width: 4px; }

    .principles-wrapper { clip-path: polygon(0 0, 50% 8vw, 100% 0, 100% 100%, 0 100%); -webkit-clip-path: polygon(0 0, 50% 8vw, 100% 0, 100% 100%, 0 100%); padding: 16vw 5% 60px 5%; }
    .principles-header h2 { font-size: 34px; }
    .principles-grid { grid-template-columns: 1fr; }
    .img-wrap { height: 200px; }

    .contacts-grid { grid-template-columns: 1fr; }
    .modal-content { padding: 30px 20px; }
    .double-inputs { flex-direction: column; gap: 15px; }
}