/* Variables de color basadas en tu captura */
:root {
    --primary: #1a392a;     /* Verde oscuro */
    --accent: #09FF00;      /* Verde neón */
    --light-bg: #f8fafc;    /* Fondo suave */
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
.header {
    background-color: var(--primary);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.logo i {
    color: var(--accent);
    font-size: 1.5rem;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.logo h1 span {
    color: var(--accent);
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--accent);
}

.btn-login {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-login:hover {
    background: var(--accent);
    color: var(--primary);
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(rgba(26, 57, 42, 0.9), rgba(26, 57, 42, 0.9)), 
                url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 20px;
    text-align: center;
}

.badge {
    background: rgba(9, 255, 0, 0.2);
    color: var(--accent);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hero h2 {
    font-size: 3rem;
    margin: 20px 0;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(9, 255, 0, 0.3);
}

.btn-secondary {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
}

/* --- SECCION ABOUT --- */
.seccion-about {
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.tag {
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* --- NOTICIAS --- */
.noticias {
    background: #f1f5f9;
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header .line {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 15px auto;
}

.contenedor-noticias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    transition: transform 0.3s;
    box-shadow: var(--shadow);
    position: relative;
}

.card:hover {
    transform: translateY(-10px);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.card h3 { margin-bottom: 15px; color: var(--primary); }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.fecha { font-size: 0.8rem; font-weight: 700; color: var(--primary); opacity: 0.6; }

/* --- FOOTER --- */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-contenido {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h3 span { color: var(--accent); }
.footer-col h4 { color: var(--accent); margin-bottom: 20px; }
.footer-col p { opacity: 0.8; margin-bottom: 10px; font-size: 0.9rem; }

.redes-sociales { display: flex; gap: 15px; margin-top: 20px; }
.redes-sociales a {
    color: var(--white);
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
}
.redes-sociales a:hover { background: var(--accent); color: var(--primary); }

.footer-links a {
    display: block;
    color: var(--white);
    text-decoration: none;
    opacity: 0.7;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .about-grid { grid-template-columns: 1fr; }
    .hero h2 { font-size: 2rem; }
    .main-nav { display: none; } /* Podrías agregar un menú hamburguesa luego */
}

/*ACCESIBILIDAD*/

/* --- BURBUJA DE ACCESIBILIDAD --- */
.accessibility-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999 !important;
}

.btn-access {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(9, 255, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-neon 2s infinite;
}

.btn-access:hover {
    transform: scale(1.1) rotate(15deg);
    background: var(--accent);
    color: var(--primary);
}

/* Menú Desplegable */
.access-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: white;
    width: 200px;
    border-radius: 15px;
    padding: 15px;
    box-shadow: var(--shadow);
    display: none; /* Se activa con JS */
    flex-direction: column;
    gap: 10px;
    border: 1px solid #e2e8f0;
}

.access-menu.active { display: flex; }

.access-menu h4 {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.access-menu button {
    background: #f1f5f9;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.access-menu button:hover {
    background: var(--primary);
    color: var(--accent);
}

/* Animación de Pulso */
@keyframes pulse-neon {
    0% { box-shadow: 0 0 0 0 rgba(9, 255, 0, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(9, 255, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(9, 255, 0, 0); }
}

/* Clase de Alto Contraste (Se activa con JS) */
.high-contrast {
    filter: contrast(1.2) brightness(0.9);
    background-color: #000 !important;
    color: #fff !important;
}
/* Estilos extra para el Menú */
.access-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
    padding: 5px;
    border-radius: 8px;
    background: #f8fafc;
}

.access-section small {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-left: 5px;
}

/* Resaltado para personas con baja visión */
.highlight-links a {
    outline: 3px solid var(--accent) !important;
    background-color: yellow !important;
    color: black !important;
    font-weight: bold !important;
}

/* Guía de lectura para ayudar a la concentración/motriz */
.reading-guide {
    position: fixed;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    pointer-events: none;
    display: none;
    z-index: 9999;
}

/* Mejoras para Lectores de Pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
/* Filtros de Accesibilidad */
.protanopia { filter: url('#protanopia') grayscale(0.1) contrast(1.1); }
.deuteranopia { filter: hue-rotate(90deg); }
.ceguera-total { filter: grayscale(100%) contrast(1.5); }

/* Animación para que el menú de accesibilidad se vea */
.access-menu.active {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Esto evita que el body "salte" cuando se aplican filtros */
body.protanopia, 
body.deuteranopia, 
body.ceguera-total {
    height: auto !important;
    overflow-x: hidden;
    /* Evita problemas de renderizado en Chrome/Edge */
    transform: translateZ(0); 
}
/* --- CORRECCIÓN DE FILTROS --- */

/* 1. Quitamos el url('#protanopia') que rompe el scroll */
.protanopia { 
    filter: sepia(0.5) saturate(1.5) hue-rotate(-30deg) !important; 
}

.deuteranopia { 
    filter: hue-rotate(90deg) !important; 
}

.ceguera-total { 
    filter: grayscale(100%) brightness(1.1) !important; 
}

/* 2. MUY IMPORTANTE: Aplicar el filtro a la etiqueta HTML en lugar del BODY */
/* Esto evita que los elementos 'fixed' (como la burbuja) se muevan de lugar */
html.protanopia, 
html.deuteranopia, 
html.ceguera-total {
    height: 100%;
    overflow-y: scroll; /* Fuerza a mantener la barra de scroll */
}

/* 3. Ajuste de la burbuja para que no se vea afectada por el filtro si es posible */
.accessibility-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000 !important;
    /* Evitamos que el filtro la mueva */
    transform: translateZ(0); 
}