/* ============================================================
   🏖️  BEACH PARTY THEME — galeria_evento_beach.css
   Galería de fotos del evento — edición playa tropical
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Quicksand:wght@300;400;500;600&family=Nunito:wght@300;400;600&display=swap');

/* ── Variables ── */
:root {
    --sand:       #F5EDD6;
    --sand-lt:    #FDF6E3;
    --ocean:      #1A7FA8;
    --turquoise:  #2EC4B6;
    --turq-lt:    #7EDDD6;
    --coral:      #FF6B6B;
    --sun:        #FFD166;
    --palm:       #3A9E6F;
    --ink:        #1C3A4A;
    --stone:      #7A8FA0;
    --border:     #D6C9A8;

    /* Alias compartidos con evento.css */
    --cream:      var(--sand-lt);
    --gold:       var(--coral);
    --gold-lt:    var(--sun);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Body: fondo océano degradado ── */
body {
    background: linear-gradient(180deg, #B2E8E8 0%, #1A9AAA 60%, #0D5F7A 100%);
    font-family: 'Quicksand', 'Nunito', sans-serif;
    font-weight: 400;
    color: var(--ink);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    display: flex;
    justify-content: center;
}

/* Textura: granos de arena muy sutiles */
body::after {
    content: '';
    position: fixed; inset: 0;
    pointer-events: none; z-index: 9999; opacity: .035;
    background-image:
        radial-gradient(circle, #8B6914 1px, transparent 1px),
        radial-gradient(circle, #8B6914 1px, transparent 1px);
    background-size: 18px 18px, 9px 9px;
    background-position: 0 0, 9px 9px;
}

/* ── Contenedor: tarjeta arena cálida ── */
.app-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    background-color: #FFFBF2;
    /* Sombra con tono oceánico */
    box-shadow: 0 0 40px rgba(26, 127, 168, 0.25);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Grain overlay (reducida para no tapar la textura de arena del body) */
.app-container::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: .022;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 128px;
}

.layout { display: flex; flex: 1; overflow: hidden; position: relative; }

/* ── Aside: barra lateral "orilla del mar" ── */
aside {
    width: 56px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Degradado orilla: arena → agua turquesa */
    background: linear-gradient(to bottom, var(--sand-lt), #C8EAF0);
    border-right: 1px solid rgba(46, 196, 182, 0.3);
    flex-shrink: 0;
}

/* Línea de tiempo → turquesa oceánica */
.time-track {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 68%;
    width: 2px;
    background: linear-gradient(to bottom,
        transparent,
        var(--turq-lt) 15%,
        var(--turquoise) 50%,
        var(--turq-lt) 85%,
        transparent);
    border-radius: 2px;
    z-index: 1;
}

.time-marks { position: relative; display: flex; flex-direction: column; gap: 2.8rem; }

.time-mark {
    font-size: 8px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(46, 196, 182, 0.35);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    transition: color .4s ease;
    cursor: default;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
}

/* Marca activa: color sol brillante */
.time-mark.active { color: var(--sun); font-weight: 700; }

/* ── Main con scroll ── */
main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

/* ── Header: barra fija "palmera" ── */
header {
    padding: 1.5rem 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid rgba(46, 196, 182, 0.2);
    position: sticky;
    top: 0;
    /* Vidrio de arena/agua */
    background: rgba(253, 246, 227, 0.88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 30;
}

/* Título principal: fuente playera */
.header-left h1 {
    font-family: 'Pacifico', cursive;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--ink);
}
.header-left h1 em {
    font-style: normal;
    color: var(--coral);
}
/* Meta info bajo el título */
.header-meta {
    margin-top: .3rem;
    font-size: 9px;
    letter-spacing: .2em;
    color: var(--turquoise);
    text-transform: uppercase;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
}

.header-right { display: flex; align-items: center; gap: .5rem; }

/* Botones de icono: círculos de concha */
.btn-icon {
    width: 32px;
    height: 32px;
    border: 1.5px solid rgba(46, 196, 182, 0.4);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(126,221,214,0.12), rgba(255,251,242,0.9));
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--ocean);
    font-size: 14px;
    transition: border-color .3s ease, box-shadow .3s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn-icon:hover {
    border-color: var(--turquoise);
    box-shadow: 0 0 10px rgba(46, 196, 182, 0.3);
}
.btn-icon i { pointer-events: none; display: block; }

/* ── Collage / Galería ── */
.collage-wrap { padding: 1rem; flex: 1; }
.collage-masonry { column-count: 2; column-gap: 8px; }
.collage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

/* Tarjeta de foto: bordes redondeados playeros */
.photo-card {
    break-inside: avoid;
    margin-bottom: 8px;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--border), #C8EAF0);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .5s ease, transform .5s ease, box-shadow .3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.photo-card:hover {
    box-shadow: 0 6px 20px rgba(26, 127, 168, 0.2);
    transform: translateY(-2px) !important;
}
.photo-card.visible { opacity: 1; transform: none; }
.collage-grid .photo-card { margin-bottom: 0; aspect-ratio: 1; }

.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Overlay degradado oceánico */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 59, 82, 0.5), transparent);
    display: flex;
    align-items: flex-end;
    padding: 8px;
}

/* Botón favorito: concha blanca */
.card-fav {
    position: absolute;
    top: 6px; right: 6px;
    width: 28px; height: 28px;
    background: rgba(255, 251, 242, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 10px;
    color: var(--stone);
    z-index: 5;
    display: flex; align-items: center; justify-content: center;
    transition: color .3s ease, transform .2s ease, box-shadow .3s ease;
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.card-fav:hover { transform: scale(1.15); }
/* Favorito activo: coral brillante */
.card-fav.faved {
    color: var(--coral);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.45);
}

/* Hora de la foto */
.card-hour {
    font-size: 8px;
    color: rgba(255,255,255,.9);
    letter-spacing: 1px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
}

/* ── Sentinel + Spinner de carga ── */
#sentinel { padding: 2rem; display: flex; justify-content: center; }

/* Spinner: ola girando */
.spinner {
    width: 24px; height: 24px;
    border: 2px solid rgba(46, 196, 182, 0.2);
    border-top-color: var(--turquoise);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal de foto: fondo marino ── */
#modal {
    position: fixed; inset: 0; z-index: 100;
    background: linear-gradient(160deg, #0A2D3E 0%, #1A5E78 100%);
    display: none; flex-direction: column;
}
#modal.open { display: flex; }

.modal-img-wrap {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
}
#modal-img {
    max-width: 100%; max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* FAB: botón de acción principal → sol brillante */
.fab {
    position: absolute;
    bottom: 1.5rem; right: 1.5rem;
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--sun), var(--coral));
    color: var(--ink);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: none; z-index: 60;
    box-shadow: 0 4px 18px rgba(255, 107, 107, 0.4);
    transition: transform .3s ease, box-shadow .3s ease;
    cursor: pointer;
    font-size: 18px;
}
.fab:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 26px rgba(255, 209, 102, 0.6);
    /* Efecto brillo solar */
    animation: sun-glow .5s ease-in-out infinite alternate;
}
@keyframes sun-glow {
    from { box-shadow: 0 4px 18px rgba(255,107,107,0.4); }
    to   { box-shadow: 0 6px 28px rgba(255,209,102,0.7), 0 0 40px rgba(255,180,71,0.3); }
}