/* --- Глобальные настройки --- */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    /* Критично для телефонов */
    font-family: 'Roboto', sans-serif;
    color: #1e293b;
}

html {
    scroll-behavior: smooth;
}

/* Обрезка анимаций, вылетающих за пределы экрана */
section {
    padding: 80px 0;
    overflow: hidden;
    position: relative;
}

@media (min-width: 768px) {
    section {
        padding: 100px 0;
    }
}

/* --- Навигация (Navbar) --- */
.navbar {
    transition: all 0.3s ease;
}

/* Реализация эффекта стекла (которого нет в чистом Bootstrap) */
.backdrop-blur-md {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bg-opacity-90 {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.hero-section {
    padding-bottom: 6rem;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    animation: floatBlob 10s infinite alternate ease-in-out;
}

.hero-blob-1 {
    width: 400px;
    height: 400px;
    background-color: rgba(13, 110, 253, 0.25);
    /* Фирменный синий */
    top: -100px;
    right: -100px;
}

.hero-blob-2 {
    width: 300px;
    height: 300px;
    background-color: rgba(13, 202, 253, 0.15);
    /* Светло-голубой */
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

/* Градиентный текст для главного акцента */
.text-gradient {
    background: linear-gradient(135deg, #0d6efd, #0043a8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Сближаем буквы в гигантском заголовке (выглядит современнее) */
.tracking-tight {
    letter-spacing: -2px;
}

/* 3. Анимация главной кнопки */
.hero-btn-animated {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hero-btn-animated:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(13, 110, 253, 0.3) !important;
}

/* Стрелочка внутри кнопки */
.hero-btn-animated i {
    transition: transform 0.3s ease;
}

.hero-btn-animated:hover i {
    transform: translateX(6px);
    /* Отъезжает вправо */
}

/* Блик на кнопке */
.hero-btn-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: none;
}

.hero-btn-animated:hover::before {
    animation: buttonShine 0.8s;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 30px) scale(1.1);
    }
}

@media (min-width: 768px) {
    .hero-section {
        padding-top: 140px;
    }
}

@media (min-width: 992px) {
    .hero-section {
        padding-top: 160px;
    }
}

/* --- Переключатель языков --- */
.lang-btn {
    background: none;
    border: none;
    font-weight: bold;
    font-size: 0.875rem;
    transition: color 0.2s;
    padding: 0 4px;
    cursor: pointer;
}

.lang-btn:focus {
    outline: none;
}

.lang-btn-active {
    color: #0d6efd !important;
}

.lang-btn-inactive {
    color: #9ca3af !important;
}

.lang-btn-inactive:hover {
    color: #0d6efd !important;
}

.mobile-lang-wrapper {
    flex-wrap: wrap;
    gap: 5px;
}

/* --- Секция Услуг (Services) --- */

.service-card-modern {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.03);
    /* Очень мягкая граница вместо жесткого border */
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Эффект при наведении на карточку услуги */
.service-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(13, 110, 253, 0.2);
}

/* Круглый контейнер для иконки */
.service-icon-wrapper {
    width: 5rem;
    height: 5rem;
    background-color: #f8f9fa;
    /* Светло-серый фон */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

/* Анимация иконки при наведении на карточку */
.service-card-modern:hover .service-icon-wrapper {
    background-color: #0d6efd;
    transform: scale(1.1);
}

.service-card-modern:hover .service-icon-wrapper i {
    color: #ffffff !important;
    /* Иконка становится белой */
}

/* Плавное изменение цвета заголовка */
.service-card-modern h3 {
    transition: color 0.3s ease;
}

.service-card-modern:hover h3 {
    color: #0d6efd;
}

/* Декоративный градиентный фон, который плавно появляется при наведении */
.service-card-modern::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(13, 110, 253, 0.02), rgba(13, 110, 253, 0.05));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.service-card-modern:hover::after {
    opacity: 1;
}

/* --- Автопарк (Fleet) --- */

.fleet-card-modern {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

/* Анимация карточки */
.fleet-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(13, 110, 253, 0.3) !important;
}

/* Круглый контейнер для иконки грузовика */
.fleet-icon-wrapper {
    width: 6rem;
    height: 6rem;
    background-color: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

/* При наведении иконка становится белой с синим ободком */
.fleet-card-modern:hover .fleet-icon-wrapper {
    background-color: #ffffff;
    border-color: #0d6efd;
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.15) !important;
}

/* --- Анимация списка характеристик --- */
.spec-item {
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Легкий сдвиг строки вправо при наведении мышью (помогает сфокусироваться на цифре) */
.spec-item:hover {
    transform: translateX(8px);
}

/* При наведении текст в левой части темнеет для контраста */
.spec-item:hover span.text-secondary {
    color: #1e293b !important;
}

/* --- Цены (Pricing) --- */
.pricing-card {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 2rem 2.5rem 2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Настройки плавной анимации */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    cursor: default;
}

/* --- Анимация "Блик света" (Shine Effect) --- */
.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    /* Полупрозрачный белый градиент */
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    z-index: 1;
}

.pricing-card:hover::before {
    animation: shineSweep 0.8s;
}

@keyframes shineSweep {
    100% {
        left: 200%;
    }
}

/* Текст поверх блика */
.pricing-card div {
    z-index: 2;
    position: relative;
}

.pricing-card h4 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: white;
}

.pricing-card p {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0;
}

.pricing-card .price {
    font-size: 1.875rem;
    font-weight: 900;
    color: #0d6efd;
}

.pricing-card .price small {
    font-size: 1rem;
    color: #9ca3af;
    font-weight: normal;
}

/* --- Контакты --- */
.contact-icon {
    width: 3.5rem;
    /* Чуть увеличили для солидности */
    height: 3.5rem;
    background-color: #f8f9fa;
    /* Серый фон вместо синего */
    color: #0d6efd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-item-hover {
    padding: 0.5rem;
    margin-left: -0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.contact-item-hover:hover {
    background-color: #f8f9fa;
}

/* Изменение иконки при наведении на блок */
.contact-item-hover:hover .contact-icon {
    background-color: #0d6efd;
    color: #ffffff;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.2) !important;
}

.contact-link {
    position: relative;
    display: inline-block;
}

.contact-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #0d6efd;
    transition: width 0.3s ease;
}

.contact-item-hover:hover .contact-link::after {
    width: 100%;
}

/* Анимация соцсетей (отдельно от блоков) */
.social-hover {
    background-color: #f8f9fa;
}

.social-hover:hover {
    background-color: #0d6efd;
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.2) !important;
}

@keyframes gentlePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* --- Footer --- */
footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 2rem 0;
    border-top: 1px solid #1f2937;
    text-align: center;
}

/* --- Кнопка "Наверх" --- */
#scrollToTopBtn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
    z-index: 998;
    cursor: pointer;
}

#scrollToTopBtn:hover {
    background-color: #0b5ed7;
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#scrollToTopBtn.visible {
    opacity: 1;
    pointer-events: auto;
}

/* --- Modern Preloader (3D Cube) --- */
#preloader {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.cube-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    perspective: 800px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: spinCube 2.5s infinite linear;
}

.side {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(13, 110, 253, 0.1);
    border: 2px solid #0d6efd;
    opacity: 0.8;
}

.front {
    transform: translateZ(30px);
}

.back {
    transform: rotateY(180deg) translateZ(30px);
}

.right {
    transform: rotateY(90deg) translateZ(30px);
}

.left {
    transform: rotateY(-90deg) translateZ(30px);
}

.top {
    transform: rotateX(90deg) translateZ(30px);
}

.bottom {
    transform: rotateX(-90deg) translateZ(30px);
}

@keyframes spinCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.shadow {
    position: absolute;
    width: 100%;
    height: 10px;
    background: radial-gradient(rgba(0, 0, 0, 0.2), transparent);
    bottom: -30px;
    left: 0;
    border-radius: 50%;
    animation: shadowPulse 2.5s infinite linear;
}

@keyframes shadowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(0.6);
        opacity: 0.2;
    }
}

.loading-text .brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    text-align: center;
}

.loading-text .status {
    font-size: 0.85rem;
    color: #0d6efd;
    font-weight: 500;
    margin-top: 5px;
    position: relative;
    display: inline-block;
}

.loading-text .status::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
    position: absolute;
    width: 15px;
    text-align: left;
}

@keyframes dots {

    0%,
    20% {
        content: '';
    }

    40% {
        content: '.';
    }

    60% {
        content: '..';
    }

    80%,
    100% {
        content: '...';
    }
}

/* --- Исправление Date Input для iOS/Safari --- */
.date-input-fix {
    position: relative;
}

/* 1. Если дата НЕ выбрана (поле invalid + required), делаем текст прозрачным */
.date-input-fix:required:invalid {
    color: transparent;
}

/* 2. Скрываем стандартный плейсхолдер браузера (dd.mm.yyyy) */
.date-input-fix:required:invalid::-webkit-datetime-edit {
    color: transparent;
}

/* 3. Показываем НАШ кастомный placeholder через ::before */
/* Работает в Safari/Chrome (WebKit) */
.date-input-fix:required:invalid::before {
    content: attr(placeholder);
    /* Берет текст из атрибута placeholder HTML */
    color: #6c757d;
    /* Цвет серый (как у обычного placeholder) */
    position: absolute;
    left: 12px;
    /* Отступ слева (как у Bootstrap) */
    pointer-events: none;
    /* Чтобы клик проходил сквозь текст */
}

/* 4. Когда дата выбрана или поле в фокусе - возвращаем нормальный цвет */
.date-input-fix:focus,
.date-input-fix:valid {
    color: #1e293b;
}

/* --- Лента "Популярное" (Ribbon) --- */
.ribbon {
    position: absolute;
    top: 12px;
    right: -35px;
    transform: rotate(45deg);
    z-index: 3;
    /* Поверх всего */
    overflow: hidden;
}

.ribbon span {
    display: block;
    /* Яркий золотой цвет фона */
    background-color: #ffc107;
    /* Темный цвет текста для контраста */
    color: #212529;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    padding: 6px 35px;
    /* Небольшая тень для объема */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* --- Адаптация карточек цен для телефонов --- */
@media (max-width: 767.98px) {
    .pricing-card {
        flex-direction: column;
        /* Ставим элементы друг под другом */
        text-align: center;
        /* Центрируем текст */
        padding: 2.5rem 1.5rem 1.5rem;
        /* Даем больше места сверху для ленточки */
        gap: 0.5rem;
        /* Добавляем воздух между названием и ценой */
    }

    /* Уменьшаем и сдвигаем ленточку, чтобы она не перекрывала контент */
    .ribbon {
        top: 8px;
        right: -45px;
        transform: scale(0.8) rotate(45deg);
    }
}

/* --- Дизайн и анимация формы --- */

/* 1. Анимация самого блока формы при наведении */
.form-wrapper {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.form-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
}

/* 2. Стиль заголовков полей (Лейблы) */
.tracking-wide {
    letter-spacing: 0.5px;
}

/* 3. Кастомные инпуты (Apple/Stripe стиль) */
.custom-input {
    background-color: #f8f9fa;
    /* Мягкий серый фон в спокойном состоянии */
    border: 2px solid transparent;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* При наведении мыши */
.custom-input:hover {
    background-color: #f1f3f5;
}

/* При клике (фокусе) - фон белеет, появляется фирменная рамка и тень */
.custom-input:focus {
    background-color: #ffffff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.15) !important;
    outline: none;
}

/* 4. Анимация кнопки отправки */
.submit-btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.submit-btn-animated:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
}

/* Иконка бумажного самолетика */
.submit-btn-animated i {
    transition: transform 0.3s ease;
}

/* При наведении на кнопку самолетик улетает вправо-вверх */
.submit-btn-animated:hover i {
    transform: translateX(4px) translateY(-4px);
}

/* --- ОБНОВЛЕНИЕ для фикса даты на iOS (учитывает новые отступы) --- */
.date-input-fix:required:invalid::before {
    content: attr(placeholder);
    color: #6c757d;
    position: absolute;
    left: 16px;
    /* Обновлено под новый padding инпута */
    pointer-events: none;
}

/* --- Секция Лимузина (VIP) --- */

.limo-card-modern {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.limo-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1) !important;
}

/* Анимация картинки (Ken Burns effect) */
.limo-img-wrapper {
    overflow: hidden;
}

.limo-img-wrapper img {
    transition: transform 1.5s ease;
}

.limo-card-modern:hover .limo-img-wrapper img {
    transform: scale(1.05);
    /* Легкое, дорогое приближение */
}

/* Внутренняя тень на фото, чтобы бейдж всегда читался */
.limo-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Премиальный блок цены */
.limo-price-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 5px solid #ffc107;
    /* Золотой акцент слева */
}

/* Выделение тегов <strong> внутри описания лимузина */
.limo-card-modern strong {
    color: #0d6efd;
    font-weight: 800;
    letter-spacing: 0.3px;
}

/* --- Cookie Banner (GDPR) --- */
.cookie-banner {
    position: fixed;
    bottom: -100%; /* Изначально спрятан за пределами экрана */
    left: 0;
    width: 100%;
    z-index: 9999;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner.show {
    bottom: 0; /* Класс для плавного появления */
}