/* ==========================================================================
   SISTEMA DE ESTILOS BRUTALISTA CINEMATOGRÁFICO: EL ENFERMERO MALDITO
   Inspirado en la estética minimalista de alto contraste HD Monster y Film4
   ========================================================================== */

/* variables de diseño */
:root {
    --bg-black: #000000;
    --bg-charcoal: #0a0a0a;
    --bg-dark-gray: #111111;
    
    --brand-red: #ff0033; /* Rojo Film4 de alta intensidad */
    --brand-red-muted: #88001b;
    
    --text-white: #ffffff;
    --text-muted: #8c8c8c;
    --text-dark: #000000;
    
    --font-heading: 'Bebas Neue', sans-serif;
    --font-sans: 'Space Grotesk', sans-serif;
    --font-technical: 'Share Tech Mono', monospace;
    
    --border-thin-gray: 1px solid rgba(255, 255, 255, 0.08);
    --border-thin-red: 1px solid var(--brand-red);
    --border-thick-red: 3px solid var(--brand-red);
    
    --transition-fast: all 0.25s cubic-bezier(0.19, 1, 0.22, 1);
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset general */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important; /* Estricto Brutalismo: Sin esquinas redondeadas */
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-red) var(--bg-black);
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

/* Bloqueo de scroll cuando el splash screen está activo */
body.splash-active {
    overflow: hidden;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-black);
}
::-webkit-scrollbar-thumb {
    background: var(--brand-red);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-white);
}

/* ==========================================================================
   PANTALLA DE INICIO REDISEÑADA (ESTILO ESTATUA/CÍRCULO ROJO - SPLIT SCREEN)
/* ==========================================================================
   PANTALLA DE INICIO REDISEÑADA (ESTILO CENTRADO - IMAGEN BLUR CON JUMPSCARE)
   ========================================================================== */
.splash-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100000; /* Prioridad máxima absoluta */
    background-color: var(--bg-black);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.6s ease-out, visibility 0.6s;
}

/* Contenido Centrado */
.splash-content-centered {
    position: relative;
    z-index: 5;
    max-width: 1100px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.splash-technical-tag {
    font-family: var(--font-technical);
    font-size: 0.9rem;
    color: var(--brand-red);
    letter-spacing: 4px;
    margin-bottom: 20px;
    white-space: nowrap;
}

.splash-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5.6vw, 5.2rem); /* Escala dinámicamente para mantenerse en una sola línea */
    line-height: 1;
    letter-spacing: 2px;
    color: var(--text-white);
    margin-bottom: 25px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
    white-space: nowrap;
}

.splash-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 45px;
    font-weight: 300;
    line-height: 1.6;
    max-width: 1050px; /* Ancho suficiente para una sola línea en desktop */
    width: 100%;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

/* Imagen de fondo con blur inicial y escala ligera */
.splash-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    filter: blur(14px) brightness(0.28) contrast(1.1); /* Efecto blur y oscuro para legibilidad */
    transform: scale(1.04);
    transition: filter 0.8s ease-out, transform 0.8s ease-out;
}

.splash-flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--brand-red);
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

/* --- ANIMACIONES DE ACCESO CON GLITCH DIGITAL --- */

/* Contenedor del Splash en estado Glitch */
.splash-container.glitching {
    animation: digitalGlitch 0.6s steps(2) infinite;
}

/* Título con aberración cromática */
.splash-container.glitching .splash-title {
    animation: textGlitch 0.15s infinite;
}

/* Imagen con cortes de clip-path y desplazamientos horizontales */
.splash-container.glitching .splash-bg {
    animation: imageGlitch 0.18s infinite;
}

/* Flash y ruido rojo/blanco */
.splash-container.glitching .splash-flash-overlay {
    animation: flashNoise 0.3s ease-out infinite;
}

/* Animación del contenedor del Splash */
@keyframes digitalGlitch {
    0%, 100% {
        transform: translate(0, 0) skew(0deg);
        filter: none;
    }
    10% {
        transform: translate(-4px, 3px) skew(-2deg);
        filter: hue-rotate(20deg) contrast(1.2);
    }
    20% {
        transform: translate(3px, -4px) skew(2deg);
        filter: contrast(1.4) brightness(1.3);
    }
    30% {
        transform: translate(-2px, -2px) skew(-3deg);
        filter: invert(0.08);
    }
    40% {
        transform: translate(5px, 4px) skew(3deg);
        filter: hue-rotate(-20deg) contrast(1.1);
    }
    50% {
        transform: translate(-5px, -3px) skew(-2deg);
        filter: invert(0.12) contrast(1.3);
    }
    60% {
        transform: translate(4px, 2px) skew(1deg);
        filter: brightness(1.4) contrast(1.1);
    }
    70% {
        transform: translate(-3px, 4px) skew(4deg);
        filter: hue-rotate(40deg);
    }
    80% {
        transform: translate(2px, -3px) skew(-4deg);
        filter: contrast(1.5) brightness(0.9);
    }
    90% {
        transform: translate(-4px, -2px) skew(2deg);
        filter: invert(0.08) hue-rotate(-40deg);
    }
}

/* Aberración cromática y temblor de texto */
@keyframes textGlitch {
    0%, 100% {
        text-shadow: 3px -1px 0 var(--brand-red), -3px 1px 0 #00ffff;
        transform: translate(0, 0);
    }
    20% {
        text-shadow: -4px 2px 0 var(--brand-red), 4px -2px 0 #00ffff;
        transform: translate(-2px, 2px);
    }
    40% {
        text-shadow: 3px 3px 0 var(--brand-red), -3px -3px 0 #00ffff;
        transform: translate(2px, -2px);
    }
    60% {
        text-shadow: -2px -3px 0 var(--brand-red), 2px 3px 0 #00ffff;
        transform: translate(-3px, 1px);
    }
    80% {
        text-shadow: 4px -2px 0 var(--brand-red), -4px 2px 0 #00ffff;
        transform: translate(3px, -3px);
    }
}

/* Efecto rebanado (slicing) en la ilustración */
@keyframes imageGlitch {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: skew(0deg) translate(0, 0) scale(1.1);
        filter: blur(0px) brightness(1.7) contrast(1.5);
    }
    10% {
        clip-path: inset(15% 0 70% 0);
        transform: skew(1.5deg) translate(-15px, 3px) scale(1.15);
        filter: blur(0px) brightness(2) contrast(1.8) hue-rotate(60deg);
    }
    20% {
        clip-path: inset(80% 0 8% 0);
        transform: skew(-2deg) translate(15px, -4px) scale(1.1);
        filter: blur(2px) brightness(0.5) contrast(1) invert(0.2);
    }
    35% {
        clip-path: inset(35% 0 50% 0);
        transform: skew(3deg) translate(-8px, 6px) scale(1.2);
        filter: blur(0px) brightness(2.2) contrast(2);
    }
    50% {
        clip-path: inset(8% 0 84% 0);
        transform: skew(-3deg) translate(20px, -6px) scale(1.08);
        filter: blur(0px) brightness(1.8) contrast(1.5) hue-rotate(-60deg);
    }
    65% {
        clip-path: inset(55% 0 30% 0);
        transform: skew(1.2deg) translate(-10px, -3px) scale(1.12);
        filter: blur(4px) brightness(0.3);
    }
    80% {
        clip-path: inset(12% 0 68% 0);
        transform: skew(-1deg) translate(8px, 5px) scale(1.16);
        filter: blur(0px) brightness(2.5) contrast(2) invert(0.15);
    }
    90% {
        clip-path: inset(70% 0 20% 0);
        transform: skew(1.5deg) translate(-18px, -2px) scale(1.1);
        filter: blur(0px) brightness(0) contrast(1);
    }
}

/* Flash de ruido rojo/blanco digital */
@keyframes flashNoise {
    0%, 100% {
        opacity: 0;
        background-color: var(--brand-red);
    }
    25% {
        opacity: 0.4;
        background-color: var(--text-white);
    }
    50% {
        opacity: 0.2;
        background-color: var(--brand-red);
    }
    75% {
        opacity: 0.5;
        background-color: var(--bg-black);
    }
}

/* ==========================================================================
   EFECTOS E INTERFAZ TÉCNICA
   ========================================================================== */

/* Interferencia CRT */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.18) 50%);
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.7;
}

/* Rejilla de Fondo Técnica */
.technical-grid-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 1;
}

/* ==========================================================================
   NAVBAR (MINIMALISTA)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-black);
    border-bottom: var(--border-thin-gray);
    z-index: 1000;
    transition: var(--transition-fast);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 2rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.logo-red-block {
    background-color: var(--brand-red);
    color: var(--bg-black);
    padding: 2px 10px;
    font-weight: 700;
}

.logo-white-text {
    color: var(--text-white);
    padding-left: 8px;
    font-weight: 400;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.nav-num-link {
    font-family: var(--font-technical);
    font-size: 0.8rem;
    color: var(--brand-red);
}

.nav-link:hover, .nav-menu ul li.active .nav-link {
    color: var(--brand-red);
}

/* Menú móvil */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 6px;
}

.nav-toggle .bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-white);
    transition: var(--transition-fast);
}

/* ==========================================================================
   SECCIÓN HERO (ESTILO HD MONSTER)
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 120px 40px 60px;
    overflow: hidden;
    z-index: 5;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 30%;
    z-index: -1;
}

.hero-content {
    max-width: 900px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.heartbeat-indicator {
    border: 1px solid var(--brand-red);
    padding: 6px 16px;
    font-family: var(--font-technical);
    font-size: 0.8rem;
    color: var(--brand-red);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    background-color: rgba(0, 0, 0, 0.85);
}

.heartbeat-indicator i {
    animation: flashStatus 1.2s infinite ease-in-out;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 6.5rem;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: 4px;
    color: var(--text-white);
    text-shadow: 0 5px 20px rgba(0,0,0,0.8);
    margin-bottom: 10px;
}

.hero-subtitle {
    font-family: var(--font-technical);
    font-size: 1.4rem;
    letter-spacing: 6px;
    color: var(--brand-red);
    margin-bottom: 25px;
    font-weight: 700;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 45px;
    font-weight: 300;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Botones Brutalistas */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--brand-red);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--text-white);
    color: var(--bg-black);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-white);
    border: 1px solid var(--text-white);
}

.btn-secondary:hover {
    background-color: var(--text-white);
    color: var(--bg-black);
}

.btn-block-rect {
    width: 100%;
}

.btn-youtube {
    background-color: #ff0000;
    color: var(--text-white);
}
.btn-youtube:hover {
    background-color: var(--text-white);
    color: var(--bg-black);
}

/* Elementos de Visor de Cámara en el Hero */
.camera-lines-top-left, .camera-lines-top-right, .camera-lines-bottom-left, .camera-lines-bottom-right {
    position: absolute;
    width: 30px;
    height: 30px;
    pointer-events: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.camera-lines-top-left { top: 40px; left: 40px; border-right: none; border-bottom: none; }
.camera-lines-top-right { top: 40px; right: 40px; border-left: none; border-bottom: none; }
.camera-lines-bottom-left { bottom: 40px; left: 40px; border-right: none; border-top: none; }
.camera-lines-bottom-right { bottom: 40px; right: 40px; border-left: none; border-top: none; }

.scroll-down {
    position: absolute;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-family: var(--font-technical);
    color: var(--text-muted);
    letter-spacing: 3px;
    animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ==========================================================================
   ESTRUCTURA DE SECCIÓN EN RED & BLACK SPLIT (BRUTALISTA)
   ========================================================================== */
.section {
    position: relative;
    z-index: 5;
    background-color: var(--bg-black);
}

.container-full {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Controles de Titulado e Interfaz */
.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.label-number {
    font-family: var(--font-technical);
    font-size: 1.2rem;
    color: var(--brand-red);
    font-weight: 700;
}

.label-number-white {
    font-family: var(--font-technical);
    font-size: 1.2rem;
    color: var(--text-white);
    font-weight: 700;
}

.label-title {
    font-family: var(--font-technical);
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: var(--text-muted);
}

.label-title-white {
    font-family: var(--font-technical);
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.75);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 0.95;
    letter-spacing: 2px;
    color: var(--text-white);
    margin-bottom: 30px;
}

.section-title-white {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 0.95;
    letter-spacing: 2px;
    color: var(--text-white);
    margin-bottom: 30px;
}

.section-title-center {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 0.95;
    letter-spacing: 3px;
    color: var(--text-white);
    margin-bottom: 50px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 300;
}

/* Split Layout Estilo Film4 */
.section-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 90vh;
    border-top: var(--border-thin-gray);
    border-bottom: var(--border-thin-gray);
}

.split-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.split-black {
    background-color: var(--bg-black);
    color: var(--text-white);
}

.split-red {
    background-color: var(--brand-red);
    color: var(--bg-black);
}

.block-padding {
    padding: 80px 100px;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-column-justify {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* ==========================================================================
   SECCIÓN 01: EL EXPEDIENTE (DETALLES TÉCNICOS)
   ========================================================================== */

/* Especificaciones Técnicas (Estilo Interfaz) */
.technical-spec-box {
    border: var(--border-thin-gray);
    background-color: var(--bg-charcoal);
    padding: 20px;
    margin-bottom: 35px;
    font-family: var(--font-technical);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
}

.spec-row span:first-child {
    color: var(--text-muted);
}

.text-red {
    color: var(--brand-red) !important;
    font-weight: 700;
}

.paragraph-highlight {
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--text-white);
}

.paragraph {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Contenedor e Imagen de Perfil a Sangrado Completo (Full Bleed) */
.split-profile-image {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-black);
    width: 100%;
    height: 100%;
}

.profile-full-bleed-container {
    width: 100%;
    height: 100%;
    position: relative;
    min-height: 550px; /* Altura mínima consistente */
}

.profile-photo-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(0.7) contrast(1.2) brightness(0.8);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.split-profile-image:hover .profile-photo-full {
    filter: grayscale(0) contrast(1.3) brightness(0.95);
    transform: scale(1.03);
}

.frame-tag-overlay {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background-color: var(--brand-red);
    color: var(--text-white);
    padding: 8px 16px;
    font-family: var(--font-technical);
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.frame-tag {
    font-family: var(--font-technical);
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--bg-black);
    font-weight: 700;
    text-align: center;
}

/* ==========================================================================
   SECCIÓN 02: CATEGORÍAS (REJILLA DE CORTES)
   ========================================================================== */
.sections-grid-section {
    padding: 120px 0;
    border-bottom: var(--border-thin-gray);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 30px;
    border: var(--border-thin-gray);
    background-color: var(--bg-black);
}

.card-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Estilo Oficial Cartel IMSS */
.imss-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #006341; /* Verde Forestal IMSS */
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    border-radius: 0 !important;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.3), 0 4px 15px rgba(0, 0, 0, 0.2);
}

.imss-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    color: #006341;
    padding: 15px 20px;
    font-family: var(--font-technical);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    border-bottom: 3px solid #006341;
    transition: all 0.3s ease;
    border-radius: 0 !important;
}

.imss-header-text {
    text-transform: uppercase;
}

.imss-logo {
    font-size: 1.1rem;
    color: #006341;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.imss-body {
    flex-grow: 1;
    padding: 18px;
    display: flex;
    flex-direction: column;
    background-color: #006341;
    transition: background-color 0.35s ease;
}

/* Inset con borde blanco característico */
.imss-border-inset {
    border: 2px solid #ffffff;
    padding: 30px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: border-color 0.35s ease;
    border-radius: 0 !important;
}

.imss-num {
    position: absolute;
    top: 15px;
    right: 20px;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.15);
    line-height: 1;
    transition: all 0.35s ease;
    pointer-events: none;
}

.imss-title {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    color: #ffffff;
    margin: 0;
    letter-spacing: 1.5px;
    line-height: 1;
    transition: color 0.35s ease;
}

.imss-sub {
    font-family: var(--font-technical);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    margin-bottom: 10px;
    display: inline-block;
    transition: all 0.35s ease;
}

.imss-text {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
    margin-top: auto; /* Empuja el texto al fondo si hay espacio sobrante */
    transition: color 0.35s ease;
}

/* Estado de Corrupción / Infección al pasar el mouse */
.card-link-wrapper:hover .imss-card {
    background-color: #800000; /* Rojo sangre */
    border-color: #ff0033;
    box-shadow: 0 10px 30px rgba(255, 0, 51, 0.3), inset 0 0 50px rgba(0, 0, 0, 0.6);
    transform: translateY(-6px);
}

.card-link-wrapper:hover .imss-header {
    background-color: #ff0033; /* Cabecera infectada */
    color: #ffffff;
    border-bottom-color: #800000;
}

.card-link-wrapper:hover .imss-logo {
    color: #ffffff;
    animation: imssGlitchIcon 0.15s infinite alternate;
}

.card-link-wrapper:hover .imss-body {
    background-color: #800000;
}

.card-link-wrapper:hover .imss-border-inset {
    border-color: #ff0033;
}

.card-link-wrapper:hover .imss-num {
    color: rgba(255, 0, 51, 0.45);
    transform: scale(1.1) rotate(-5deg);
}

.card-link-wrapper:hover .imss-sub {
    border-bottom-color: rgba(255, 0, 51, 0.5);
    color: #ff0033;
}

.card-link-wrapper:hover .imss-text {
    color: rgba(255, 255, 255, 0.95);
}

/* Animación de Glitch para los iconos de la cabecera */
@keyframes imssGlitchIcon {
    0% {
        transform: translate(0, 0) skewX(0deg);
    }
    50% {
        transform: translate(-2px, 1px) skewX(-10deg);
        filter: hue-rotate(90deg);
    }
    100% {
        transform: translate(2px, -1px) skewX(10deg);
        filter: hue-rotate(-90deg);
    }
}

/* ==========================================================================
   SECCIÓN 03: REPRODUCTOR DE VIDEO
   ========================================================================== */
.video-section {
    padding: 120px 0;
    border-bottom: var(--border-thin-gray);
}

.video-container-wrapper {
    max-width: 900px;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.video-frame-border {
    border: var(--border-thin-gray);
    background-color: var(--bg-charcoal);
    padding: 0;
}

.video-responsive {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #000;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Panel técnico del reproductor estilo Film4 */
.player-panel-technical {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-top: var(--border-thin-gray);
    font-family: var(--font-technical);
    font-size: 0.8rem;
    background-color: var(--bg-black);
}

.player-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-red);
    font-weight: 700;
}

.rec-dot {
    width: 8px;
    height: 8px;
    background-color: var(--brand-red);
    border-radius: 50% !important;
    animation: flashStatus 1.2s infinite ease-in-out;
}

@keyframes flashStatus {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.player-controls {
    display: flex;
    gap: 30px;
    color: var(--text-muted);
}

.video-action-box {
    width: 100%;
}

/* ==========================================================================
   SECCIÓN 04: FORMULARIO (SPLIT INVERTIDO)
   ========================================================================== */
.contact-section {
    background-color: var(--bg-black);
}

.bg-textured {
    background-size: cover;
    background-position: center;
}

.red-block-info {
    margin-top: 40px;
}

.desc-white {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 35px;
    font-weight: 300;
}

.section-title-white {
    color: var(--text-white);
}

.medical-warning-box {
    border: 1px solid var(--text-white);
    background-color: var(--bg-black);
    padding: 20px;
    font-family: var(--font-technical);
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text-white);
}

.warning-title {
    color: var(--brand-red);
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
}

.warning-text {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Formulario Técnico */
.clinical-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: var(--font-technical);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

.form-group input, .form-group select, .form-group textarea {
    background-color: var(--bg-charcoal);
    border: var(--border-thin-gray);
    padding: 15px;
    color: var(--text-white);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='red' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--brand-red);
    background-color: var(--bg-black);
}

.direct-mail-note {
    margin-top: 30px;
    font-family: var(--font-technical);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.direct-mail-note a {
    color: var(--brand-red);
    text-decoration: none;
    font-weight: 700;
}

.direct-mail-note a:hover {
    text-decoration: underline;
}

.form-status-message {
    font-family: var(--font-technical);
    font-size: 0.8rem;
    margin-top: 10px;
    display: none;
}

.form-status-message.success { display: block; color: #00ffff; }
.form-status-message.error { display: block; color: var(--brand-red); }

/* ==========================================================================
   SECCIÓN 05: REDES Y CONTADOR (ESTRUCTURA TÉCNICA MULTI-CONTADOR)
   ========================================================================== */
.counter-network-section {
    padding: 120px 0;
    border-top: var(--border-thin-gray);
    border-bottom: var(--border-thin-gray);
}

.grid-2-columns {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
}

/* Bloque Métricas Multi-Contador */
.counter-technical-box {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.specs-grid {
    border: var(--border-thin-gray);
    background-color: var(--bg-charcoal);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.metrics-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.metrics-layout-grid .spec-metric {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-left: 2px solid rgba(255, 0, 51, 0.3);
    padding-left: 15px;
}

/* El primer elemento (YouTube) es el principal y ocupa dos columnas */
.metrics-layout-grid .spec-metric:first-child {
    grid-column: span 2;
    border-left: 4px solid var(--brand-red);
    padding-left: 20px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 5px;
}

.metrics-layout-grid .spec-metric:first-child .metric-num {
    font-size: 6rem;
}

.metric-num {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--brand-red);
    line-height: 0.85;
    letter-spacing: 2px;
}

.metric-label {
    font-family: var(--font-technical);
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--text-white);
    font-weight: 700;
}

.technical-system-note {
    font-family: var(--font-technical);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pulse-indicator-small {
    color: var(--brand-red);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-indicator-small::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: var(--brand-red);
    border-radius: 50% !important;
    box-shadow: 0 0 6px var(--brand-red);
    animation: flashStatus 1s infinite;
}

/* Bloque Redes Sociales */
.social-links-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.social-box-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    letter-spacing: 2px;
}

.social-box-desc {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 300;
    margin-bottom: 10px;
}

.social-grid {
    display: flex;
    flex-direction: column;
    border: var(--border-thin-gray);
    background-color: var(--bg-charcoal);
}

.social-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 30px;
    text-decoration: none;
    border-bottom: var(--border-thin-gray);
    transition: var(--transition-fast);
}

.social-card:last-child {
    border-bottom: none;
}

.social-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
    width: 30px;
}

.social-name {
    font-family: var(--font-technical);
    font-size: 0.9rem;
    color: var(--text-white);
    letter-spacing: 2px;
    font-weight: 700;
    margin-right: auto;
    padding-left: 10px;
}

.social-arrow {
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

/* Hover redes brutalista */
.social-card:hover {
    background-color: var(--brand-red);
}

.social-card:hover .social-icon,
.social-card:hover .social-name,
.social-card:hover .social-arrow {
    color: var(--bg-black);
}

/* ==========================================================================
   PIE DE PÁGINA (ESTILO MÍNIMO EDITORIAL)
   ========================================================================== */
.footer {
    background-color: var(--bg-black);
    padding: 40px 0;
    border-top: var(--border-thin-gray);
}

.footer-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    font-family: var(--font-technical);
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.footer-disclaimer-box {
    border: 1px solid var(--brand-red);
    padding: 6px 15px;
    background-color: var(--bg-black);
    font-family: var(--font-technical);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    color: var(--brand-red);
}

/* ==========================================================================
   DISEÑO ADAPTABLE (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1200px) {
    .hero-title {
        font-size: 5rem;
    }
    
    .block-padding {
        padding: 60px 50px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .section-grid-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .split-block {
        width: 100%;
    }
    
    .grid-2-columns {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 73px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 73px);
        background-color: var(--bg-black);
        border-top: var(--border-thin-gray);
        transition: var(--transition-smooth);
        padding: 50px;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .nav-link {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        letter-spacing: 4px;
    }
    
    .section-title, .section-title-white, .section-title-center {
        font-size: 3rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        padding: 20px 15px;
        gap: 20px;
    }
    
    .metrics-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-layout-grid .spec-metric:first-child {
        grid-column: span 1;
    }
    
    .metrics-layout-grid .spec-metric:first-child .metric-num {
        font-size: 4.5rem;
    }
    
    .btn {
        width: 100%;
        padding: 15px 30px;
    }
    
    .block-padding {
        padding: 60px 30px;
    }
    
    /* Splash Centrado Responsivo */
    .splash-title {
        font-size: clamp(1.8rem, 8vw, 3rem);
        text-align: center;
        white-space: normal;
    }
    
    .splash-technical-tag {
        white-space: normal;
        font-size: 0.8rem;
    }
    
    .splash-desc {
        font-size: 0.95rem;
        text-align: center;
        margin-bottom: 35px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .section-title, .section-title-white, .section-title-center {
        font-size: 2.3rem;
    }
}

/* ==========================================================================
   SECCIÓN 03: ÚLTIMOS CAPÍTULOS (GRILLA DE CAPÍTULOS DE YOUTUBE)
   ========================================================================== */
.youtube-filters {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.yt-filter-btn {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
    border-radius: 0 !important;
}

.yt-filter-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.yt-filter-btn.active {
    background-color: var(--text-white);
    color: var(--text-dark);
}

.latest-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.video-episode-card {
    display: flex;
    flex-direction: column;
    background-color: transparent;
    border: none;
    text-decoration: none;
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 0 !important;
}

.video-episode-card:hover {
    transform: translateY(-4px);
}

.episode-thumbnail-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #000;
    border: var(--border-thin-gray);
}

.episode-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.2) contrast(1.05) brightness(0.95);
    transition: filter 0.35s ease, transform 0.35s ease;
}

.video-episode-card:hover .episode-thumbnail {
    filter: grayscale(0) contrast(1.1) brightness(1);
    transform: scale(1.02);
}

.episode-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.85);
    color: var(--text-white);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 6px;
    letter-spacing: 0.5px;
    z-index: 10;
    pointer-events: none;
}

.episode-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.video-episode-card:hover .episode-play-overlay {
    opacity: 1;
}

.episode-play-overlay i {
    color: var(--text-white);
    font-size: 2.2rem;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
}

.episode-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: var(--brand-red);
    z-index: 8;
    pointer-events: none;
}

.episode-content {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background-color: transparent;
}

.episode-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.episode-title {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-white);
    margin: 0;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.7rem;
    transition: color 0.25s ease;
}

.video-episode-card:hover .episode-title {
    color: var(--text-white);
}

.episode-options-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.25s ease;
}

.episode-options-btn:hover {
    color: var(--text-white);
}

.episode-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.episode-meta-separator {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Responsividad de la Grilla de Videos */
@media (max-width: 1200px) {
    .latest-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .latest-videos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .youtube-filters {
        gap: 8px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    .yt-filter-btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

