/* ══════════════════════════════════════════════════════════════════
   Intro – scrollytelling s popisky Mariánského sloupu
   ══════════════════════════════════════════════════════════════════ */

/* ── Sekce s extra výškou pro scroll budget ───────────────────── */
.intro-scroll-section {
    /* 1 viewport sticky + 4 × 1 viewport = 300 vh celkem        */
    /* Každý popisek se zobrazí po 60 vh scrollování             */
    height: 300vh;
    /* Prolomí padding z .site-main                               */
    margin: -2rem -1.5rem 2rem;
}

/* ── Sticky wrapper – zůstává na místě při scrollu ───────────── */
.intro-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-primary);
}

/* ── Scéna – relativní kontejner pro obrázek, SVG a popisky ─── */
.intro-scene {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Obrázek ──────────────────────────────────────────────────── */
.intro-img {
    max-height: 90vh;
    max-width: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    /* Přepis globálních stylů z site.css */
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    pointer-events: none;
    user-select: none;
    position: relative;
    z-index: 1;
}

/* ── SVG vrstva (šipky a tečky) ───────────────────────────────── */
.intro-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 2;
}

.intro-svg line,
.intro-svg circle {
    transition: opacity 0.5s ease;
}

/* ── Popisky ─────────────────────────────────────────────────── */
.intro-label {
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 3;
}

.intro-label.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Rámeček popisku */
.label-frame {
    display: inline-block;
    background: rgba(6, 14, 36, 0.90);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    text-decoration: none;
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    border-radius: var(--radius);
    white-space: nowrap;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.label-frame:hover {
    text-decoration: none;
    color: inherit;
}

/* ── Hlavní nadpis ───────────────────────────────────────────── */
.index-title {
    margin-bottom: 5rem;
}

.index-title > h1 {
    text-align: center;
    font-weight: 200;
    font-size: clamp(1.2rem, 4vw, 3rem);
}

.index-title h1 {
    margin: 0 5vw;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

@media (max-width: 640px) {
    .index-title h1 {
        margin: 0;
    }
}

/* ── Úzký viewport: menší text, povolené zalomení, žádný boční okraj ── */
@media (max-width: 767px) {
    .intro-scroll-section {
        margin-left: 0;
        margin-right: 0;
    }

    .intro-img {
        max-width: 100%;
    }

    .label-frame {
        font-size: 1rem;
        padding: 0.6rem 1rem;
        white-space: normal;
        min-width: 130px;
        text-align: center;
        line-height: 1.4;
    }
}
