/* public/css/galeria.css - ESTILOS ESPECÍFICOS DE LA GALERÍA */

/* ========================================
   GALERÍA - FULL SCREEN PREMIUM GALLERY
   ======================================== */
.galeria-full {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    padding: 120px 0 80px; /* Espacio para el header fijo */
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    z-index: 1;
}

.galeria-full .container {
    max-width: 1400px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.galeria-full h1 {
    font-size: clamp(2.5rem, 4.5vw, 3.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* --- GRID SYSTEM: 1 Columna Móvil / 4 Columnas PC --- */
.galeria-full .grid {
    display: grid;
    /* MÓVIL (Por defecto): 1 columna */
    grid-template-columns: 1fr; 
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin-bottom: 40px;
}

/* TABLET: 2 columnas */
@media (min-width: 600px) {
    .galeria-full .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* PC / ESCRITORIO: 4 columnas exactas */
@media (min-width: 1024px) {
    .galeria-full .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* --- CARDS DE FOTOS (CUADRADOS PERFECTOS) --- */
.foto-item {
    position: relative;
    overflow: hidden; /* Vital para esconder el título cuando baja */
    border-radius: 12px;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--i, 0) * 0.1s);
    opacity: 0;
    width: 100%;
    
    /* REGLA DE ORO: CUADRADO */
    aspect-ratio: 1 / 1; 
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.foto-item img {
    width: 100%;
    height: 100%;       /* Llena el cuadrado */
    object-fit: cover;  /* Recorta sin deformar */
    display: block;
    transition: transform 0.4s ease;
}

.foto-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(227, 181, 5, 0.3);
}

.foto-item:hover img {
    transform: scale(1.05);
}

/* --- INFORMACIÓN (Efecto Slide-Up tipo Public.css) --- */
.foto-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    
    /* Fondo oscuro graduado para legibilidad */
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.7)); 
    border-top: 1px solid var(--glass-border);
    
    padding: 15px 10px;
    text-align: center;
    
    /* LA MAGIA: Escondido abajo por defecto */
    transform: translateY(100%); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Al hacer hover en la foto, subimos la info */
.foto-item:hover .foto-info {
    transform: translateY(0);
}

.foto-info h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-weight: 600;
    color: var(--gold-light); /* Color dorado para resaltar */
    margin-bottom: 5px;
    text-transform: uppercase;
}

.foto-info p {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.8rem, 1.3vw, 0.85rem);
    color: var(--text-muted);
    line-height: 1.3;
    margin: 0;
}

/* BOTÓN VOLVER */
.galeria-full .btn {
    margin-top: 30px;
    min-width: 200px;
    text-align: center;
}

/* MENSAJE SIN FOTOS */
.galeria-full p.no-photos {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 40px 0;
}

/* ========================================
   IMAGE MODAL (Lightbox)
   ======================================== */
.image-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 15, 25, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-modal.active {
    display: flex;
    opacity: 1;
}

.modal-image {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    animation: zoomIn 0.4s ease;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    color: var(--text);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    font-weight: 300;
    line-height: 1;
    z-index: 10000;
}

.close-modal:hover {
    color: var(--gold);
    transform: scale(1.2);
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ========================================
   RESPONSIVE DESIGN (Ajustes finos)
   ======================================== */
@media (max-width: 770px) {
    .galeria-full {
        padding: 100px 0 60px;
    }

    .galeria-full .container {
        padding: 0 20px;
    }

    .galeria-full h1 {
        font-size: clamp(2rem, 4vw, 3rem);
        margin-bottom: 40px;
    }
    
    .image-modal {
        padding: 10px;
    }

    .close-modal {
        top: 15px;
        right: 15px;
        font-size: 2rem;
    }
    
    
    .foto-info {
        transform: translateY(0);
        background: rgba(10, 15, 25, 0.85);
    }

}