:root {
    --primary: #0A2540;      
    --secondary: #0066CC;    
    --accent: #00D2D3;       
    --bg-body: #F4F7FA;      
    --white: #FFFFFF;
    --text-main: #333333;
    --text-muted: #666666;
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 40px rgba(0,85,204,0.2);
    --radius: 16px;          
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ================= RESET Y BASE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
}

/* ================= NAVBAR ================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 5%;
    box-shadow: var(--shadow-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: -0.5px;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

header.scrolled .logo-img { height: 35px; }
.logo span { color: var(--accent); }
header.scrolled .logo { color: var(--primary); }

/* Botón Menú Hamburguesa (Oculto en PC) */
.menu-toggle {
    display: none; cursor: pointer; font-size: 2rem;
    color: var(--white); transition: var(--transition);
    z-index: 1002;
}
header.scrolled .menu-toggle { color: var(--primary); }

nav ul { display: flex; gap: 30px; list-style: none; }
nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 8px;
    transition: var(--transition);
}

header.scrolled nav a { color: var(--primary); }
nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 0; height: 3px;
    background: var(--accent); border-radius: 2px;
    transition: var(--transition);
}
nav a:hover::after, nav a.active::after { width: 100%; }
nav a:hover, nav a.active { color: var(--accent); }
header.scrolled nav a:hover, header.scrolled nav a.active { color: var(--secondary); }

/* ================= HERO SECTION ================= */
.hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background: url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(10,37,64,0.75) 0%, rgba(0,210,211,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 20px;
    animation: fadeInDown 1s ease-out;
}

.hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4vw, 3.8rem);
    margin-bottom: 25px;
    line-height: 1.2;
    font-weight: 800;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    font-weight: 400;
    color: #F0F4F8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: var(--primary);
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(0, 210, 211, 0.4);
}

.btn-main:hover {
    background: var(--white);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.3);
}

.custom-shape-divider-bottom {
    position: absolute; bottom: -1px; left: 0; width: 100%;
    overflow: hidden; line-height: 0;
}
.custom-shape-divider-bottom svg { display: block; width: calc(130% + 1.3px); height: 60px; }
.custom-shape-divider-bottom .shape-fill { fill: var(--primary); }

/* ================= IMAGEN FIJA EN ESQUINA IZQUIERDA (FOCA) ================= */
.fixed-corner-image {
    position: fixed; 
    bottom: 0;       
    left: 20px; 
    z-index: 990;    
    pointer-events: none; 
}

.fixed-corner-image img {
    width: 200px; 
    max-width: 15vw; 
    height: auto;
    display: block;
    transition: all 0.3s ease; 
}

@media (max-width: 992px) {
    .fixed-corner-image img {
        width: 140px; 
        max-width: 20vw;
    }
}

@media (max-width: 768px) {
    .fixed-corner-image {
        display: none;
    }
}

/* ================= SECCIONES Y CONTENEDOR ================= */
.container { max-width: 1280px; margin: 0 auto; padding: 80px 20px; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 {
    font-family: 'Montserrat', sans-serif; font-size: 2.5rem; font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    position: relative; display: inline-block; margin-bottom: 15px;
}
.section-header h2::after {
    content: ''; position: absolute; bottom: -10px; left: 50%;
    transform: translateX(-50%); width: 80px; height: 5px;
    background: var(--accent); border-radius: 5px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 35px; }

.card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition);
    position: relative; display: flex; flex-direction: column;
    border: 1px solid rgba(0,0,0,0.02); text-decoration: none;
}
.card:hover { transform: translateY(-12px); box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 210, 211, 0.4); border-color: rgba(0, 210, 211, 0.5); }
.card-img-wrapper { position: relative; height: 220px; overflow: hidden; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); }
.card:hover .card-img-wrapper img { transform: scale(1.15); }
.card-img-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(10,37,64,0.9) 0%, transparent 100%);
    display: flex; align-items: flex-end; padding: 25px;
}
.card-body { padding: 30px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 12px; font-family: 'Montserrat', sans-serif; transition: var(--transition); }
.card:hover .card-title { color: var(--accent); }
.card-text { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 25px; flex-grow: 1; }
.btn-card {
    display: inline-flex; justify-content: center; align-items: center; gap: 8px;
    padding: 12px 20px; background: rgba(0, 102, 204, 0.05); color: var(--secondary);
    text-decoration: none; border-radius: 8px; font-weight: 600; transition: var(--transition);
}
.btn-card:hover { background: var(--secondary); color: var(--white); box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3); }

.cta-sis {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius); padding: 60px 40px; text-align: center;
    color: var(--white); position: relative; overflow: hidden;
    box-shadow: var(--shadow-lg); margin: 0 auto 80px auto; max-width: 1200px;
}
.cta-sis h2 { font-family: 'Montserrat', sans-serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 900; margin-bottom: 15px; }
.cta-sis h2 span { color: var(--accent); }
.cta-sis p { font-size: 1.1rem; margin-bottom: 30px; font-weight: 300; opacity: 0.9; }

.back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    background: var(--accent); color: var(--primary);
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transition: var(--transition); z-index: 999;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-5px); background: var(--primary); color: var(--white); }

.side-login {
    position: fixed; left: 0; top: 50%; transform: translateY(-50%);
    background: rgba(10, 37, 64, 0.8); color: var(--white); padding: 12px;
    border-radius: 0 8px 8px 0; text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); z-index: 1000; opacity: 0.7;
    backdrop-filter: blur(5px);
}
.side-login:hover { opacity: 1; background: var(--primary); box-shadow: 2px 0 15px rgba(0,0,0,0.3); transform: translateY(-50%) scale(1.05); }

.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

.reveal-left { opacity: 0; transform: translateX(-60px); transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.reveal-left.active { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0; transform: translateX(60px); transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.reveal-right.active { opacity: 1; transform: translateX(0); }

footer { background: var(--primary); color: rgba(255,255,255,0.7); padding: 80px 20px 20px; text-align: center; position: relative; }
.footer-logo { font-size: 1.5rem; color: var(--white); font-family: 'Montserrat', sans-serif; font-weight: 900; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.footer-logo img { height: 35px; width: auto; }
.footer-logo span { color: var(--accent); }
.social-links { margin-top: 25px; display: flex; justify-content: center; gap: 20px; }
.social-links a {
    color: var(--white); background: rgba(255,255,255,0.05); width: 45px; height: 45px;
    display: flex; align-items: center; justify-content: center; border-radius: 50%;
    text-decoration: none; transition: var(--transition); border: 1px solid rgba(255,255,255,0.1);
}
.social-links a:hover { background: var(--accent); color: var(--primary); transform: translateY(-5px); border-color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; margin-top: 30px; font-size: 0.9rem; }

@media (max-width: 768px) {
    header { padding: 15px 20px; background: rgba(10,37,64,0.98); }
    header.scrolled { background: rgba(255,255,255,0.98); }
    .menu-toggle { display: block; }
    nav {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: var(--white); box-shadow: -5px 0 20px rgba(0,0,0,0.15);
        padding: 90px 30px 40px; transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 1001;
    }
    nav.show { right: 0; }
    nav ul { flex-direction: column; gap: 20px; }
    nav a { color: var(--primary); font-size: 1.1rem; display: inline-block; width: 100%; }
    header.scrolled nav a { color: var(--primary); }
    .cta-sis { padding: 40px 20px; margin: 40px 20px; }

    /* ================= AJUSTES DE PORTADA MÓVIL ================= */
    .hero {
        height: auto;
        min-height: 85vh;
        padding-top: 110px; /* Evita que el header tape el título */
        padding-bottom: 80px; /* Evita que las ondas tapen el botón */
    }
    .hero-content h1 { font-size: 2rem; margin-bottom: 15px; }
    .logo { max-width: 80%; }
    .logo div { font-size: 0.8rem; line-height: 1.2; }
}

/* ================= ESTADÍSTICAS ================= */
.stats-section { background: linear-gradient(to bottom, var(--primary) 0%, var(--secondary) 100%); color: var(--white); padding: 60px 20px; }
.stats-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.stat-item { padding: 20px; }
.stat-icon { font-size: 3.5rem; color: var(--accent); margin-bottom: 15px; }
.stat-number { font-size: 3.5rem; font-weight: 800; font-family: 'Montserrat', sans-serif; margin-bottom: 5px; text-shadow: 0 4px 10px rgba(0,0,0,0.2); display: inline-block; }
.stat-number.bounce { animation: bounceStat 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }

@keyframes bounceStat {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: var(--accent); }
    100% { transform: scale(1); color: var(--white); }
}

.stat-label { font-size: 1rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.9; font-weight: 500; }

/* ================= PREGUNTAS FRECUENTES ================= */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--white); margin-bottom: 15px; border-radius: 8px; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq-question { padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; color: var(--primary); transition: var(--transition); }
.faq-question:hover { background: rgba(0, 102, 204, 0.05); }
.faq-answer { padding: 0 25px; max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; color: var(--text-muted); line-height: 1.6; }
.faq-item.active .faq-answer { padding: 0 25px 20px; max-height: 500px; }
.faq-item.active .faq-question { color: var(--secondary); }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-icon { transition: transform 0.3s ease; }

/* ================= CONTACTO Y DIRECTORIO ================= */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: var(--white); border-radius: var(--radius); padding: 50px; box-shadow: var(--shadow-lg); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.form-group label { font-weight: 600; color: var(--primary); font-size: 0.9rem; }
.form-control { padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; transition: border-color 0.3s; background: var(--bg-body); color: var(--text-main); }
.form-control:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }
textarea.form-control { resize: vertical; min-height: 120px; }

.directory-list { display: flex; flex-direction: column; gap: 25px; text-align: left; }
.dir-item { display: flex; gap: 15px; align-items: flex-start; }
.dir-icon { background: rgba(0, 210, 211, 0.1); color: var(--secondary); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.5rem; }
.dir-info h4 { color: var(--primary); margin-bottom: 5px; font-family: 'Montserrat', sans-serif; font-size: 1.1rem; }
.dir-info p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; }

@media (max-width: 768px) {
    .contact-wrapper { grid-template-columns: 1fr; padding: 30px 20px; }
    .stat-number { font-size: 2.5rem; }

    /* ================= MEJORAS VISUALES MÓVILES ================= */
    .container { padding: 50px 15px; }
    .section-header { margin-bottom: 40px; }
    .section-header h2 { font-size: 2rem; }

    /* 1. Tarjetas Clásicas (Noticias y Normativas) a 1 sola columna */
    .grid { grid-template-columns: 1fr; gap: 20px; }
    .card-body { padding: 20px; }
    .card-title { font-size: 1.15rem; margin-bottom: 10px; }

    /* 2. Tarjetas de Análisis de Gestión (Diseño tipo App a 2 columnas) */
    .dash-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
    .dash-card { width: 100% !important; min-height: 190px; border-radius: 12px; }
    .dash-card-img-wrapper { height: 90px; }
    .dash-card .material-icons-round { 
        font-size: 1.8rem; padding: 10px; margin-top: -25px; border-width: 3px; 
    }
    .dash-card-body { padding: 15px 10px; }
    .dash-text { font-size: 0.85rem; line-height: 1.2; }
}

/* ================= MODAL NOTICIAS ================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 37, 64, 0.8); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--white); width: 90%; max-width: 800px; max-height: 90vh;
    border-radius: var(--radius); overflow-y: auto; position: relative;
    transform: translateY(50px); transition: var(--transition); box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close {
    position: absolute; top: 20px; right: 20px; background: rgba(0,0,0,0.5); color: var(--white);
    border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition); z-index: 10;
}
.modal-close:hover { background: var(--accent); color: var(--primary); transform: scale(1.1); }
#modal-img { width: 100%; height: 350px; object-fit: contain; background-color: #E9ECEF; }
.modal-body-content { padding: 40px; }
.modal-badge { display: inline-block; background: rgba(0, 102, 204, 0.1); color: var(--secondary); padding: 5px 15px; border-radius: 20px; font-size: 0.85rem; font-weight: 700; margin-bottom: 15px; }
.modal-body-content h2 { font-family: 'Montserrat', sans-serif; color: var(--primary); margin-bottom: 20px; font-size: 2rem; line-height: 1.3; }
.modal-body-content p { color: var(--text-muted); line-height: 1.8; font-size: 1.1rem; white-space: pre-wrap; margin: 0; }
@media (max-width: 768px) { #modal-img { height: 220px; } .modal-body-content { padding: 25px; } .modal-body-content h2 { font-size: 1.5rem; } }

/* ================= EXPLORADOR TIPO DASHBOARD (TARJETAS) ================= */
.analisis-dashboard { display: flex; flex-direction: column; gap: 50px; margin-top: 30px; }
.dash-category { background: transparent; padding: 0; border: none; box-shadow: none; }
.dash-category-title { 
    font-size: 1.4rem; color: var(--primary); 
    background: var(--white); padding: 15px 25px; 
    border-radius: 12px; box-shadow: var(--shadow-sm); 
    border-left: 6px solid var(--accent); display: inline-block; 
    margin-bottom: 25px; font-family: 'Montserrat', sans-serif; text-transform: uppercase;
}
.dash-group-title { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; font-family: 'Montserrat', sans-serif; background: rgba(0,0,0,0.03); padding: 10px 20px; border-radius: 8px; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 25px; }

.dash-card {
    background: var(--white); border: none; border-radius: 16px; padding: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    text-align: center; text-decoration: none; color: var(--text-main); transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); position: relative; cursor: pointer; min-height: 240px;
    overflow: hidden; z-index: 1; border: 1px solid rgba(0,0,0,0.02);
}

.dash-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg), 0 0 25px rgba(0, 210, 211, 0.4); color: var(--primary); border-color: rgba(0, 210, 211, 0.5); }

.dash-card-img-wrapper { width: 100%; height: 130px; overflow: hidden; position: relative; }
.dash-card-img-wrapper::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(10,37,64,0.2) 0%, rgba(10,37,64,0.6) 100%);
    transition: var(--transition);
}
.dash-card:hover .dash-card-img-wrapper::after { background: rgba(0, 102, 204, 0.3); }
.dash-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); }
.dash-card:hover .dash-card-img { transform: scale(1.15); }

.dash-card-body {
    padding: 15px 20px 25px; display: flex; flex-direction: column; align-items: center; width: 100%;
    background: var(--white); z-index: 2; flex-grow: 1; justify-content: center; position: relative;
}

.dash-card .material-icons-round { 
    background: var(--white); color: var(--secondary); 
    padding: 16px; border-radius: 50%; font-size: 2.2rem; margin-top: -45px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: var(--transition); 
    z-index: 3; position: relative; border: 4px solid var(--white);
}
.dash-card:hover .material-icons-round { background: var(--secondary); color: var(--white); transform: scale(1.1) rotate(5deg); border-color: var(--secondary); box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3); }

.dash-text { font-size: 1.05rem; font-weight: 700; line-height: 1.4; margin-top: 10px; color: var(--primary); transition: var(--transition); }
.dash-card:hover .dash-text { color: var(--accent); }

/* Indicador de que la tarjeta lleva a otra página */
.dash-card::after {
    content: "arrow_forward"; font-family: 'Material Icons Round'; position: absolute; bottom: 20px; right: 20px;
    font-size: 1.2rem; color: var(--accent); background: rgba(0, 210, 211, 0.15); border-radius: 50%;
    padding: 6px; transition: var(--transition); font-weight: bold; opacity: 0; z-index: 5;
}
.dash-card:hover::after { opacity: 1; background: var(--accent); color: var(--white); transform: translateX(5px); }

/* ================= MODO OSCURO (DARK MODE) ================= */
body.dark-mode {
    --bg-body: #121212;
    --white: #1E1E1E;
    --text-main: #F0F4F8;
    --text-muted: #A0AAB5;
    --primary: #1A365D; /* Ajuste suave para las cajas oscuras */
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.5);
    --shadow-lg: 0 20px 40px rgba(0,210,211,0.08);
}

body.dark-mode header.scrolled { background: rgba(30, 30, 30, 0.95); }
body.dark-mode .card, body.dark-mode .dash-card { background: #1E1E1E !important; border-color: rgba(255,255,255,0.08) !important; }
body.dark-mode .dash-card-img-wrapper::after { background: linear-gradient(to bottom, rgba(18,18,18,0.3) 0%, rgba(18,18,18,0.9) 100%); }
body.dark-mode .dash-card .material-icons-round { border-color: #1E1E1E !important; }
body.dark-mode #modal-img { background-color: #121212; }
body.dark-mode .form-control { background: #2A2A2A; color: #FFF; border-color: #444; }
body.dark-mode .faq-item { background: #1E1E1E; }
body.dark-mode .modal-content { background: #1E1E1E; }

body.dark-mode .section-header h2 { 
    background: linear-gradient(90deg, #FFF, var(--accent)) !important; 
    -webkit-background-clip: text !important; background-clip: text !important; 
    -webkit-text-fill-color: transparent !important; color: #FFF !important; 
}

/* ================= MEJORAS DE CONTRASTE (MODO OSCURO) ================= */
body.dark-mode .card-title, body.dark-mode .dash-text, 
body.dark-mode .modal-body-content h2, body.dark-mode .faq-question, 
body.dark-mode .dir-info h4, body.dark-mode .form-group label, 
body.dark-mode .contact-form h3, body.dark-mode .directory-list h3 { color: #F0F4F8 !important; }

body.dark-mode .modal-close { color: #FFF; background: rgba(255,255,255,0.1); }
body.dark-mode .modal-close:hover { background: var(--accent); color: #000; }
body.dark-mode .modal-badge { color: var(--accent); background: rgba(0, 210, 211, 0.1); }

body.dark-mode .btn-card { background: rgba(255,255,255,0.05) !important; color: var(--accent) !important; border-color: rgba(255,255,255,0.1) !important; }
body.dark-mode .cta-sis .btn-main { background: #FFF !important; color: #0A2540 !important; }
body.dark-mode .section-header .btn-main { color: var(--accent) !important; border-color: var(--accent) !important; }
body.dark-mode #grid-normativas .card > div:first-child { border-color: #1E1E1E !important; }

/* Botón Theme Toggle */
.theme-toggle-btn {
    background: transparent; color: var(--white); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0; outline: none;
    transition: var(--transition); margin-left: 10px;
}
header.scrolled .theme-toggle-btn { color: var(--primary); }
.theme-toggle-btn:hover { color: var(--accent); transform: scale(1.15); }
header.scrolled .theme-toggle-btn:hover { color: var(--secondary); }

@media (max-width: 768px) {
    .theme-toggle-btn { color: var(--primary); font-size: 1.1rem; margin-left: 0; margin-top: 10px; justify-content: flex-start; padding-bottom: 8px; }
}
