/* =========================================================
   Información sobre los concursos de selección de ingreso a la UNAM
   Hoja de estilos principal — rediseño "Jacaranda"
   ========================================================= */

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/space-grotesk-latin-700-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/public-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/public-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Public Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/public-sans-latin-600-normal.woff2') format('woff2');
}

:root {
    --unam-blue: #002060;
    --unam-blue-vivid: #0C3FA8;
    --unam-blue-dark: #001845;
    --header-bg: #14385C;
    --footer-bg: #0B233A;
    --footer-link: #DFB923;
    --unam-gold: #BF9000;
    --unam-white: #FFFFFF;

    --jacaranda: #7C5CBF;
    --jacaranda-light: #EFEAFB;
    --jacaranda-border: #D9CFF0;
    --warm: #EC5C74;

    --card-blue: #B4C7E7;
    --card-blue-border: #7C93C9;
    --card-yellow: #FFE699;
    --card-yellow-border: #D6B84A;

    --accent-green: #639922;
    --accent-blue: #378ADD;
    --accent-gray: #888780;
    --accent-pink: #EC5C74;
    --accent-gold: #BF9000;

    --text-body: #2A2A3D;
    --text-soft: #5B5B76;
    --bg-page: #FAFAFE;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Public Sans', "Segoe UI", Calibri, Arial, sans-serif;
    color: var(--text-body);
    background-color: var(--bg-page);
}

main {
    flex: 1 0 auto;
}

/* ===================== HEADER ===================== */
.site-header {
    background-color: var(--header-bg);
    padding: 0.65rem 0;
}

.site-header .header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-header img {
    height: 52px;
    width: auto;
}

/* ===================== TÍTULO DE PÁGINA ===================== */
.page-title {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--unam-blue);
    font-weight: 700;
    text-align: center;
    font-size: 1.65rem;
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.page-title .cap {
    color: var(--unam-blue);
}

.page-subtitle {
    display: inline-block;
    color: var(--jacaranda);
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 2.25rem;
    width: 100%;
}

/* ===================== HERO (portada) ===================== */
.hero-wrap {
    position: relative;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.hero-blob.b1 {
    width: 340px;
    height: 340px;
    top: -180px;
    left: -120px;
    background: var(--jacaranda);
    opacity: 0.07;
}

.hero-blob.b2 {
    width: 300px;
    height: 300px;
    top: -140px;
    right: -140px;
    background: var(--warm);
    opacity: 0.055;
}

.hero-tagline {
    position: relative;
    text-align: center;
    color: var(--text-soft);
    font-size: 0.95rem;
    max-width: 480px;
    margin: 0 auto 1.5rem;
}

/* ===================== BREADCRUMB ===================== */
.breadcrumb-nav {
    background-color: transparent;
    padding: 0.75rem 0 0;
    font-size: 0.85rem;
}

.breadcrumb-nav ol.breadcrumb {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.breadcrumb-nav .breadcrumb-item {
    padding-left: 0;
    display: flex;
    align-items: center;
}

.breadcrumb-nav .breadcrumb-item a,
.breadcrumb-nav .breadcrumb-item.active {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-nav .breadcrumb-item a {
    color: var(--text-soft);
}

.breadcrumb-nav .breadcrumb-item a::before,
.breadcrumb-nav .breadcrumb-item.active::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--jacaranda);
    flex-shrink: 0;
}

.breadcrumb-nav .breadcrumb-item a:hover {
    color: var(--jacaranda);
}

.breadcrumb-nav .breadcrumb-item.active {
    color: var(--unam-blue);
    font-weight: 700;
}

.breadcrumb-nav .breadcrumb-item.active::before {
    box-shadow: 0 0 0 3px var(--jacaranda-light);
}

.breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 1px;
    background: var(--jacaranda-border);
    margin: 0 8px;
}

/* ===================== TARJETAS GRANDES (Vista 1 - portada) ===================== */
.big-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    min-height: 140px;
    border-radius: 16px;
    background: var(--unam-white);
    border: 1px solid var(--jacaranda-border);
    font-weight: 500;
    color: var(--unam-blue);
    text-decoration: none;
    padding: 1.5rem 1.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.big-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 24px rgba(124, 92, 191, 0.16);
    border-color: var(--jacaranda);
    color: var(--unam-blue);
}

.big-card .badge-year {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
}

.big-card.card-blue .badge-year {
    background: var(--jacaranda-light);
    color: var(--jacaranda);
}

.big-card.card-yellow .badge-year {
    background: #FBF0D9;
    color: var(--unam-gold);
}

.big-card strong {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.15rem;
}

.big-card span {
    font-size: 0.85rem;
    color: var(--text-soft);
    font-weight: 400;
}

/* ===================== LÍNEA DE CONCURSO (Vista 2) — Opción B ===================== */
.concurso-line {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--jacaranda);
    margin: 0 0 2.25rem;
}

.concurso-line .sep {
    color: var(--jacaranda-border);
    margin: 0 8px;
    font-weight: 400;
}

/* ===================== TARJETAS DE MENÚ (Vista 2) ===================== */
.menu-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    min-height: 130px;
    border-radius: 14px;
    background: var(--unam-white);
    border: 1px solid #ECEAF2;
    border-top: 3px solid var(--menu-color, var(--jacaranda));
    font-weight: 500;
    color: var(--unam-blue);
    text-decoration: none;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.menu-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(124, 92, 191, 0.14);
    color: var(--unam-blue);
}

.menu-card .menu-icon {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--menu-color, var(--jacaranda));
    margin-bottom: 1.25rem;
}

.menu-card .menu-label {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
}

.menu-card.card-green { --menu-color: var(--accent-green); }
.menu-card.card-blue2 { --menu-color: var(--accent-blue); }
.menu-card.card-gray  { --menu-color: var(--accent-gray); }
.menu-card.card-pink  { --menu-color: var(--accent-pink); }
.menu-card.card-gold  { --menu-color: var(--accent-gold); }
.menu-card.card-jacaranda { --menu-color: var(--jacaranda); }

/* ===================== LISTA DE DOCUMENTOS (tipo tarjeta/fila) ===================== */
.doclist {
    list-style: none;
    padding-left: 0;
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doc-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--unam-white);
    border: 1px solid #ECEAF2;
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    text-decoration: none;
    color: var(--unam-blue);
    font-size: 0.92rem;
    font-weight: 500;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.doc-row:hover {
    border-color: var(--jacaranda);
    transform: translateX(2px);
    color: var(--unam-blue);
}

.doc-row .picon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--jacaranda-light);
    color: var(--jacaranda);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ===================== TIMELINE (Boletines y Comunicados) ===================== */
.timeline {
    max-width: 760px;
    margin: 0 auto;
    padding-left: 0;
}

.tl-item {
    display: flex;
    gap: 16px;
    position: relative;
    padding-bottom: 1.4rem;
}

.tl-item::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 16px;
    bottom: 0;
    width: 1px;
    background: var(--jacaranda-border);
}

.tl-item:last-child::before {
    display: none;
}

.tl-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--jacaranda);
    margin-top: 5px;
    flex-shrink: 0;
}

.tl-date {
    font-size: 0.78rem;
    color: var(--jacaranda);
    font-weight: 600;
    margin-bottom: 0.15rem;
    text-transform: capitalize;
}

.tl-text {
    font-size: 0.92rem;
    line-height: 1.45;
}

.tl-text a {
    color: var(--unam-blue);
    text-decoration: none;
    border-bottom: 1px solid #C9C3E2;
}

.tl-text a:hover {
    color: var(--jacaranda);
    border-bottom-color: var(--jacaranda);
}

/* ===================== FOOTER ===================== */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--unam-white);
    padding: 0.85rem 0;
    margin-top: 2rem;
    flex-shrink: 0;
}

.site-footer a {
    color: var(--footer-link);
    text-decoration: underline;
}

.site-footer a:hover {
    color: #fff;
}

.site-footer .footer-text {
    font-size: 0.75rem;
    line-height: 1.55;
    text-align: justify;
}

.site-footer .footer-logo img {
    height: 46px;
    width: auto;
}

.footer-chip-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    color: #E8E4F5;
    vertical-align: middle;
}

.footer-chip-inline .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--warm);
    flex-shrink: 0;
}

.footer-dot-sep {
    color: #4C6488;
    margin: 0 3px;
}

.footer-credits-link {
    font-size: 0.75rem;
    color: var(--footer-link) !important;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.footer-credits-link:hover {
    color: #fff !important;
}

/* Modal de créditos */
#creditsModal .modal-content {
    border-radius: 14px;
    border: none;
}

#creditsModal .modal-title {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--unam-blue);
    font-size: 1.05rem;
}

#creditsModal .credits-office {
    font-size: 0.8rem;
    color: var(--jacaranda);
    font-weight: 600;
    margin: -6px 0 16px;
}

#creditsModal .credits-group {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F0EDF8;
}

#creditsModal .credits-group:last-child {
    border-bottom: none;
    padding-bottom: 2px;
}

#creditsModal .credits-group .bar {
    width: 3px;
    border-radius: 2px;
    background: var(--jacaranda);
    flex-shrink: 0;
    align-self: stretch;
}

#creditsModal .credits-role {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--unam-blue);
    margin: 0 0 6px;
}

#creditsModal .credits-person {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.6;
}

/* ===================== RESPONSIVO ===================== */
@media (max-width: 767.98px) {
    .page-title {
        font-size: 1.25rem;
    }

    .page-subtitle {
        font-size: 0.88rem;
    }

    .big-card,
    .menu-card {
        min-height: 110px;
        margin-bottom: 1rem;
    }

    .site-header img {
        height: 42px;
    }

    .header-badge {
        font-size: 0.66rem;
        padding: 4px 10px;
    }

    .hero-blob.b1, .hero-blob.b2 {
        width: 200px;
        height: 200px;
    }

    .doc-row {
        font-size: 0.88rem;
    }

    .site-footer .footer-logo {
        text-align: center !important;
        margin-top: 0.75rem;
    }

    .site-footer .footer-text {
        text-align: left;
    }
}
