/* ==========================================================================
   TSE GUATEMALA - LANDING DE VOTACION ELECTRONICA
   ========================================================================== */
:root {
    --tse-blue: #0072bc;
    --tse-navy: #003865;
    --tse-sky: #00a3e0;
    --tse-red: #c8102e;
    --tse-yellow: #f4c430;
    --ink: #172033;
    --text-muted: #5d6b7a;
    --bg-light: #ffffff;
    --bg-light-alt: #f3f7fb;
    --border-color: #dbe6ef;
    --shadow-soft: 0 18px 35px rgba(0, 56, 101, 0.12);
    --transition: 0.3s ease;
    --font-main: 'Source Sans 3', Arial, Helvetica, sans-serif;
    --font-heading: 'Montserrat', Arial, Helvetica, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

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

h1, h2, h3, h4 {
    color: var(--tse-navy);
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 0;
}

a { color: inherit; }
img, iframe { max-width: 100%; }
p, h1, h2, h3, h4, a, li { overflow-wrap: break-word; }

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

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

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

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.12rem;
    max-width: 640px;
    margin: 0 auto;
}

.eyebrow {
    color: var(--tse-red);
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.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: 72px;
    height: 4px;
    background: linear-gradient(90deg, var(--tse-blue), var(--tse-red));
    border-radius: 2px;
}

/* Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 56, 101, 0.06);
    transition: box-shadow var(--transition);
}

.main-header.scrolled {
    box-shadow: 0 8px 24px rgba(0, 56, 101, 0.14);
}

.header-top {
    background-color: var(--tse-navy);
    color: #ffffff;
    font-size: 0.92rem;
}

.topbar-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    min-height: 36px;
}

.topbar-content a {
    color: #ffffff;
    text-decoration: none;
}

.topbar-content i { margin-right: 7px; color: var(--tse-yellow); }

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    width: auto;
    height: 58px;
    display: block;
    object-fit: contain;
    transition: height var(--transition);
}

.main-header.scrolled .logo img { height: 48px; }

.nav-links {
    display: flex;
    gap: 26px;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--tse-navy);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: color var(--transition);
}

.nav-links a:hover { color: var(--tse-red); }

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 27px;
    height: 3px;
    background: var(--tse-navy);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 27px;
    height: 3px;
    background: var(--tse-navy);
    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; }

/* Hero */
.hero {
    position: relative;
    min-height: clamp(640px, 74vh, 760px);
    padding: 86px 0 78px;
    display: flex;
    align-items: center;
    background-image: url('/img/tse-hero-area.png');
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 29, 57, 0.93), rgba(0, 114, 188, 0.74) 56%, rgba(200, 16, 46, 0.42)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.25));
    z-index: 1;
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 420px;
    gap: 56px;
    align-items: center;
    min-width: 0;
}

.hero-text,
.voting-panel {
    min-width: 0;
}

.institution-title {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: clamp(1.15rem, 2.1vw, 1.95rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 18px;
    text-transform: uppercase;
    text-wrap: balance;
}

.hero-text h1 {
    max-width: 760px;
    color: #ffffff;
    font-size: clamp(2rem, 3.25vw, 3.2rem);
    line-height: 1.12;
    margin-bottom: 0;
    text-transform: uppercase;
    text-wrap: balance;
}

.hero-text .eyebrow { color: var(--tse-yellow); }

.hero-lead {
    max-width: 640px;
    color: #edf7ff;
    font-size: 1.32rem;
    line-height: 1.48;
    margin-bottom: 34px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.secondary-link {
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 4px;
}

.secondary-link i {
    margin-left: 8px;
    font-size: 0.82rem;
}

.voting-panel {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 28px 55px rgba(0, 22, 45, 0.28);
}

.panel-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--tse-navy);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.status-dot {
    width: 11px;
    height: 11px;
    background-color: #25b45b;
    border-radius: 999px;
    box-shadow: 0 0 0 5px rgba(37, 180, 91, 0.12);
}

.voting-panel h2 {
    font-size: 1.65rem;
    margin-bottom: 10px;
}

.voting-panel p { color: var(--text-muted); }

.panel-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.panel-list li {
    color: var(--ink);
    font-weight: 700;
}

.panel-list i {
    color: var(--tse-red);
    margin-right: 9px;
}

.panel-actions {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.cta-button {
    background-color: var(--tse-red);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 54px;
    text-align: center;
    text-decoration: none;
    border: none;
    padding: 14px 30px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
    box-shadow: 0 12px 24px rgba(200, 16, 46, 0.28);
}

.cta-button:hover {
    background-color: #a90d27;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(200, 16, 46, 0.34);
}

.cta-button-alt {
    background-color: var(--tse-navy);
    box-shadow: 0 12px 24px rgba(0, 56, 101, 0.22);
}

.cta-button-alt:hover {
    background-color: var(--tse-blue);
    box-shadow: 0 16px 28px rgba(0, 56, 101, 0.28);
}

.panel-vote-btn {
    width: 100%;
}

/* Quick links */
.quick-links {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background-color: var(--border-color);
}

.quick-grid a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 88px;
    background-color: #ffffff;
    color: var(--tse-navy);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    text-decoration: none;
    padding: 18px 22px;
    transition: color var(--transition), background-color var(--transition);
}

.quick-grid i {
    color: var(--tse-red);
    font-size: 1.35rem;
}

.quick-grid a:hover {
    background-color: #f8fbfe;
    color: var(--tse-red);
}

/* Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.card {
    background: #ffffff;
    padding: 34px 28px;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 56, 101, 0.08);
    text-align: left;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--tse-blue);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
    border-top-color: var(--tse-red);
}

.card-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--tse-blue), var(--tse-navy));
    font-size: 1.55rem;
    margin-bottom: 20px;
    transition: background var(--transition);
}

.card:hover .card-icon {
    background: linear-gradient(135deg, var(--tse-red), var(--tse-blue));
}

.card h3 {
    font-size: 1.18rem;
    margin-bottom: 12px;
}

.card p { color: var(--text-muted); }

/* Tutorial */
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.step-item {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 16px;
    align-items: start;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    min-height: 154px;
}

.step-item span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background-color: var(--tse-red);
    color: #ffffff;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 800;
}

.step-item h3 {
    font-size: 1.08rem;
    margin-bottom: 4px;
}

.step-item p { color: var(--text-muted); }

.rounded-shadow {
    box-shadow: var(--shadow-soft);
}

.ready-section {
    background:
        linear-gradient(90deg, rgba(0, 56, 101, 0.95), rgba(0, 114, 188, 0.9)),
        url('/img/tse-hero-area.png');
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.ready-section h2,
.ready-section .subtitle { color: #ffffff; }

.ready-section .eyebrow { color: var(--tse-yellow); }
.ready-section .underline-title h2::after { background: var(--tse-yellow); }

/* Footer */
.site-footer {
    background-color: #061d33;
    color: #ffffff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 42px;
    margin-bottom: 42px;
}

.footer-col h4 {
    color: var(--tse-yellow);
    font-size: 1.05rem;
    margin-bottom: 18px;
}

.brand-col p,
.contact-col p {
    color: #dce8f2;
    line-height: 1.45;
}

.footer-logo-box {
    display: inline-flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

.footer-logo {
    width: 220px;
    height: auto;
    display: block;
}

.links-col ul,
.contact-list {
    list-style: none;
}

.links-col li,
.contact-list li {
    margin-bottom: 11px;
}

.links-col a,
.contact-list a {
    color: #ffffff;
    text-decoration: none;
    transition: color var(--transition);
}

.links-col a:hover,
.contact-list a:hover {
    color: var(--tse-yellow);
    text-decoration: underline;
}

.btn-contacto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 18px;
    border: 1px solid var(--tse-yellow);
    color: var(--tse-yellow) !important;
    text-decoration: none !important;
    border-radius: 8px;
    margin-top: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    transition: background-color var(--transition), color var(--transition);
}

.btn-contacto:hover {
    background-color: var(--tse-yellow);
    color: #061d33 !important;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.86rem;
    color: #aebdca;
}

/* Animaciones y accesibilidad */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s ease-out, transform 0.75s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.16s; }

.a11y-widget {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
}

.a11y-toggle-btn {
    background-color: var(--tse-navy);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 56, 101, 0.34);
    transition: transform var(--transition), background-color var(--transition);
}

.a11y-toggle-btn:hover {
    transform: scale(1.05);
    background-color: var(--tse-red);
}

.a11y-menu {
    position: absolute;
    bottom: 75px;
    left: 0;
    background: #ffffff;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
    width: 224px;
    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 14px;
    text-align: left;
    cursor: pointer;
    width: 100%;
    font-size: 0.96rem;
    color: var(--ink);
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-main);
}

.a11y-menu button:hover {
    background: #eef5fb;
    color: var(--tse-navy);
}

.a11y-menu button.btn-reset {
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    margin-top: 5px;
    color: var(--tse-red);
}

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

/* Responsive */
@media (max-width: 980px) {
    .hero-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding: 68px 0;
    }

    .voting-panel {
        max-width: 520px;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-top { display: none; }
    .header-content {
        min-height: 72px;
        width: 100%;
    }

    .logo { min-width: 0; }
    .logo img,
    .main-header.scrolled .logo img { height: 46px; }

    .menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-12px);
        transition: all 0.3s;
        z-index: -1;
        padding: 20px 0;
        border-bottom: 3px solid var(--tse-red);
        box-shadow: 0 18px 24px rgba(0, 56, 101, 0.12);
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .hero-grid {
        text-align: left;
        gap: 34px;
        width: 100%;
        max-width: 100%;
    }

    .hero-text,
    .voting-panel {
        width: 100%;
        max-width: calc(100vw - 48px);
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .cta-button {
        width: 100%;
    }

    .section-padding { padding: 64px 0; }
    .card {
        padding: 28px 24px;
        text-align: center;
    }

    .card-icon {
        margin: 0 auto 20px;
    }

    .steps-list { grid-template-columns: 1fr; }
    .step-item {
        grid-template-columns: 1fr;
        min-height: auto;
        text-align: center;
    }

    .step-item span {
        margin: 0 auto;
    }

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

@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .hero { padding: 50px 0; }
    .hero-lead { font-size: 1.12rem; }
    .voting-panel { padding: 24px; }
    .a11y-widget { left: 16px; bottom: 76px; }
}
