/* --- Estilos Base --- */
body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at top, #b71c1c 0%, #5d080e 100%);
    overflow-x: hidden;
    min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    color: white;
}

.title {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 30px;
    font-weight: 800;
    font-size: 2.5rem;
    text-shadow: 0 4px 6px rgba(0,0,0,0.3);
    color: #fff;
}

/* --- LUCES REALISTAS --- */
.lightrope {
    position: absolute; top: -5px; width: 100%; display: flex; justify-content: space-around;
    padding: 0; margin: 0; z-index: 200; pointer-events: none; list-style: none; border-top: 3px solid #333;
    white-space: nowrap; overflow: hidden;
}
.lightrope li {
    position: relative; width: 18px; height: 30px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    margin: 0 5px; flex-shrink: 0; animation: glow 2s infinite both;
}
.lightrope li::before {
    content: ""; position: absolute; background: #222; width: 12px; height: 7px; top: -5px; left: 3px; border-radius: 2px;
}
.lightrope li:nth-child(4n+1) { background: #00ffea; box-shadow: 0px 5px 20px 5px rgba(0, 255, 234, 0.5); animation-duration: 1.5s; }
.lightrope li:nth-child(4n+2) { background: #50ff34; box-shadow: 0px 5px 20px 5px rgba(80, 255, 52, 0.5); animation-duration: 1.8s; animation-delay: 0.2s; }
.lightrope li:nth-child(4n+3) { background: #ffeb3b; box-shadow: 0px 5px 20px 5px rgba(255, 235, 59, 0.5); animation-duration: 1.2s; animation-delay: 0.4s; }
.lightrope li:nth-child(4n+4) { background: #ffffff; box-shadow: 0px 5px 20px 5px rgba(255, 255, 255, 0.6); animation-duration: 2.2s; animation-delay: 0.1s; }
@keyframes glow {
    0%, 100% { opacity: 1; filter: brightness(1.3); }
    50% { opacity: 0.5; filter: brightness(0.7); box-shadow: 0px 2px 5px rgba(255,255,255,0.1); }
}

/* --- Nieve --- */
#snowCanvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100;
}

/* --- CONTENEDOR PRINCIPAL --- */
.main-container {
    z-index: 150;
    position: relative;
    width: 95%; /* Un poco más ancho */
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 50px;
}

/* --- GRID DE GALERÍA --- */
.gallery-grid {
    display: grid;
    /* Hacemos las columnas más estrechas para que quepan más fotos (como en tu captura) */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px; /* Menos espacio entre fotos */
}

/* --- ÍTEM DE GALERÍA (Marco mínimo) --- */
.gallery-item {
    background-color: #fff;
    /* AQUÍ ESTÁ EL CAMBIO: Padding reducido para un marco fino */
    padding: 6px; 
    border-radius: 4px; /* Bordes menos redondeados */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* Sombra más sutil */
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex; /* Para asegurar que la imagen llene el contenedor */
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.gallery-item img {
    width: 100%;
    height: 150px; /* Altura fija para uniformidad */
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

/* --- Se eliminaron los estilos de .caption --- */

/* --- LIGHTBOX --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    border: 3px solid #fff; /* Marco fino en modo pantalla completa también */
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.close-btn {
    position: absolute; top: 20px; right: 30px;
    color: #fff; font-size: 40px; font-weight: bold; cursor: pointer;
}

/* Responsive */
@media (max-width: 480px) {
    .title { font-size: 2rem; margin-top: 50px; }
    /* En celular, 2 columnas */
    .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .gallery-item img { height: 120px; }
}