/* --- RESET Y VARIABLES --- */
:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --accent: #fbc02d;
    --border: #eeeeee;
}

[data-theme="dark"] {
    --bg: #121212;
    --text: #ffffff;
    --border: #333333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Montserrat', sans-serif; background-color: var(--bg); color: var(--text); line-height: 1.6; transition: 0.3s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- NAVBAR --- */
.navbar { background: #000; color: white; padding: 15px 0; position: sticky; top: 0; z-index: 1000; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.nav-menu { display: flex; list-style: none; gap: 20px; }
.nav-menu a { color: white; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.nav-menu a.active { color: var(--accent); }

/* --- GRID DE SERVICIOS Y ÁREAS --- */
.services-home-grid, .grid-moderno-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.tarjeta-area, .service-home-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.imagen-box { height: 200px; width: 100%; }
.imagen-box img { width: 100%; height: 100%; object-fit: cover; }

.icon-circle-large {
    width: 80px; height: 80px; background: var(--accent); color: black;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 30px; margin: 20px auto;
}

.btn-action-yellow {
    background: var(--accent); color: black; padding: 10px 20px;
    text-decoration: none; border-radius: 5px; font-weight: 800; display: inline-block;
}

.bg-soft { background: #f9f9f9; }
[data-theme="dark"] .bg-soft { background: #1a1a1a; }
/* Variables de Diseño */
:root {
    --primary: #1a1a1a;    /* Azul muy oscuro/Negro */
    --accent: #fbc02d;     /* Amarillo COMEZU */
    --success: #28a745;    /* Verde descarga */
    --bg: #ffffff;
    --bg-soft: #f8f9fa;
    --text: #333333;
    --nav-h: 80px;
}

[data-theme="dark"] {
    --bg: #121212;
    --bg-soft: #1e1e1e;
    --text: #e0e0e0;
    --primary: #000000;
}

* { margin: 0; padding: 0; box-sizing: border-box; transition: 0.3s ease; }
html { scroll-behavior: smooth; }
body { font-family: 'Montserrat', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar { background: var(--primary); height: var(--nav-h); position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.nav-wrapper { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.logo { height: 60px; width: auto; }
.nav-menu { display: flex; list-style: none; gap: 20px; }
.nav-menu a { color: white; text-decoration: none; font-size: 13px; font-weight: 600; text-transform: uppercase; }
.nav-menu a:hover { color: var(--accent); }

/* Switch de Tema */
.theme-switch-wrapper { display: flex; align-items: center; }
.theme-switch { position: relative; width: 50px; height: 26px; }
.theme-switch input { display: none; }
.slider { background: #444; position: absolute; top:0; left:0; right:0; bottom:0; cursor: pointer; border-radius: 34px; }
.slider:before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: white; border-radius: 50%; z-index: 2; }
input:checked + .slider { background: var(--accent); }
input:checked + .slider:before { transform: translateX(24px); }
.sun-icon, .moon-icon { position: absolute; top: 5px; font-size: 14px; }
.sun-icon { left: 7px; color: #fbc02d; }
.moon-icon { right: 7px; color: #ddd; }

/* Hero Section */
.hero-section { background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1551076805-e1869033e561?w=1400'); height: calc(100vh - var(--nav-h)); background-size: cover; display: flex; align-items: center; color: white; }
.hero-tag { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
.hero-section h1 { font-size: 3.5rem; font-weight: 800; margin: 10px 0; }
.highlight { color: var(--accent); }
.btn { padding: 12px 30px; border-radius: 5px; text-decoration: none; font-weight: 700; display: inline-block; margin-top: 20px; }
.btn-primary { background: var(--accent); color: #000; }
.btn-outline { border: 2px solid white; color: white; margin-left: 15px; }

/* Secciones Generales */
.section { padding: 80px 0; }
.bg-soft { background: var(--bg-soft); }
.section-title { text-align: center; color: var(--accent); font-weight: 800; font-size: 2.2rem; margin-bottom: 50px; }

/* Biblioteca Card */
.magazine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; }
.mag-card { background: var(--bg); border: 1px solid #ddd; padding: 15px; border-radius: 8px; position: relative; }
.mag-badge { position: absolute; top: 25px; right: 25px; background: var(--accent); padding: 5px 10px; font-weight: bold; border-radius: 4px; font-size: 11px; }
.mag-card img { width: 100%; border-radius: 4px; }
.dl-badge-group { display: flex; margin-top: 15px; }
.dl-btn { background: var(--success); color: white; padding: 8px 15px; text-decoration: none; font-weight: bold; border-radius: 4px 0 0 4px; font-size: 12px; }
.dl-count { background: var(--primary); color: white; padding: 8px 12px; border-radius: 0 4px 4px 0; font-size: 12px; }

/* Footer */
.main-footer { padding: 60px 0; border-top: 1px solid #eee; text-align: center; }
.stat-pill { display: flex; border-radius: 4px; overflow: hidden; font-size: 12px; justify-content: center; margin-bottom: 10px; }
.s-label { background: var(--accent); color: black; padding: 5px 12px; font-weight: 700; }
.s-val { background: var(--primary); color: white; padding: 5px 12px; }

/* --- Ajustes del Logo y Texto --- */
.brand-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo-small {
    height: 45px; /* Más pequeño según lo pedido */
    width: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    color: white;
    line-height: 1.1;
}

.acronym {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.full-name {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
    text-transform: uppercase;
}

/* --- Estilo de Página Activa --- */
.nav-menu a.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

/* --- Layout para Páginas Individuales --- */
.page-header {
    background: var(--primary);
    padding: 60px 0;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

/* Reutiliza el resto del CSS anterior para el modo oscuro y tarjetas */

/* --- Estilos de la Página de Servicios --- */
.services-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
    margin-top: 20px;
}

.service-detail-card {
    background: var(--bg);
    padding: 30px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 20px;
}

.service-detail-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.service-detail-card p {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 25px;
    line-height: 1.6;
}

.greeting {
    font-weight: 700;
    margin-bottom: 5px !important;
}

.btn-action-yellow {
    background: var(--accent);
    color: #000;
    text-decoration: none;
    padding: 10px 20px;
    font-weight: 700;
    border-radius: 5px;
    font-size: 14px;
    transition: transform 0.2s;
}

.btn-action-yellow:hover {
    transform: scale(1.05);
}

.btn-group {
    display: flex;
    gap: 10px;
}
/* --- Footer Profesional --- */
.footer-main {
    background: var(--bg);
    padding: 50px 0 30px 0;
    border-top: 1px solid var(--border);
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    text-align: center;
}

.footer-info p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.location-text {
    font-size: 0.75rem !important;
    margin-top: 5px;
}

/* Redes Sociales - Puntos negros de la imagen */
.footer-social {
    display: flex;
    gap: 15px;
}

.social-dot {
    width: 35px;
    height: 35px;
    background: #333; /* Cambia a blanco en modo oscuro mediante variables */
    border-radius: 50%;
    transition: 0.3s;
}

[data-theme="dark"] .social-dot {
    background: #eee;
}

/* Contadores de Visitas (Diseño exacto) */
.footer-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-group {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
}

.stat-label {
    background: var(--accent); /* Amarillo */
    color: #000;
    padding: 6px 15px;
}

.stat-number {
    background: var(--primary); /* Negro/Oscuro */
    color: #fff;
    padding: 6px 15px;
}

/* Ajuste Responsivo */
@media (max-width: 600px) {
    .footer-stats {
        flex-direction: column;
        align-items: center;
    }
}
/* --- Estilos de la Página de Noticias --- */
.news-main-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-full-card {
    display: grid;
    grid-template-columns: 350px 1fr;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.news-image-container {
    position: relative;
    height: 100%;
}

.news-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: #000;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
}

.news-text-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-date {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 10px;
}

.news-text-content h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--text);
}

.news-text-content p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: var(--text);
    opacity: 0.9;
}

.btn-read-more {
    align-self: flex-start;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.btn-read-more:hover {
    border-bottom: 2px solid var(--accent);
}

/* Responsivo para celulares */
@media (max-width: 768px) {
    .news-full-card {
        grid-template-columns: 1fr;
    }
    .news-image-container {
        height: 200px;
    }
}
/* --- Estilo de Noticias Tipo Cuadrícula --- */
.news-grid-institution {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.news-card-alt {
    background: var(--bg); /* Se adapta al modo oscuro */
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border);
}

.news-img-wrap {
    width: 100%;
    height: 220px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.news-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-img-wrap img.img-contain {
    object-fit: contain;
    padding: 20px;
}

.news-content-alt {
    padding: 25px;
    text-align: center;
}

.news-content-alt h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text);
    text-transform: uppercase;
}

.news-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
    opacity: 0.8;
}

.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }

/* --- Estilo de Anuncios en Lista --- */
.news-list-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.news-announcement {
    display: flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.news-announcement:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.announcement-img {
    flex: 0 0 400px; /* Ancho fijo para la imagen a la izquierda */
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.announcement-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.announcement-img img.contain {
    object-fit: contain;
    padding: 30px;
}

.announcement-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.announcement-tag {
    background: var(--accent);
    color: #000;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    align-self: flex-start;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.announcement-body h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 15px;
    line-height: 1.3;
}

.announcement-body p {
    font-size: 1rem;
    color: var(--text);
    opacity: 0.8;
    margin-bottom: 20px;
    line-height: 1.6;
}

.announcement-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: 0.3s;
}

.announcement-link:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Responsivo para móviles */
@media (max-width: 900px) {
    .news-announcement {
        flex-direction: column;
    }
    .announcement-img {
        flex: 0 0 250px;
    }
}
/* --- Grid de Biblioteca --- */
.magazine-grid-official {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.mag-card-official {
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}

/* Portada Estilo COMEZU */
.mag-cover-wrap {
    height: 350px;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid var(--accent);
}

.mag-yellow {
    background: #ffff00; /* Amarillo brillante de la captura */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mag-lines {
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 20px;
    border-left: 3px solid #006400; /* Líneas verdes laterales */
    border-right: 3px solid #006400;
}

.mag-logo-center {
    width: 120px;
    z-index: 2;
}

.mag-footer-info {
    position: absolute;
    bottom: 20px;
    font-size: 10px;
    font-weight: 700;
}

/* Cuerpo de la Tarjeta */
.mag-body-official {
    padding: 20px;
}

.mag-body-official h3 {
    color: #004a99;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.mag-body-official p {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

/* Botón Descarga Exacto */
.mag-dl-box {
    display: flex;
    margin-top: 15px;
}

.btn-dl-green {
    background: #28a745;
    color: white;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 3px 0 0 3px;
}

.dl-count-box {
    background: #343a40;
    color: white;
    font-size: 11px;
    padding: 8px 10px;
    border-radius: 0 3px 3px 0;
}

/* --- Categorías de Biblioteca --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.category-card {
    text-align: center;
    padding: 30px;
    background: var(--bg);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.cat-icon {
    font-size: 50px;
    margin-bottom: 20px;
}

.btn-category {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffc107; /* Amarillo de la imagen */
    color: #000;
    text-decoration: none;
    padding: 8px 15px;
    font-weight: 700;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 15px;
}

.badge {
    background: #007bff; /* Azul de la imagen */
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.section-divider {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 50px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem;
}
/* --- Ajuste de Tamaño de Revistas --- */
.magazine-grid-official {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Columnas más estrechas */
    gap: 25px;
    justify-items: center; /* Centra las tarjetas si hay pocas */
}

.mag-card-official {
    width: 220px; /* Ancho fijo para control total */
    background: var(--bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.mag-card-official:hover {
    transform: translateY(-5px);
}

.mag-cover-wrap {
    height: 300px; /* Altura ajustada para que no sea infinita */
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
}

.mag-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Mantiene la proporción de la foto del médico */
}

.mag-cover-wrap img.mag-logo-center {
    width: 100px; /* Logo más pequeño en la portada amarilla */
    height: auto;
    object-fit: contain;
}

/* El resto de mag-yellow, mag-lines y mag-body-official se mantienen igual */

/* --- Variables para Modo Oscuro --- */
:root {
    --bg: #ffffff;
    --text: #333333;
    --border: #dddddd;
    --accent: #fbc02d;
    --primary: #1a1a1a;
}

[data-theme="dark"] {
    --bg: #121212;
    --text: #e0e0e0;
    --border: #333333;
    --primary: #000000;
}

body { background-color: var(--bg); color: var(--text); transition: 0.3s; }

/* --- Ajuste de Tamaño de Fotos de Revistas --- */
.magazine-grid-official {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    justify-items: center;
}

.mag-card-official {
    width: 220px; /* Tamaño controlado según lo pedido */
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.mag-cover-wrap {
    height: 280px; /* Altura fija para que todas sean iguales */
    width: 100%;
    position: relative;
    background: #f0f0f0;
}

.mag-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la foto se estire */
}

/* Categorías superiores */
.category-card {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 25px;
    text-align: center;
    border-radius: 8px;
}
/* --- Sección Directiva --- */
.leader-section {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.profile-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.profile-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.main-leader {
    max-width: 700px;
    display: flex;
    align-items: center;
    text-align: left;
    gap: 30px;
}

.profile-img img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
}

.position-tag {
    background: var(--accent);
    color: #000;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
}

.profile-info h2 { font-size: 1.8rem; margin-bottom: 10px; }
.profile-info h3 { font-size: 1.2rem; }

/* Responsivo para Directiva */
@media (max-width: 600px) {
    .main-leader {
        flex-direction: column;
        text-align: center;
    }
}
/* --- Diseño de la Página de Contacto --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 24px;
    color: var(--accent);
    margin-top: 5px;
}

.info-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.map-container {
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

/* Formulario */
.institutional-form {
    background: var(--bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Responsivo */
@media (max-width: 850px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}
/* --- Home Showcase Moderno --- */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://via.placeholder.com/1200x800?text=Sede+COMEZU');
    background-size: cover; background-position: center;
    display: flex; align-items: center; text-align: center; color: white;
}

.areas-showcase { padding: 80px 0; background: var(--bg); }

.section-header-center { text-align: center; margin-bottom: 50px; }

.divider-yellow { 
    width: 60px; height: 4px; background: var(--accent); margin: 15px auto; 
}

.modern-grid-areas {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px;
}

.area-item-modern {
    position: relative; height: 380px; border-radius: 15px;
    overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.area-item-modern img {
    width: 100%; height: 100%; object-fit: cover; transition: 0.5s ease;
}

.area-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 5%, transparent 70%);
}

.area-text-content {
    position: absolute; bottom: 25px; left: 25px; right: 25px;
    color: white; z-index: 2; transition: 0.4s;
}

.area-tag {
    background: var(--accent); color: black; padding: 3px 10px;
    font-size: 10px; font-weight: 800; border-radius: 3px; display: inline-block; margin-bottom: 8px;
}

.area-item-modern:hover img { transform: scale(1.08); }

.icon-circle-large {
    width: 100px; height: 100px; background: var(--accent);
    color: #000; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 40px; margin: 0 auto 20px;
}

.btn-action-yellow {
    display: inline-block; background: var(--accent); color: #000;
    padding: 10px 20px; border-radius: 5px; font-weight: 700; text-decoration: none; margin-top: 10px;
}

/* --- Estilos para corregir el diseño de Áreas --- */
.areas-seccion {
    padding: 60px 0;
    background: var(--bg);
}

.header-areas {
    text-align: center;
    margin-bottom: 40px;
}

.linea-amarilla {
    width: 80px;
    height: 4px;
    background: #fbc02d;
    margin: 15px auto;
}

.grid-moderno-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Esto arregla el amontonamiento */
    gap: 30px;
}

.tarjeta-area {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta-area:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.imagen-box {
    position: relative;
    height: 200px;
}

.imagen-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag-area {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fbc02d;
    color: #000;
    padding: 5px 12px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 5px;
    text-transform: uppercase;
}

.contenido-area {
    padding: 20px;
}

.contenido-area h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text);
}

.contenido-area p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
    opacity: 0.8;
}

/* Ajuste para el modo oscuro */
[data-theme="dark"] .tarjeta-area {
    background: #1e1e1e;
    border-color: #333;
}
/* --- Estilos Base --- */
:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --accent: #fbc02d;
    --primary: #000000;
    --border: #dddddd;
}

[data-theme="dark"] {
    --bg: #121212;
    --text: #ffffff;
    --border: #333333;
}

body { font-family: 'Montserrat', sans-serif; background: var(--bg); color: var(--text); transition: 0.3s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- Navbar --- */
.navbar { background: #000; color: white; padding: 15px 0; position: sticky; top: 0; z-index: 1000; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.nav-menu { display: flex; list-style: none; gap: 20px; }
.nav-menu a { color: white; text-decoration: none; font-weight: 600; }
.nav-menu a.active { color: var(--accent); }

/* --- Hero --- */
.hero { 
    height: 60vh; background: #1a1a1a; color: white; 
    display: flex; align-items: center; text-align: center; 
}

/* --- Cards de Servicios --- */
.services-home-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; padding: 60px 0; 
}

.service-home-card { 
    background: var(--bg); border: 1px solid var(--border); 
    padding: 40px 20px; border-radius: 15px; text-align: center; 
}

.icon-circle-large { 
    width: 100px; height: 100px; background: var(--accent); color: black; 
    border-radius: 50%; display: flex; align-items: center; 
    justify-content: center; font-size: 40px; margin: 0 auto 20px; 
}

.btn-action-yellow { 
    background: var(--accent); color: black; padding: 10px 20px; 
    text-decoration: none; border-radius: 5px; font-weight: 800; display: inline-block; 
}
/* --- Estilos para Áreas del Gremio --- */
.section-subtitle {
    text-align: center;
    margin-top: -20px;
    margin-bottom: 40px;
    opacity: 0.8;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.area-card {
    background: var(--bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
}

.area-card:hover {
    transform: translateY(-10px);
}

.area-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.area-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.area-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
}

.area-tag {
    background: var(--accent);
    color: #000;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
}

.area-content {
    padding: 20px;
}

.area-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text);
}

.area-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.8;
}

/* --- Diseño de Áreas Recreativas con Fotos Circulares --- */
.areas-visual-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
    padding-top: 40px;
}

.area-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.area-item.inverse {
    flex-direction: row-reverse;
}

.area-col-text {
    flex: 1;
    text-align: right;
}

.area-item.inverse .area-col-text {
    text-align: left;
}

.area-col-text h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 15px;
}

.area-col-text p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.circle-img-container {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 8px solid #fbc02d; /* El amarillo de COMEZU */
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.circle-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .area-item, .area-item.inverse {
        flex-direction: column-reverse;
        text-align: center !important;
    }
    .area-col-text {
        text-align: center !important;
    }
}
/* --- Nueva Rejilla de Áreas --- */
.areas-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.area-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.area-card:hover {
    transform: translateY(-8px);
}

.area-card-img {
    position: relative;
    height: 220px;
}

.area-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.area-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: #000;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 5px;
    text-transform: uppercase;
}

.area-card-content {
    padding: 25px;
}

.area-card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--text);
}

.area-card-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    opacity: 0.8;
}

/* Ajuste del título */
.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.7;
}

/* --- Grid Estilo Directiva aplicado a Áreas --- */
.directiva-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.member-card {
    background: var(--bg);
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.member-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.member-img-circle {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 5px solid var(--accent); /* El anillo amarillo */
    overflow: hidden;
}

.member-img-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text);
}

.member-role {
    display: block;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.member-info p {
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.8;
}

/* --- VARIABLES Y RESET CRÍTICO --- */
:root {
    --bg: #ffffff;
    --bg-soft: #f8f9fa;
    --text: #1a1a1a;
    --accent: #fbc02d; /* Amarillo COMEZU */
    --border: #e0e0e0;
    --primary: #000000;
}

[data-theme="dark"] {
    --bg: #121212;
    --bg-soft: #1e1e1e;
    --text: #ffffff;
    --border: #333333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { 
    font-family: 'Montserrat', sans-serif; 
    background-color: var(--bg); 
    color: var(--text); 
    line-height: 1.6; 
}

.container { 
    max-width: 1140px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

.section { padding: 80px 0; }
.bg-soft { background-color: var(--bg-soft); }

/* --- TÍTULOS --- */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    opacity: 0.8;
}

/* --- GRID DE ÁREAS (ESTILO DIRECTIVA CORREGIDO) --- */
.directiva-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.member-card {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 40px 25px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.member-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.member-img-circle {
    width: 160px;
    height: 160px;
    margin: 0 auto 25px;
    border-radius: 50%;
    border: 6px solid var(--accent); /* Aro Amarillo */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-img-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto evita que la imagen se estire */
}

.member-info h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.member-role {
    display: inline-block;
    background: var(--accent);
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 15px;
    border-radius: 50px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.member-info p {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* --- RESPONSIVO --- */
@media (max-width: 768px) {
    .section-title { font-size: 1.8rem; }
    .directiva-style-grid { grid-template-columns: 1fr; }
}
/* --- FOOTER SIEMPRE OSCURO (Independiente del tema) --- */
.main-footer {
    background-color: #000000 !important; /* Fondo negro obligatorio */
    color: #ffffff !important;
    padding: 40px 0;
    text-align: center;
    border-top: 2px solid #333;
}

.copy {
    font-size: 0.9rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.location-footer {
    font-size: 0.85rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

/* Contenedor de estadísticas */
.visit-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; /* Responsive */
}

/* Las pastillas de estadísticas (Negro y Amarillo) */
.stat-pill {
    display: flex;
    overflow: hidden;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Parte izquierda (Amarilla) */
.s-label {
    background-color: #fbc02d; /* Amarillo COMEZU */
    color: #000;
    padding: 10px 18px;
}

/* Parte derecha (Negra) */
.s-val {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 10px 18px;
    min-width: 80px;
}

/* Ajuste responsive para el footer */
@media (max-width: 600px) {
    .visit-stats {
        flex-direction: column;
        align-items: center;
    }
    .stat-pill {
        width: 100%;
        max-width: 280px;
    }
}
/* Centrado de Títulos y Decoración */
.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    margin: 15px 0 20px;
    border-radius: 2px;
}

/* Tarjeta Principal Centrada */
.featured-area {
    max-width: 800px;
    margin: 0 auto 50px auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Rejilla de áreas (2 columnas en escritorio, 1 en móvil) */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

/* Refuerzo de Footer para que no se mueva */
.main-footer {
    background-color: #000 !important;
    padding: 60px 0 40px !important;
}

.stat-pill {
    border: 1px solid #333;
    display: flex;
    border-radius: 8px;
    overflow: hidden;
}
.hero-section {
    position: relative;
    height: 75vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Mantiene la proporción cubriendo el espacio */
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Oscurece el video para resaltar el texto */
}

.hero-content {
    position: relative;
    z-index: 2; /* Coloca el texto por encima del video y el overlay */
    text-align: center;
    width: 100%;
}
.hero-section {
    position: relative;
    height: 70vh; /* Ajusta la altura a tu gusto */
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto es clave para que el GIF no se estire feo */
}

/* Capa oscura para que el texto se lea bien sobre el GIF */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Ajusta el 0.5 si quieres más o menos oscuridad */
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}
.hero-section {
    position: relative;
    height: 75vh; /* Ajusta la altura a tu gusto */
    width: 100%;
    /* La imagen se coloca aquí */
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('TU_IMAGEN_AQUI.jpg');
    background-size: cover; /* Hace que la foto cubra todo el espacio sin estirarse */
    background-position: center; /* Centra la foto */
    background-attachment: fixed; /* Opcional: crea un efecto de movimiento lento al hacer scroll */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}
/* --- ESTILOS COMUNES PARA TODOS LOS BANNERS --- */
.section-banner {
    position: relative;
    padding: 100px 0;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    text-align: center;
    color: white;
    margin-bottom: 50px;
}

.section-title-alt {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin: 0;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.title-underline-center {
    width: 80px;
    height: 4px;
    background-color: var(--accent);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* --- CONFIGURACIÓN ESPECÍFICA DE IMÁGENES --- */

/* Banner de Servicios */
.banner-servicios {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                      url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?fm=jpg&q=60&w=3000');
}

/* Banner de Noticias */
.banner-noticias {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                      url('https://s03.s3c.es/imag/_v0/640x300/c/2/2/periodicos-apilados-recurso.jpg');
}

/* Banner de Biblioteca */
.banner-biblioteca {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                      url('https://plus.unsplash.com/premium_photo-1695942301094-472c4dbf9130?fm=jpg&q=60&w=3000&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8YmlibGlvdGVjYSUyMGp1ciVDMyVBRGRpY2F8ZW58MHx8MHx8fDA%3D');
}
/* Banner de Directiva */
.banner-directiva {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                      url('https://www.expoknews.com/wp-content/uploads/2019/08/Cual-es-el-rol-de-la-junta-directiva-ante-la-RSE.jpg');
}
/* Banner de Contacto */
.banner-contacto {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                      url('https://www.shutterstock.com/image-vector/contact-icon-set-isolated-on-600nw-2438133391.jpg');
}
/* Espaciado de secciones para que no se peguen */
#servicios, #noticias, #biblioteca, #directiva, #contacto {
    padding-top: 20px;
}
/* Estilos para Cifras de Gestión */
.stats-banner {
    background-color: var(--accent);
    color: #000;
    padding: 60px 0;
}
.stats-wrapper {
    display: flex;
    justify-content: space-around;
    text-align: center;
    flex-wrap: wrap;
    gap: 30px;
}
.stat-num {
    display: block;
    font-size: 3rem;
    font-weight: 800;
}
.stat-desc {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Estilo para Misión/Visión */
.institutional-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

/* --- SECCIÓN INSTITUCIONAL PREMIUM --- */
.institutional-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, #ffffff, #f0f2f5);
    position: relative;
}

/* Encabezado */
.section-header-alt {
    text-align: center;
    margin-bottom: 60px;
}

.pre-title {
    color: #fbc02d;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 10px;
}

.title-main {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.header-line {
    width: 60px;
    height: 4px;
    background: #fbc02d;
    margin: 20px auto 0;
    border-radius: 10px;
}

/* Grid de Tarjetas */
.inst-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Tarjetas Estilo Glassmorphism */
.glass-card {
    background: #ffffff;
    padding: 50px 35px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #e1e8ed;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.03);
}

.glass-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.08);
    border-color: #fbc02d;
}

/* Resaltar la tarjeta del medio */
.glass-card.featured {
    border-top: 5px solid #fbc02d;
}

/* Iconos */
.card-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #fff9e6;
    color: #fbc02d;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 25px;
    transition: 0.3s;
}

.glass-card:hover .card-icon-wrapper {
    background: #fbc02d;
    color: #000;
    transform: rotate(10deg);
}

.glass-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.glass-card p {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

/* Detalle decorativo inferior en la tarjeta */
.card-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: #fbc02d;
    transition: width 0.4s ease;
}

.glass-card:hover .card-accent {
    width: 100%;
}

/* Responsivo */
@media (max-width: 768px) {
    .title-main { font-size: 2rem; }
    .institutional-section { padding: 60px 20px; }
}
/* --- SECCIÓN INSTITUCIONAL ADAPTABLE --- */
.institutional-section {
    padding: 100px 0;
    /* Usa el fondo principal de tu tema */
    background: var(--bg-color, #ffffff); 
    transition: background 0.3s ease;
}

.section-header-alt .title-main {
    font-size: 2.5rem;
    font-weight: 800;
    /* Usa el color de texto de tu tema */
    color: var(--text-color, #1a1a1a); 
    margin: 0;
}

/* Tarjetas con efecto adaptable */
.glass-card {
    /* Fondo que cambia: blanco en claro, gris oscuro en dark */
    background: var(--card-bg, #ffffff); 
    padding: 50px 35px;
    border-radius: 20px;
    position: relative;
    transition: all 0.4s ease;
    /* Borde sutil que cambia según el tema */
    border: 1px solid var(--border-color, #e1e8ed); 
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Colores específicos para Modo Oscuro (se activa con tu atributo data-theme) */
[data-theme="dark"] .glass-card {
    background: #1e1e1e; /* Gris muy oscuro para el modo noche */
    border-color: #333333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

[data-theme="dark"] .glass-card p {
    color: #bbbbbb; /* Texto más suave en modo oscuro */
}

[data-theme="dark"] .glass-card h3 {
    color: #ffffff;
}

[data-theme="dark"] .card-icon-wrapper {
    background: #2d2d2d; /* Fondo del icono en modo oscuro */
}

/* Animaciones y Hover (Igual para ambos modos) */
.glass-card:hover {
    transform: translateY(-12px);
    border-color: #fbc02d;
}

.card-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #fff9e6;
    color: #fbc02d;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin: 0 auto 25px;
}

.glass-card p {
    color: var(--text-color-light, #555);
    line-height: 1.8;
}

.header-line {
    width: 60px;
    height: 4px;
    background: #fbc02d;
    margin: 20px auto 0;
}
/* --- SECCIÓN INSTITUCIONAL REFINADA Y ADAPTABLE --- */
.institutional-section {
    padding: 80px 0;
    /* Eliminamos el fondo blanco fijo para que use el de tu página */
    background: transparent; 
}

/* Encabezado adaptable */
.section-header-alt .title-main {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color, #ffffff); /* Blanco por defecto si no hay variable */
    margin: 0;
}

/* TARJETAS: Ahora con fondo dinámico */
.glass-card {
    /* Fondo oscuro suave para que resalte sobre el negro absoluto */
    background: rgba(255, 255, 255, 0.05); 
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Borde casi invisible */
    text-align: center;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px); /* Efecto cristal */
}

/* Títulos y párrafos dentro de la tarjeta */
.glass-card h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.glass-card p {
    color: #cccccc; /* Gris claro para lectura cómoda */
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Contenedor del Icono */
.card-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(251, 192, 45, 0.15); /* Amarillo muy suave de fondo */
    color: #fbc02d; /* Tu amarillo institucional */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

/* Efecto al pasar el mouse (Hover) */
.glass-card:hover {
    transform: translateY(-10px);
    background: rgba(251, 192, 45, 0.1); /* Tinte amarillo al tocar */
    border-color: #fbc02d;
}

/* --- AJUSTE AUTOMÁTICO MODO CLARO (Si tu body cambia de clase o data-theme) --- */
body.light-mode .institutional-section,
[data-theme="light"] .institutional-section {
    background: #f9f9f9;
}

body.light-mode .glass-card,
[data-theme="light"] .glass-card {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

body.light-mode .glass-card h3,
[data-theme="light"] .glass-card h3 {
    color: #1a1a1a;
}

body.light-mode .glass-card p,
[data-theme="light"] .glass-card p {
    color: #555555;
}
/* Encabezado adaptable que cambia de color según el tema */
.section-header-alt .title-main {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    /* Prioriza el color de texto de tu tema, si no, usa negro por defecto */
    color: var(--text-color, #1a1a1a); 
    transition: color 0.3s ease;
}

/* Forzar color blanco solo cuando el modo oscuro está activo */
[data-theme="dark"] .section-header-alt .title-main {
    color: #ffffff !important;
}

/* Forzar color oscuro cuando el modo claro está activo */
[data-theme="light"] .section-header-alt .title-main,
body.light-mode .section-header-alt .title-main {
    color: #1a1a1a !important;
}
.pre-title {
    color: #fbc02d; /* Se mantiene amarillo en ambos */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 10px;
}

/* --- ESTILOS OPCIÓN 1: CONTADORES --- */
.stats-section {
    padding: 60px 0;
    background: #fbc02d; /* El amarillo resalta mucho aquí */
    color: #000;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item i { font-size: 2.5rem; margin-bottom: 15px; }
.stat-number { font-size: 3.5rem; font-weight: 900; margin: 0; line-height: 1; }
.stat-item p { font-weight: 700; text-transform: uppercase; margin-top: 10px; font-size: 0.9rem; }

/* --- ESTILOS OPCIÓN 2: TRÁMITES RÁPIDOS --- */
.quick-access-section { padding: 100px 0; background: transparent; }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.quick-card {
    display: flex;
    align-items: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-card:hover {
    background: rgba(251, 192, 45, 0.1);
    border-color: #fbc02d;
    transform: translateX(10px); /* Efecto de empuje lateral */
}

.quick-icon {
    width: 60px;
    height: 60px;
    background: #fbc02d;
    color: #000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 20px;
}

.quick-info h4 { color: #fff; margin: 0 0 5px 0; font-size: 1.2rem; }
.quick-info p { color: #aaa; margin: 0; font-size: 0.9rem; }
.arrow { color: #fbc02d; margin-left: auto; opacity: 0; transition: 0.3s; }
.quick-card:hover .arrow { opacity: 1; }

/* --- AJUSTES MODO CLARO --- */
[data-theme="light"] .quick-card {
    background: #ffffff;
    border-color: #eee;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
[data-theme="light"] .quick-info h4 { color: #1a1a1a; }
[data-theme="light"] .quick-info p { color: #666; }

.main-footer {
    background: #111; /* Negro profundo para el footer */
    color: #eee;
    padding: 80px 0 20px;
    border-top: 2px solid #fbc02d;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: #fbc02d;
    margin-bottom: 25px;
    font-weight: 800;
}

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 15px; color: #ccc; }
.footer-col i { color: #fbc02d; margin-right: 10px; }

.social-links a {
    font-size: 1.5rem;
    color: #fff;
    margin-right: 20px;
    transition: 0.3s;
}

.social-links a:hover { color: #fbc02d; }

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #222;
    font-size: 0.8rem;
    color: #666;
}

/* Ajuste Modo Claro */
[data-theme="light"] .main-footer {
    background: #f4f4f4;
    color: #333;
}
[data-theme="light"] .footer-col ul li { color: #555; }
[data-theme="light"] .social-links a { color: #333; }

/* --- FOOTER ULTRA-MINIMALISTA --- */
.site-footer {
    padding: 60px 0 30px;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 50px;
}

.footer-grid-minimal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-label {
    display: block;
    color: #fbc02d; /* Amarillo institucional */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.footer-column p {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-nav a {
    display: block;
    color: #888;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #ffffff;
}

.footer-social-minimal {
    display: flex;
    gap: 20px;
}

.footer-social-minimal a {
    color: #888;
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-social-minimal a:hover {
    color: #fbc02d;
    transform: translateY(-3px);
}

.footer-copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 25px;
}

.footer-copyright p {
    color: #555;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- ADAPTACIÓN MODO CLARO --- */
[data-theme="light"] .site-footer {
    border-top-color: #eee;
}

[data-theme="light"] .footer-nav a:hover {
    color: #000;
}

[data-theme="light"] .footer-column p,
[data-theme="light"] .footer-nav a {
    color: #666;
}

/* --- FOOTER ULTRA-MINIMALISTA --- */
.site-footer {
    padding: 60px 0 30px;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 50px;
}

.footer-grid-minimal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-label {
    display: block;
    color: #fbc02d; /* Amarillo institucional */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.footer-column p {
    color: #888;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-nav a {
    display: block;
    color: #888;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #ffffff;
}

.footer-social-minimal {
    display: flex;
    gap: 20px;
}

.footer-social-minimal a {
    color: #888;
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-social-minimal a:hover {
    color: #fbc02d;
    transform: translateY(-3px);
}

.footer-copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 25px;
}

.footer-copyright p {
    color: #555;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- ADAPTACIÓN MODO CLARO --- */
[data-theme="light"] .site-footer {
    border-top-color: #eee;
}

[data-theme="light"] .footer-nav a:hover {
    color: #000;
}

[data-theme="light"] .footer-column p,
[data-theme="light"] .footer-nav a {
    color: #666;
}

/* --- BOTÓN VOLVER ARRIBA --- */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #fbc02d; /* Tu amarillo institucional */
    color: #000;
    cursor: pointer;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.2rem;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#backToTop:hover {
    background-color: #1a1a1a;
    color: #fbc02d;
    transform: translateY(-5px);
}

/* --- CORRECCIÓN DE ICONOS EN FOOTER --- */
.footer-social-minimal i {
    display: inline-block !important; /* Fuerza la visualización */
    visibility: visible !important;
    min-width: 20px;
    text-align: center;
}

/* Asegura que en modo oscuro los iconos no se "pierdan" */
[data-theme="dark"] .footer-social-minimal a {
    color: #888;
}

[data-theme="dark"] .footer-social-minimal a:hover {
    color: #fbc02d;
}
/* Contenedor con margen para que no pegue al header */
.theme-toggle-container {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle {
    position: relative;
    width: 58px;
    height: 30px;
    cursor: pointer;
}

.theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* El fondo del switch */
.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* El círculo que se mueve */
.toggle-circle {
    position: absolute;
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Iconos */
.toggle-circle i {
    font-size: 14px;
    position: absolute;
    transition: opacity 0.3s, transform 0.4s;
}

.sun-icon { color: #fbc02d; opacity: 1; }
.moon-icon { color: #5c6bc0; opacity: 0; transform: rotate(-45deg); }

/* ESTADO ACTIVO (MODO OSCURO) */
input:checked + .toggle-slider {
    background-color: #333;
}

input:checked + .toggle-slider .toggle-circle {
    transform: translateX(28px);
}

input:checked + .toggle-slider .sun-icon {
    opacity: 0;
    transform: rotate(45deg);
}

input:checked + .toggle-slider .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Hover sutil */
.theme-toggle:hover .toggle-circle {
    box-shadow: 0 0 10px rgba(251, 192, 45, 0.4);
}
/* --- BOTÓN WHATSAPP FLOTANTE --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px; /* Lo ponemos a la izquierda para no chocar con el botón de "Volver Arriba" */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Efecto de onda (Pulse) */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #25d366;
    border-radius: 50%;
    z-index: -1;
    animation: pulse-wa 2s infinite;
}

@keyframes pulse-wa {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: #fff;
}

/* Tooltip (Texto que aparece al poner el mouse) */
.tooltip-wa {
    position: absolute;
    left: 75px;
    background-color: #333;
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.whatsapp-float:hover .tooltip-wa {
    opacity: 1;
    visibility: visible;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
        font-size: 25px;
    }
}