/* ==========================================================================
   PROCESO ELECTORAL UDEC 2026 - LANDING PAGE
   1. VARIABLES Y COLORES (BASADO EN MANUAL DE MARCA UDEC BIBLIOTECAS)
   ========================================================================== */
   :root {
    --udec-blue: #223c6a;   /* Pantone 541C */
    --udec-orange: #e69b0a; /* Pantone 130C */
    --udec-gray: #a0a0a0;   
    --overlay-blue: rgba(25, 29, 51, 0.8); /* #191d33 con opacidad */
    
    --text-dark: #333333; 
    --text-muted: #666666; 
    
    --bg-light: #FFFFFF;
    --bg-light-alt: #F8F9FA; 
    --border-color: #E2E8F0; 
    
    --transition: 0.3s ease;
    --font-main: 'Poppins', sans-serif;
}

/* ==========================================================================
   2. RESET Y ESTILOS BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    font-family: var(--font-main);
    font-weight: 400;
}

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--udec-blue);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding { padding: 80px 0; }
.bg-light-alt { background-color: var(--bg-light-alt); }
.text-center { text-align: center; }
.mt-2 { margin-top: 15px; }

/* Títulos */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.2rem; margin-bottom: 10px; }
.subtitle { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; font-weight: 300; }

.underline-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.underline-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--udec-orange);
    border-radius: 2px;
}

/* ==========================================================================
   3. NAVEGACIÓN Y HEADER
   ========================================================================== */
/* ==========================================================================
   3. NAVEGACIÓN Y HEADER (VERSIÓN AZUL INSTITUCIONAL)
   ========================================================================== */
   .main-header {
    background-color: var(--udec-blue); /* Fondo azul oficial */
    padding: 20px 0; 
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 3px solid var(--udec-orange); /* Borde naranja para resaltar */
    transition: padding 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease; 
}

.main-header.scrolled {
    padding: 10px 0; 
    background-color: rgba(34, 60, 106, 0.95); /* Azul ligeramente transparente al hacer scroll */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); 
    border-bottom: 3px solid var(--udec-orange);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { display: flex; align-items: center; gap: 15px; }
.logo-item { display: flex; align-items: center; position: relative; }

.logo-item img.logo-normal,
.logo-item img.logo-hc { 
    max-height: 70px; 
    width: auto;
    display: block;
    object-fit: contain;
    transition: max-height 0.4s ease;
}

.main-header.scrolled .logo-item img.logo-normal,
.main-header.scrolled .logo-item img.logo-hc { 
    max-height: 55px; 
}

.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { 
    color: #FFFFFF; /* Enlaces blancos para contrastar con el azul */
    text-decoration: none; 
    font-weight: 600; 
    font-size: 1rem; 
    transition: var(--transition); 
}
.nav-links a:hover { color: var(--udec-orange); }

/* Menú Hamburguesa Móvil (Ajustado a blanco) */
.menu-toggle { display: none; background: transparent; border: none; cursor: pointer; padding: 10px; }
.hamburger { display: block; width: 25px; height: 3px; background: #FFFFFF; position: relative; transition: var(--transition); }
.hamburger::before, .hamburger::after { content: ''; position: absolute; width: 25px; height: 3px; background: #FFFFFF; left: 0; transition: var(--transition); }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }
.menu-toggle.active .hamburger { background: transparent; }
.menu-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.menu-toggle.active .hamburger::after { transform: rotate(-45deg); top: 0; }

/* ==========================================================================
   4. HERO, BOTONES Y COMPONENTES PRINCIPALES
   ========================================================================== */
.hero {
    position: relative;
    padding: 80px 0;
    background-image: url('/img/fondo-hero.jpg'); /* Imagen local de fondo */
    background-size: cover;
    background-position: center;
    color: white;
}

/* Filtro overlay exigido por el manual (#191d33 al 80%) */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-blue);
    z-index: 1;
}

.hero-grid { 
    position: relative;
    z-index: 2;
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 50px; 
    align-items: center; 
}

.hero-text h1 { font-size: 3.2rem; color: white; line-height: 1.2; margin-bottom: 20px; }
.hero-text p { font-size: 1.15rem; color: #F0F4F8; margin-bottom: 35px; font-weight: 300; }

.img-fluid { width: 100%; height: auto; display: block; }
.rounded-shadow {
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Botón Principal */
.cta-button {
    background-color: var(--udec-orange);
    color: #FFFFFF;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    border: none;
    padding: 16px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(230, 155, 10, 0.3);
}

.cta-button:hover {
    background-color: #cc8908;
    color: #FFFFFF;
    transform: translateY(-3px); 
    box-shadow: 0 12px 25px rgba(230, 155, 10, 0.4);
}

/* Botón Flotante */
.floating-btn {
    position: fixed;
    bottom: -100px; 
    right: 30px;
    z-index: 9998; 
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.floating-btn.is-visible { bottom: 30px; }

/* ==========================================================================
   5. TARJETAS INFORMATIVAS
   ========================================================================== */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(34, 60, 106, 0.08);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(34, 60, 106, 0.12);
    border-top: 4px solid var(--udec-orange);
}

.card-icon { font-size: 3rem; color: var(--udec-blue); margin-bottom: 20px; transition: color var(--transition); }
.card:hover .card-icon { color: var(--udec-orange); }
.card h3 { margin-bottom: 15px; }

.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 900px; margin: 0 auto; background-color: var(--udec-blue); border-radius: 12px; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.site-footer { background-color: var(--udec-blue); color: #FFFFFF; padding: 60px 0 20px 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { font-size: 1.1rem; margin-bottom: 20px; color: var(--udec-orange); }
.brand-col p { font-size: 0.95rem; color: #E2E8F0; line-height: 1.4; }
.brand-col .small { font-size: 0.8rem; color: var(--udec-gray); }

.footer-logo {
    max-height: 70px; 
    width: auto;
    display: block;
    margin-bottom: 20px;
}

.links-col ul, .contact-list { list-style: none; padding: 0; }
.links-col ul li { margin-bottom: 12px; }
.links-col ul li a { color: #FFFFFF; text-decoration: none; font-size: 0.95rem; transition: color var(--transition); }
.links-col ul li a:hover { color: var(--udec-orange); text-decoration: underline; }

.btn-contacto {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--udec-orange);
    color: var(--udec-orange);
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
    transition: var(--transition);
}
.btn-contacto:hover {
    background-color: var(--udec-orange);
    color: var(--udec-blue);
}

.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; color: var(--udec-gray); }

/* ==========================================================================
   7. ANIMACIONES Y WIDGET A11Y
   ========================================================================== */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }

.a11y-widget { position: fixed; bottom: 25px; left: 25px; z-index: 9999; }
.a11y-toggle-btn { background-color: var(--udec-blue); color: white; border: none; border-radius: 50%; width: 60px; height: 60px; font-size: 1.8rem; cursor: pointer; box-shadow: 0 4px 15px rgba(34, 60, 106, 0.4); transition: transform var(--transition); }
.a11y-toggle-btn:hover { transform: scale(1.05); background-color: var(--udec-orange); }

.a11y-menu { position: absolute; bottom: 75px; left: 0; background: white; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.15); width: 220px; border: 1px solid var(--border-color); opacity: 1; visibility: visible; transition: opacity 0.3s, visibility 0.3s, transform 0.3s; transform: translateY(0); }
.a11y-menu.hidden { opacity: 0; visibility: hidden; transform: translateY(10px); }

.a11y-menu button { background: transparent; border: none; padding: 10px 15px; text-align: left; cursor: pointer; width: 100%; font-size: 0.95rem; color: var(--text-dark); border-radius: 8px; transition: background 0.2s; display: flex; align-items: center; gap: 12px; font-family: var(--font-main); }
.a11y-menu button:hover { background: #f0f4f8; color: var(--udec-blue); }
.a11y-menu button.btn-reset { border-top: 1px solid var(--border-color); border-radius: 0 0 8px 8px; margin-top: 5px; color: #A6192E; }

/* ==========================================================================
   8. CLASES DINÁMICAS JS - ACCESIBILIDAD 
   ========================================================================== */
.logo-hc { display: none !important; }

/* Fuente Legible (Excluye explícitamente los iconos de FontAwesome) */
body.readable-font, 
body.readable-font *:not(i):not([class*="fa-"]) {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.05em !important;
    word-spacing: 0.1em !important;
}
body.high-contrast {
    --udec-blue: #000000;
    --udec-orange: #FFFF00;
    --bg-light: #000000;
    --bg-light-alt: #111111;
    --text-dark: #FFFFFF;
    --text-muted: #FFFFFF;
    --border-color: #FFFF00;
}

body.high-contrast .hero-overlay { background-color: rgba(0,0,0,0.9); }
body.high-contrast .card { background-color: #111111; border: 1px solid #FFFF00; }
body.high-contrast .card-icon { color: #FFFF00; }
body.high-contrast .a11y-menu { background-color: #000; border: 2px solid #FFFF00; }
body.high-contrast .a11y-menu button { color: #FFF; }
body.high-contrast .a11y-menu button:hover { background-color: #333; color: #FFFF00; }
body.high-contrast h1, body.high-contrast h2, body.high-contrast h3 { color: #FFFF00 !important; }
body.high-contrast .cta-button { background-color: #FFFF00 !important; color: #000 !important; }
body.high-contrast .nav-links a { color: #FFF !important; }
body.high-contrast .hamburger { background: #FFF !important; }
body.high-contrast .logo-normal { display: none !important; }
body.high-contrast .logo-hc { display: block !important; }

/* ==========================================================================
   9. MEDIA QUERIES (MÓVIL)
   ========================================================================== */
@media (max-width: 768px) {
    .main-header { padding: 12px 0 !important; }
    .logo-item img.logo-normal, .logo-item img.logo-hc { max-height: 50px !important; }
    
    .floating-btn { left: 5%; right: auto; width: 90%; text-align: center; }

    .menu-toggle { display: block; }
    .nav-menu {
        position: absolute; top: 100%; left: 0; width: 100%;
        background-color: var(--bg-light); 
        opacity: 0; visibility: hidden; transform: translateY(-15px); 
        transition: all 0.3s; z-index: -1; padding: 20px 0;
        border-bottom: 3px solid var(--udec-orange);
    }
    .nav-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
    .nav-links { flex-direction: column; align-items: center; gap: 20px; }

    .hero { padding: 40px 0; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-text h1 { font-size: 2.2rem; }
    .footer-grid { text-align: center; }
}