/* ==========================================================================
   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;
}
ul {
    padding-left: 0px !important;
}
p{
    font-family: var(--font-main);
}

h1,
h2,
h3,
h4,
h6 {
    font-weight: 700;
    color: var(--udec-blue);
}
section {
    scroll-margin-top: 100px;
}

.container {
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 60px 0;
}

.bg-light-alt {
    background-color: var(--bg-light-alt);
}

.text-center {
    text-align: center;
}


/* Títulos */
.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin: 0 auto;
    font-weight: 500;
}

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

.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
   ========================================================================== */
.main-header {
    background-color: var(--udec-blue);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 3px solid var(--udec-orange);
    transition: padding 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}

.main-header.scrolled {
    padding: 20px 0;
    background-color: rgba(34, 60, 106, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    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;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--udec-orange);
}

/* Menú Hamburguesa Móvil */
.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 Y BOTONES
   ========================================================================== */
.hero {
    position: relative;
    padding: 0;
}

.content-hero {
    position: relative;
    width: 100%;
    height: 90vh;
    overflow: hidden;
    background-color: var(--udec-blue);
}

.carrusel-fondo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.imagen-fondo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: transicionFondo 30s infinite; 
}

.img1 { animation-delay: 0s; }
.img2 { animation-delay: 5s; }
.img3 { animation-delay: 10s; }
.img4 { animation-delay: 15s; }
.img5 { animation-delay: 20s; }
.img6 { animation-delay: 25s; }

@keyframes transicionFondo {
    0% { opacity: 0; }
    5% { opacity: 1; }
    16% { opacity: 1; }
    21% { opacity: 0; }
    100% { opacity: 0; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-blue, rgba(25, 29, 51, 0.8));
    z-index: 2;
}

.hero-grid {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
    margin: 0 auto;
}

.hero-text h1 {
    font-size: 3.2rem;
    color: white;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5)
}

.hero-text p {
    font-size: 1.2rem;
    color: #F0F4F8;
    margin-bottom: 35px;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5)
}

.election-date {
    font-family: var(--font-main);
}

/* Botones */
.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);
}

.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. NUEVA SECCIÓN: CANDIDATURAS
   ========================================================================== */
   .candidates-section {
    background-color: var(--bg-light);
}

/* Dejamos que tome la alineación centrada por defecto, solo ajustamos colores */
.candidates-section .underline-title h2::after {
    background-color: var(--udec-orange);
    width: 65px;
}

.candidates-section .card {
    border-radius: 12px;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--border-color) !important;
    background-color: var(--bg-light);
}

.candidates-section .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(34, 60, 106, 0.1) !important;
}

.candidates-section .card-img-top {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.candidates-section .badge {
    background-color: rgba(230, 155, 10, 0.15) !important; 
    color: var(--udec-orange) !important;
    font-family: var(--font-main);
    font-weight: 600;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border: none;
}

.candidates-section .card-title {
    color: var(--udec-blue);
    font-size: 1.25rem;
    margin-top: 0.5rem;
    font-family: var(--font-main);
}

/* ==========================================================================
   6. TARJETAS INFORMATIVAS
   ========================================================================== */
.custom-card{
    display: flex;
    flex-direction: column;
    background: var(--udec-blue);
    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;
    color: #FFF;
}
.card h3{
    color: #fff
}

.custom-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(34, 60, 106, 0.12);
    border-top: 10px solid var(--udec-orange) !important;
}
.custom-card:hover h5{
    font-weight: 900 !important;
}

.card-icon {
    font-size: 3rem;
    color: var(--udec-gray);
    margin-bottom: 20px;
    transition: color var(--transition);
}

.custom-card:hover .card-icon { /* Corregido para afectar a custom-card */
    color: var(--udec-orange);
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--udec-blue);
    color: #FFFFFF;
    padding: 60px 0 20px 0;
}
.site-footer a {
    color: var(--udec-orange);
    text-decoration: none;
}

.footer-grid {
    display: grid;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--udec-orange);
}

.contact-list {
    list-style: none;
    padding: 0;
}

.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);
}

/* ==========================================================================
   8. 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);
}

.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;
}

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

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 !important; }
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, body.high-contrast h4 { color: #FFFF00 !important; }
body.high-contrast .cta-button { background-color: #FFFF00 !important; color: #000 !important; }
body.high-contrast .nav-links a { color: #FFF !important; border-bottom: 3px solid #FFFF00 !important; }
body.high-contrast .hamburger { background: #FFF !important; }
body.high-contrast .logo-normal { display: none !important; }
body.high-contrast .logo-hc { display: block !important; }
body.high-contrast .main-header { background-color: rgba(0, 0, 0, 0.95) !important; backdrop-filter: none !important; box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3) !important; }
body.high-contrast .nav-menu { background-color: rgba(0, 0, 0, 0.95) !important; }

/* Altos contrastes para nuevas secciones */
body.high-contrast .candidates-section .badge {
    background-color: #000 !important;
    color: #FFFF00 !important;
    border: 1px solid #FFFF00 !important;
}
body.high-contrast .election-date {
    color: #FFFF00 !important;
    text-shadow: none;
}

/* ==========================================================================
   10. 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: rgba(34, 60, 106, 0.95);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-15px);
        transition: all 0.3s;
        z-index: -1;
        padding: 20px 0;
        border-bottom: 3px solid var(--udec-orange);
        text-align: center;
    }

    .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;
    }
    .footer-logo {
        margin: 0 auto 20px auto;
    }
}
/* ==========================================================================
   ANIMACIONES DE LAS TARJETAS Y FOTOS DE CANDIDATOS
   ========================================================================== */

/* 1. Animación general de la tarjeta (Se eleva y da sombra) */
.candidates-section .card {
    border-radius: 12px;
    border: 1px solid var(--border-color) !important;
    background-color: var(--bg-light);
    /* Aseguramos que la transición esté forzada aquí */
    transition: transform 0.3s ease, box-shadow 0.3s ease !important; 
}

.candidates-section .card:hover {
    transform: translateY(-8px) !important; /* Levanta la tarjeta 8px */
    box-shadow: 0 15px 30px rgba(34, 60, 106, 0.15) !important; /* Sombra azulada */
}

/* 2. Animación específica de la foto (Efecto de zoom suave) */
.candidates-section .card-img-top {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    /* Agregamos una transición suave a la imagen */
    transition: transform 0.5s ease !important; 
}

/* Cuando pasas el mouse por la tarjeta, la foto hace un pequeño zoom */
.candidates-section .card:hover .card-img-top {
    transform: scale(1.04) !important; 
}