/**
 * Legado Ecuador — CSS Principal (Bulma CSS 1.0 + Modern Minimalist NGO Theme)
 * Optimizado para Web Vitals (60 FPS, cero freezes), accesibilidad WCAG AAA y contraste total.
 */

:root,
[data-theme="light"] {
    --page-bg: #f8fafc;
    --section-bg: #ffffff;
    --section-alt-bg: #f1f5f9;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --text-title: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --brand-primary: #00BFFF;
    --brand-primary-hover: #009ad4;
    --brand-primary-dark: #0077a8;
    --brand-primary-text: #0284c7;
    --brand-primary-soft: rgba(0, 191, 255, 0.12);
    --brand-dark: #0f172a;
    --brand-border: #e2e8f0;

    /* Bulma 1.0 overrides */
    --bulma-primary: #00BFFF;
    --bulma-link: #0284c7;
    --bulma-family-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bulma-body-family: var(--bulma-family-primary);
}

[data-theme="dark"] {
    --page-bg: #070d18;
    --section-bg: #0b1120;
    --section-alt-bg: #0e1626;
    --card-bg: #111c30;
    --card-border: #1e293b;
    --text-title: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --brand-primary: #00BFFF;
    --brand-primary-hover: #38bdf8;
    --brand-primary-dark: #0284c7;
    --brand-primary-text: #38bdf8;
    --brand-primary-soft: rgba(0, 191, 255, 0.18);
    --brand-dark: #070d18;
    --brand-border: #1e293b;

    /* Bulma 1.0 overrides */
    --bulma-scheme-main: #070d18;
    --bulma-scheme-main-bis: #0b1120;
    --bulma-scheme-main-ter: #0e1626;
    --bulma-text: #cbd5e1;
    --bulma-text-strong: #ffffff;
    --bulma-border: #1e293b;
    --bulma-card-background-color: #111c30;
    --bulma-box-background-color: #111c30;
}

html {
    scroll-behavior: smooth;
    font-family: var(--bulma-family-primary);
    background-color: var(--page-bg);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--page-bg);
    color: var(--text-body);
    transition: background-color 0.25s ease, color 0.25s ease;
}

main {
    flex: 1 0 auto;
}

/* -------------------------------------------------------------------------
 * Control Global de Modo Oscuro & Corrección Total de Contrastes
 * ---------------------------------------------------------------------- */
[data-theme="dark"] body {
    background-color: var(--page-bg) !important;
    color: var(--text-body) !important;
}

[data-theme="dark"] .has-background-light,
[data-theme="dark"] .section.has-background-light {
    background-color: var(--section-alt-bg) !important;
    color: var(--text-body) !important;
}

[data-theme="dark"] .has-background-white,
[data-theme="dark"] .section.has-background-white {
    background-color: var(--section-bg) !important;
    color: var(--text-body) !important;
}

[data-theme="dark"] .box,
[data-theme="dark"] .card {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-body) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .title,
[data-theme="dark"] .subtitle,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] strong {
    color: var(--text-title) !important;
}

[data-theme="dark"] .title.has-text-primary,
[data-theme="dark"] .has-text-primary {
    color: var(--brand-primary-text) !important;
}

[data-theme="dark"] p,
[data-theme="dark"] .content p {
    color: var(--text-body) !important;
}

[data-theme="dark"] .has-text-grey,
[data-theme="dark"] .has-text-grey-dark {
    color: var(--text-muted) !important;
}

[data-theme="dark"] hr {
    background-color: var(--card-border) !important;
    opacity: 0.6;
}

/* Modo Claro: Contraste y Tipografía */
[data-theme="light"] body {
    background-color: var(--page-bg);
    color: var(--text-body);
}

[data-theme="light"] .title,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
    color: var(--text-title);
}

[data-theme="light"] .title.has-text-primary,
[data-theme="light"] .has-text-primary {
    color: var(--brand-primary-text) !important;
}

[data-theme="light"] .has-text-grey,
[data-theme="light"] .has-text-grey-dark {
    color: var(--text-muted) !important;
}

[data-theme="light"] .box,
[data-theme="light"] .card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.06);
}

/* -------------------------------------------------------------------------
 * Utilidades de Simetría & Grid
 * ---------------------------------------------------------------------- */
.h-100 {
    height: 100% !important;
}

.w-100 {
    width: 100% !important;
}

.is-flex-column,
.flex-column {
    display: flex !important;
    flex-direction: column !important;
}

.is-flex-grow-1,
.flex-grow-1 {
    flex-grow: 1 !important;
}

.columns.is-multiline > .column {
    display: flex;
    flex-direction: column;
}

.columns.is-multiline > .column > .box,
.columns.is-multiline > .column > .card,
.columns.is-multiline > .column > .strategic-card {
    flex: 1 1 auto;
    width: 100%;
}

/* -------------------------------------------------------------------------
 * Barra de Navegación Simétrica & Moderna (Bulma CSS 1.0)
 * ---------------------------------------------------------------------- */
.navbar.is-legado {
    background-color: var(--brand-primary);
    box-shadow: 0 4px 20px rgba(0, 191, 255, 0.22);
    min-height: 66px;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    z-index: 100;
}

[data-theme="dark"] .navbar.is-legado {
    background-color: rgba(11, 17, 32, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.navbar.is-legado .navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
    padding: 0 1.25rem;
}

.navbar-logo-img {
    max-height: 40px;
    width: auto;
    display: block;
    transition: transform 0.2s ease;
}

.navbar-logo-img:hover {
    transform: scale(1.02);
}

.navbar.is-legado .navbar-burger {
    color: #ffffff;
    height: 48px;
    width: 48px;
}

@media screen and (min-width: 1024px) {
    .navbar.is-legado .navbar-menu {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: space-between;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .navbar-center-island {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }

    .navbar-nav-pills {
        pointer-events: auto;
        display: inline-flex;
        align-items: center;
        background: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.28);
        border-radius: 9999px;
        padding: 4px 6px;
        gap: 6px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }

    [data-theme="dark"] .navbar-nav-pills {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .navbar-end-actions {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-left: auto;
    }
}

.nav-pill-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.35rem;
    border-radius: 9999px;
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.nav-pill-item:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.nav-pill-item.is-active {
    background-color: rgba(255, 255, 255, 0.35);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .nav-pill-item.is-active {
    background-color: var(--brand-primary);
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(0, 191, 255, 0.4);
}

.nav-action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.95rem;
    min-width: 44px;
    height: 38px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-action-pill:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nav-action-pill:active {
    transform: scale(0.96);
}

.nav-action-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-action-circle:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nav-action-circle:active {
    transform: scale(0.94);
}

@media screen and (max-width: 1023px) {
    .navbar.is-legado .navbar-menu {
        background-color: var(--brand-primary);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        padding: 1.25rem 1rem;
        border-radius: 0 0 16px 16px;
    }

    [data-theme="dark"] .navbar.is-legado .navbar-menu {
        background-color: #0b1120;
        border: 1px solid var(--brand-border);
        border-top: none;
    }

    .navbar-center-island {
        margin-bottom: 1.25rem;
    }

    .navbar-nav-pills {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
        background: transparent;
        border: none;
        padding: 0;
    }

    .nav-pill-item {
        width: 100%;
        justify-content: flex-start;
        padding: 0.65rem 1.25rem;
        background: rgba(255, 255, 255, 0.12);
        border-radius: 10px;
    }

    .navbar-end-actions {
        display: flex;
        justify-content: center;
        gap: 16px;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* -------------------------------------------------------------------------
 * Tarjetas y Animaciones GPU (60 FPS - Cero Freezes)
 * ---------------------------------------------------------------------- */
.card-hover-effect {
    transition: transform 0.28s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.28s cubic-bezier(0.2, 0, 0.2, 1);
    will-change: transform;
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 36px -6px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .card-hover-effect:hover {
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.7);
    border-color: rgba(56, 189, 248, 0.3) !important;
}

.card-hover-effect .card-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.card-hover-effect .card-content .card-actions {
    margin-top: auto;
    padding-top: 1rem;
}

/* -------------------------------------------------------------------------
 * Badges y Etiquetas Editoriales
 * ---------------------------------------------------------------------- */
.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.95rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 9999px;
    background: rgba(0, 191, 255, 0.12);
    color: #0284c7;
    border: 1px solid rgba(0, 191, 255, 0.25);
    width: fit-content;
}

[data-theme="dark"] .badge-pill {
    background: rgba(0, 191, 255, 0.15);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
}

/* -------------------------------------------------------------------------
 * Ámbitos de Actividad (Layout Editorial & Alternante)
 * ---------------------------------------------------------------------- */
.activity-row {
    margin-bottom: 3.5rem;
}

@media screen and (min-width: 769px) {
    .activity-row.is-reversed {
        flex-direction: row-reverse;
    }
}

.activity-image-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.12);
    aspect-ratio: 16 / 9;
    position: relative;
    background-color: var(--card-border);
}

.activity-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

.activity-image-wrapper:hover img {
    transform: scale(1.05);
}

.activity-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 0.5rem 0;
}

.activity-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-body);
}

/* -------------------------------------------------------------------------
 * Tarjetas de Áreas Estratégicas (Planes Nacionales)
 * ---------------------------------------------------------------------- */
.strategic-icon-box {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.strategic-card:hover .strategic-icon-box {
    transform: scale(1.12) rotate(4deg);
}

.strategic-card {
    border-radius: 14px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    will-change: transform;
}

.strategic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

/* Variantes de Color para Áreas (Modo Claro) */
.is-area-blue {
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
    color: #1e40af;
}
.is-area-blue .strategic-icon-box { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }

.is-area-green {
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
    color: #166534;
}
.is-area-green .strategic-icon-box { background: linear-gradient(135deg, #22c55e, #15803d); }

.is-area-purple {
    background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #e9d5ff;
    color: #6b21a8;
}
.is-area-purple .strategic-icon-box { background: linear-gradient(135deg, #a855f7, #7e22ce); }

.is-area-red {
    background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
    color: #991b1b;
}
.is-area-red .strategic-icon-box { background: linear-gradient(135deg, #ef4444, #b91c1c); }

.is-area-yellow {
    background: linear-gradient(180deg, #fefce8 0%, #fef9c3 100%);
    border-color: #fef08a;
    color: #854d0e;
}
.is-area-yellow .strategic-icon-box { background: linear-gradient(135deg, #eab308, #a16207); }

.is-area-indigo {
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
    border-color: #c7d2fe;
    color: #3730a3;
}
.is-area-indigo .strategic-icon-box { background: linear-gradient(135deg, #6366f1, #4338ca); }

.is-area-pink {
    background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 100%);
    border-color: #fbcfe8;
    color: #9d174d;
}
.is-area-pink .strategic-icon-box { background: linear-gradient(135deg, #ec4899, #be185d); }

/* Modo oscuro para tarjetas de áreas */
[data-theme="dark"] .strategic-card {
    background: #111c30;
    color: #f8fafc;
    border: 1px solid #1e293b;
}
[data-theme="dark"] .is-area-blue { border-color: rgba(59, 130, 246, 0.4); }
[data-theme="dark"] .is-area-green { border-color: rgba(34, 197, 94, 0.4); }
[data-theme="dark"] .is-area-purple { border-color: rgba(168, 85, 247, 0.4); }
[data-theme="dark"] .is-area-red { border-color: rgba(239, 68, 68, 0.4); }
[data-theme="dark"] .is-area-yellow { border-color: rgba(234, 179, 8, 0.4); }
[data-theme="dark"] .is-area-indigo { border-color: rgba(99, 102, 241, 0.4); }
[data-theme="dark"] .is-area-pink { border-color: rgba(236, 72, 153, 0.4); }

/* -------------------------------------------------------------------------
 * Hero Section
 * ---------------------------------------------------------------------- */
.hero-video-container {
    position: relative;
    height: 65vh;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 13, 24, 0.45) 0%, rgba(7, 13, 24, 0.85) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #ffffff;
}

.hero-title-unidos {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #00BFFF;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

.hero-subtitle-text {
    font-size: clamp(1.4rem, 3.5vw, 2.2rem);
    font-weight: 300;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

.scroll-indicator-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: color 0.2s ease;
}

.scroll-indicator-arrow:hover {
    color: var(--brand-primary);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-12px); }
    60% { transform: translateY(-6px); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    display: inline-block;
    animation: spin-slow 8s linear infinite;
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */
.site-footer {
    background-color: #080e1a;
    color: #ffffff;
    padding: 3.5rem 1.5rem 1.5rem;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer a {
    color: #e2e8f0;
    opacity: 0.88;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.site-footer a:hover {
    opacity: 1;
    color: var(--brand-primary);
}

.site-footer .footer-title {
    color: #ffffff !important;
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 191, 255, 0.4);
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    font-size: 1.2rem;
    color: #ffffff;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, color 0.2s ease;
}

.footer-social-icon:hover {
    transform: translateY(-3px) scale(1.08);
    background-color: var(--brand-primary);
    color: #ffffff;
}

/* -------------------------------------------------------------------------
 * Galería y ECharts (Páginas de Lugares)
 * ---------------------------------------------------------------------- */
.collage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.collage-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    background-color: var(--card-border);
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.collage-item:hover img {
    transform: scale(1.06);
}

.view-more-btn-wide {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

[data-theme="dark"] .view-more-btn-wide {
    background-color: #1e293b;
    color: #cbd5e1;
}

.view-more-btn-wide:hover {
    background-color: var(--brand-primary);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-glow {
    box-shadow: 0 4px 18px rgba(0, 191, 255, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 191, 255, 0.65);
}

/* -------------------------------------------------------------------------
 * Gráficos ECharts y Tarjetas de Estadísticas Simétricas
 * ---------------------------------------------------------------------- */
.chart-container-box {
    position: relative;
    height: 440px;
    width: 100%;
    min-height: 380px;
}

.chart-stat-box {
    border-radius: 12px;
    padding: 1rem 0.75rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.chart-stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* -------------------------------------------------------------------------
 * Lightbox Galería Ultra-Moderno & Responsive (Cero Scrollbars, 60 FPS)
 * ---------------------------------------------------------------------- */
.modal.is-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
}

.modal.is-gallery-modal.is-active {
    display: flex;
}

.modal.is-gallery-modal .modal-background {
    background: rgba(6, 11, 22, 0.95);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.gallery-modal-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden !important;
    padding: 1rem;
    box-sizing: border-box;
}

.gallery-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    z-index: 10;
    user-select: none;
}

.gallery-image {
    max-width: 86vw;
    max-height: 76vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7);
    transition: opacity 0.2s ease, transform 0.2s ease;
    animation: galleryFadeIn 0.25s cubic-bezier(0.2, 0, 0.2, 1);
}

@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-bottom-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
}

.gallery-counter {
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.25rem 0.9rem;
    border-radius: 9999px;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.gallery-caption {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    max-width: 650px;
}

.gallery-close-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    z-index: 50;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-close-btn:hover {
    background: rgba(239, 68, 68, 0.85);
    transform: scale(1.08) rotate(90deg);
}

.gallery-close-btn:active {
    transform: scale(0.95);
}

.gallery-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 50;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-nav-btn:hover {
    background: var(--brand-primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.6);
}

.gallery-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-prev-btn {
    left: 2rem;
}

.gallery-next-btn {
    right: 2rem;
}

@media screen and (max-width: 768px) {
    .gallery-nav-btn {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    .gallery-prev-btn {
        left: 0.6rem;
    }
    .gallery-next-btn {
        right: 0.6rem;
    }
    .gallery-close-btn {
        top: 0.75rem;
        right: 0.75rem;
        width: 38px;
        height: 38px;
    }
    .gallery-image {
        max-width: 92vw;
        max-height: 70vh;
    }
}
