/*******************************************************************************
 * *
 * 9. GALERÍA DE FOTOS                                                         *
 * *
 *******************************************************************************/

.seccion-galeria-header {
    background: #cf1515;
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.seccion-galeria-header h1 {
    font-size: 38px;
    margin-bottom: 10px;
}

.seccion-galeria-header p {
    opacity: 0.9;
    font-size: 18px;
    margin-bottom: 20px;
}

.stats-galeria {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    opacity: 0.8;
    margin-top: 20px;
}

.contenedor-galeria {
    max-width: 1200px;
    margin: 22px auto 60px auto;
    padding: 24px 20px;
}

.public-alert-ok {
    margin-bottom: 24px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #e7f8ec;
    border: 1px solid #b6e2c5;
    color: #17603a;
    text-align: center;
    font-weight: 700;
}

/* Filtros de Categoría */
.filtros-galeria {
    background: white;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 40px;
    border: 1px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.btn-filtro {
    padding: 10px 20px;
    min-height: 42px;
    border: none;
    background: #f1f1f1;
    color: #444;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease;
}

.btn-filtro.activo {
    background: #cf1515;
    color: white;
}

.btn-filtro:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

/* Rejilla de Álbumes */
.rejilla-albumes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.tarjeta-album {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}

.tarjeta-album:hover {
    transform: translateY(-8px);
    border-color: rgba(207, 21, 21, 0.14);
    box-shadow: 0 18px 36px rgba(127, 29, 29, 0.14);
}

.imagen-album {
    position: relative;
    height: 140px;
}

.imagen-album img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 42px;
}

.badge-fotos {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #cf1515;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.info-album {
    padding: 12px;
    display: flex;
    flex: 1;
    flex-direction: column;
}

.album-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.tipo-album {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #cf1515;
}

.info-album h3 {
    font-size: 15px;
    margin-bottom: 6px;
    color: #111;
}

.info-album p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
    min-height: 34px;
    overflow: hidden;
    flex: 1;
}

.footer-album {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: auto;
}

.public-inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.public-card-action {
    margin: 0;
}

.fecha-album {
    display: block;
    font-size: 11px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-ver-album {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    background: #fff1f2;
    color: #b91c1c;
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease, color 0.24s ease;
    border: 1px solid rgba(220, 38, 38, 0.12);
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.08);
}

.btn-ver-album:hover {
    background: #fff1f2;
    color: #b91c1c;
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.16);
}

.public-hide-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid #d97706;
    background: #fff;
    color: #b45309;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.public-hide-button:hover {
    background: #d97706;
    color: #fff;
    transform: translateY(-1px);
}



.contenedor-paginacion-galeria {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.galeria-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.galeria-breadcrumb:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.galeria-detalle-nav {
    display: flex;
    justify-content: center;
}

.seccion-galeria-header-detalle {
    text-align: center;
}

.seccion-galeria-header-detalle .header-contenido {
    max-width: 920px;
    margin: 0 auto;
}

.seccion-galeria-header-detalle h1 {
    max-width: 760px;
    margin: 0 auto 14px;
}

.seccion-galeria-header-detalle p {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.contenedor-galeria-detalle {
    margin-top: -20px;
}

.galeria-editorial-shell {
    background: white;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.galeria-editorial-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.galeria-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #cf1515;
}

.galeria-editorial-intro h2 {
    margin: 0;
    font-size: 28px;
    color: #111827;
}

.galeria-editorial-intro p {
    margin: 0;
    max-width: 720px;
    color: #6b7280;
    line-height: 1.6;
}

.rejilla-fotos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.foto-galeria-card {
    display: block;
    position: relative;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    background: #111827;
}

.foto-galeria-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.foto-galeria-card:hover img {
    transform: scale(1.03);
}

.foto-galeria-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 16px;
    background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.82) 100%);
    color: white;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.foto-galeria-card:hover .foto-galeria-overlay {
    opacity: 1;
}

.lightbox-open {
    overflow: hidden;
}

.lightbox-galeria {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox-galeria[hidden] {
    display: none;
}

.lightbox-contenido {
    max-width: min(92vw, 1200px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
}

.lightbox-contenido img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-meta {
    display: flex;
    gap: 18px;
    align-items: center;
    color: white;
    font-size: 14px;
}

.lightbox-cerrar,
.lightbox-nav {
    border: none;
    cursor: pointer;
    color: white;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.lightbox-cerrar {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 18px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 18px;
}

.lightbox-nav-prev {
    left: 24px;
}

.lightbox-nav-next {
    right: 24px;
}

.pie-pagina {
    margin-top: 0;
}

/* =========================
   Modo oscuro SOLO Galeria
   ========================= */
html[data-theme="dark"] .public-news-hero {
    background: radial-gradient(circle at 22% 12%, #7f1d1d 0%, #1f2937 45%, #020617 100%);
}

html[data-theme="dark"] .public-news-hero-badge {
    background: #111827;
    border: 1px solid #374151;
    color: #fecaca;
}

html[data-theme="dark"] .public-news-hero h1 {
    color: #f8fafc;
}

html[data-theme="dark"] .public-news-hero p {
    color: #e2e8f0;
}

html[data-theme="dark"] .public-news-hero-divider {
    background: #f87171;
}

html[data-theme="dark"] .stats-galeria {
    color: #cbd5e1;
}

html[data-theme="dark"] .contenedor-galeria {
    background: #0b1120;
    border-radius: 14px;
    padding-top: 24px;
    padding-bottom: 24px;
}

html[data-theme="dark"] .public-alert-ok {
    background: #052e1a;
    border-color: #166534;
    color: #bbf7d0;
}

html[data-theme="dark"] .filtros-galeria {
    background: #0f172a;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.45);
    border: 1px solid #1f2937;
}

html[data-theme="dark"] .btn-filtro {
    background: #1e293b;
    color: #e2e8f0;
}

html[data-theme="dark"] .btn-filtro.activo {
    background: #dc2626;
    color: #fff;
}

html[data-theme="dark"] .tarjeta-album {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.55);
}

html[data-theme="dark"] .album-placeholder {
    background: #111827;
    color: #94a3b8;
}

html[data-theme="dark"] .badge-fotos {
    background: #dc2626;
}

html[data-theme="dark"] .tipo-album {
    color: #fca5a5;
}

html[data-theme="dark"] .info-album h3 {
    color: #f8fafc;
}

html[data-theme="dark"] .info-album p {
    color: #cbd5e1;
}

html[data-theme="dark"] .footer-album {
    border-top-color: #334155;
}

html[data-theme="dark"] .fecha-album {
    color: #94a3b8;
}

html[data-theme="dark"] .btn-ver-album {
    background: #dc2626;
    color: #ffffff;
}

html[data-theme="dark"] .btn-ver-album:hover {
    background: #ef4444;
    color: #ffffff;
}

html[data-theme="dark"] .public-hide-button {
    background: #111827;
    border-color: #f59e0b;
    color: #fbbf24;
}

html[data-theme="dark"] .public-hide-button:hover {
    background: #f59e0b;
    color: #111827;
}

html[data-theme="dark"] .galeria-empty-state {
    background: #0f172a;
    color: #cbd5e1;
    border: 1px solid #1f2937;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.55);
}

html[data-theme="dark"] .galeria-empty-state i {
    color: #f87171;
}

html[data-theme="dark"] .galeria-breadcrumb {
    background: rgba(15, 23, 42, 0.5);
    border-color: #334155;
    color: #f8fafc;
}

html[data-theme="dark"] .galeria-editorial-shell {
    background: #0f172a;
    border: 1px solid #1f2937;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.55);
}

html[data-theme="dark"] .galeria-kicker {
    color: #fca5a5;
}

html[data-theme="dark"] .galeria-editorial-intro h2 {
    color: #f8fafc;
}

html[data-theme="dark"] .galeria-editorial-intro p {
    color: #cbd5e1;
}

html[data-theme="dark"] .foto-galeria-card {
    background: #0b1220;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.6);
}

html[data-theme="dark"] .lightbox-cerrar,
html[data-theme="dark"] .lightbox-nav {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid #334155;
}

html[data-theme="dark"] .lightbox-meta {
    color: #f8fafc;
}

html[data-theme="dark"] .contenedor-galeria .pagination .page-link {
    background: #1d4ed8;
    border-color: #1e40af;
    color: #f8fafc;
}

html[data-theme="dark"] .contenedor-galeria .pagination .page-link:hover {
    background: #2563eb;
}

html[data-theme="dark"] .contenedor-galeria .pagination .disabled .page-link,
html[data-theme="dark"] .contenedor-galeria .pagination .page-item.disabled .page-link {
    background: #334155;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .seccion-galeria-header {
        padding: 42px 18px;
    }

    .seccion-galeria-header h1 {
        font-size: 30px;
    }

    .stats-galeria {
        flex-direction: column;
        gap: 8px;
    }

    .contenedor-galeria {
        padding: 0 18px;
        margin-top: -18px;
    }

    .filtros-galeria {
        justify-content: stretch;
        gap: 8px;
    }

    .btn-filtro {
        width: 100%;
        justify-content: center;
    }

    .rejilla-albumes {
        grid-template-columns: 1fr;
    }

    .tarjeta-album {
        max-width: 420px;
        width: 100%;
        margin: 0 auto;
    }

    .galeria-editorial-shell {
        padding: 18px;
    }

    .galeria-editorial-intro h2 {
        font-size: 22px;
    }

    .rejilla-fotos {
        grid-template-columns: 1fr;
    }

    .foto-galeria-card img {
        height: 220px;
    }

    .footer-album {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .galeria-breadcrumb {
        width: 100%;
        justify-content: center;
    }

    .lightbox-nav {
        width: 42px;
        height: 42px;
    }

    .lightbox-nav-prev {
        left: 12px;
    }

    .lightbox-nav-next {
        right: 12px;
    }

    .lightbox-meta {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .seccion-galeria-header {
        padding: 34px 16px;
    }

    .seccion-galeria-header h1 {
        font-size: 26px;
    }

    .seccion-galeria-header p {
        font-size: 15px;
    }

    .contenedor-galeria {
        padding: 0 16px;
    }

    .filtros-galeria {
        padding: 12px;
        margin-bottom: 24px;
    }

    .info-album {
        padding: 14px;
    }

    .info-album p {
        height: auto;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .galeria-editorial-shell {
        padding: 16px;
        border-radius: 14px;
    }

    .foto-galeria-card img {
        height: 200px;
    }

    .lightbox-cerrar {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}
