/* =========================================================
   Portal de Procesos Electorales - FENO UNAM
   ========================================================= */

:root {
    --azul-unam: #003b5c;
    --azul-oscuro: #002b43;
    --azul-claro: #0b5d80;
    --dorado: #b08d2c;
    --gris-fondo: #f5f7f9;
    --gris-borde: #e2e7eb;
    --gris-texto: #53606b;
    --blanco: #ffffff;
    --sombra: 0 12px 30px rgba(0, 43, 67, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #1d2a33;
    background: var(--blanco);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

a {
    color: inherit;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--gris-borde);
}

.brand-row {
    min-height: 126px;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 18px 0;
}

.brand-logos {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-unam {
    width: 82px;
    height: 82px;
    object-fit: contain;
}

.logo-feno {
    width: 74px;
    height: 74px;
    object-fit: contain;
}

.brand-divider {
    width: 1px;
    height: 62px;
    background: #d6dce1;
}

.brand-text {
    border-left: 4px solid var(--dorado);
    padding-left: 20px;
}

.brand-unam {
    font-size: .85rem;
    letter-spacing: .08em;
    color: var(--gris-texto);
}

.brand-facultad {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--azul-unam);
    margin-top: 5px;
}

.brand-section {
    font-size: .92rem;
    letter-spacing: .13em;
    font-weight: 700;
    color: var(--dorado);
    margin-top: 7px;
}

.institutional-nav {
    background: var(--azul-unam);
}

.institutional-nav .nav-link {
    color: rgba(255,255,255,.9);
    padding: 14px 20px;
    font-weight: 600;
}

.institutional-nav .nav-link:hover,
.institutional-nav .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.09);
}

.hero {
    background: linear-gradient(120deg, var(--azul-oscuro), var(--azul-claro));
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    right: -140px;
    top: -140px;
}

.hero-content {
    padding: 92px 0 100px;
    max-width: 820px;
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-block;
    font-size: .76rem;
    letter-spacing: .14em;
    font-weight: 800;
    color: #fff;
    opacity: .95;
    margin-bottom: 10px;
}

.eyebrow.dark {
    color: var(--dorado);
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 1.05;
    margin: 0 0 22px;
    font-weight: 800;
}

.hero p {
    font-size: 1.15rem;
    line-height: 1.7;
    max-width: 720px;
    color: rgba(255,255,255,.9);
    margin-bottom: 30px;
}

.section {
    padding: 72px 0;
}

.section-soft {
    background: var(--gris-fondo);
}

.section-heading {
    margin-bottom: 38px;
}

.section-heading h1,
.section-heading h2 {
    color: var(--azul-unam);
    font-weight: 800;
    margin: 0 0 10px;
}

.section-heading h2 {
    font-size: 2rem;
}

.section-heading p {
    color: var(--gris-texto);
    margin: 0;
}

.process-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--gris-borde);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: transform .2s ease, box-shadow .2s ease;
}

.process-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(0, 43, 67, .13);
}

.process-number {
    height: 7px;
    background: var(--dorado);
    color: transparent;
}

.process-card .card-body {
    padding: 30px;
}

.process-period {
    color: var(--dorado);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.process-card h3 {
    color: var(--azul-unam);
    font-size: 1.45rem;
    margin: 9px 0 12px;
}

.process-card p {
    color: var(--gris-texto);
    line-height: 1.6;
    min-height: 78px;
}

.btn-institutional {
    background: var(--azul-unam);
    border-color: var(--azul-unam);
    color: #fff;
    font-weight: 700;
    padding: 10px 17px;
}

.btn-institutional:hover {
    background: var(--azul-oscuro);
    border-color: var(--azul-oscuro);
    color: #fff;
}

.btn-outline-institutional {
    border-color: var(--azul-unam);
    color: var(--azul-unam);
    font-weight: 700;
}

.btn-outline-institutional:hover {
    background: var(--azul-unam);
    color: #fff;
}

.info-card {
    background: #fff;
    border: 1px solid var(--gris-borde);
    border-radius: 14px;
    padding: 28px;
    height: 100%;
}

.info-card > i {
    display: inline-flex;
    font-size: 2rem;
    color: var(--dorado);
    margin-bottom: 18px;
}

.info-card h3 {
    color: var(--azul-unam);
    font-size: 1.2rem;
    font-weight: 750;
}

.info-card p {
    color: var(--gris-texto);
    margin-bottom: 0;
    line-height: 1.6;
}

.process-title {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    border-bottom: 1px solid var(--gris-borde);
    padding-bottom: 30px;
    margin-bottom: 18px;
}

.process-title h1 {
    color: var(--azul-unam);
    font-weight: 800;
    margin: 0 0 5px;
}

.process-title p {
    color: var(--gris-texto);
    margin: 0;
}

.content-panel,
.sidebar-card {
    background: #fff;
    border: 1px solid var(--gris-borde);
    border-radius: 14px;
    padding: 26px;
    margin-bottom: 24px;
    box-shadow: 0 7px 20px rgba(0,0,0,.035);
}

.panel-heading {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.panel-heading > i {
    color: var(--dorado);
    font-size: 1.8rem;
}

.panel-heading h2 {
    color: var(--azul-unam);
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.panel-heading p {
    color: var(--gris-texto);
    font-size: .92rem;
    margin: 0;
}

.document-list {
    display: grid;
    gap: 8px;
}

.document-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 13px 15px;
    border: 1px solid var(--gris-borde);
    border-radius: 9px;
    color: #263640;
    background: #fbfcfd;
    transition: background .15s ease, border-color .15s ease;
}

.document-link:hover {
    background: #f1f6f9;
    border-color: #c5d3dc;
    color: var(--azul-unam);
}

.document-link > i:first-child {
    color: var(--azul-claro);
    font-size: 1.25rem;
}

.small-link {
    margin-top: 7px;
}

.empty-state {
    padding: 18px;
    background: var(--gris-fondo);
    border-radius: 9px;
    color: var(--gris-texto);
    font-size: .93rem;
}

.empty-state.compact {
    padding: 11px 14px;
    font-size: .88rem;
}

.representation-block {
    margin-top: 22px;
}

.representation-block:first-of-type {
    margin-top: 0;
}

.representation-block h3 {
    font-size: 1rem;
    color: var(--azul-unam);
    font-weight: 800;
    padding-bottom: 7px;
    border-bottom: 2px solid #eef1f3;
}

.sidebar-card {
    top: 90px;
}

.sidebar-title {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.sidebar-title i {
    color: var(--dorado);
    font-size: 1.45rem;
}

.sidebar-title h2 {
    color: var(--azul-unam);
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
}

.sidebar-card p {
    color: var(--gris-texto);
    line-height: 1.6;
}

.representation-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.representation-list li {
    display: flex;
    gap: 9px;
    padding: 8px 0;
    color: var(--gris-texto);
}

.representation-list i {
    color: var(--dorado);
}

.commission-panel {
    border: 1px solid var(--gris-borde);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--sombra);
}

.commission-header {
    background: var(--azul-unam);
    color: #fff;
    padding: 25px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.commission-header h2 {
    margin: 0;
    font-weight: 800;
}

.commission-table th {
    color: var(--azul-unam);
    background: #f4f7f9;
    font-size: .88rem;
}

.commission-table td,
.commission-table th {
    padding: 15px 18px;
    border-color: var(--gris-borde);
}

.commission-table a {
    color: var(--azul-claro);
    text-decoration: none;
}

.commission-table a:hover {
    text-decoration: underline;
}

.site-footer {
    background: var(--azul-oscuro);
    color: #fff;
    padding: 35px 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.site-footer p {
    margin: 5px 0 0;
    color: rgba(255,255,255,.72);
}

.footer-note {
    font-size: .85rem;
}

@media (max-width: 767.98px) {
    .brand-row {
        min-height: auto;
        align-items: flex-start;
        gap: 14px;
        padding: 14px 0;
    }

    .brand-logos {
        gap: 8px;
    }

    .logo-unam {
        width: 52px;
        height: 52px;
    }

    .logo-feno {
        width: 48px;
        height: 48px;
    }

    .brand-divider {
        height: 42px;
    }

    .brand-text {
        padding-left: 11px;
    }

    .brand-unam {
        font-size: .58rem;
        line-height: 1.25;
    }

    .brand-facultad {
        font-size: .82rem;
        line-height: 1.2;
    }

    .brand-section {
        font-size: .62rem;
        letter-spacing: .07em;
    }

    .hero-content {
        padding: 65px 0 72px;
    }

    .hero h1 {
        font-size: 2.45rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section {
        padding: 52px 0;
    }

    .process-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .content-panel,
    .sidebar-card {
        padding: 20px;
    }

    .commission-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-grid {
        flex-direction: column;
    }
}


/* ===== V2: avisos, fórmulas y visor PDF ===== */

.formula-grid {
    display: grid;
    gap: 9px;
}

.formula-card {
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    color: #263640;
    padding: 14px;
    border: 1px solid var(--gris-borde);
    border-radius: 10px;
    background: #fbfcfd;
    transition: .15s ease;
}

.formula-card:hover {
    background: #f1f6f9;
    border-color: #c5d3dc;
    color: var(--azul-unam);
    transform: translateX(2px);
}

.formula-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #eef4f7;
    color: var(--azul-unam);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.formula-card strong,
.formula-card small {
    display: block;
}

.formula-card small {
    color: var(--gris-texto);
    margin-top: 3px;
}

.formula-detail-header {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 25px 0 30px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--gris-borde);
}

.formula-detail-icon {
    width: 76px;
    height: 76px;
    border-radius: 16px;
    background: var(--azul-unam);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.formula-detail-header h1 {
    color: var(--azul-unam);
    font-weight: 800;
    margin: 0 0 5px;
}

.formula-detail-header p {
    color: var(--gris-texto);
    margin: 0;
}

.formula-pdf-preview {
    width: 100%;
    height: 680px;
    border: 1px solid var(--gris-borde);
    border-radius: 9px;
    overflow: hidden;
    background: #eef1f3;
}

.formula-pdf-preview iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.formula-image-preview {
    background: #f5f7f9;
    padding: 15px;
    text-align: center;
    border-radius: 10px;
}

.formula-image-preview img {
    max-width: 100%;
    max-height: 720px;
    object-fit: contain;
}

.formula-meta {
    margin: 0;
}

.formula-meta dt {
    color: var(--azul-unam);
    font-weight: 800;
    font-size: .82rem;
    margin-top: 14px;
}

.formula-meta dt:first-child {
    margin-top: 0;
}

.formula-meta dd {
    color: var(--gris-texto);
    margin: 3px 0 0;
}

.pdf-page {
    background: #1b252c;
    min-height: 100vh;
}

.pdf-toolbar {
    background: var(--azul-oscuro);
    color: #fff;
    padding: 11px 15px;
    position: fixed;
    z-index: 10;
    top: 0;
    left: 0;
    right: 0;
}

.pdf-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 650;
}

.pdf-title i {
    color: #fff;
    font-size: 1.3rem;
}

.pdf-title span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-viewer {
    position: fixed;
    top: 58px;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 0;
}

.pdf-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #525659;
}

@media (max-width: 767.98px) {
    .formula-detail-header {
        align-items: flex-start;
        gap: 14px;
    }

    .formula-detail-icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }

    .formula-detail-header h1 {
        font-size: 1.65rem;
    }

    .formula-pdf-preview {
        height: 500px;
    }

    .pdf-toolbar .btn {
        padding: 5px 8px;
    }
}

/* ===== V3: voto, cronología y documentación por figura ===== */

.voting-banner {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    align-items: center;
    gap: 22px;
    padding: 25px 28px;
    border-radius: 16px;
    background: var(--azul-unam);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0,0,0,.08);
}

.voting-icon {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.13);
    font-size: 2.2rem;
}

.voting-info h2 {
    margin: 0 0 5px;
    font-size: 1.75rem;
    font-weight: 850;
}

.voting-info p {
    margin: 0;
    opacity: .92;
    line-height: 1.5;
}

.eyebrow.light {
    color: rgba(255,255,255,.82);
}

.voting-action .btn {
    white-space: nowrap;
    font-weight: 750;
}

.figure-documentation .accordion-button {
    color: var(--azul-unam);
    background: #fff;
    padding: 18px 16px;
    box-shadow: none;
}

.figure-documentation .accordion-button:not(.collapsed) {
    color: var(--azul-unam);
    background: #f4f8fa;
}

.figure-documentation .accordion-button:focus {
    box-shadow: none;
}

.figure-documentation .accordion-button strong,
.figure-documentation .accordion-button small {
    display: block;
}

.figure-documentation .accordion-button small {
    margin-top: 3px;
    color: var(--gris-texto);
    font-weight: 400;
}

.figure-number {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eaf1f5;
    color: var(--azul-unam);
    font-weight: 800;
    margin-right: 12px;
    flex-shrink: 0;
}

.accordion-body {
    padding: 8px 18px 22px;
    background: #fbfcfd;
}

.doc-subsection {
    padding: 18px 0;
    border-bottom: 1px solid var(--gris-borde);
}

.doc-subsection:last-child {
    border-bottom: 0;
}

.doc-subsection h4 {
    color: var(--azul-unam);
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 10px;
}

.doc-subsection h4 i {
    margin-right: 7px;
}

.election-date-big {
    font-size: 1.55rem;
    color: var(--azul-unam);
    font-weight: 850;
    margin: 5px 0 10px;
}

.voting-side-card p {
    color: var(--gris-texto);
}

.timeline-section {
    background: #fff;
    border: 1px solid var(--gris-borde);
    border-radius: 16px;
    padding: 30px 32px 32px;
    box-shadow: 0 7px 22px rgba(0,0,0,.035);
}

.timeline-heading { margin-bottom: 28px; }
.timeline-heading h2 {
    color: var(--azul-unam);
    font-size: 1.65rem;
    font-weight: 800;
    margin: 0 0 6px;
}
.timeline-heading p { color: var(--gris-texto); margin: 0; }
.timeline { position: relative; margin-left: 13px; }
.timeline::before {
    content: ""; position: absolute; left: 18px; top: 8px; bottom: 8px;
    width: 2px; background: #dbe3e8;
}
.timeline-item {
    position: relative; display: grid; grid-template-columns: 38px 1fr;
    gap: 18px; min-height: 118px;
}
.timeline-marker {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: #eef2f4; border: 3px solid #fff; box-shadow: 0 0 0 1px #d4dde2;
    color: var(--gris-texto); position: relative; z-index: 1;
}
.timeline-item.completado .timeline-marker {
    background: var(--azul-unam); color: #fff; box-shadow: 0 0 0 1px var(--azul-unam);
}
.timeline-item.actual .timeline-marker {
    background: var(--dorado); color: #fff; box-shadow: 0 0 0 3px rgba(176,141,44,.18);
}
.timeline-content { padding: 0 0 28px; }
.timeline-date {
    display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em;
    color: var(--dorado); text-transform: uppercase; margin-bottom: 5px;
}
.timeline-content h3 { color: var(--azul-unam); font-size: 1.08rem; font-weight: 800; margin: 0 0 5px; }
.timeline-content p { color: var(--gris-texto); line-height: 1.55; margin: 0 0 8px; }
.timeline-status {
    display: inline-block; border-radius: 20px; padding: 4px 9px; font-size: .72rem;
    font-weight: 750; background: #f0f3f5; color: var(--gris-texto);
}
.timeline-item.completado .timeline-status { background: #eaf2f6; color: var(--azul-unam); }
.timeline-item.actual .timeline-status { background: #f8f0d9; color: #755d17; }

@media (max-width: 767.98px) {
    .voting-banner { grid-template-columns: 52px 1fr; gap: 13px; padding: 20px; }
    .voting-icon { width: 52px; height: 52px; font-size: 1.5rem; }
    .voting-info h2 { font-size: 1.35rem; }
    .voting-action { grid-column: 1 / -1; }
    .voting-action .btn { width: 100%; }
    .timeline-section { padding: 23px 18px; }
    .timeline { margin-left: 0; }
    .timeline::before { left: 16px; }
    .timeline-item { grid-template-columns: 34px 1fr; gap: 13px; }
    .timeline-marker { width: 34px; height: 34px; }
}


/* Portada: procesos electorales + jornada electoral + carrusel */
.home-intro { padding-top: 34px; padding-bottom: 28px; }
.home-process-panel, .home-voting-panel { border-radius: 18px; padding: 38px; box-shadow: 0 12px 32px rgba(0,0,0,.10); }
.home-process-panel { background: linear-gradient(135deg,#173c52,#0d2738); color:#fff; display:flex; flex-direction:column; justify-content:center; }
.home-process-panel h1 { font-size:clamp(2rem,4vw,3.2rem); font-weight:850; margin:8px 0 14px; }
.home-process-panel p { max-width:700px; color:rgba(255,255,255,.88); font-size:1.04rem; line-height:1.65; margin-bottom:22px; }
.home-process-panel .btn { color:#173c52; font-weight:750; }
.home-voting-panel { background:#f7f5ed; border:1px solid #ded6bd; display:flex; flex-direction:column; justify-content:center; }
.home-voting-panel .voting-icon { width:52px; height:52px; border-radius:14px; display:grid; place-items:center; background:#173c52; color:#fff; font-size:1.5rem; margin-bottom:18px; }
.home-voting-panel .eyebrow.gold { color:#8c7020; }
.home-voting-panel h2 { color:#173c52; font-size:clamp(1.65rem,3vw,2.2rem); font-weight:850; margin:7px 0 10px; }
.home-voting-panel p { color:#4d5b63; line-height:1.55; margin-bottom:20px; }
.btn-voting { background:#173c52; color:#fff; border:0; padding:11px 15px; font-weight:750; }
.btn-voting:hover { background:#0d2738; color:#fff; }
.election-carousel { overflow:hidden; border-radius:18px; box-shadow:0 12px 35px rgba(0,0,0,.12); background:#152c3b; }
.election-carousel .carousel-item, .election-carousel .carousel-item img { height:390px; }
.election-carousel .carousel-item { position:relative; background:#152c3b; }
.election-carousel .carousel-item::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(5,25,38,.78),rgba(5,25,38,.18) 65%,rgba(5,25,38,.05)); pointer-events:none; }
.election-carousel .carousel-item img { object-fit:cover; }
.election-carousel .carousel-caption { z-index:2; left:8%; right:30%; bottom:68px; text-align:left; }
.carousel-kicker { display:inline-block; font-size:.76rem; font-weight:800; letter-spacing:.14em; margin-bottom:9px; color:#f0d77d; }
.election-carousel .carousel-caption h2 { font-size:clamp(1.8rem,3vw,3rem); font-weight:800; margin-bottom:9px; }
.election-carousel .carousel-caption p { font-size:1.03rem; line-height:1.55; max-width:650px; margin:0; }
@media (max-width:767.98px) {
 .home-intro { padding-top:20px; }
 .home-process-panel,.home-voting-panel { padding:27px; }
 .election-carousel .carousel-item,.election-carousel .carousel-item img { height:330px; }
 .election-carousel .carousel-caption { left:8%; right:10%; bottom:48px; }
 .election-carousel .carousel-caption h2 { font-size:1.65rem; }
 .election-carousel .carousel-caption p { font-size:.9rem; }
}
