/* =========================================================
   BLOQUE 1: Variables :root y configuraciones del body / sqr
   ========================================================= */
:root {
    --white: #fffdf7;
    --paper: #fff8ea;
    --ivory: #f8efe0;
    --gold: #c99a42;
    --gold-soft: #f7dd9a;
    --gold-deep: #8b6424;
    --burgundy: #5a0f1b;
    --burgundy-dark: #29020a;
    --burgundy-ink: #3b0710;
    --shadow: 0 24px 70px rgba(25, 0, 8, .36);
    --radius: 28px;
    --max: 1180px;

    /* NODOS DE IMAGEN OPCIONALES */
    --img-novios: url('1.jpg');
    --img-m3: url('2.jpg');
    --img-pase: url('3.jpg');
}

* {
    box-sizing: border-box;
}

sqr {
    scroll-behavior: smooth;
    margin: 0;
    color: var(--burgundy-ink);
    font-family: 'Cormorant Garamond', serif;
    background:
        radial-gradient(circle at 20% 10%, rgba(247, 221, 154, .28) 0 12%, transparent 30%),
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .16) 0 8%, transparent 28%),
        linear-gradient(135deg, #2b020a 0%, #5a0f1b 42%, #270208 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    margin: 0;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: -20%;
    pointer-events: none;
    z-index: 0;
}

body::before {
    background-image:
        radial-gradient(circle, rgba(255, 237, 180, .8) 0 1px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, .65) 0 1px, transparent 2px);
    background-size: 120px 120px, 180px 180px;
    animation: starsDrift 32s linear infinite;
    opacity: .34;
}

body::after {
    background:
        radial-gradient(ellipse at top, rgba(255, 255, 255, .22), transparent 42%),
        linear-gradient(120deg, transparent 0 42%, rgba(255, 215, 130, .1) 50%, transparent 58%);
    mix-blend-mode: screen;
    animation: goldSweep 10s ease-in-out infinite;
    opacity: .55;
}

@keyframes starsDrift {
    to {
        transform: translate3d(-70px, 80px, 0);
    }
}

@keyframes goldSweep {

    0%,
    100% {
        opacity: .25;
        transform: translateX(-4%);
    }

    50% {
        opacity: .72;
        transform: translateX(4%);
    }
}

a {
    color: inherit;
}

@media (prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

@media (max-width:650px) {
    body {
        padding-bottom: 0px;
    }
}

/* =========================================================
   BLOQUE 2: Lógica del .top-nav (Navegación)
   ========================================================= */
.top-nav {
    position: sticky;
    top: 14px;
    align-self: center;
    margin: 0 auto;
    z-index: 99;
    /* SUBIMOS A 99 PARA QUE SOBREVIVA AL OVERLAY DE 89 */
    width: min(94vw, 920px);
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(247, 221, 154, .5);
    border-radius: 999px;
    background: rgba(43, 2, 10, .52);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 38px rgba(0, 0, 0, .22);
}

.top-nav a {
    text-decoration: none;
    color: var(--white);
    font-family: 'Cinzel', serif;
    font-size: clamp(.62rem, 1.7vw, .78rem);
    letter-spacing: .08em;
    padding: 10px 12px;
    border-radius: 999px;
    transition: .28s ease;
    white-space: nowrap;
}

.top-nav a:hover {
    background: rgba(247, 221, 154, .17);
    color: var(--gold-soft);
}

@media (max-width:650px) {
    .top-nav {
        position: sticky;
        top: auto;
        bottom: 12px;
        width: min(94vw, 520px);
        overflow: auto;
        justify-content: flex-start;
        scrollbar-width: none;
        z-index: 100;
        order: 99;
    }

    .top-nav::-webkit-scrollbar {
        display: none;
    }
}

/* =========================================================
   BLOQUE 3: Lógica de <main> (Contenedor maestro)
   ========================================================= */
main {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    margin: 0;
}

.section {
    width: min(100% - 34px, var(--max));
    margin: 0 auto 34px;
    padding: clamp(26px, 4vw, 48px);
    border-radius: var(--radius);
    background: rgba(255, 253, 247, .95);
    border: 1px solid rgba(247, 221, 154, .62);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .22);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.section h2 {
    margin: 0 0 18px;
    text-align: center;
    color: var(--burgundy);
    font-family: 'Great Vibes', cursive;
    font-size: clamp(3rem, 7vw, 5.4rem);
    line-height: 1;
    font-weight: 400;
}

.section-sub {
    text-align: center;
    font-family: 'Cinzel', serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-deep);
    font-size: .82rem;
    margin-top: -8px;
}

@media (max-width:650px) {
    .section {
        width: min(100% - 20px, var(--max));
        padding: 24px 16px;
    }
}

/* =========================================================
   BLOQUE 4: Lógica de .hero, .invite-card, .photo-stage
   ========================================================= */
.hero {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 96px 20px 48px;
}

.invite-card {
    width: min(100%, var(--max));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(18px, 4vw, 46px);
    align-items: center;
    padding: clamp(18px, 3.2vw, 44px);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255, 253, 247, .96), rgba(255, 248, 234, .92)),
        var(--paper);
    box-shadow: var(--shadow);
    border: 1px solid rgba(247, 221, 154, .6);
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.invite-card::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: calc(var(--radius) - 9px);
    border: 1px solid rgba(201, 154, 66, .7);
    pointer-events: none;
    z-index: 2;
}

.invite-card::after {
    content: "";
    position: absolute;
    inset: 23px;
    border-radius: calc(var(--radius) - 18px);
    border: 1px solid rgba(90, 15, 27, .22);
    pointer-events: none;
    z-index: 2;
}

.ornament {
    position: absolute;
    width: 190px;
    height: 190px;
    opacity: .36;
    z-index: 1;
    pointer-events: none;
}

.ornament.tl {
    left: -40px;
    top: -45px;
    transform: rotate(-12deg);
}

.ornament.br {
    right: -42px;
    bottom: -40px;
    transform: rotate(168deg);
}

.ornament svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.photo-stage {
    min-height: 670px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    background-image: var(--img-novios);
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(201, 154, 66, .78);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .36), 0 20px 50px rgba(90, 15, 27, .25);
}

.photo-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(43, 2, 10, .62), transparent 45%),
        radial-gradient(circle at 50% 17%, rgba(247, 221, 154, .48), transparent 24%);
}

.photo-stage::after {
    content: "M&A";
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--gold-soft);
    font-family: 'Pinyon Script', cursive;
    font-size: 2.1rem;
    background: radial-gradient(circle, #7a1827, #3b0710 70%);
    border: 2px solid rgba(247, 221, 154, .74);
    box-shadow: 0 0 0 8px rgba(90, 15, 27, .18), 0 12px 34px rgba(0, 0, 0, .32);
}

.content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: clamp(26px, 3vw, 42px) clamp(10px, 3vw, 26px);
}

.eyebrow {
    font-family: 'Cinzel', serif;
    color: var(--gold-deep);
    letter-spacing: .27em;
    text-transform: uppercase;
    font-size: .84rem;
    margin: 0 0 16px;
    font-weight: 700;
}

.script-title {
    font-family: 'Great Vibes', cursive;
    color: var(--burgundy);
    font-size: clamp(4.1rem, 9vw, 8.2rem);
    line-height: .86;
    margin: 0;
    text-shadow: 0 5px 18px rgba(201, 154, 66, .25);
}

.amp {
    font-family: 'Pinyon Script', cursive;
    color: var(--gold);
    font-size: .86em;
    display: inline-block;
    margin: 0 .03em;
}

.intro {
    max-width: 560px;
    margin: 24px auto 20px;
    font-size: clamp(1.24rem, 2.4vw, 1.58rem);
    line-height: 1.35;
    color: #4a0712;
}

.date-pill {
    margin: 28px auto;
    width: min(100%, 465px);
    padding: 16px 18px;
    border-block: 1px solid rgba(201, 154, 66, .75);
    display: flex;
    justify-content: center;
    gap: 18px;
    align-items: center;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    color: var(--burgundy);
    letter-spacing: .08em;
    font-weight: 700;
}

.date-pill .day {
    font-size: clamp(2.5rem, 6vw, 4.4rem);
    color: var(--gold-deep);
    line-height: 1;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 24px auto 10px;
    max-width: 650px;
}

.detail-box {
    border: 1px solid rgba(201, 154, 66, .48);
    border-radius: 18px;
    padding: 18px 16px;
    background: rgba(255, 255, 255, .54);
    box-shadow: 0 12px 28px rgba(90, 15, 27, .08);
}

.detail-box h3 {
    margin: 0 0 8px;
    font-family: 'Cinzel', serif;
    font-size: .92rem;
    letter-spacing: .14em;
    color: var(--gold-deep);
    text-transform: uppercase;
}

.detail-box p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.25;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 28px;
}

.btn {
    border: 0;
    cursor: pointer;
    text-decoration: none;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 19px;
    border-radius: 999px;
    font-family: 'Cinzel', serif;
    letter-spacing: .06em;
    font-size: .82rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--burgundy), #7e1a2b);
    box-shadow: 0 12px 28px rgba(90, 15, 27, .28);
    transition: .24s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(90, 15, 27, .34);
}

.btn.gold {
    background: linear-gradient(135deg, #a8792f, #e2bd68);
    color: #35040b;
}

.btn.ghost {
    background: rgba(255, 253, 247, .74);
    color: var(--burgundy);
    border: 1px solid rgba(201, 154, 66, .68);
    box-shadow: none;
}

@media (max-width:970px) {
    .invite-card {
        grid-template-columns: 1fr;
    }

    .photo-stage {
        min-height: 520px;
        order: 2;
    }

    .content {
        order: 1;
    }
}

@media (max-width:650px) {
    .hero {
        padding: 26px 14px 38px;
    }

    .invite-card {
        padding: 14px;
        border-radius: 22px;
    }

    .invite-card::before {
        inset: 8px;
        border-radius: 17px;
    }

    .invite-card::after {
        display: none;
    }

    .photo-stage {
        min-height: 380px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .date-pill {
        gap: 10px;
        padding: 12px 8px;
        font-size: .78rem;
    }
}

/* =========================================================
   BLOQUE 5: Lógica de la sección #familias y sus divisores
   ========================================================= */
.family-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
    border: 1px solid rgba(201, 154, 66, .52);
    border-radius: 24px;
    padding: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .65), rgba(255, 248, 234, .82));
}

.family-side {
    text-align: center;
}

.family-side h3 {
    font-family: 'Cinzel', serif;
    color: var(--gold-deep);
    font-size: .92rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.family-side p {
    font-size: 1.32rem;
    line-height: 1.42;
}

.family-divider {
    width: 1px;
    height: 140px;
    background: linear-gradient(to bottom, transparent, var(--gold), transparent);
}

.memory {
    font-style: italic;
    color: var(--burgundy);
}

@media (max-width: 970px) {
    .family-card {
        grid-template-columns: 1fr;
    }

    .family-divider {
        width: 220px;
        height: 1px;
        margin: auto;
        background: linear-gradient(to right, transparent, var(--gold), transparent);
    }
}

/* =========================================================
   BLOQUE 6: Lógica de #programa, .timeline, .time-card
   ========================================================= */
.timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 26px;
}

.time-card {
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(201, 154, 66, .45);
    background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 248, 234, .72));
    text-align: center;
}

.time-card .time {
    font-family: 'Cinzel', serif;
    color: var(--burgundy);
    font-size: 1.45rem;
    font-weight: 700;
}

.time-card h3 {
    margin: 10px 0 8px;
    color: var(--gold-deep);
    font-family: 'Cinzel', serif;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .13em;
}

.time-card p {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.26;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px auto 0;
    max-width: 760px;
}

.count-box {
    border-radius: 18px;
    padding: 16px 10px;
    background: linear-gradient(180deg, #fffef8, #f4e2ba);
    border: 1px solid rgba(201, 154, 66, .6);
    text-align: center;
}

.count-box strong {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: clamp(1.8rem, 5vw, 3.1rem);
    color: var(--burgundy);
    line-height: 1;
}

.count-box span {
    font-family: 'Cinzel', serif;
    font-size: .7rem;
    letter-spacing: .12em;
    color: var(--gold-deep);
    text-transform: uppercase;
}

@media (max-width:970px) {
    .timeline {
        grid-template-columns: 1fr;
    }
}

@media (max-width:650px) {
    .countdown {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================
   BLOQUE 7: Lógica de #ubicacion, .tabs, .pass-ticket, etc.
   ========================================================= */
.tabs {
    margin-top: 28px;
}

.tab-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.tab-btn {
    border: 1px solid rgba(201, 154, 66, .65);
    border-radius: 999px;
    padding: 12px 16px;
    background: #fffdf7;
    color: var(--burgundy);
    font-family: 'Cinzel', serif;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    cursor: pointer;
    min-height: 44px;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--burgundy), #7b1d2b);
    color: var(--white);
    border-color: transparent;
}

.tab-panel {
    display: none;
    animation: fadeUp .42s ease both;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(9px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-layout {
    display: grid;
    grid-template-columns: .86fr 1.14fr;
    gap: 18px;
    align-items: stretch;
}

.venue-info {
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(90, 15, 27, .96), rgba(41, 2, 10, .96));
    color: var(--white);
    border: 1px solid rgba(247, 221, 154, .58);
}

.venue-info h3 {
    font-family: 'Cinzel', serif;
    color: var(--gold-soft);
    margin: 0 0 12px;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.venue-info p {
    font-size: 1.13rem;
    line-height: 1.35;
    margin: 0 0 16px;
}

.map-box {
    min-height: 330px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(201, 154, 66, .6);
    background: #efe0bd;
}

.map-box iframe {
    width: 100%;
    height: 100%;
    min-height: 330px;
    border: 0;
    display: block;
}

.pass-wrap {
    display: grid;
    grid-template-columns: 1fr .9fr;
    gap: 20px;
    align-items: center;
    margin-top: 24px;
}

.pass-ticket {
    position: relative;
    min-height: 380px;
    border-radius: 28px;
    padding: 28px;
    overflow: hidden;
    background-image: var(--img-pase);
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(201, 154, 66, .8);
    box-shadow: 0 22px 40px rgba(90, 15, 27, .16);
}

.pass-ticket::before,
.pass-ticket::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid rgba(201, 154, 66, .5);
}

.pass-ticket::before {
    left: -22px;
}

.pass-ticket::after {
    right: -22px;
}

.pass-copy {
    position: relative;
    z-index: 2;
    max-width: 58%;
    color: var(--burgundy);
}

.pass-copy h3 {
    font-family: 'Cinzel', serif;
    letter-spacing: .16em;
    color: var(--gold-deep);
    margin: 0 0 8px;
    text-transform: uppercase;
}

.pass-copy .two {
    font-family: 'Great Vibes', cursive;
    font-size: 5rem;
    color: var(--burgundy);
    line-height: .9;
    margin: 8px 0;
}

.pass-copy p {
    font-size: 1.18rem;
    line-height: 1.2;
    margin: 0;
}

.pass-seal {
    position: absolute;
    right: 45px;
    bottom: 38px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, #7d1c2a, #3b0710);
    color: var(--gold-soft);
    font-family: 'Pinyon Script', cursive;
    font-size: 2.2rem;
    border: 2px solid rgba(247, 221, 154, .75);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
}

.alt-card {
    min-height: 420px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 32px;
    color: var(--white);
    background-image: var(--img-m3);
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(247, 221, 154, .66);
    overflow: hidden;
    position: relative;
}

.alt-card h3 {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(4rem, 9vw, 7rem);
    font-weight: 400;
    margin: 0;
    text-shadow: 0 8px 28px rgba(0, 0, 0, .4);
}

.alt-card p {
    font-family: 'Cinzel', serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-soft);
}

.contact-grid {
    display: grid;
    grid-template-columns: .88fr 1.12fr;
    gap: 18px;
    align-items: start;
    margin-top: 24px;
}

.qr-card,
.private-card {
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(201, 154, 66, .56);
    background: linear-gradient(180deg, rgba(255, 255, 255, .76), rgba(255, 248, 234, .82));
    text-align: center;
}

.qr-frame {
    width: min(100%, 235px);
    aspect-ratio: 1;
    margin: 10px auto 16px;
    padding: 12px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(201, 154, 66, .65);
    box-shadow: 0 14px 32px rgba(90, 15, 27, .14);
}

.qr-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.input-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 18px 0 12px;
}

input[type="password"],
input[type="text"] {
    min-height: 46px;
    border: 1px solid rgba(201, 154, 66, .65);
    border-radius: 999px;
    padding: 0 16px;
    font: 600 1rem 'Cormorant Garamond', serif;
    color: var(--burgundy);
    background: #fffdf7;
    outline: none;
    min-width: 210px;
}

.phone-actions {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}

.phone-actions.show {
    display: grid;
    animation: fadeUp .38s ease both;
}

.note {
    font-size: .96rem;
    opacity: .8;
    margin: 10px 0 0;
}

.helper {
    max-width: 620px;
    margin: 22px auto;
    font-size: clamp(1.2rem, 2.4vw, 1.56rem);
    line-height: 1.35;
}

.search-form {
    display: flex;
    gap: 12px;
    max-width: 760px;
    margin: 22px auto 0;
    align-items: center;
}

.search-form input {
    min-height: 50px;
    flex: 1;
    border: 1px solid rgba(201, 154, 66, .75);
    border-radius: 999px;
    padding: 0 18px;
    font: 600 1.02rem 'Cormorant Garamond', serif;
    color: var(--burgundy);
    background: #fffdf7;
    outline: none;
}

.form-message {
    text-align: center;
    margin: 16px auto;
    font-weight: 700;
}

.form-message.error {
    color: #ad2232;
}

.form-message.ok {
    color: #477a2f;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

@media (max-width:970px) {

    .map-layout,
    .pass-wrap,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .pass-copy {
        max-width: 66%;
    }
}

@media (max-width:650px) {

    .map-box,
    .map-box iframe {
        min-height: 285px;
    }

    .pass-ticket {
        min-height: 360px;
        padding: 22px;
    }

    .pass-copy {
        max-width: 100%;
    }

    .pass-seal {
        right: 24px;
        bottom: 22px;
        width: 86px;
        height: 86px;
        font-size: 1.8rem;
    }

    .phone-actions {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form input,
    .search-form .btn {
        width: 100%;
    }
}

/* =========================================================
   BLOQUE 8: Lógica del footer estándar del main
   ========================================================= */
footer {
    margin: 0 auto;
    width: min(100% - 34px, var(--max));
    text-align: center;
    font-family: 'Cinzel', serif;
    letter-spacing: .08em;
    font-size: .75rem;
    opacity: .96;
}

@media (max-width: 650px) {
    footer {
        padding-bottom: 40px;
    }
}

.floating-petal {
    position: fixed;
    top: -20px;
    width: 10px;
    height: 16px;
    border-radius: 80% 20% 80% 20%;
    background: linear-gradient(135deg, #7d1c2a, #f7dd9a);
    opacity: .68;
    z-index: 0;
    pointer-events: none;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translate3d(var(--x), 105vh, 0) rotate(520deg);
        opacity: 0;
    }
}

/* =========================================================
   BLOQUE 9: Lógica del Sello BDH (Minifooter BDH)
   ========================================================= */
/* =========================================================
   FIRMA INFERIOR · BDH MICRO FOOTER
   PEGADA AL PIE DE LA INTERFAZ Y A LA IZQUIERDA
   ========================================================= */

.bdh-footer-bottom {
    width: 100%;
    margin: 0;
    padding: 0.45rem 0 0.35rem 0;
    /* Padding izquierdo en 0 para que pegue al borde */
    display: flex;
    justify-content: flex-start;
    /* Ancla los elementos a la izquierda */
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-family: "Segoe UI", sans-serif;
    font-size: 0.58rem;
    line-height: 1.2;
    color: rgba(60, 0, 16, 0.55);
}

/* ---------------------------------------------------------
   COPYRIGHT
   --------------------------------------------------------- */

.footer-copy {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.footer-copy span {
    color: rgba(26, 23, 20, 0.75);
}

/* ---------------------------------------------------------
   EMOJI BDH
   --------------------------------------------------------- */

.bdh-emoji-opaco {
    opacity: 0.42;
    filter: grayscale(15%);
}

/* =========================================================
   FIRMA LORD BDH
   ========================================================= */

.bdh-signature-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.bdh-trigger {
    cursor: pointer;
    color: rgba(21, 21, 19, 0.863);
    transition: color 0.25s ease, text-shadow 0.25s ease;
    outline: none;
}

.bdh-trigger:hover {
    color: rgba(255, 0, 212, 0.82);
    text-shadow: 0 0 10px rgba(255, 0, 212, 0.35);
}

/* =========================================================
   FIRMA / BUBBLE
   ========================================================= */

.bdh-bubble {
    position: absolute;
    bottom: calc(100% + 9px);
    /* Se ajusta ligeramente el centro para que no se vea desfasado al estar tan a la izquierda */
    left: 0;
    transform: translateY(4px) scale(0.96);
    transform-origin: bottom left;

    opacity: 0;
    visibility: hidden;
    width: max-content;
    max-width: 280px;
    padding: 0.65rem 0.9rem;
    border-radius: 12px;

    /* GLASS TRANSPARENTE */
    background: rgba(29, 28, 28, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(16, 15, 16, 0.28);
    box-shadow:
        0 8px 30px rgba(30, 29, 29, 0.28),
        0 0 18px rgba(26, 25, 26, 0.08);
    color: #4b4546;
    border: px solid rgba(201, 166, 70, .5);
    text-align: left;
    /* Alineado a la izquierda para coherencia */
    font-family: "Segoe UI", sans-serif;
    font-size: 0.55rem;
    line-height: 1.5;
    white-space: nowrap;

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease;

    z-index: 9999;
    pointer-events: none;
}

@media (max-width: 650px) {
    .bdh-bubble {
        /* 
         * Incrementa el vector Y de despegue. 
         * 75px compensa los 12px de separación del top-nav + el volumen de la barra + un margen limpio.
         */
        bottom: calc(100% + 75px);

        /* 
         * Refuerza la geometría de la animación para que visualmente 
         * siga brotando desde la esquina inferior izquierda donde reside su firma.
         */
        transform-origin: bottom left;
    }
}

/* ---------------------------------------------------------
   ACTIVACIÓN NATIVA
   SIN JAVASCRIPT (Purgado el foco para evitar retención de clic)
   --------------------------------------------------------- */

.bdh-signature-wrapper:hover .bdh-bubble {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

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

@media (max-width: 700px) {
    .bdh-footer-bottom {
        padding: 0.45rem 0 0.35rem 0;
        /* Padding izquierdo en 0 para que pegue al borde */
        display: flex;
        justify-content: flex-start;
        /* Ancla los elementos a la izquierda */
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    /*{
        width: 100%;
        margin: 0;
        align-self: flex-start;
        /* Mantiene izquierda estricta */
    /*padding-bottom: 0;
        margin-bottom: 0;
       white-space: nowrap;
    }*/

    .footer-copy {
        justify-content: flex-start;
        /* Mantiene izquierda estricta */
        flex-wrap: wrap;
        white-space: nowrap;
        margin-bottom: 0;
    }
}

/* =========================================================
   PASE MAESTRO (INYECTADO POR BACKEND) Y MODO IMPRESIÓN
   ========================================================= */
.ticket-master {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    background: #fffdf7;
    border-radius: 28px;
    border: 2px solid rgba(201, 154, 66, 0.7);
    box-shadow: 0 24px 50px rgba(90, 15, 27, 0.18);
    overflow: hidden;
    margin: 20px auto;
    max-width: 850px;
}

.ticket-m-img {
    background: url('https://github.com/BlixDarkHorse/mya2026.galaxymanager.systems-by-LORD-BDH/blob/main/data/IMPRESO/1.jpg?raw=true') center/cover no-repeat;
    position: relative;
    min-height: 100%;
}

.ticket-m-info {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.ticket-m-info h3 {
    font-family: 'Cinzel', serif;
    color: var(--gold-deep);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 12px;
    font-size: 0.9rem;
}

.ticket-m-name {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(3rem, 6vw, 4.2rem);
    color: var(--burgundy);
    line-height: 0.9;
    margin: 0 0 20px;
}

.ticket-events {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid rgba(201, 154, 66, 0.4);
    border-bottom: 1px solid rgba(201, 154, 66, 0.4);
    margin-bottom: 20px;
}

.e-col h4 {
    font-family: 'Cinzel', serif;
    color: var(--burgundy);
    margin: 0 0 6px;
    font-size: 0.85rem;
}

.e-col p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--burgundy-ink);
}

.ticket-m-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.ticket-m-footer .details p {
    margin: 4px 0;
    font-size: 1.1rem;
}

.qr-box {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90px;
    height: 90px;
    background: #fff;
    padding: 6px;
    border: 1px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.qr-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-print-row {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

@media (max-width: 650px) {
    .ticket-master {
        grid-template-columns: 1fr;
    }

    .ticket-m-img {
        min-height: 280px;
    }

    .ticket-events {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* AISLAMIENTO PARA IMPRESIÓN (OCULTA LA UI INNECESARIA) */
/* =========================================================
   AISLAMIENTO PARA IMPRESIÓN BARE METAL
   ========================================================= */
@media print {
    /* 1. Aniquilación de geometría base y fondos inline */
    html, body { 
        background: transparent !important; 
        background-image: none !important; 
    } /* <--- ESTA ES LA LLAVE QUE FALTABA PARA EVITAR EL COLAPSO */
     /* Ocultar el overlay de LORD BDH y el resto del DOM */
    .top-nav, .hero, #familias, #programa, #ubicacion, footer, .bdh-footer-bottom { 
        display: none !important; 
    }
    
    /* 2. Reposicionamiento absoluto del nodo objetivo */
    #pase-directo {
        display: block !important;
        position: center;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }

    /* 3. Purgado de textos ajenos y botón dentro de la sección */
    .section-sub, #pase-directo h2, .btn-print-row {
        display: none !important;
    }

    /* 4. Forzado de tinta para el diseño del pase */
    .ticket-master {
        box-shadow: none !important;
        border: 2px solid #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        margin: 0 auto;
        print-color-adjust: exact;
    }
    .btn-print-row, .bdh-footer-bottom {
        display: none !important;
    }

    @page {
    margin: 0; /* Aniquila instantáneamente los encabezados y pies de página inyectados por el navegador */
    }

}

/* =========================================================
   ENCABEZADO SUPERPUESTO (LORD BDH OVERLAY)
   ========================================================= */
/* =========================================================
   ENCABEZADO SUPERPUESTO (LORD BDH OVERLAY - VERSIÓN BANNER ESTIRADO)
   ========================================================= */
.bdh-header-overlay {
    position: absolute; 
    top: 0;
    left: 0;
    width: 100vw; 
    
    /* 1. HACE LA CAJA MÁS CHICA (Menos invasiva hacia abajo) */
    height: 220px; 
    
    /* 2. ALARGA Y HACE MÁS CHICA LA IMAGEN (Fuerza bruta de estiramiento)
       Al usar '100% 100%', la imagen se estira a lo ancho de la pantalla 
       y se comprime en los 220px de alto, haciendo que las flores se vean pequeñas. */
    background: url('11.jpeg') top center / 100% 100% no-repeat;
    
    /* HUNDIMIENTO FÁCTICO DE PROFUNDIDAD */
    z-index: 89; 
    pointer-events: none; 
    
    /* Degradado suavizado para la nueva altura corta */
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}


/* =========================================================
   ESTRUCTURA TIPO LIBRO / CARRUSEL (OBSIDIAN-GOLD BDH)
   ========================================================= */
.book-container {
    width: min(100%, 950px);
    display: flex;
    flex-direction: column;
    gap: 60px;
    scroll-behavior: smooth;
}

.epic-black-card {
    background: linear-gradient(135deg, #0d0407 0%, #1a080e 100%);
    border: 2px solid var(--gold);
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), inset 0 0 40px rgba(201, 154, 66, 0.12);
    color: var(--white);
    padding: clamp(24px, 4vw, 48px);
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
}

.epic-black-card::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: calc(var(--radius) - 8px);
    border: 1px solid rgba(201, 154, 66, 0.4);
    pointer-events: none;
}