﻿@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,400&family=JetBrains+Mono:wght@400;500&display=swap');

@font-face {
    font-family: 'EmfatickNF';
    src: url('../fonts/Emfatick_NF_Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;    
}

@font-face {
    font-family: 'HandelGothic';
    src: url('../fonts/Handel_Gothic.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Paleta institucional IPN */
    --guinda: #6F1628;
    --guinda-dark: #4A0E1B;
    --guinda-mid: #8B1E33;
    --guinda-pale: #F5E8EB;
    --guinda-ghost: #FDF3F5;
    /* Escala de grises */
    --gris-800: #2D2D2D;
    --gris-600: #4A4A4A;
    --gris-500: #6B6B6B;
    --gris-300: #BDBDBD;
    --gris-200: #D4D4D4;
    --gris-100: #F2F2F2;
    --gris-50: #FAFAFA;
    /* Semánticos */
    --color-success: #1E8449;
    --color-warning: #B7770D;
    --color-danger: #C0392B;
    --color-info: #1A5276;
    /* Tipografía */
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    /* Espaciado */
    --radius-sm: .375rem;
    --radius-md: .625rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.07);
    /* Transiciones */
    --transition: .18s cubic-bezier(.4,0,.2,1);
    /* Layout */
    --nav-height: 64px; /* admin topbar — no tocar */
    --nav-bar-h: 110px; /* barra principal (ISSN 100 px + margen) */
    --nav-motto-h: 26px; /* franja del lema */
    --sidebar-width: 264px;
    --content-max: 1280px;
    --font-emfatick: 'EmfatickNF', system-ui, sans-serif;
    --font-handleGothic: 'HandelGothic', system-ui, sans-serif;
}

/* ─────────────────────────────────────────────
   3. RESET Y BASE
   ───────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--gris-800);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

img, video {
    max-width: 100%;
    display: block;
}

a {
    color: var(--guinda);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.25;
    color: var(--gris-800);
}

p {
    margin-bottom: .75rem;
}

    p:last-child {
        margin-bottom: 0;
    }

code {
    font-family: var(--font-mono);
    font-size: .875em;
    background: var(--gris-100);
    padding: .15em .35em;
    border-radius: var(--radius-sm);
    color: var(--guinda-dark);
}

ol, ul {
    padding-left: 1.25rem;
}

/* ─────────────────────────────────────────────
   4. LAYOUT — CONTENEDOR Y GRIDS
   ───────────────────────────────────────────── */
.container {
    max-width: unset;
    margin-inline: auto;
    padding: 1rem 10% 1rem 10%
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

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

/* ─────────────────────────────────────────────
   5. BOTONES
   ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    font-family: var(--font-body);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1;
    padding: .6rem 1.25rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
}

    .btn:focus-visible {
        outline: 3px solid var(--guinda);
        outline-offset: 2px;
    }

    .btn:disabled {
        opacity: .55;
        pointer-events: none;
    }

/* Variantes */
.btn-primary {
    background: var(--guinda);
    color: #fff;
    border-color: var(--guinda);
}

    .btn-primary:hover {
        background: var(--guinda-dark);
        border-color: var(--guinda-dark);
        color: #fff;
        text-decoration: none;
    }

.btn-outline {
    background: transparent;
    color: var(--guinda);
    border-color: var(--guinda);
}

    .btn-outline:hover {
        background: var(--guinda);
        color: #fff;
        text-decoration: none;
    }

.btn-ghost {
    background: transparent;
    color: var(--gris-600);
    border-color: transparent;
}

    .btn-ghost:hover {
        background: var(--gris-100);
        color: var(--gris-800);
        text-decoration: none;
    }

.btn-danger {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}

    .btn-danger:hover {
        background: #9b2c1e;
        border-color: #9b2c1e;
        color: #fff;
        text-decoration: none;
    }

.btn-success {
    background: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}

    .btn-success:hover {
        background: #166638;
        border-color: #166638;
        color: #fff;
        text-decoration: none;
    }

/* Tamaños */
.btn-sm {
    font-size: .78rem;
    padding: .4rem .875rem;
}

.btn-lg {
    font-size: 1rem;
    padding: .8rem 1.75rem;
}

.btn-full {
    width: 100%;
}

/* Botones CTA Band */
.btn-cta-inv {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    color: var(--guinda-dark);
    padding: .75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: .95rem;
    font-family: var(--font-body);
    transition: all var(--transition);
    cursor: pointer;
}

    .btn-cta-inv:hover {
        background: var(--guinda-pale);
        text-decoration: none;
    }

.btn-cta-out {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: transparent;
    color: #fff;
    padding: .75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: .95rem;
    font-family: var(--font-body);
    border: 2px solid rgba(255,255,255,.6);
    transition: all var(--transition);
    cursor: pointer;
}

    .btn-cta-out:hover {
        background: rgba(255,255,255,.1);
        border-color: #fff;
        text-decoration: none;
    }

/* ─────────────────────────────────────────────
   6. CARDS
   ───────────────────────────────────────────── */
.card {
    background: #fff;
    border: 1px solid var(--gris-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: .875rem 1.25rem;
    border-bottom: 1px solid var(--gris-200);
    background: var(--gris-50);
    font-size: .9rem;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: .75rem 1.25rem;
    border-top: 1px solid var(--gris-200);
    background: var(--gris-50);
}

/* ─────────────────────────────────────────────
   7. BADGES
   ───────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-family: var(--font-body);
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 100px;
    white-space: nowrap;
    line-height: 1.4;
}

.badge-guinda {
    background: var(--guinda);
    color: #fff;
}

.badge-success {
    background: #d4edda;
    color: var(--color-success);
}

.badge-warning {
    background: #fef3cd;
    color: var(--color-warning);
}

.badge-danger {
    background: #fde8e8;
    color: var(--color-danger);
}

.badge-info {
    background: #dbeafe;
    color: var(--color-info);
}

.badge-neutral {
    background: var(--gris-100);
    color: var(--gris-600);
}

/* ─────────────────────────────────────────────
   8. ALERTAS
   ───────────────────────────────────────────── */
.alert {
    padding: .875rem 1.25rem;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    font-size: .9rem;
    line-height: 1.5;
}

.alert-success {
    background: #f0fdf4;
    border-color: var(--color-success);
    color: #14532d;
}

.alert-error {
    background: #fef2f2;
    border-color: var(--color-danger);
    color: #7f1d1d;
}

.alert-info {
    background: #eff6ff;
    border-color: var(--color-info);
    color: #1e3a5f;
}

.alert-warning {
    background: #fffbeb;
    border-color: var(--color-warning);
    color: #78350f;
}
/* Auto-dismiss: JS agrega transición de salida; clase marca candidatos */
.alert-auto {
    transition: opacity .5s ease, max-height .5s ease;
}

/* ─────────────────────────────────────────────
   9. TABLAS
   ───────────────────────────────────────────── */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gris-200);
}

.table-ipn {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    background: #fff;
}

    .table-ipn thead th {
        background: var(--guinda);
        color: #fff;
        font-family: var(--font-body);
        font-weight: 600;
        font-size: .8rem;
        padding: .75rem 1rem;
        text-align: left;
        white-space: nowrap;
        letter-spacing: .03em;
    }

        .table-ipn thead th:first-child {
            border-radius: var(--radius-md) 0 0 0;
        }

        .table-ipn thead th:last-child {
            border-radius: 0 var(--radius-md) 0 0;
        }

    .table-ipn tbody tr {
        border-bottom: 1px solid var(--gris-200);
        transition: background var(--transition);
    }

        .table-ipn tbody tr:last-child {
            border-bottom: none;
        }

        .table-ipn tbody tr:hover {
            background: var(--guinda-ghost);
        }

    .table-ipn tbody td {
        padding: .75rem 1rem;
        vertical-align: middle;
    }

/* ─────────────────────────────────────────────
   10. STAT CARDS
   ───────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border: 1px solid var(--gris-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

    .stat-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.stat-card-icon {
    font-size: 1.6rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-display);
    line-height: 1;
}

.stat-card-label {
    font-size: .78rem;
    color: var(--gris-500);
    font-weight: 500;
}

/* ─────────────────────────────────────────────
   11. PAGE HERO
   ───────────────────────────────────────────── */
.page-hero {
    color: #fff;
    padding: 2.5rem 1.25rem 2.5rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: unset;
    margin: 0 auto;
}

    .page-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
    }

    .page-hero .container {
        position: relative;
        z-index: 1;
    }

    .page-hero h1 {
        font-size: clamp(1.75rem, 2.5vw, 2rem);
        color: #fff;
        margin-bottom: .5rem;
    }

    .page-hero p {
        color: #b8a0a5;
        font-size: 0.95rem;
        margin-bottom: 0;
    }

.page-tag {
    display: inline-block;
    background: rgba(255,255,255,.18);
    color: rgba(255,255,255,.9);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .25rem .75rem;
    border-radius: 100px;
    margin-bottom: .875rem;
}

/* ─────────────────────────────────────────────
   12. CAROUSEL DE ARTÍCULOS DESTACADOS
   ───────────────────────────────────────────── */
/* ─────────────────────────────────────────────
   12. CAROUSEL DE ARTÍCULOS DESTACADOS
   ───────────────────────────────────────────── */
.carousel-section {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--guinda-dark);
}

.carousel-wrap {
    position: relative;
    /* altura fija eliminada — el grid define la altura ahora */
}

/* ── Cada slide: layout split izquierda / derecha ──────────────────────────── */
.carousel-slide {
    display: none; /* oculto por defecto */
    grid-template-columns: 1fr 320px; /* texto | imagen vertical */
    opacity: 0;
    transition: opacity .6s ease;
    min-height: 520px;
}

    .carousel-slide.active {
        display: grid; /* visible solo el activo */
        opacity: 1;
        z-index: 1;
    }

/* ── Panel izquierdo: texto ─────────────────────────────────────────────────── */
.carousel-left {
    /*background: linear-gradient(135deg, #4a0e1b70 0%, #1a040859 100%);*/
    padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 3.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .875rem;
    position: relative;
}

    /* Línea decorativa lateral — acento de color */
    .carousel-left::before {
        content: '';
        position: absolute;
        left: 0;
        top: 20%;
        bottom: 20%;
        width: 4px;
        background: linear-gradient(180deg, transparent, var(--guinda), transparent);
        border-radius: 2px;
    }

/* ── Panel derecho: imagen vertical ─────────────────────────────────────────── */
.carousel-right {
    position: relative;
    overflow: hidden;
    /* Sin height fijo — el grid le da la altura del panel izquierdo */
}

.carousel-img-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

    /* Imagen — object-fit:cover respeta el ratio 9:16 o 3:4 sin deformar */
    .carousel-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center;
        display: block;
        transition: transform .55s ease, filter .4s ease;
        /* Oscurecer por defecto — contrarresta imágenes con fondo blanco */
        filter: brightness(.8) contrast(1.05);
    }

/* Overlay permanente: fusiona la imagen con el panel izquierdo y oscurece */
.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to right, rgba(0,0,0,.72) 0%, /* borde izq: se funde con el panel texto */
    rgba(0,0,0,.15) 35%, /* zona central: casi transparente */
    rgba(0,0,0,.45) 100% /* borde der: oscurece el extremo */
    );
    pointer-events: none;
    z-index: 1;
    transition: background .4s ease;
}

/* Contador de slides encima de la imagen */
.carousel-img-num {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 2;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: rgba(255,255,255,.45);
    user-select: none;
}

/* Emoji de respaldo cuando no hay carátula */
.carousel-bg-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    opacity: .18;
    user-select: none;
    pointer-events: none;
}

/* ── Hover sobre el panel de imagen ─────────────────────────────────────────── */
.carousel-right:hover .carousel-img-wrap img {
    transform: scale(1.05);
    filter: brightness(.68) contrast(1.08); /* se oscurece más */
}

.carousel-right:hover .carousel-overlay {
    background: linear-gradient( to right, rgba(0,0,0,.82) 0%, rgba(0,0,0,.25) 35%, rgba(0,0,0,.62) 100% );
}

/* ── Contenido del texto ─────────────────────────────────────────────────────── */
.carousel-tag {
    display: inline-block;
    background: rgb(193 39 45 / 82%);
    border: 1px solid rgba(193, 39, 45, 0.5);
    color: #fdfdfd;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 2px;
    width: fit-content;
}

.carousel-title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.8vw, 2rem);
    color: #fff;
    margin: 0;
    line-height: 1.25;
}

.carousel-excerpt {
    font-size: .9rem;
    color: rgba(255,255,255,.72);
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-meta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: .82rem;
    color: rgba(255,255,255,.55);
}

    .carousel-meta span {
        display: flex;
        align-items: center;
        gap: .3rem;
    }

/* Botón CTA dentro del carrusel */
.carousel-read-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: .25rem;
    padding: .65rem 1.35rem;
    background: var(--guinda);
    color: #fff;
    font-size: .87rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    width: fit-content;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

    .carousel-read-btn:hover {
        background: var(--guinda-dark);
        transform: translateX(4px);
        box-shadow: 0 4px 18px rgba(0,0,0,.35);
        color: #fff;
        text-decoration: none;
    }

/* ── Controles (dots + flechas) ──────────────────────────────────────────────── */
.carousel-controls {
    position: absolute;
    bottom: 1.25rem;
    /* Alineados con el panel izquierdo */
    left: clamp(1.5rem, 4vw, 3.5rem);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.carousel-prev,
.carousel-next {
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background var(--transition), transform var(--transition);
}

    .carousel-prev:hover,
    .carousel-next:hover {
        background: rgba(255,255,255,.35);
        transform: scale(1.1);
    }

.carousel-dots {
    display: flex;
    gap: .4rem;
    align-items: center;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition);
}

    .dot.active {
        background: #fff;
        width: 22px;
        border-radius: 4px;
    }

    .dot:hover {
        background: rgba(255,255,255,.7);
    }

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .carousel-slide {
        grid-template-columns: 1fr; /* colapsa a una columna */
        grid-template-rows: auto 260px; /* texto arriba, imagen abajo */
    }

    .carousel-right {
        min-height: 260px;
    }

    .carousel-controls {
        /* En móvil lo centramos como en el diseño original */
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ─────────────────────────────────────────────
   13. SECCIONES PÚBLICAS
   ───────────────────────────────────────────── */
.section {
    padding: 2rem 0;
}

.section-alt {
    padding: 4rem 0;
    background: var(--gris-50);
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 2rem;
}

    .section-head h2 {
        font-size: clamp(1.4rem, 3vw, 2rem);
        flex: 1;
    }

.section-tag-sm {
    display: block;
    width: 100%;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--guinda);
    margin-bottom: .35rem;
}

.section-link {
    font-size: .875rem;
    font-weight: 600;
    color: var(--guinda);
    white-space: nowrap;
    text-decoration: none;
}

    .section-link:hover {
        text-decoration: underline;
    }

/* ─────────────────────────────────────────────
   14. TARJETAS DE BOLETÍN
   ───────────────────────────────────────────── */
.boletin-card {
    background: #fff;
    border: 1px solid var(--gris-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

    .boletin-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-4px);
        text-decoration: none;
    }

.boletin-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--guinda) 0%, var(--guinda-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-size: 110%;
    background-position-x: center;
    background-position-y: 8%;
}



.boletin-cover-emoji {
    font-size: 4rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.2));
}

.boletin-num {
    position: absolute;
    top: .625rem;
    right: .625rem;
    background: var(--guinda);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,.25);
}

.boletin-card-body {
    padding: 1.1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

    .boletin-card-body h3 {
        font-size: .95rem;
        font-family: var(--font-display);
        color: var(--gris-800);
    }

.boletin-desc {
    font-size: .8rem;
    color: var(--gris-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.boletin-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .75rem;
    color: var(--gris-500);
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px solid var(--gris-200);
}

.boletin-cta {
    color: var(--guinda);
    font-weight: 600;
}

/* ─────────────────────────────────────────────
   15. TARJETAS DE CATEGORÍA
   ───────────────────────────────────────────── */
.cat-card {
    background: #fff;
    border: 2.5px solid color-mix(in srgb, var(--cat-color, var(--gris-200)) 40%, transparent);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

    .cat-card:hover {
        box-shadow: 0 8px 28px color-mix(in srgb, var(--cat-color, #6F1628) 18%, transparent), var(--shadow-sm);
        transform: translateY(-4px);
        border-color: color-mix(in srgb, var(--cat-color, var(--guinda-pale)) 70%, transparent);
        text-decoration: none;
    }

.cat-icon {
    font-size: 2.5rem;
}

.cat-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gris-800);
}

.cat-desc {
    font-size: .78rem;
    color: var(--gris-500);
    text-align: center;
}

.cat-count {
    font-size: .72rem;
    font-weight: 600;
    color: var(--guinda);
    margin-top: .25rem;
}

/* ─────────────────────────────────────────────
   16. BANDA CTA (CONVOCATORIA)
   ───────────────────────────────────────────── */
.cta-band {
    background: var(--guinda-dark);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

    .cta-band::before {
        content: '';
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient( -45deg, transparent 0, transparent 18px, rgba(255,255,255,.03) 18px, rgba(255,255,255,.03) 19px );
        pointer-events: none;
    }

.cta-inner {
    position: relative;
    z-index: 1;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: 1.25rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 900px) {
    .cta-inner {
        grid-template-columns: 1fr;
    }
}

.cta-text h2 {
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: .875rem;
}

.cta-text p {
    color: rgba(255,255,255,.8);
    font-size: 1rem;
    max-width: 520px;
}

.cta-badge {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.9);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .3rem .8rem;
    border-radius: 100px;
    margin-bottom: .875rem;
}

.cta-steps {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.cta-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: rgba(255,255,255,.85);
    font-size: .83rem;
}

.cta-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-weight: 700;
    font-size: .72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

.cta-disclaimer {
    font-size: .75rem;
    color: rgba(255,255,255,.55);
    line-height: 1.5;
}

/* ─────────────────────────────────────────────
   17. TARJETAS DE ARTÍCULO
   ───────────────────────────────────────────── */
.art-card {
    background: #fff;
    border: 1px solid var(--gris-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

    .art-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-3px);
        text-decoration: none;
    }

.art-card-img {
    height: 120px;
    background: var(--guinda-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.art-card-body {
    padding: 1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.art-card-cat {
    font-size: .72rem;
    font-weight: 600;
    color: var(--guinda);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.art-card-title {
    font-family: var(--font-display);
    font-size: .95rem;
    color: var(--gris-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.art-card-excerpt {
    font-size: .8rem;
    color: var(--gris-500);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.art-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .75rem;
    color: var(--gris-500);
    padding: .6rem 1.1rem;
    border-top: 1px solid var(--gris-200);
    margin-top: auto;
}

.art-card-link {
    color: var(--guinda);
    font-weight: 600;
}

/* Artículo Destacado (featured) */
.art-featured {
    display: grid;
    grid-template-columns: 480px 1fr;
    border: 1px solid var(--gris-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
    .art-featured {
        grid-template-columns: 1fr;
    }
}

.art-featured-img {
    background: linear-gradient(135deg, var(--guinda) 0%, var(--guinda-dark) 100%);
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.art-featured-emoji {
    font-size: 7rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.25));
}

.art-featured-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.art-featured-excerpt {
    font-size: .9rem;
    color: var(--gris-600);
    line-height: 1.65;
}

.art-featured-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
    font-size: .83rem;
    color: var(--gris-500);
    padding-top: .5rem;
    border-top: 1px solid var(--gris-200);
    margin-top: auto;
}

/* ─────────────────────────────────────────────
   18. DETALLE DE ARTÍCULO
   ───────────────────────────────────────────── */
.art-detalle-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .art-detalle-layout {
        grid-template-columns: 1fr;
    }

    .art-detalle-sidebar {
        position: static !important;
    }
}

.art-lead {
    border-left: 4px solid var(--guinda);
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
    background: var(--guinda-ghost);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 1.5rem;
}

.art-lead-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--guinda);
    margin-bottom: .5rem;
}

.art-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-top: 1rem;
    align-items: center;
}

.art-author-chip {
    display: flex;
    align-items: center;
    gap: .625rem;
}

.art-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--guinda-mid);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .8rem;
    flex-shrink: 0;
    font-family: var(--font-body);
}

.art-hero-stats {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: .83rem;
    color: rgba(255,255,255,.8);
}

.art-download-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--gris-100);
    border: 1px solid var(--gris-200);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.art-download-icon {
    font-size: 2rem;
}

.art-download-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .875rem;
}

    .art-download-info strong {
        color: var(--gris-800);
    }

    .art-download-info span {
        color: var(--gris-500);
        font-size: .78rem;
    }

.art-cita {
    display: block;
    background: var(--gris-50);
    border: 1px solid var(--gris-200);
    border-radius: var(--radius-sm);
    padding: .875rem 1rem;
    font-size: .83rem;
    line-height: 1.65;
    color: var(--gris-700, var(--gris-600));
}

/* ─────────────────────────────────────────────
   19. TARJETAS DE NOTICIAS
   ───────────────────────────────────────────── */
.noticia-card {
    display: flex;
    background: #fff;
    border: 1px solid var(--gris-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
    margin-bottom: 1rem;
}

    .noticia-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
        text-decoration: none;
    }

.noticia-thumb {
    width: 200px;
    min-height: 140px;
    background: var(--guinda-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .noticia-thumb {
        width: 80px;
        font-size: 2rem;
    }
}

.noticia-body {
    padding: 1.1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.noticia-cat {
    font-size: .72rem;
    font-weight: 600;
    color: var(--guinda);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.noticia-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--gris-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.noticia-excerpt {
    font-size: .85rem;
    color: var(--gris-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.noticia-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .75rem;
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px solid var(--gris-200);
}

.noticia-fecha {
    color: var(--gris-500);
}

.noticia-link {
    color: var(--guinda);
    font-weight: 600;
}

/* ─────────────────────────────────────────────
   20. PÁGINA DE LOGIN (Layout=null)
   ───────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-side {
        display: none;
    }
}

/* Columna izquierda */
.login-side {
    background: linear-gradient(145deg, var(--guinda) 0%, var(--guinda-dark) 100%);
    display: flex;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

    .login-side::before {
        content: '';
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient( -45deg, transparent 0, transparent 20px, rgba(255,255,255,.03) 20px, rgba(255,255,255,.03) 21px );
    }

.login-side-content {
    position: relative;
    z-index: 1;
    max-width: 380px;
    color: #fff;
}

.login-emblem {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,.15);
    border: 2px solid rgba(255,255,255,.35);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .05em;
    color: #fff;
    margin-bottom: 1.5rem;
}

.login-side-content h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: .75rem;
}

.login-side-content p {
    color: rgba(255,255,255,.78);
    font-size: .9rem;
    margin-bottom: 1.5rem;
}

.login-roles {
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

.role-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    background: rgba(255,255,255,.1);
    border-radius: var(--radius-md);
    padding: .875rem 1rem;
    backdrop-filter: blur(4px);
}

.role-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.role-info strong {
    display: block;
    color: #fff;
    font-size: .875rem;
    margin-bottom: .2rem;
}

.role-info p {
    color: rgba(255,255,255,.7);
    font-size: .78rem;
    margin: 0;
}

/* Columna derecha */
.login-main {
    background: var(--gris-50);
    display: flex;
    flex-direction: column;
    padding: 2rem;
    position: relative;
}

.login-back-link {
    font-size: .83rem;
    color: var(--gris-500);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-bottom: auto;
}

    .login-back-link:hover {
        color: var(--guinda);
    }

.login-box {
    max-width: 420px;
    width: 100%;
    margin: auto;
    padding: 2.5rem;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

    .login-box h3 {
        font-size: 1.4rem;
        margin-bottom: .35rem;
    }

.login-hint {
    font-size: .875rem;
    color: var(--gris-500);
    margin-bottom: 1.25rem;
}

.login-demo {
    background: var(--guinda-ghost);
    border: 1px solid var(--guinda-pale);
    border-radius: var(--radius-md);
    padding: .875rem 1rem;
    margin-bottom: 1.25rem;
}

.login-demo-title {
    font-size: .78rem;
    font-weight: 700;
    color: var(--guinda-dark);
    margin-bottom: .5rem;
}

.login-demo-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .3rem;
}

.login-demo-role {
    font-size: .7rem;
    font-weight: 700;
    background: var(--guinda-pale);
    color: var(--guinda-dark);
    padding: .15rem .45rem;
    border-radius: 100px;
}

.login-demo-row code {
    font-size: .78rem;
}

.login-guest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

/* ─────────────────────────────────────────────
   21. FORMULARIOS
   ───────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.form-label {
    font-size: .83rem;
    font-weight: 600;
    color: var(--gris-600);
    font-family: var(--font-body);
}

.form-control {
    width: 100%;
    padding: .55rem .875rem;
    font-family: var(--font-body);
    font-size: .9rem;
    color: var(--gris-800);
    background: #fff;
    border: 1.5px solid var(--gris-200);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    line-height: 1.5;
    appearance: none;
}

    .form-control::placeholder {
        color: var(--gris-300);
    }

    .form-control:focus {
        outline: none;
        border-color: var(--guinda);
        box-shadow: 0 0 0 3px rgba(111,22,40,.12);
    }

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    cursor: pointer;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .875rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .875rem;
}

@media (max-width: 640px) {
    .form-row-2, .form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Checkboxes tipo chip (categorías) */
.cats-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.cat-chip {
    cursor: pointer;
}

    .cat-chip input[type="radio"] {
        display: none;
    }

    .cat-chip span {
        display: inline-flex;
        align-items: center;
        padding: .35rem .875rem;
        border-radius: 100px;
        font-size: .8rem;
        font-weight: 500;
        background: var(--gris-100);
        color: var(--gris-600);
        border: 1.5px solid var(--gris-200);
        transition: all var(--transition);
        user-select: none;
    }

    .cat-chip input:checked + span {
        background: var(--guinda-pale);
        color: var(--guinda-dark);
        border-color: var(--guinda);
        font-weight: 600;
    }

    .cat-chip:hover span {
        border-color: var(--guinda);
        color: var(--guinda);
    }

/* Zona de carga de archivos */
.upload-zone {
    border: 2px dashed var(--gris-200);
    border-radius: var(--radius-md);
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gris-50);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
}

    .upload-zone:hover,
    .upload-zone.dragover {
        border-color: var(--guinda);
        background: var(--guinda-ghost);
    }

.upload-zone-icon {
    font-size: 2.5rem;
}

.upload-zone-text strong {
    display: block;
    font-size: .9rem;
    color: var(--gris-800);
}

.upload-zone-text span {
    font-size: .83rem;
    color: var(--gris-500);
}

.upload-zone-hint {
    font-size: .75rem;
    color: var(--gris-500);
    margin-top: .25rem;
}

/* ─────────────────────────────────────────────
   22. INDICADOR DE PASOS
   ───────────────────────────────────────────── */
.steps-visual {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 1.75rem;
}

.step-v {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-v-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    background: var(--gris-200);
    color: var(--gris-500);
    border: 2px solid var(--gris-200);
    transition: all var(--transition);
    z-index: 1;
}

    .step-v-circle.active {
        background: var(--guinda);
        color: #fff;
        border-color: var(--guinda);
        box-shadow: 0 0 0 4px var(--guinda-pale);
    }

    .step-v-circle.done {
        background: var(--color-success);
        color: #fff;
        border-color: var(--color-success);
    }

.step-v-label {
    font-size: .72rem;
    color: var(--gris-500);
    text-align: center;
    margin-top: .4rem;
    max-width: 90px;
    line-height: 1.3;
}

.step-v-line {
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--gris-200);
    z-index: 0;
}

/* ─────────────────────────────────────────────
   23. SEPARADOR DECORATIVO
   ───────────────────────────────────────────── */
.divider-ipn {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    color: var(--gris-500);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

    .divider-ipn::before,
    .divider-ipn::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--gris-200);
    }

    .divider-ipn span {
        white-space: nowrap;
        color: var(--gris-500);
    }

/* ─────────────────────────────────────────────
   24. TABS (PESTAÑAS)
   ───────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: .25rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--gris-200);
    margin-bottom: 1.25rem;
    padding-bottom: 0;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .875rem;
    font-size: .83rem;
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--gris-500);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    white-space: nowrap;
    margin-bottom: -1px;
}

    .tab-btn:hover {
        color: var(--guinda);
        background: var(--guinda-ghost);
    }

    .tab-btn.active {
        color: var(--guinda);
        border-bottom-color: var(--guinda);
        font-weight: 600;
    }

/* Filtro de sidebar (variante vertical) */
.cat-filter-nav {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

    .cat-filter-nav .tab-btn {
        border-radius: var(--radius-sm);
        border-bottom: none;
        justify-content: space-between;
        padding: .45rem .625rem;
        font-size: .8rem;
        margin-bottom: 0;
    }

        .cat-filter-nav .tab-btn.active {
            background: var(--guinda-pale);
            color: var(--guinda-dark);
            border-bottom: none;
        }

        .cat-filter-nav .tab-btn:hover {
            background: var(--guinda-ghost);
        }

.tab-count {
    background: var(--gris-200);
    color: var(--gris-600);
    font-size: .7rem;
    font-weight: 700;
    padding: .1rem .4rem;
    border-radius: 100px;
    min-width: 20px;
    text-align: center;
}

.tab-btn.active .tab-count {
    background: var(--guinda-pale);
    color: var(--guinda-dark);
}

/* ─────────────────────────────────────────────
   25. ÁREA DEL AUTOR — STATS
   ───────────────────────────────────────────── */
.autor-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .autor-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─────────────────────────────────────────────
   26. ADMIN — GRÁFICAS DE BARRAS
   ───────────────────────────────────────────── */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: .625rem;
    font-size: .8rem;
}

.bar-label {
    width: 80px;
    flex-shrink: 0;
    color: var(--gris-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bar-track {
    flex: 1;
    height: 8px;
    background: var(--gris-100);
    border-radius: 100px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--guinda);
    border-radius: 100px;
    transition: width .6s ease;
}

.bar-val {
    width: 24px;
    text-align: right;
    color: var(--gris-800);
    font-weight: 600;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   27. ADMIN — PENDIENTES / EVENTOS
   ───────────────────────────────────────────── */
.pending-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--gris-200);
    transition: background var(--transition);
}

    .pending-row:hover {
        background: var(--gris-50);
    }

.pending-titulo {
    font-weight: 600;
    font-size: .83rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pending-meta {
    font-size: .75rem;
    color: var(--gris-500);
}

.evento-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--gris-200);
}

.evento-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: .3rem;
}

.evento-titulo {
    font-weight: 600;
    font-size: .83rem;
}

.evento-desc {
    font-size: .75rem;
    color: var(--gris-500);
    margin-top: .1rem;
}

.evento-fecha {
    font-size: .75rem;
    color: var(--gris-500);
}

/* ─────────────────────────────────────────────
   28. ADMIN — POLÍTICAS TOGGLE
   ───────────────────────────────────────────── */
.politica-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: .875rem 1rem;
    border-bottom: 1px solid var(--gris-200);
    transition: background var(--transition);
}

    .politica-row:hover {
        background: var(--gris-50);
    }

    .politica-row:last-child {
        border-bottom: none;
    }

/* Toggle switch CSS puro */
.politica-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
}

    .politica-toggle input[type="checkbox"] {
        opacity: 0;
        width: 0;
        height: 0;
        position: absolute;
    }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--gris-200);
    border-radius: 22px;
    transition: background var(--transition);
    display: block;
}

    .toggle-slider span {
        position: absolute;
        height: 16px;
        width: 16px;
        left: 3px;
        bottom: 3px;
        background: white;
        border-radius: 50%;
        transition: transform var(--transition);
        display: block;
        box-shadow: 0 1px 3px rgba(0,0,0,.2);
    }

.politica-toggle input:checked + .toggle-slider {
    background: var(--guinda);
}

    .politica-toggle input:checked + .toggle-slider span {
        transform: translateX(20px);
    }

/* ─────────────────────────────────────────────
   29. ADMIN — CALENDARIO
   ───────────────────────────────────────────── */
.cal-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .cal-grid {
        grid-template-columns: 1fr;
    }
}

.cal-wrapper .card {
    padding: 1.25rem;
}

/* Overrides de FullCalendar */
.fc .fc-toolbar-title {
    font-family: var(--font-display) !important;
    font-size: 1.1rem !important;
}

.fc .fc-button-primary {
    background: var(--guinda) !important;
    border-color: var(--guinda) !important;
}

    .fc .fc-button-primary:hover {
        background: var(--guinda-dark) !important;
    }

    .fc .fc-button-primary:not(:disabled).fc-button-active {
        background: var(--guinda-dark) !important;
    }

.fc .fc-day-today {
    background: var(--guinda-ghost) !important;
}

.fc .fc-event {
    border-radius: 4px !important;
    font-size: .75rem !important;
}

/* ─────────────────────────────────────────────
   30. REVISTA — PORTADA DE BOLETÍN
   ───────────────────────────────────────────── */
.revista-portada {
    min-height: 420px;
    background: linear-gradient(135deg, var(--guinda-dark) 0%, #1a0509 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 4rem 0;
}

    .revista-portada::before {
        content: '';
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient( -45deg, transparent 0, transparent 20px, rgba(255,255,255,.025) 20px, rgba(255,255,255,.025) 21px );
    }

.revista-portada-content {
    position: relative;
    z-index: 1;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: 1.25rem;
    color: #fff;
}

    .revista-portada-content h1 {
        color: #fff;
        font-size: clamp(1.75rem, 2.5vw, 3rem);
        margin-top: .875rem;
        margin-bottom: .75rem;
    }

.revista-meta-row {
    display: flex;
    gap: .625rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: .5rem;
}

.revista-desc {
    color: rgba(255,255,255,.82);
    font-size: 1.05rem;
    text-align:justify;
}

.revista-back-link {
    color: rgba(255,255,255,.75);
    font-size: .875rem;
    text-decoration: none;
}

    .revista-back-link:hover {
        color: #fff;
        text-decoration: underline;
    }

/* ─────────────────────────────────────────────
   31. ADMIN — LAYOUT BASE
   (sidebar y topbar definidos en _AdminLayout.cshtml;
    este archivo solo estiliza el área de contenido)
   ───────────────────────────────────────────── */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--guinda-dark);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--nav-height);
    background: #fff;
    border-bottom: 1px solid var(--gris-200);
    z-index: 100;
    display: flex;
    align-items: center;
    padding-inline: 1.5rem;
    box-shadow: var(--shadow-sm);
}

    .admin-topbar h1 {
        font-size: 1.15rem;
        font-family: var(--font-display);
        color: var(--gris-800);
    }

.admin-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--nav-height);
    padding: 2rem;
    background: #FAF7F7;
    min-height: calc(100vh - var(--nav-height));
}

/* Sidebar nav items */
.sidebar-logo {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.sidebar-logo-badge {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.15);
    border: 1.5px solid rgba(255,255,255,.25);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: #fff;
    margin-bottom: .25rem;
}

.sidebar-logo span {
    font-size: .7rem;
    color: rgba(255,255,255,.55);
    display: block;
}

.sidebar-nav {
    padding: .75rem .625rem;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .6rem .875rem;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,.7);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    margin-bottom: .125rem;
}

    .sidebar-link:hover {
        background: rgba(255,255,255,.1);
        color: #fff;
        text-decoration: none;
    }

    .sidebar-link.active {
        background: rgba(255,255,255,.18);
        color: #fff;
        font-weight: 600;
    }

    .sidebar-link .link-icon {
        font-size: 1.1rem;
        width: 22px;
        text-align: center;
        flex-shrink: 0;
    }

.sidebar-section-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
    padding: .75rem .875rem .25rem;
}

/* ─────────────────────────────────────────────
   32. ANIMACIONES DE ENTRADA
   ───────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anim-fade-up {
    opacity: 0;
    transform: translateY(24px);
}

    .anim-fade-up.visible {
        animation: fadeUp .55s ease forwards;
    }

.delay-1 {
    animation-delay: .05s;
}

.delay-2 {
    animation-delay: .12s;
}

.delay-3 {
    animation-delay: .19s;
}

.delay-4 {
    animation-delay: .26s;
}

.delay-5 {
    animation-delay: .33s;
}

.delay-6 {
    animation-delay: .40s;
}

/* ─────────────────────────────────────────────
   33. BARRA DE PROGRESO DE LECTURA
   ───────────────────────────────────────────── */
#readingBar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 3px;
    background: var(--gris-200);
}

#readingBarFill {
    height: 100%;
    width: 0%;
    background: var(--guinda);
    transition: width .1s linear;
}

/* ─────────────────────────────────────────────
   34. FILTROS DE ARTÍCULOS (sidebar sticky)
   ───────────────────────────────────────────── */
.art-filtros-sidebar {
    position: sticky;
    top: 88px;
}

/* ─────────────────────────────────────────────
   35. FORMULARIO DE ENVÍO (layout)
   ───────────────────────────────────────────── */
.envio-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .envio-layout {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────────
   36. REVISIÓN DE ARTÍCULO (layout admin)
   ───────────────────────────────────────────── */
.rev-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .rev-layout {
        grid-template-columns: 1fr;
    }

    .rev-sidebar {
        position: static !important;
    }
}

/* ─────────────────────────────────────────────
   37. QUICK ACTIONS (dashboard admin)
   ───────────────────────────────────────────── */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75rem;
}

.qa-btn {
    padding: .875rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    transition: box-shadow var(--transition), transform var(--transition);
    cursor: pointer;
    border: 1px solid var(--gris-200);
    border-radius: var(--radius-lg);
    background: #fff;
}

    .qa-btn:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
        text-decoration: none;
        border-color: var(--guinda-pale);
    }

.qa-icon {
    font-size: 1.5rem;
}

/* ─────────────────────────────────────────────
   38. DASH GRID (dashboard columnas)
   ───────────────────────────────────────────── */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.dash-metrics-sm {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dash-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 900px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-metrics-sm {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-grid {
        grid-template-columns: 1fr;
    }
    .dash-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-metrics-sm {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─────────────────────────────────────────────
   38b. ADMIN — LAYOUT RESPONSIVE (≤ 768px)
   ───────────────────────────────────────────── */
.admin-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: .35rem;
    color: var(--gris-700);
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    margin-right: .25rem;
    flex-shrink: 0;
    transition: background .15s;
}

.admin-hamburger:hover { background: var(--gris-100); }

.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 180;
}

.admin-overlay.overlay--visible { display: block; }

@media (max-width: 768px) {
    .admin-hamburger { display: flex; }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
        z-index: 200;
    }

    .admin-sidebar.sidebar--open {
        transform: translateX(0);
    }

    .admin-topbar {
        left: 0 !important;
        padding-inline: .75rem !important;
    }

    .admin-content {
        margin-left: 0 !important;
        padding: 1rem .75rem 2rem !important;
    }
}

/* ─────────────────────────────────────────────
   39. AUTOR STATS GRID
   ───────────────────────────────────────────── */
.autor-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .autor-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─────────────────────────────────────────────
   40. UTILIDADES ADICIONALES
   ───────────────────────────────────────────── */
.sidebar-steps-list {
    padding-left: 0 !important;
    list-style: none !important;
}

.sidebar-step-num {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-size: .75rem !important;
    font-weight: 700 !important;
}

/* ─────────────────────────────────────────────
   41. NAVEGACIÓN PÚBLICA (NAV-TOP)
   Presente en: _Layout.cshtml — todas las vistas
   públicas y del área del autor.
   ───────────────────────────────────────────── */
.nav-top {
    position: sticky;
    top: 0;
    z-index: 500;
    height: auto;                       /* crece con el contenido (dos filas) */
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--gris-200);
    box-shadow: 0 1px 8px rgba(0, 0, 0, .08);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* ── Barra de navegación principal ──────────────────────────────── */
.nav-inner {
    width: 100%;
    margin-inline: auto;
    padding-inline: .5rem; /* padding reducido */
    height: 80px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand-logo {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center left;
    width: 4.5rem;
    height: 2.75rem;
    flex-shrink: 0;
}

/* Logos institucionales al extremo derecho de la barra */
.nav-logos-right {
    display: flex;
    align-items: center;
    gap: .625rem;
    flex-shrink: 0;
    margin-left: auto;          /* empuja todo lo previo hacia la izquierda */
}

.nav-logo-upiita {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 3.5rem;
    height: 60px;
    flex-shrink: 0;
}

.nav-logo-issn {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 150px;
    height: 70px;
    flex-shrink: 0;
}

.nav-logos-vdiv {
    width: 1px;
    height: 48px;
    background: var(--gris-200);
    flex-shrink: 0;
}

/* ── Banda hero: fondo compartido entre nav-motto y carousel ────── */
.hero-band {
    position: relative;
    background-image: url(../resources/banner_boletin_completo.jpeg);
    background-size: 100% 820px; /* mismo valor que el ::before — no se extiende más allá del carousel */
    background-position: top center;
    background-repeat: no-repeat;
}

    .hero-band::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 820px; /* cubre nav-motto (~120 px) + carousel-section (~700 px) */
        background: linear-gradient(to bottom, rgb(18 1 1 / 54%), rgb(32 5 5 / 86%));
        z-index: 0;
        pointer-events: none;
    }

/* ── Franja del lema (debajo de la barra) ────────────────────────── */
.nav-motto {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    border-bottom: 5px solid #ffffff1c;
}

    .nav-motto > * {
        position: relative;
        z-index: 1;
    }

.nav-motto-text {
    font-family: var(--font-display);
    font-size: .7rem;
    font-style: italic;
    font-weight: 500;
    color: white;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.nav-motto-text::before,
.nav-motto-text::after {
    content: " ✦ ";
    font-style: normal;
    font-size: .5rem;
    opacity: .55;
    vertical-align: middle;
}

/* Marca / logo */
.nav-brand {
    display: flex;
    align-items: center;
    gap: .625rem;
    text-decoration: none;
    flex-shrink: 0;
}

    .nav-brand:hover {
        text-decoration: none;
    }

.nav-brand-badge {
    width: 34px;
    height: 34px;
    background: var(--guinda);
    color: #fff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    flex-shrink: 0;
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.nav-brand-title {
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 700;
    color: var(--guinda-dark);
}

.nav-brand-sub {
    font-size: .62rem;
    font-weight: 500;
    color: var(--gris-500);
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Links centrales */
.nav-links {
    display: flex;
    align-items: center;
    gap: .125rem;
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .4rem .75rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--gris-600);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
    font-family: var(--font-body);
}

    .nav-link:hover {
        color: var(--guinda);
        background: var(--guinda-ghost);
        text-decoration: none;
    }

    .nav-link.nav-link-act {
        color: var(--guinda);
        font-weight: 600;
    }

/* Zona de acciones de sesión */
.nav-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* Chip de usuario autenticado */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--guinda-pale);
    border: 1px solid rgba(111,22,40,.18);
    border-radius: 100px;
    padding: .25rem .75rem .25rem .35rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--guinda-dark);
    white-space: nowrap;
}

.user-chip-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--guinda);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-chip-role {
    font-size: .65rem;
    font-weight: 500;
    color: var(--gris-500);
    display: block;
    line-height: 1;
}

/* Hamburger (móvil) */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    border-radius: var(--radius-sm);
    color: var(--gris-600);
    transition: background var(--transition);
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .nav-hamburger:hover {
        background: var(--gris-100);
    }

    .nav-hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: currentColor;
        border-radius: 2px;
        transition: all var(--transition);
    }

/* Menú móvil desplegable */
.nav-mobile-panel {
    display: none;
    position: fixed;
    top: calc(var(--nav-bar-h) + var(--nav-motto-h));
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gris-200);
    box-shadow: var(--shadow-md);
    z-index: 499;
    padding: .75rem 1.25rem 1.25rem;
    flex-direction: column;
    gap: .25rem;
}

    .nav-mobile-panel.open {
        display: flex;
    }

.nav-mobile-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem .75rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--gris-600);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

    .nav-mobile-link:hover {
        color: var(--guinda);
        background: var(--guinda-ghost);
        text-decoration: none;
    }

.nav-mobile-divider {
    height: 1px;
    background: var(--gris-200);
    margin: .5rem 0;
}

/* Overlay oscuro cuando el menú móvil está abierto */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: calc(var(--nav-bar-h) + var(--nav-motto-h));
    background: rgba(0,0,0,.3);
    z-index: 498;
}

    .nav-overlay.open {
        display: block;
    }

/* Responsive: ocultar links centrales en móvil */
@media (max-width: 900px) {
    .nav-links, .nav-actions {
        display: none;
    }

    /* Logos institucionales y lema: fuera del viewport móvil */
    .nav-logos-right, .nav-motto { display: none; }

    /* La barra principal vuelve a su altura base */
    .nav-inner { height: var(--nav-height); }

    .nav-hamburger {
        display: flex;
        margin-left: auto;
    }

    /* Panel y overlay arrancan justo debajo de la barra compacta */
    .nav-mobile-panel,
    .nav-overlay { top: var(--nav-height); }
}

/* Separador visual entre zona de links y acciones */
.nav-sep {
    width: 1px;
    height: 20px;
    background: var(--gris-200);
    margin-inline: .25rem;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   42. FOOTER INSTITUCIONAL
   Presente en: _Layout.cshtml — 4 columnas.
   ───────────────────────────────────────────── */
.footer-ipn {
    background: var(--guinda-dark);
    color: rgba(255,255,255,.82);
    padding: 3.5rem 0 0;
    margin-top: 1rem;
    font-size: .875rem;
    position: relative;
    overflow: hidden;
}

    .footer-ipn::before {
        content: '';
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient( -45deg, transparent 0, transparent 20px, rgba(255,255,255,.02) 20px, rgba(255,255,255,.02) 21px );
        pointer-events: none;
    }

.footer-grid {
    position: relative;
    z-index: 1;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: 1.25rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 560px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Columna marca */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.footer-brand-badge {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,.12);
    border: 1.5px solid rgba(255,255,255,.22);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: .875rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .03em;
    flex-shrink: 0;
}

.footer-brand-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

    .footer-brand-name small {
        display: block;
        font-family: var(--font-body);
        font-size: .72rem;
        font-weight: 400;
        color: rgba(255,255,255,.5);
        margin-top: .15rem;
    }

.footer-desc {
    font-size: .8rem;
    color: rgba(255,255,255,.6);
    line-height: 1.65;
    max-width: 260px;
}

.footer-social {
    display: flex;
    gap: .5rem;
    margin-top: .25rem;
}

.footer-social-btn {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .875rem;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: all var(--transition);
}

    .footer-social-btn:hover {
        background: rgba(255,255,255,.2);
        color: #fff;
        text-decoration: none;
    }

/* Columnas de links */
.footer-col {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.footer-col-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    margin-bottom: .625rem;
    font-family: var(--font-body);
}

.footer-link {
    font-size: .83rem;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    padding: .2rem 0;
    transition: color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

    .footer-link:hover {
        color: #fff;
        text-decoration: none;
    }

/* Barra inferior */
.footer-legal {
    position: relative;
    z-index: 1;
    max-width: var(--content-max);
    margin-inline: auto;
    padding: 1.1rem 1.25rem .75rem;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.footer-legal-address {
    font-size: .75rem;
    color: rgba(255,255,255,.55);
    margin: 0;
    line-height: 1.6;
}

.footer-legal-notice {
    font-size: .72rem;
    color: rgba(255,255,255,.38);
    margin: 0;
    line-height: 1.65;
    font-style: italic;
}

.footer-bottom {
    position: relative;
    z-index: 1;
    max-width: var(--content-max);
    margin-inline: auto;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .75rem;
    color: rgba(255,255,255,.4);
}

    .footer-bottom a {
        color: rgba(255,255,255,.55);
        text-decoration: none;
        transition: color var(--transition);
    }

        .footer-bottom a:hover {
            color: rgba(255,255,255,.85);
        }

.footer-bottom-links {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* Body padding para que el contenido no quede bajo el nav */
body {
    padding-top: 0;
}

.main-content {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - var(--nav-height) - 320px);
}

/* ─────────────────────────────────────────────
   43. REGISTRO DE USUARIO (Auth/Registro)
   Layout=null, extiende el sistema de login.
   ───────────────────────────────────────────── */

/* Caja de formulario más ancha para el registro
   (el login-box tiene max-width:420px, insuficiente
   para los grids de 2 columnas del registro). */
.reg-box {
    width: 100%;
    max-width: 560px;
    margin: auto;
    padding: 2rem 2.25rem;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

    .reg-box h3 {
        font-size: 1.35rem;
        margin-bottom: .25rem;
    }

/* La columna derecha del registro necesita scroll vertical
   porque el formulario es más largo que la pantalla. */
.login-main.reg-main {
    overflow-y: auto;
    padding: 1.5rem 1.75rem;
    align-items: flex-start;
    justify-content: flex-start;
}
    /* Centrar la caja dentro del área scrollable */
    .login-main.reg-main .reg-box {
        margin: auto;
    }

/* Panel lateral adaptado para registro */
.reg-side-benefits {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    margin-top: 1.25rem;
}

.reg-benefit-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    background: rgba(255,255,255,.1);
    border-radius: var(--radius-md);
    padding: .875rem 1rem;
    backdrop-filter: blur(4px);
}

.reg-benefit-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.reg-benefit-info strong {
    display: block;
    color: #fff;
    font-size: .875rem;
    margin-bottom: .2rem;
}

.reg-benefit-info p {
    color: rgba(255,255,255,.7);
    font-size: .78rem;
    margin: 0;
}

/* Hint de campo (texto de ayuda debajo del input) */
.field-hint {
    font-size: .73rem;
    color: var(--gris-500);
    margin-top: .2rem;
    display: flex;
    align-items: center;
    gap: .25rem;
}

    .field-hint.hint-error {
        color: var(--color-danger);
    }

    .field-hint.hint-success {
        color: var(--color-success);
    }

/* Input con estado de error / éxito */
.form-control.input-error {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 3px rgba(192,57,43,.10);
}

.form-control.input-success {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(30,132,73,.10);
}

/* Medidor de fortaleza de contraseña */
.password-strength {
    margin-top: .45rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.password-strength-track {
    height: 5px;
    background: var(--gris-200);
    border-radius: 100px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 100px;
    transition: width .3s ease, background .3s ease;
}
    /* Niveles: débil → media → fuerte → muy fuerte */
    .password-strength-bar.level-1 {
        background: var(--color-danger);
        width: 25%;
    }

    .password-strength-bar.level-2 {
        background: var(--color-warning);
        width: 50%;
    }

    .password-strength-bar.level-3 {
        background: #2E86AB;
        width: 75%;
    }

    .password-strength-bar.level-4 {
        background: var(--color-success);
        width: 100%;
    }

.password-strength-label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--gris-500);
    transition: color .3s ease;
}

/* Toggle de visibilidad de contraseña */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-wrapper .form-control {
        padding-right: 2.5rem;
    }

.password-toggle-btn {
    position: absolute;
    right: .625rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gris-500);
    font-size: .875rem;
    padding: .2rem;
    transition: color var(--transition);
    line-height: 1;
    user-select: none;
}

    .password-toggle-btn:hover {
        color: var(--guinda);
    }

/* Sección de checkbox de términos */
.terms-check {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .875rem 1rem;
    background: var(--gris-50);
    border: 1px solid var(--gris-200);
    border-radius: var(--radius-md);
}

    .terms-check input[type="checkbox"] {
        margin-top: .2rem;
        flex-shrink: 0;
        width: 16px;
        height: 16px;
        accent-color: var(--guinda);
        cursor: pointer;
    }

    .terms-check label {
        font-size: .8rem;
        color: var(--gris-600);
        line-height: 1.55;
        cursor: pointer;
    }

        .terms-check label a {
            color: var(--guinda);
        }

/* Link inferior "ya tienes cuenta" */
.reg-login-link {
    text-align: center;
    font-size: .83rem;
    color: var(--gris-500);
    margin-top: .875rem;
}

    .reg-login-link a {
        color: var(--guinda);
        font-weight: 600;
    }

/* Stepper visual de los pasos del proceso de registro */
.reg-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.5rem;
}

.reg-step {
    display: flex;
    align-items: center;
    gap: 0;
}

.reg-step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gris-200);
    color: var(--gris-500);
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
    position: relative;
    z-index: 1;
}

    .reg-step-circle.active {
        background: var(--guinda);
        color: #fff;
        box-shadow: 0 0 0 4px var(--guinda-pale);
    }

    .reg-step-circle.done {
        background: var(--color-success);
        color: #fff;
    }

.reg-step-label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--gris-500);
    margin-top: .3rem;
    text-align: center;
    white-space: nowrap;
}

.reg-step-line {
    width: 48px;
    height: 2px;
    background: var(--gris-200);
    flex-shrink: 0;
}

.reg-step-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
}

/* ═══════════════════════════════════════════════════════════════
   44. MEJORAS MOBILE-FIRST — EXPERIENCIA MÓVIL
   ═══════════════════════════════════════════════════════════════ */

/* ── Touch targets mínimos (44 px según WCAG 2.1 / Apple HIG) ──
   Sin esto, los elementos son demasiado pequeños para el dedo. */
@media (max-width: 768px) {

    /* Botones generales */
    .btn {
        min-height: 44px;
        padding-top: .65rem;
        padding-bottom: .65rem;
    }
    .btn-sm {
        min-height: 40px;
    }
    .btn-lg {
        min-height: 50px;
    }

    /* Links del menú móvil */
    .nav-mobile-link {
        min-height: 44px;
        padding: .75rem 1rem;
        font-size: .95rem;
    }

    /* Inputs y selects — font-size 16px evita zoom automático en iOS */
    .form-control {
        min-height: 44px;
        padding: .65rem .875rem;
        font-size: 16px;
    }

    textarea.form-control {
        min-height: 80px;  /* textarea no necesita 44px fixed */
        font-size: .9rem;
    }

    select.form-control {
        min-height: 44px;
    }

    /* Links del sidebar admin */
    .sidebar-link {
        min-height: 44px;
        padding: .75rem .875rem;
    }

    /* Tab buttons */
    .tab-btn {
        min-height: 40px;
    }
}

/* ── Login / Registro: caja más compacta en teléfonos ── */
@media (max-width: 480px) {
    .login-main {
        padding: 1rem;
    }

    .login-box {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-lg);
    }

    .reg-box {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-lg);
    }

    .login-main.reg-main {
        padding: 1rem;
    }
}

/* ── Secciones públicas: padding vertical reducido en móvil ── */
@media (max-width: 640px) {
    .section-alt {
        padding: 2.25rem 0;
    }

    .section {
        padding: 1.5rem 0;
    }

    .cta-band {
        padding: 2.25rem 0;
    }

    .cta-steps {
        gap: .625rem;
        flex-direction: column;
    }

    .cta-inner {
        gap: 1.5rem;
    }

    .section-head {
        margin-bottom: 1.25rem;
    }
}

/* ── Carousel: imagen más alta en móvil para mayor impacto visual ── */
@media (max-width: 768px) {
    .carousel-slide {
        grid-template-rows: auto 300px;
    }

    .carousel-right {
        min-height: 300px;
    }
}

@media (max-width: 400px) {
    .carousel-slide {
        grid-template-rows: auto 200px;
    }

    .carousel-right {
        min-height: 200px;
    }
}

/* ── Stat cards: texto de valor más pequeño en pantallas muy estrechas ── */
@media (max-width: 360px) {
    .stat-card-value {
        font-size: 1.5rem;
    }

    .stat-card {
        padding: .875rem;
    }
}

/* ── Container: menos padding lateral en pantallas muy pequeñas ── */
@media (max-width: 380px) {
    .container {
        padding-left: .75rem;
        padding-right: .75rem;
    }
}

/* ── Footer bottom: columna en pantallas pequeñas ── */
@media (max-width: 520px) {
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: .5rem;
        padding-bottom: 1.5rem;
    }

    .footer-bottom-links {
        justify-content: center;
        gap: .875rem;
    }
}

/* ── Art Featured: evitar desbordamiento en pantallas intermedias ── */
@media (max-width: 1100px) and (min-width: 901px) {
    .art-featured {
        grid-template-columns: 340px 1fr;
    }
}

/* ── Admin topbar: título no se desborde en móvil ── */
@media (max-width: 480px) {
    .admin-topbar h1 {
        font-size: .95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100vw - 120px);
    }

    .admin-content {
        padding: .75rem .625rem 2rem !important;
    }
}

/* ── Boletines/Articulos sidebar: botón toggle solo en móvil ── */
.bol-filter-toggle {
    display: none;
    width: 100%;
    padding: .75rem 1rem;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--guinda);
    cursor: pointer;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .75rem;
    transition: background .15s, border-color .15s;
    text-align: left;
    font-family: var(--font-body);
}

.bol-filter-toggle:hover {
    background: var(--guinda-ghost);
    border-color: var(--guinda);
}

.bol-filter-toggle .toggle-arrow {
    transition: transform .2s ease;
    flex-shrink: 0;
}

.bol-filter-toggle.open .toggle-arrow {
    transform: rotate(180deg);
}

.bol-sidebar-collapsible {
    /* Desktop: siempre visible, no requiere clase */
}

@media (max-width: 768px) {
    .bol-filter-toggle {
        display: flex;
    }

    .bol-sidebar-collapsible {
        display: none;
        padding-bottom: .5rem;
    }

    .bol-sidebar-collapsible.filters-open {
        display: block;
    }
}

/* ── Utilidades para ocultar columnas de tabla en móvil ── */
@media (max-width: 640px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hide-xs {
        display: none !important;
    }
}

/* ── nav-motto: escalar texto en pantallas intermedias (901-1100px) ── */
@media (max-width: 1100px) and (min-width: 901px) {
    .nav-motto-boletin {
        font-size: 2.2rem !important;
        letter-spacing: 8px !important;
    }

    .nav-motto-upiita {
        font-size: 1.7rem !important;
        letter-spacing: 8px !important;
    }
}

/* ── Página hero: reducir padding en móvil ── */
@media (max-width: 640px) {
    .page-hero {
        padding: 1.75rem 1rem 1.5rem;
    }

    .page-hero h1 {
        font-size: 1.5rem;
    }
}

/* ── Boletin card: imagen de portada más alta en móvil para mejor impacto ── */
@media (max-width: 640px) {
    .boletin-cover {
        height: 200px;
    }
}

/* ── CTA Band: alinear botones al centro en móvil ── */
@media (max-width: 640px) {
    .cta-actions {
        align-items: center;
    }

    .btn-cta-inv,
    .btn-cta-out {
        width: 100%;
        justify-content: center;
    }
}

/* ── Download box en Detalle de artículo: stack vertical en móvil ── */
@media (max-width: 540px) {
    .art-download-box {
        flex-direction: column;
        text-align: center;
        gap: .75rem;
    }

    .art-download-box .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Tabla de admin: contenido de celdas legible en móvil ── */
@media (max-width: 768px) {
    .table-ipn tbody td,
    .table-ipn thead th {
        padding: .6rem .75rem;
        font-size: .8rem;
    }
}
