/* Galería pública premium */
.gallery-experience {
    background:
        radial-gradient(circle at 8% 10%, color-mix(in srgb, var(--event-primary) 12%, transparent), transparent 28%),
        radial-gradient(circle at 92% 28%, color-mix(in srgb, var(--event-secondary) 12%, transparent), transparent 25%),
        #fbf8fa;
    padding-bottom: 6rem;
}

.gallery-hero {
    position: relative;
    min-height: 68svh;
    color: #fff;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--event-primary) 80%, #15101d), color-mix(in srgb, var(--event-secondary) 78%, #15101d));
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.gallery-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 78% 18%, rgba(255,255,255,.22), transparent 30%),
        linear-gradient(180deg, rgba(10,6,16,.12), rgba(10,6,16,.52));
    pointer-events: none;
}

.gallery-hero::after {
    position: absolute;
    right: -8rem;
    bottom: -10rem;
    content: "Recuerdos";
    color: rgba(255,255,255,.08);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(6rem, 18vw, 18rem);
    font-weight: 700;
    letter-spacing: -.08em;
    line-height: 1;
    pointer-events: none;
}

.gallery-nav {
    position: relative;
    z-index: 2;
    display: flex;
    max-width: 1240px;
    margin: auto;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.5rem;
}

.gallery-nav .brand-mark {
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.28);
    box-shadow: none;
    backdrop-filter: blur(14px);
}

.gallery-guest-chip {
    display: inline-grid;
    gap: .08rem;
    padding: .68rem .85rem;
    color: #fff;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    text-align: right;
    backdrop-filter: blur(14px);
}

.gallery-guest-chip span {
    color: rgba(255,255,255,.72);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gallery-guest-chip strong {
    color: #fff;
    font-size: .9rem;
}

.gallery-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    max-width: 1120px;
    min-height: calc(68svh - 90px);
    margin: auto;
    align-content: center;
    padding: clamp(3rem, 8vw, 7rem) 1.5rem 5rem;
}

.gallery-kicker {
    width: fit-content;
    margin-bottom: 1rem;
    padding: .58rem .85rem;
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    backdrop-filter: blur(14px);
}

.gallery-hero-content h1 {
    max-width: 920px;
    margin-bottom: 1rem;
    color: #fff;
    font-size: clamp(3rem, 8vw, 7rem);
}

.gallery-hosts {
    max-width: 720px;
    margin-bottom: 1.25rem;
    color: rgba(255,255,255,.86);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.gallery-hero blockquote {
    max-width: 760px;
    margin-bottom: 1.15rem;
    color: rgba(255,255,255,.84);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.1rem, 2.2vw, 1.6rem);
}

.gallery-memory-line {
    width: fit-content;
    max-width: 760px;
    margin: 0;
    padding: .86rem 1rem;
    color: rgba(255,255,255,.88);
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    font-size: .98rem;
    font-weight: 750;
    backdrop-filter: blur(14px);
}

.gallery-main-premium {
    max-width: 1320px;
    padding-top: clamp(2rem, 5vw, 4rem);
}

.gallery-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.6rem;
}

.gallery-toolbar h2 {
    max-width: 760px;
    margin-bottom: .7rem;
}

.gallery-toolbar p:not(.eyebrow) {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
}

.gallery-mosaic {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-flow: dense;
    gap: 1rem;
}

.gallery-mosaic .memory-item {
    grid-column: span 4;
    background: rgba(255,255,255,.94);
    border-color: rgba(255,255,255,.9);
    border-radius: 28px;
    box-shadow: 0 18px 48px rgba(43, 29, 51, .08);
    transition: transform .24s var(--ease), box-shadow .24s var(--ease), border-color .24s var(--ease);
}

.gallery-mosaic .memory-item:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--event-primary) 22%, #fff);
    box-shadow: 0 24px 64px rgba(43, 29, 51, .12);
}

.gallery-mosaic .memory-item.wide {
    grid-column: span 8;
}

.gallery-mosaic .memory-item.tall {
    grid-row: span 2;
}

.gallery-mosaic .memory-media {
    background: linear-gradient(135deg, color-mix(in srgb, var(--event-primary) 8%, #f4edf4), #f6f1f4);
}

.gallery-mosaic .memory-media img,
.gallery-mosaic .memory-media video {
    height: 340px;
}

.gallery-mosaic .memory-item.wide .memory-media img,
.gallery-mosaic .memory-item.wide .memory-media video {
    height: 420px;
}

.gallery-mosaic .memory-item.tall .memory-media img,
.gallery-mosaic .memory-item.tall .memory-media video,
.gallery-mosaic .memory-item.featured .memory-media img,
.gallery-mosaic .memory-item.featured .memory-media video {
    height: 470px;
}

.memory-type-badge {
    position: absolute;
    right: .9rem;
    bottom: .9rem;
    padding: .36rem .62rem;
    color: #fff;
    background: rgba(20,14,25,.62);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.memory-date {
    display: block;
    margin-bottom: .18rem;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.whatsapp-action {
    color: #116347;
    background: #eaf8f2;
    border-color: #bee6d7;
}

.floating-upload-button {
    position: fixed;
    z-index: 45;
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(1rem + env(safe-area-inset-bottom));
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .95rem 1.15rem;
    color: #fff;
    background: linear-gradient(135deg, var(--event-primary), var(--event-secondary));
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    box-shadow: 0 18px 42px rgba(26, 16, 34, .28);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.floating-upload-button span {
    display: grid;
    width: 1.55rem;
    height: 1.55rem;
    place-items: center;
    background: rgba(255,255,255,.18);
    border-radius: 50%;
    font-size: 1.1rem;
}

.upload-drawer[hidden] {
    display: none;
}

.upload-drawer {
    position: fixed;
    z-index: 70;
    inset: 0;
    display: grid;
    align-items: end;
}

.upload-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(14, 8, 19, .52);
    opacity: 0;
    transition: opacity .22s var(--ease);
    backdrop-filter: blur(8px);
}

.upload-drawer-panel {
    position: relative;
    z-index: 1;
    width: min(720px, calc(100% - 1.2rem));
    max-height: calc(92svh - env(safe-area-inset-bottom));
    margin: 0 auto calc(.6rem + env(safe-area-inset-bottom));
    padding: clamp(1.2rem, 4vw, 2rem);
    overflow: auto;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 30px;
    box-shadow: 0 32px 90px rgba(20, 12, 28, .24);
    transform: translateY(16px);
    opacity: 0;
    transition: transform .22s var(--ease), opacity .22s var(--ease);
}

.upload-drawer.is-open .upload-drawer-backdrop,
.upload-drawer.is-open .upload-drawer-panel {
    opacity: 1;
}

.upload-drawer.is-open .upload-drawer-panel {
    transform: translateY(0);
}

.upload-drawer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
}

.upload-drawer-panel h2 {
    margin-bottom: .55rem;
}

.upload-drawer-copy {
    margin-bottom: 1rem;
    color: var(--muted);
}

.drawer-upload-form {
    box-shadow: none;
}

body.upload-drawer-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .gallery-mosaic .memory-item,
    .gallery-mosaic .memory-item.wide,
    .gallery-mosaic .memory-item.tall {
        grid-column: span 6;
    }
}

@media (max-width: 760px) {
    .gallery-hero {
        min-height: 62svh;
    }

    .gallery-nav {
        align-items: center;
        flex-direction: row;
        padding: 1rem;
    }

    .gallery-guest-chip {
        max-width: 45vw;
        padding: .6rem .72rem;
    }

    .gallery-guest-chip strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gallery-hero-content {
        min-height: auto;
        padding: 2.2rem 1rem 4rem;
    }

    .gallery-hero-content h1 {
        font-size: clamp(2.55rem, 13vw, 4.1rem);
    }

    .gallery-memory-line {
        width: 100%;
        border-radius: 20px;
    }

    .gallery-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-mosaic {
        grid-template-columns: 1fr;
    }

    .gallery-mosaic .memory-item,
    .gallery-mosaic .memory-item.wide,
    .gallery-mosaic .memory-item.tall {
        grid-column: auto;
    }

    .gallery-mosaic .memory-media img,
    .gallery-mosaic .memory-media video,
    .gallery-mosaic .memory-item.wide .memory-media img,
    .gallery-mosaic .memory-item.wide .memory-media video,
    .gallery-mosaic .memory-item.tall .memory-media img,
    .gallery-mosaic .memory-item.tall .memory-media video,
    .gallery-mosaic .memory-item.featured .memory-media img,
    .gallery-mosaic .memory-item.featured .memory-media video {
        height: 360px;
    }

    .gallery-mosaic .memory-item:hover {
        transform: none;
    }
}

@media (max-width: 460px) {
    .gallery-hero {
        min-height: auto;
    }

    .gallery-nav .brand {
        font-size: .95rem;
    }

    .gallery-guest-chip span {
        display: none;
    }

    .gallery-hero-content h1 {
        font-size: clamp(2.35rem, 13vw, 3.8rem);
    }

    .gallery-hosts {
        font-size: 1rem;
    }

    .floating-upload-button {
        right: 1rem;
        left: 1rem;
        justify-content: center;
        bottom: calc(.85rem + env(safe-area-inset-bottom));
        padding: 1rem 1.15rem;
    }

    .upload-drawer-panel {
        width: calc(100% - .75rem);
        border-radius: 26px 26px 22px 22px;
    }

    .gallery-mosaic .memory-media img,
    .gallery-mosaic .memory-media video,
    .gallery-mosaic .memory-item.wide .memory-media img,
    .gallery-mosaic .memory-item.wide .memory-media video,
    .gallery-mosaic .memory-item.tall .memory-media img,
    .gallery-mosaic .memory-item.tall .memory-media video,
    .gallery-mosaic .memory-item.featured .memory-media img,
    .gallery-mosaic .memory-item.featured .memory-media video {
        height: 300px;
    }
}
