/* Стили сайта BIRJA PRIME */

/* Всегда резервируем место под вертикальный скроллбар:
   иначе при открытии модалок (body overflow: hidden) страница прыгает по горизонтали. */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    background-color: #070709;
    color: #ffffff;
    overflow-x: clip;
}

/* Glassmorphism utility */
.glass-panel {
    background: #0c0c0f;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
}

/* Dropdown styling fix for dark mode */
option {
    background-color: #141417;
    color: #fff;
}

/* Day/Night Transition */
.dn-bg {
    transition: opacity 0.8s ease-in-out;
}

/* Accordion transition */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
    opacity: 0;
}
.accordion-item.active .accordion-content {
    max-height: 460px;
    opacity: 1;
}
.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
    color: #D4AF37;
}

/* Image overlap setup */
.overlap-image {
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* Custom Scrollbar for Booking Container: Hidden on Desktop, Compact Square Thumb on Mobile */
.booking-scroll-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.booking-scroll-container::-webkit-scrollbar {
    display: none;
}

@media (max-width: 1023px) {
    .booking-scroll-container {
        scrollbar-width: thin;
        scrollbar-color: #D4AF37 rgba(255, 255, 255, 0.05);
        -ms-overflow-style: auto;
        overflow-x: auto;
        padding-bottom: 12px;
    }
    .booking-scroll-container::-webkit-scrollbar {
        display: block;
        height: 6px;
    }
    .booking-scroll-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
    }
    .booking-scroll-container::-webkit-scrollbar-thumb {
        background: #D4AF37;
        border-radius: 4px;
        width: 36px !important;
        min-width: 36px !important;
    }
}

/* General Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #070709;
}
::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 4px;
}

/* Hide scrollbar for carousels completely */
.hide-scroll::-webkit-scrollbar { display: none; }
.hide-scroll { scrollbar-width: none; -ms-overflow-style: none; }

/* Появление секции из черноты */
.reveal-section {
    opacity: 0;
    transform: translateY(50px);
    will-change: transform, opacity;
    transition: opacity 1s ease-out, transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Появление заголовков (как у «Атмосферы») */
.reveal-heading {
    opacity: 0;
    transform: translateY(3.5rem);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}
.reveal-heading.is-visible {
    opacity: 1;
    transform: none;
}
/* LCP: главный заголовок проявляем быстрее, чем остальные блоки */
header h1.reveal-heading {
    transition: opacity 0.45s ease-out, transform 0.6s ease-out;
}
@media (prefers-reduced-motion: reduce) {
    .reveal-section, .reveal-heading { opacity: 1; transform: none; transition: none; }
}

/* Мерцание стрелок каруселей (мобайл) */
@keyframes arrowBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}
.arrow-blink { animation: arrowBlink 1.5s ease-in-out infinite; }

/* Мобильная производительность: отключаем backdrop-blur (тяжёлый на GPU) */
[class*="backdrop-blur"], .glass-panel {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Галерея: вписываем «воронку» в остаток высоты экрана с сохранением пропорций.
   Ширина ограничивается так, чтобы высота (ширина / пропорция) помещалась в доступное место.
   Автоматически уменьшается и по ширине, и по высоте на низких экранах. */
#vg-fit { container-type: size; }
#vortex-gallery { width: min(100%, calc(100cqh * 4 / 3)); }
@media (min-width: 768px) {
    #vortex-gallery { width: min(100%, calc(100cqh * 16 / 9)); }
}

/* Формы заявок */
.lead-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.lead-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font: 400 11px/1.5 Manrope, sans-serif;
    color: #9a9aa2;
    text-align: left;
    cursor: pointer;
}
.lead-consent input {
    margin-top: 2px;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    accent-color: #d2a33f;
    cursor: pointer;
}
.lead-consent a {
    color: #d2a33f;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lead-btn-busy { opacity: .65 !important; cursor: progress !important; }
#lead-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 200;
    max-width: min(92vw, 440px);
    padding: 14px 18px;
    border-radius: 12px;
    background: #1a1310;
    border: 1px solid rgba(210, 163, 63, .55);
    color: #f5f1e8;
    font: 400 13px/1.5 Manrope, sans-serif;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .55);
    display: none;
}
#lead-toast.show { display: block; }

/* Нативные поля даты и времени */
input.lead-date, input.lead-time { color-scheme: dark; }
input.lead-date::-webkit-calendar-picker-indicator,
input.lead-time::-webkit-calendar-picker-indicator {
    opacity: .8;
    cursor: pointer;
    filter: invert(72%) sepia(45%) saturate(800%) hue-rotate(358deg) brightness(1.05);
}
input.lead-date::-webkit-datetime-edit,
input.lead-time::-webkit-datetime-edit { color: inherit; }

/* Подсказка горизонтальной прокрутки hero-формы */
#hero-scroll-wrap { position: relative; }
.hero-form-panel { min-width: 950px; }
#menu-section { padding-bottom: 48px; }
.hero-consent-row { display: flex; justify-content: flex-start; margin-top: 16px; }
#hero-booking .lead-consent { max-width: 20rem; }
@media (min-width: 1024px) {
    .hero-form-panel { min-width: 0; }
    .hero-consent-row { justify-content: center; margin-top: 20px; }
    #hero-booking .lead-consent { max-width: none; }
}
#hero-scroll-fade {
    position: absolute;
    top: 0; right: 0;
    width: 48px;
    height: 0;
    background: linear-gradient(to left, #0a0a0c 12%, rgba(10, 10, 12, .8) 48%, rgba(10, 10, 12, 0) 100%);
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 5;
}
#hero-scroll-hint {
    position: absolute;
    right: 0;
    top: 0;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    border: 1px solid rgba(210, 163, 63, .45);
    background: rgba(10, 10, 12, .72);
    color: #d2a33f;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
    cursor: pointer;
    transition: opacity .3s ease;
}
#hero-scroll-hint svg {
    width: 16px;
    height: 16px;
    animation: hintNudge 1.5s ease-in-out infinite;
}
@keyframes hintNudge {
    0%, 100% { transform: translateX(-4px); opacity: .55; }
    50% { transform: translateX(4px); opacity: 1; }
}
#hero-scroll-hint.is-hidden, #hero-scroll-fade.is-hidden {
    opacity: 0;
    pointer-events: none;
}
@media (min-width: 1024px) {
    #hero-scroll-wrap { padding-right: 0; }
    #hero-scroll-hint, #hero-scroll-fade { display: none; }
}
/* Дата и время в hero-форме */
#hero-datetime, #vip-datetime { cursor: pointer; min-width: 0; }
#hero-datetime-text, #vip-datetime-text {
    color: #6b6b72;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
#hero-datetime-text.has-value, #vip-datetime-text.has-value { color: #fff; }
#datetime-modal { z-index: 120; }
.dt-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.6fr 1fr;
    gap: 12px;
}
.dt-grid-time { grid-template-columns: 1fr 1fr; margin-top: 14px; }
.dt-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dt-field > span {
    font: 600 10px/1 Manrope, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #d2a33f;
}
.dt-field select {
    width: 100%;
    min-width: 0;
    background: #0a0a0c;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    padding: 10px 12px;
    font: 500 14px/1.2 Manrope, sans-serif;
    outline: none;
    color-scheme: dark;
    cursor: pointer;
}
.dt-field select:focus { border-color: rgba(210, 163, 63, .7); }
.dt-preview {
    margin: 18px 0 0;
    font: 500 14px/1.4 Manrope, sans-serif;
    color: #e8e5df;
    text-align: center;
    min-height: 20px;
}
.dt-preview.is-error { color: #e07a5f; }
#dt-apply:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 639px) {
    #vip-modal .glass-panel { padding: 18px; }
    #vip-modal form { gap: 14px; }
    #vip-modal h3 { margin-bottom: 16px; }
}

@media (max-width: 420px) {
    .dt-grid { grid-template-columns: 1fr 1.4fr .9fr; gap: 8px; }
    .dt-field select { padding: 9px 8px; font-size: 13px; }
}
