/* ============================================================
   SIV Hero Slider — Modern Layouts
   правки/siv-hero-layouts.css  |  v1.0
   Добавляет: Layout 2 (Boxed Card) и Layout 3 (Modern Glass)
   ============================================================ */

/* ─── Text Inner Wrapper ─────────────────────────────────── */
/* В classic/boxed — просто блок-обёртка, не меняет визуал.
   В modern — становится левой колонкой (flex: 1). */
.siv-text-inner {
    /* default: block — ничего не ломает в classic/boxed */
}

.siv-hero[data-layout="modern"] .siv-text-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

/* ─── Navigation Arrows ──────────────────────────────────── */
/* Элементы рендерятся только для layout=modern (PHP conditional),
   поэтому display:none-default не нужен — зато нужны базовые стили. */
.siv-nav {
    display: flex;
    position: absolute;
    top: 42%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    cursor: pointer;
    z-index: 25;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
}

.siv-nav svg {
    width: 22px;
    height: 22px;
    fill: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    pointer-events: none;
}

.siv-nav--prev { left: 24px; }
.siv-nav--next { right: 24px; }

.siv-nav:hover {
    background: rgba(255, 255, 255, 0.20);
    border-color: rgba(255, 255, 255, 0.38);
    transform: translateY(-50%) scale(1.08);
}

/* ─── Slide Counter ──────────────────────────────────────── */
/* Рендерится только для layout=modern */
.siv-counter {
    position: absolute;
    top: 32px;
    right: 40px;
    z-index: 25;
    font-family: 'Montserrat', sans-serif;
    text-align: right;
    pointer-events: none;
    line-height: 1;
}

.siv-counter-cur {
    display: block;
    font-size: 30px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 2px;
}

.siv-counter-sep,
.siv-counter-total {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.50);
    letter-spacing: 1px;
}

/* ─── Progress Bar ───────────────────────────────────────── */
/* Рендерится только для layout=modern */
.siv-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 26;
    overflow: hidden;
}

.siv-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d4af37, #f4d03f);
}

/* ============================================================
   LAYOUT 2 — BOXED CARD
   Слайдер как большая закруглённая карточка, текст снизу
   ============================================================ */

.siv-hero[data-layout="boxed"] {
    border-radius: 26px !important;
    max-width: 1380px;
    margin-left: auto;
    margin-right: auto;
    height: 78vh !important;
    min-height: 520px !important;
    max-height: 840px !important;
    box-shadow:
        0 32px 80px rgba(0, 0, 0, 0.38),
        0 8px 24px rgba(0, 0, 0, 0.20),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

/* Градиент снизу вверх (не сбоку, как в classic) */
.siv-hero[data-layout="boxed"] .siv-slide::after {
    background: linear-gradient(
        to top,
        rgba(8, 18, 44, 0.94) 0%,
        rgba(8, 18, 44, 0.70) 28%,
        rgba(8, 18, 44, 0.22) 58%,
        rgba(8, 18, 44, 0.02) 100%
    ) !important;
}

/* Контент — колонка, прижата ко дну */
.siv-hero[data-layout="boxed"] .siv-content {
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    max-width: 100%;
    padding: 0 56px 52px;
}

.siv-hero[data-layout="boxed"] .siv-text {
    padding-right: 0;
    max-width: 700px;
}

/* Скрыть фото гида в boxed */
.siv-hero[data-layout="boxed"] .siv-guide {
    display: none !important;
}

.siv-hero[data-layout="boxed"] .siv-title {
    font-size: clamp(28px, 3.4vw, 52px);
}

/* Точки позиционировать нижний правый угол */
.siv-hero[data-layout="boxed"] .siv-dots {
    right: 56px;
    bottom: 56px;
}
/* Note: частицы обрезаются автоматически через overflow:hidden на родителе — отдельный border-radius не нужен */

/* ============================================================
   LAYOUT 3 — MODERN (frosted glass panel)
   Закруглённый слайдер, стеклянная панель снизу,
   навигационные стрелки, счётчик, прогрессбар
   ============================================================ */

.siv-hero[data-layout="modern"] {
    border-radius: 24px !important;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    height: 88vh !important;
    min-height: 580px !important;
    max-height: 960px !important;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.42),
        0 12px 36px rgba(0, 0, 0, 0.26),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

/* Лёгкий градиент снизу — основной фон обеспечивает стеклопанель */
.siv-hero[data-layout="modern"] .siv-slide::after {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.50) 0%,
        rgba(0, 0, 0, 0.18) 28%,
        rgba(0, 0, 0, 0.00) 55%
    ) !important;
}

/* Контент — колонка, прижата снизу */
.siv-hero[data-layout="modern"] .siv-content {
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    max-width: 100%;
    padding: 0;
    padding-bottom: 3px; /* место под прогрессбар */
}

/* Скрыть фото гида */
.siv-hero[data-layout="modern"] .siv-guide {
    display: none !important;
}

/* ── Frosted Glass Panel ── */
.siv-hero[data-layout="modern"] .siv-text {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    padding: 36px 48px 42px !important; /* override base padding-right:40px */
    margin: 0 24px 24px;
    background: rgba(8, 14, 34, 0.60);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Subtitle с линией слева */
.siv-hero[data-layout="modern"] .siv-subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.siv-hero[data-layout="modern"] .siv-subtitle::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: currentColor;
    flex-shrink: 0;
}

.siv-hero[data-layout="modern"] .siv-title {
    font-size: clamp(26px, 3vw, 48px);
    margin-bottom: 14px;
}

.siv-hero[data-layout="modern"] .siv-desc {
    max-width: 500px;
    margin-bottom: 20px;
}

.siv-hero[data-layout="modern"] .siv-place {
    margin-bottom: 0;
}

/* Кнопки — правая колонка панели */
.siv-hero[data-layout="modern"] .siv-buttons {
    flex-shrink: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-width: 200px;
    animation: none;
    opacity: 1;
    transform: none;
}

.siv-hero[data-layout="modern"] .siv-btn {
    width: 100%;
    justify-content: center;
}

/* ── Прогрессбар — скругление нижних углов совпадает с hero ── */
.siv-hero[data-layout="modern"] .siv-progress {
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

/* Точки скрыть в modern (используем счётчик + прогрессбар) */
.siv-hero[data-layout="modern"] .siv-dots {
    display: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
    .siv-hero[data-layout="modern"] .siv-nav--prev { left: 16px; }
    .siv-hero[data-layout="modern"] .siv-nav--next { right: 16px; }
}

@media (max-width: 1024px) {
    .siv-hero[data-layout="boxed"] {
        border-radius: 20px !important;
        height: 75vh !important;
    }

    .siv-hero[data-layout="boxed"] .siv-content {
        padding: 0 28px 36px;
    }

    .siv-hero[data-layout="modern"] {
        border-radius: 18px !important;
    }

    .siv-hero[data-layout="modern"] .siv-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        padding: 28px 28px 32px !important;
        margin: 0 16px 16px;
    }

    .siv-hero[data-layout="modern"] .siv-buttons {
        flex-direction: row;
        align-items: flex-start;
        min-width: 0;
        width: 100%;
    }

    .siv-hero[data-layout="modern"] .siv-btn {
        width: auto;
    }

    .siv-hero[data-layout="modern"] .siv-nav {
        width: 44px;
        height: 44px;
    }

    .siv-hero[data-layout="modern"] .siv-counter {
        top: 20px;
        right: 20px;
    }

    .siv-hero[data-layout="modern"] .siv-counter-cur {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .siv-hero[data-layout="boxed"],
    .siv-hero[data-layout="modern"] {
        border-radius: 14px !important;
        height: 88vh !important;
        max-height: none !important;
    }

    .siv-hero[data-layout="boxed"] .siv-content {
        padding: 0 20px 28px;
    }

    .siv-hero[data-layout="modern"] .siv-text {
        padding: 20px 20px 24px !important;
        margin: 0 12px 12px;
        border-radius: 12px;
    }

    .siv-hero[data-layout="modern"] .siv-buttons {
        flex-direction: column;
        width: 100%;
    }

    .siv-hero[data-layout="modern"] .siv-btn {
        width: 100%;
        justify-content: center;
    }

    .siv-hero[data-layout="modern"] .siv-nav {
        display: none;
    }

    .siv-hero[data-layout="modern"] .siv-progress {
        height: 4px;
        border-radius: 0 0 14px 14px;
    }

    .siv-hero[data-layout="modern"] .siv-counter {
        display: none;
    }
}
