/* ========== GALERÍA POLAROID SCROLL HORIZONTAL ========== */
.gallery-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #e8e0d8 0%, #f5f0eb 50%, #dcd4cc 100%);
    padding: 140px 20px 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gallery-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(168,149,108,0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201,184,153,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.gallery-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.gallery-title {
    font-family: 'Pinyon Script', cursive;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    color: #8e9b6d;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.gallery-title::after {
    content: '♥';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: var(--gold);
}

.gallery-subtitle {
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: var(--text-color);
    font-style: italic;
    margin-top: 35px;
}

/* Container scroll horizontal */
.gallery-scroll-container {
    width: 100%;
    max-width: 1400px;
    overflow-x: auto;
    overflow-y: hidden;
    cursor: grab;
    position: relative;
    z-index: 2;
    padding: 40px 20px;
    
    /* Ocultar scrollbar pero mantener funcionalidad */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.gallery-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.gallery-scroll-container:active {
    cursor: grabbing;
}

/* Track de fotos */
.gallery-track {
    display: flex;
    gap: 40px;
    padding: 20px;
    width: fit-content;
}

/* ========== POLAROID FRAMES ========== */
.polaroid {
    background: white;
    padding: 15px 15px 60px 15px;
    box-shadow: 
        0 8px 30px rgba(0,0,0,0.12),
        0 2px 8px rgba(0,0,0,0.08);
    border-radius: 3px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
    width: 320px;
    user-select: none;
    -webkit-user-drag: none;
}

/* Rotaciones aleatorias */
.polaroid:nth-child(1) { transform: rotate(-3deg); }
.polaroid:nth-child(2) { transform: rotate(2deg); }
.polaroid:nth-child(3) { transform: rotate(-4deg); }
.polaroid:nth-child(4) { transform: rotate(3deg); }
.polaroid:nth-child(5) { transform: rotate(-2deg); }
.polaroid:nth-child(6) { transform: rotate(4deg); }
.polaroid:nth-child(7) { transform: rotate(-3deg); }
.polaroid:nth-child(8) { transform: rotate(2deg); }

.polaroid:hover {
    transform: rotate(0deg) translateY(-12px) scale(1.05);
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.2),
        0 8px 20px rgba(0,0,0,0.15);
    z-index: 10;
}

/* Efecto textura del polaroid */
.polaroid::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(0,0,0,0.015) 100%);
    pointer-events: none;
    border-radius: 3px;
}

.polaroid-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}

/* Caption opcional en el polaroid */
.polaroid-caption {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    text-align: center;
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: var(--dark-text);
    opacity: 0.7;
}

/* Indicador de scroll */
.scroll-hint {
    text-align: center;
    margin-top: 30px;
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.6;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fadeInOut 3s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* ========== LIGHTBOX ========== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.8);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease;
    user-select: none;
    line-height: 1;
}

.lightbox-close:hover {
    transform: scale(1.2) rotate(90deg);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .gallery-section {
        padding: 120px 15px 80px;
    }

    .gallery-scroll-container {
        padding: 30px 15px;
    }

    .gallery-track {
        gap: 25px;
    }

    .polaroid {
        width: 260px;
    }

    .polaroid-img {
        height: 300px;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .polaroid {
        width: 240px;
        padding: 12px 12px 50px 12px;
    }

    .polaroid-img {
        height: 280px;
    }

    .gallery-track {
        gap: 20px;
    }
}