body {
    font-family: 'Montserrat', sans-serif;
    background-color: #222529;
    color: rgb(202, 200, 200);
    line-height: 1.6;
}

.hello-page {
    width: 100%;
    height: 100vh;
    color: rgb(202, 200, 200);
    line-height: 1.5;
    font-size: 1.1rem;
    background-image: url("./assets/background.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.head {
    margin: 0 15rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgb(155, 155, 155);
}

.nav-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    box-sizing: border-box;
    padding: 0 10%;
}
.logo {
    width: 28vw;
    height: 9vh;
}

.nav-items {
    text-decoration: none;
    color: rgb(202, 200, 200);
    letter-spacing: 0.08em;
    box-sizing: border-box;
    font-weight: 500;
}

.nav-items:hover {
    cursor: pointer;
    color: white;
}

.main {
    display: flex;
    height: 50vh;
    flex-direction: column;
    align-items: flex-start;
    padding: 10rem 15rem;
}

.main-text {
    text-transform: uppercase;
    color: white;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
}

.description {
    margin: 1.5rem 0;
}

.button {
    text-transform: uppercase;
    /* background-color: rgb(73, 114, 226); */
    background-color: #2563eb;
    color: white;
    font-size: 1rem;
    padding: 1.2em;
    border: none;
    border-radius: 8px;
    text-decoration: none;
}

.button:hover {
    cursor: pointer;
    background-color: rgb(55, 91, 190);
    color: rgb(211, 211, 211);
}


/* Секция каталога */
.catalog-section {
    padding: 2rem 15rem; /* Выравниваем отступы по бокам, как у хедера и майна */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* background: linear-gradient(to bottom, #1c2023 0%, #3a3f44 15%, #898989 100%) */
    background-color: #222529;
}

.catalog-title {
    font-size: 2rem;
    text-transform: uppercase;
    color: white;
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
    font-weight: 500;
}

/* Сетка для карточек (4 колонки) */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
}

/* Сама карточка */
.card {
    background: #2b3034;
    border: 1px solid rgba(155, 155, 155, 0.25); /* Тонкая рамка */
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4), 
        0 1px 0px rgba(255, 255, 255, 0.08) inset;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px); /* Эффект приподнимания при наведении */
    border-color: rgba(73, 114, 226, 0.6);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.6), 
        0 0 15px rgba(255, 255, 255, 0.1); 
    /* border-color: rgba(255, 255, 255, 0.15); */
}

/* Контейнер для картинки авто */
.card-image-wrap {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.card-img {
    width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Текстовый блок карточки */
.card-content {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.card-name {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.card-type {
    font-size: 0.85rem;
    margin-top: 0.3rem;
    text-transform: uppercase;
}
.type-sell-color {
    color: rgb(3, 212, 3);
}

.type-nosell-color {
    color: rgb(255, 12, 12);
}

.card-price {
    font-size: 1.4rem;
    color: white;
    font-weight: 700;
    margin: 1rem 0;
}

/* Нижняя часть карточки */
.card-footer {
    margin-top: auto; /* Прижимает футер карточки к низу */
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    border-top: 1px solid rgba(155, 155, 155, 0.2);
    padding-top: 1rem;
}

.card-button {
    width: 100%;
    font-size: 1em;
    padding: 0.9em;
}

.foot-content {
    background: #2b3034;
    color: white;
    padding: 1rem 15rem;
}

.foot-content article {
    /* border: 1px solid #2563eb; */
    border: 1px solid #2563eb;
    padding: 1rem;
    margin: 1rem;
    border-radius: 18px;
    background: #3f464b;
}

.foot-title {
    font-size: 1.5rem;
    margin: 3rem 0;
    font-weight: 600;
}

.foot-content p {
    line-height: 1.5;
}

.sub-title {
    font-size: 1.2rem;
    margin: 1rem 0;
    font-weight: 600;
}

.phone {
    font-weight: 600;
}

.contact-description {
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}




.policy-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 3rem;
    background: #2b3034; /* Цвет карточек и футера */
    border: 1px solid rgba(155, 155, 155, 0.25);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.policy-container h1 {
    color: white;
    font-size: 2.2rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(155, 155, 155, 0.2);
    padding-bottom: 1rem;
}

.policy-container h2 {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.policy-container p, ul {
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.policy-container ul {
    padding-left: 1.5rem;
}

.policy-container li {
    margin-bottom: 0.5rem;
}

.highlight {
    color: rgb(73, 114, 226); /* Синий акцент как в модалке */
    text-decoration: none;
    font-weight: 500;
}

.back-btn {
    display: inline-block;
    text-transform: uppercase;
    background-color: #2563eb;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: background-color 0.2s, color 0.2s;
}

.back-btn:hover {
    cursor: pointer;
    background-color: rgb(55, 91, 190);
    color: rgb(211, 211, 211);
}






/* --- Стили модального окна --- */
.modal {
    display: none; /* По умолчанию скрыто */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px); /* Размытие заднего фона */
    align-items: center;
    justify-content: center;
}

/* Класс, который мы будем добавлять через JS для показа */
.modal.active {
    display: flex;
}

.modal-content {
    background: #2b3034;
    border: 1px solid rgba(155, 155, 155, 0.25);
    padding: 2.5rem;
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: rgb(202, 200, 200);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: white;
}

.modal-title {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.modal-car-name {
    color: rgb(73, 114, 226); /* Выделяем авто синим цветом */
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(155, 155, 155, 0.3);
    border-radius: 8px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: rgb(73, 114, 226);
}

.modal-submit-btn {
    width: 100%;
    font-weight: 700;
    margin-top: 0.5rem;
}

/* --- Стили для согласия с политикой конфиденциальности --- */
.policy-agreement {
    display: flex;
    align-items: flex-start; /* Выравнивание по верхнему краю, если текст перенесется на 2 строки */
    gap: 0.7rem;
    text-align: left;
    margin: 0.3rem 0 0.2rem 0;
}

.policy-checkbox {
    margin-top: 0.2rem; /* Легкое смещение чекбокса вниз для выравнивания с первой строкой текста */
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.policy-label {
    color: rgb(202, 200, 200);
    font-size: 0.85rem;
    line-height: 1.4;
    user-select: none; /* Чтобы текст не выделялся случайно при клике */
}

.policy-link {
    color: rgb(73, 114, 226); /* Синий цвет ссылки, как у названия авто в модалке */
    text-decoration: underline;
    transition: color 0.2s;
}

.policy-link:hover {
    color: white;
}

/* --- Стили для Cookie Баннера --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2b3034; /* В цвет карточек авто */
    border: 1px solid rgba(155, 155, 155, 0.3);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 800px;
    z-index: 10000;
    padding: 1.2rem 2rem;
    box-sizing: border-box;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.cookie-banner.hidden {
    opacity: 0;
    transform: translate(-50%, 30px);
    pointer-events: none;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-text {
    font-size: 0.95rem;
    color: rgb(202, 200, 200);
    line-height: 1.4;
    margin: 0;
}

.cookie-link {
    color: #fff;
    text-decoration: underline;
}

.cookie-link:hover {
    text-decoration: none;
}

.cookie-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
}


/* ==========================================================================
   МЕДИА-ЗАПРОСЫ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ (Экраны до 768px)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* 1. Сброс экстремальных отступов на главной странице */
    .head {
        margin: 0 1rem;
        flex-direction: column; /* Логотип и меню встанут друг под друга */
        padding: 1rem 0;
    }

    .nav-head {
        padding: 0;
        flex-wrap: wrap; /* Если ссылки не влезут в строку, они перенесутся */
        gap: 0.8rem;
        justify-content: center;
        margin-top: 1rem;
    }

    .nav-head .nav-items:last-child {
        display: none !important;
    }

    .logo {
        width: 60vw; /* Увеличиваем логотип на мобильных */
        height: auto;
    }

    .main {
        padding: 4rem 1rem; /* Уменьшаем гигантские отступы */
        align-items: center;
        text-align: center;
        justify-content: center;
    }

    .main-text {
        font-size: 2rem; /* Уменьшаем огромный шрифт 4rem до читаемого */
        line-height: 1.3;
    }

    .description {
        font-size: 1rem;
        margin: 1.5rem 0;
    }

    .button {
        width: 100%; /* Кнопка на всю ширину экрана для удобного тапа пальцем */
        box-sizing: border-box;
        text-align: center;
    }

    /* 2. Адаптация каталога */
    .catalog-section {
        padding: 3rem 1rem; /* Убираем боковые отступы в 15rem */
    }

    .catalog-title {
        font-size: 1.6rem;
        margin-bottom: 2rem;
        text-align: center;
    }

    .catalog-grid {
        grid-template-columns: 1fr; /* Перестраиваем карточки в 1 колонку вместо 4 */
        gap: 1.5rem;
    }

    /* 3. Адаптация футера (О нас, Контакты, Доставка) */
    .foot-content {
        padding: 2rem 1rem; /* Убираем боковые отступы в 15rem */
    }

    .foot-title {
        font-size: 1.4rem;
        margin: 2rem 0 1rem 0;
    }

    /* 4. Адаптация модального окна */
    .modal-content {
        padding: 2rem 1.5rem;
        margin: 0 1rem; /* Чтобы модалка не липла к краям экрана телефона */
        width: 100%;
        max-width: calc(100% - 2rem);
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-close {
        top: 0.5rem;
        right: 1rem;
    }

    .policy-agreement {
        gap: 0.5rem;
    }

    .policy-label {
        font-size: 0.8rem; /* Чуть уменьшаем текст согласия для экономии места */
    }

    .policy-container {
        margin: 1.5rem;
        padding: 1.5rem;
    }
    .policy-container h1 {
        font-size: 1.6rem;
    }

    .cookie-banner {
        bottom: 10px;
        padding: 1rem;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}

/* Дополнительный мини-запрос для совсем маленьких экранов (до 480px) */
@media (max-width: 480px) {
    .main-text {
        font-size: 1.7rem;
    }
    
    .nav-head {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Меню сеткой 2х2 + 1 */
        text-align: center;
        gap: 0.5rem;
    }
    
    .nav-items {
        font-size: 0.9rem;
    }
}