/* ==========================================================================
           VARIABLES CSS & SISTEMA DE DISEÑO
           ========================================================================== */
:root {
    /* Colores Base Institucionales */
    --color-red: #EF3E3F;
    --color-blue: #3A4CA0;
    --color-yellow: #F5D401;
    --color-black: #111111;
    --color-white: #FFFFFF;

    /* Colores Complementarios y Fondos */
    --color-bg-light: #F9FAFC;
    --color-text-muted: #4A4A4A;
    --color-border: #D1D5DB;

    /* Tipografía */
    --font-display: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Espaciados y Layout */
    --container-width: 1280px;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Sombras Sólidas (Diseño Editorial Creativo) */
    --shadow-solid-blue: 6px 6px 0px var(--color-blue);
    --shadow-solid-red: 6px 6px 0px var(--color-red);
    --shadow-solid-yellow: 6px 6px 0px var(--color-yellow);

    /* Transiciones */
    --transition-bounce: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    --transition-smooth: all 0.3s ease;
}

/* ==========================================================================
           RESETEO Y ACCESIBILIDAD BÁSICA
           ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-black);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Focus Accesible de Alto Contraste */
*:focus-visible {
    outline: 4px solid var(--color-red);
    outline-offset: 4px;
    border-radius: 2px;
}

.news-img {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

/* ==========================================================================
           TEXTURA DE PAPEL (CSS/SVG MUY SUTIL)
           ========================================================================== */
.paper-texture::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* ==========================================================================
           SISTEMA DE PINCELADAS (BRUSH STROKES)
           ========================================================================== */
.brush-highlight {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    z-index: 1;
    padding: 0 4px;
}

.brush-highlight::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -2%;
    width: 104%;
    height: 100%;
    z-index: -1;
    clip-path: polygon(2% 10%, 100% 0%, 98% 90%, 0% 100%);
    transform: rotate(-1deg);
    border-radius: 4px;
}

/* Contraste verificado: Negro sobre amarillo */
.brush-yellow {
    color: var(--color-black);
}

.brush-yellow::before {
    background-color: var(--color-yellow);
}

/* Contraste verificado: Blanco sobre azul */
.brush-blue {
    color: var(--color-white);
}

.brush-blue::before {
    background-color: var(--color-blue);
}

/* ==========================================================================
           COMPONENTES COMUNES
           ========================================================================== */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.2;
    text-transform: uppercase;
}

.section {
    padding: var(--space-xl) 0;
}

.bg-light {
    background-color: var(--color-bg-light);
}

/* Botón Creativo Institucional */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    border: 2px solid var(--color-black);
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    background-color: var(--color-white);
    color: var(--color-black);
    box-shadow: var(--shadow-solid-blue);
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px var(--color-blue);
}

.btn-primary {
    background-color: var(--color-yellow);
}

/* ==========================================================================
           HEADER
           ========================================================================== */
header {
    background-color: var(--color-white);
    border-bottom: 2px solid var(--color-black);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--color-black);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Acento gráfico en el logo */
.logo::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: var(--color-red);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-black);
    font-weight: 600;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--color-red);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

/* Banner principal de bienvenida */
/* Asegura que la sección banner no genere márgenes externos arriba */
.hero-banner {
    width: 100%;
    margin-top: 0;
    margin-bottom: 4rem;
    overflow: hidden;
}

/* Forzar que la imagen no genere espacios por renderizado en línea */
.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
    object-fit: cover;
}

/* ==========================================================================
           HERO SECTION (Diseño Editorial Creativo)
           ========================================================================== */
/* Modifica esta sección en tu CSS */
.hero {
    padding: 0 0 var(--space-xl) 0; /* Cambiamos el padding superior a 0 */
    background-color: var(--color-white);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content .kicker {
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--color-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    display: inline-block;
    border-bottom: 2px solid var(--color-red);
    padding-bottom: 5px;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    color: var(--color-black);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

/* Imagen del Hero */
.hero-visual {
    width: 100%;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.hero-visual img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {

    .hero-banner {
        margin-bottom: 2.5rem;
    }

    .hero-banner img {
        width: 100%;
        height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-content h1 {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

}
/* ==========================================================================
           CIFRAS / IMPACTO (Uso de Cards Creativas)
           ========================================================================== */
.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

/* Card de Cifras */
.stat-card {
    background-color: var(--color-white);
    border: 2px solid var(--color-black);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    transition: var(--transition-bounce);
}

.stat-card:nth-child(1) {
    box-shadow: var(--shadow-solid-red);
}

.stat-card:nth-child(2) {
    box-shadow: var(--shadow-solid-blue);
}

.stat-card:nth-child(3) {
    box-shadow: var(--shadow-solid-yellow);
}

.stat-card:nth-child(4) {
    box-shadow: var(--shadow-solid-black);
    box-shadow: 6px 6px 0px var(--color-black);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 4.5rem;
    color: var(--color-black);
    line-height: 1;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    z-index: 2;
}

/* Detalle orgánico detrás del número */
.stat-card:nth-child(1) .stat-number::before {
    content: '';
    position: absolute;
    bottom: 10px;
    left: -15px;
    width: 40px;
    height: 40px;
    background-color: var(--color-yellow);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.8;
}

.stat-card:nth-child(2) .stat-number::after {
    content: '';
    position: absolute;
    top: -10px;
    right: -20px;
    width: 100%;
    height: 20px;
    background-color: var(--color-red);
    z-index: -1;
    transform: rotate(-5deg);
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

/* ==========================================================================
           GESTIÓN Y ACOMPAÑAMIENTO (Timeline Cards)
           ========================================================================== */
.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
}

/* Card de Timeline */
.timeline-card {
    background-color: var(--color-bg-light);
    border: 2px solid var(--color-black);
    padding: 2.5rem 2rem;
    position: relative;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
}

.timeline-card:nth-child(1)::before {
    background-color: var(--color-red);
}

.timeline-card:nth-child(2)::before {
    background-color: var(--color-blue);
}

.timeline-card:nth-child(3)::before {
    background-color: var(--color-yellow);
}

.timeline-card:nth-child(4)::before {
    background-color: var(--color-black);
}

.step-number {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--color-border);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    line-height: 1;
}

.timeline-card h3 {
    font-size: 1.5rem;
    color: var(--color-black);
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.timeline-card p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
}

/* ==========================================================================
           NOTICIAS (Tarjetas Editoriales)
           ========================================================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.news-card {
    background-color: var(--color-white);
    border: 2px solid var(--color-black);
    display: flex;
    flex-direction: column;
    transition: var(--transition-bounce);
    box-shadow: 6px 6px 0px transparent;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0px var(--color-blue);
}

.news-img {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--color-border);
    border-bottom: 2px solid var(--color-black);
    position: relative;
}

/* Etiqueta de categoría en la imagen */
.news-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--color-yellow);
    color: var(--color-black);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    text-transform: uppercase;
    border: 1px solid var(--color-black);
}

.news-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    font-size: 0.9rem;
    color: var(--color-red);
    font-weight: 700;
    margin-bottom: 1rem;
}

.news-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-transform: none;
}

.news-content p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    font-weight: 700;
    color: var(--color-blue);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
           RECURSOS Y VIDEOS
           ========================================================================== */
.video-container {
    border: 2px solid var(--color-black);
    background-color: var(--color-black);
    aspect-ratio: 16/9;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-solid-red);
    margin-bottom: 2rem;
}

.play-btn {
    width: 80px;
    height: 80px;
    background-color: var(--color-yellow);
    border: 2px solid var(--color-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.play-btn:hover {
    transform: scale(1.1);
    background-color: var(--color-red);
}

.play-btn:hover svg {
    fill: var(--color-white);
}

.play-btn svg {
    fill: var(--color-black);
    width: 32px;
    margin-left: 6px;
    transition: fill 0.3s;
}

/* ==========================================================================
           CTA FINAL (Diseño Cercano y Llamativo)
           ========================================================================== */
.cta-section {
    background-color: var(--color-blue);
    color: var(--color-white);
    text-align: center;
    padding: var(--space-xl) 0;
    position: relative;
    border-top: 4px solid var(--color-red);
    border-bottom: 4px solid var(--color-yellow);
}

.cta-section h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

/* Modificar botón en el fondo azul para contraste */
.cta-section .btn {
    box-shadow: 6px 6px 0px var(--color-yellow);
}

.cta-section .btn:hover {
    box-shadow: 8px 8px 0px var(--color-yellow);
}

/* ==========================================================================
           FOOTER
           ========================================================================== */
footer {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 4rem 0 2rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid #333;
    padding-bottom: 3rem;
}

.footer-col h4 {
    font-family: var(--font-display);
    color: var(--color-yellow);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #E0E0E0;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

/* ==========================================================================
   ESTILOS DE REDES SOCIALES (FOOTER)
   ========================================================================== */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #E0E0E0;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

/* Iconos SVG */
.social-links svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--color-yellow);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease, stroke 0.2s ease;
}

/* Hover y Focus Accesible */
.social-links a:hover,
.social-links a:focus-visible {
    color: var(--color-white);
    text-decoration: underline;
}

.social-links a:hover svg,
.social-links a:focus-visible svg {
    transform: scale(1.15);
    stroke: var(--color-red);
}

/* ==========================================================================
           RESPONSIVE & MOBILE
           ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-content {
        order: 2;
        text-align: center;
    }

    .hero-visual-wrapper {
        order: 1;
        max-width: 600px;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content p {
        margin: 0 auto 2rem auto;
    }
}

@media (max-width: 768px) {
    :root {
        --space-xl: 4rem;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background: var(--color-white);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 2px solid var(--color-black);
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu-btn svg {
        width: 32px;
        height: 32px;
    }

    .stat-card {
        padding: 2rem 1rem;
    }
}

/* ==========================================================================
           REDUCED MOTION
           ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}