/* ==========================================================================
   ACF BLOCK: STADIUM 3D (interaktywny model Camp Nou)
   Ładowane tylko na stronach, na których jest ten blok.
   ========================================================================== */

.stadium-3d {
    margin: var(--spacing-10, 2.5rem) 0;
    padding: 0;
}

.stadium-3d__stage {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #070b16;
    overflow: hidden;
    box-shadow: 8px 8px 0 var(--color-accent, #edbb00);
}

/* ---------- ekran startowy ---------- */
.stadium-3d__poster {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    background-color: #070b16;
    background-size: cover;
    background-position: center 40%;
}

.stadium-3d__poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 11, 22, 0.8) 0%, rgba(7, 11, 22, 0.35) 55%, rgba(7, 11, 22, 0) 80%),
        linear-gradient(180deg, rgba(7, 11, 22, 0.1) 0%, rgba(7, 11, 22, 0.45) 45%, rgba(7, 11, 22, 0.95) 100%);
}

.stadium-3d__poster-inner {
    position: relative;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    max-width: 38rem;
    color: #fff;
}

.stadium-3d__eyebrow {
    display: inline-block;
    font-family: var(--font-mono, monospace);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #fff;
    background: var(--color-primary, #a50044);
    padding: 0.4rem 0.7rem;
    margin-bottom: 0.9rem;
}

.single-post .stadium-3d__title,
.stadium-3d__title {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1.5rem, 3.4vw, 2.25rem) !important;
    font-weight: 800;
    line-height: 1.1;
    color: #fff !important;
    margin: 0 0 0.6rem !important;
    padding: 0 !important;
    border: 0 !important;
}

.single-post .stadium-3d__text,
.stadium-3d__text {
    font-family: var(--font-body, sans-serif);
    font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
    line-height: 1.5;
    color: #d7dcea !important;
    margin: 0 0 1.25rem !important;
}

.stadium-3d__start {
    appearance: none;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--color-accent, #edbb00);
    color: #0a0a0a;
    font-family: var(--font-mono, monospace);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 1rem 1.5rem;
    box-shadow: 5px 5px 0 #000;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stadium-3d__start:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 #000;
}

.stadium-3d__start:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

.stadium-3d__start:focus-visible,
.stadium-3d__expand:focus-visible,
.stadium-3d__close:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.stadium-3d__start[disabled] {
    cursor: default;
}

/* ---------- model w ramce ---------- */
.stadium-3d__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #070b16;
}

.stadium-3d.is-loaded .stadium-3d__poster {
    display: none;
}

/* Przyciski pełnego ekranu / zamknięcia — pod pigułkami SECTORS/GATES modelu,
   jedyne miejsce wolne od HUD-u (logo, przyciski, panel miejsca, formularz biletu) */
.stadium-3d__expand,
.stadium-3d__close {
    position: absolute;
    z-index: 3;
    left: 24px;
    top: 132px;
    appearance: none;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(12, 18, 38, 0.85);
    color: #fff;
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    font-family: var(--font-mono, monospace);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.6rem 0.8rem;
}

.stadium-3d__expand:hover,
.stadium-3d__close:hover {
    box-shadow: inset 0 0 0 1.5px #fff;
}

.stadium-3d__expand[hidden],
.stadium-3d__close[hidden] {
    display: none;
}

/* ---------- pełny ekran (własna nakładka — działa też na iPhonie) ---------- */
.stadium-3d.is-expanded .stadium-3d__stage {
    position: fixed;
    inset: 0;
    z-index: 999999;
    aspect-ratio: auto;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    box-shadow: none;
}

.stadium-3d.is-expanded .stadium-3d__close {
    top: calc(env(safe-area-inset-top, 0px) + 132px);
    background: var(--color-accent, #edbb00);
    color: #0a0a0a;
    box-shadow: 4px 4px 0 #000;
}

html.stadium-3d-lock,
html.stadium-3d-lock body {
    overflow: hidden !important;
}

.stadium-3d__note {
    margin-top: 1.1rem;
    font-family: var(--font-mono, monospace);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    color: var(--color-gray-500, #71717a);
    text-align: left;
}

@media (max-width: 640px) {
    .stadium-3d__stage {
        aspect-ratio: 4 / 5;
        box-shadow: 5px 5px 0 var(--color-accent, #edbb00);
    }

    .stadium-3d__poster {
        background-position: center 30%;
    }
}
