:root {
    --azul-emaus: #003366;
    --dorado-emaus: #c5a059;
    --gris-claro: #f4f4f4;
    --blanco: #ffffff;
}

body { font-family: 'Segoe UI', sans-serif; margin: 0; background: var(--gris-claro); }



/* Estilos de Filtros */
.filters {
    text-align: center;
    margin: 20px 0;
}

.filter-btn {
    padding: 10px 20px;
    margin: 5px;
    border: 2px solid var(--azul-emaus);
    background: transparent;
    color: var(--azul-emaus);
    cursor: pointer;
    border-radius: 20px;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--azul-emaus);
    color: var(--blanco);
}

.container { max-width: 1200px; margin: auto; padding: 20px; }



.photo-card {
    background: var(--blanco);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}


/* Clase para ocultar fotos suavemente */
.hidden {
    display: none;
    opacity: 0;
}

.photo-placeholder { height: 200px; background: #ddd; display: flex; align-items: center; justify-content: center; }
.photo-info { padding: 15px; text-align: center; font-weight: bold; }

/* ===== FOOTER ======== FOOTER ======== FOOTER ======== FOOTER ======== FOOTER ======== FOOTER ===== */
/* Forzamos el fondo negro en todo el contenedor */
.site-footer {
    background-color: #000000 !important;
    color: #ffffff;
    padding: 40px 20px 30px 20px;
    text-align: center;
    font-family: Arial, sans-serif;
}

/* Título superior en amarillo */
.footer-title {
    color: #ffcc00 !important;
    font-weight: bold;
    margin-bottom: 20px;
    display: block;
}

/* Redes sociales */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.social-links a {
    background-color: #333 !important;
    color: #ffffff !important;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Enlaces de navegación blancos */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.footer-links a {
    color: #ffffff !important;
    text-decoration: none;
    font-size: 15px;
}

/* Botón Rojo */
.footer-adoracion {
    background-color: #990000 !important;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none !important;
}

/* Lema en amarillo */
.footer-motto {
    color: #ffcc00 !important;
    font-size: 1.4rem;
    margin: 25px 0;
    font-weight: bold;
}

/* ELIMINAR FRANJA AZUL: Copyright con fondo negro */
.footer-bottom {
    background-color: #000000 !important; /* Aquí eliminamos el azul */
    border-top: 1px solid #333; /* Una línea muy fina para separar */
    padding: 20px 0;
    margin-top: 20px;
}

.footer-bottom p {
    color: #ffffff !important;
    margin: 0;
    font-size: 13px;
}
/* copyright - AJUSTE FINAL */
.footer-bottom {
    background-color: #000 !important; /* Mismo negro que arriba */
    border-top: 1px solid #333; /* Línea de separación sutil */
    padding: 25px 20px; /* Más espacio arriba y abajo */
    margin-top: 20px;
    text-align: center; /* Centra el texto */
    width: 100%;
}

.footer-bottom p {
    color: #bbbbbb !important; /* Un gris claro para que no brille tanto como el blanco */
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}



/* ===== FOOTER ======== FOOTER ======== FOOTER ======== FOOTER ======== FOOTER ======== FOOTER ===== */

/* ===== TÍTULO DE GALERÍAS ===== */
.galeria-header {
    text-align: center;
    margin: 60px auto 40px;
    padding: 0 20px;
}

.galeria-header h1 {
    font-size: 2.2rem;
    color: var(--azul-emaus);
    margin-bottom: 10px;
}

.galeria-header p {
    font-size: 1rem;
    color: #555;
}
/* ===== AJUSTE LOGO + NOMBRE (IGUAL QUE INDEX) ===== */

.site-header .logo {
    display: flex;
    align-items: center;   /* centra logo + texto verticalmente */
    gap: 12px;
}

.site-header .logo span {
    display: block;
    line-height: 1.2;
    text-align: left;      /* clave: justificado como index */
    font-weight: 600;
}

.site-header .logo span br {
    display: block;
    content: "";
}
.photo-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}


@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
.photo-card:hover {
    transform: translateY(-4px);
}


}
//* ===== COMPENSAR HEADER FIJO ===== */
.galeria-section {
    padding-top: 160px;   /* AJUSTA si hace falta */
}
.galeria-section {
    background: var(--gris-claro);
}
@media (max-width: 768px) {
    .galeria-section {
        padding-top: 120px;
    }
}
/* ===== ANCHO REAL DE LA GALERÍA ===== */
.galeria-section .container {
    max-width: 1400px;   /* MÁS ANCHO */
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
}
/* ===== ANCHO REAL DE LA GALERÍA (CLAVE) ===== */
.galeria-section .container {
    max-width: 1600px;   /* MISMO IMPACTO QUE EL HEADER */
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
}


.galeria-section .gallery-grid > .photo-card {
    width: auto !important;
    max-width: none !important;
    display: block;
}
@media (max-width: 1200px) {
    .galeria-section .gallery-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .galeria-section .gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .galeria-section .gallery-grid {
        grid-template-columns: 1fr !important;
    }
}
@media (max-width: 768px) {
    .photo-card .photo-info {
        font-size: 0.9rem;
    }
}

/* ===== LIGHTBOX FINAL ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 95%;
    max-height: 95vh;
    object-fit: contain;
}
.galeria-section .container {
    max-width: 1400px;   /* ancho suficiente para 4 cards */
    margin: 0 auto;
    padding: 0 30px;
}
.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px;
    width: 100%;
}
.gallery-grid .photo-card {
    width: 100% !important;
}


/* tarjetas */
#gallery .photo-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* responsive */
@media (max-width: 1200px) {
    #gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 900px) {
    #gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    #gallery {
        grid-template-columns: 1fr;
    }
}
/* ===== FORZAR 4 IMÁGENES EN UNA FILA ===== */
#gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
}

.photo-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* evitar que algún estilo viejo rompa el grid */
#gallery > .photo-card {
    width: 100%;
    max-width: none;
}


@media (max-width: 1200px) {
    #gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    #gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #gallery {
        grid-template-columns: 1fr;
    }
}
/* ===== FIX FINAL: CADA CARD EN SU COLUMNA ===== */
#gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ROMPER cualquier herencia que las haga full width */
#gallery .photo-card {
    grid-column: auto !important;   /* ← ESTA ES LA CLAVE */
    width: 100% !important;
    max-width: none !important;
}


@media (max-width: 1200px) {
    #gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    #gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #gallery {
        grid-template-columns: 1fr;
    }
}

/* ===================================================
   GALERÍA DE FOTOS – CSS LIMPIO Y DEFINITIVO
   =================================================== */

/* Sección */
.galeria-section {
    padding-top: 90px;   /* AJUSTE FINO */
    background: var(--gris-claro);
}


@media (max-width: 768px) {
    .galeria-section {
        padding-top: 70px;
    }
}

/* Contenedor */
.galeria-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Grid real (4 columnas) */
#gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Tarjeta */
#gallery .photo-card {
    background: var(--blanco);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}


/* Texto */
.photo-info {
    padding: 12px;
    text-align: center;
    font-weight: 600;
}

/* Hover */
#gallery .photo-card:hover {
    transform: translateY(-4px);
}



#gallery .photo-card:hover img {
    transform: scale(1.03);
}

/* Responsive */
@media (max-width: 1200px) {
    #gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    #gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #gallery {
        grid-template-columns: 1fr;
    }
}

/* ===== AJUSTE REAL DEL TÍTULO ===== */
.galeria-header {
    margin-top: 30px;   /* controla la bajada real */
    margin-bottom: 40px;
}
/* si el título es un h1 directo */
#gallery-title,
.galeria-section h1 {
    margin-top: 30px !important;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.photo-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== AJUSTE DE ESPACIO TÍTULO GALERÍA ===== */
.galeria-header {
    margin-top: 30px;     /* ↓ acerca al menú */
    margin-bottom: 35px;  /* ↓ separa de los filtros */
}
.galeria-section h1 {
    margin-top: 30px;
}

.galeria-section p {
    margin-top: 10px;
}
/* ===== COMPENSAR HEADER FIJO ===== */
.galeria-section {
    padding-top: 100px;   /* ← ESTE ES EL ESPACIO REAL */
}
@media (max-width: 768px) {
    .galeria-section {
        padding-top: 80px;
    }
}
/* ===== CORREGIR ESPACIO SUPERIOR GALERÍA ===== */
.galeria-section {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.galeria-header {
    padding-top: -10px;   /* ← ESTE controla el espacio real */
    margin-bottom: 30px;
}
.galeria-filtros {
    margin-bottom: 30px;   /* separación limpia antes de las fotos */
}

/* Contenedor general de la tarjeta */
.photo-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Título superior: Fondo Gris muy claro */
.photo-label-top {
    background-color: #f2f4f6; /* Fondo gris claro */
    color: #333;
    font-weight: bold;
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

/* Título inferior: Fondo Blanco o tono muy suave */
.photo-label-bottom {
    background-color: #ffffff; /* Fondo blanco */
    color: #2d6a7a; /* Color corporativo */
    font-weight: 800;
    padding: 12px;
    text-align: center;
}

/* Asegurar que la imagen se vea bien */
.photo-card img {
    width: 100%;
    display: block;
    cursor: pointer;
}