/* 
==================================================================
   SISTEMA DE DISEÑO: CAPTURA COMUNICACIONES
   Versión: 1.0 (Clean Light Mode)
   Arquitectura: Variables CSS Nativas
================================================================== 
*/

:root {
    /* 1. FUNDAMENTOS DE COLOR (LIGHT MODE) */
    --color-bg-absolute: #fdfdfd;
    --color-bg-space: #ffffff;
    
    /* Variables de Texto */
    --color-text-primary: #1a1a1a; 
    --color-text-secondary: rgba(0, 0, 0, 0.6);
    
    /* ACENTOS VISUALES */
    --color-text-accent: #000000;
    --color-brand-red: #e50914; 
    
    /* 2. GLASSMORPHISM LIGHT */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-blur: blur(20px);
    
    /* 3. SHADOW EFFECTS PREMIUM */
    --glow-soft: 0 0 30px rgba(0, 0, 0, 0.05);
    --glow-accent: 0 0 40px rgba(229, 9, 20, 0.1);
    
    /* 4. TIPOGRAFÍA & MOTION */
    --font-family-base: 'Inter', sans-serif;
    --ease-cinematic: cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* ==================================================================
   RESETEO BASE Y PROTECCIÓN DEL ENTORNO
================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ocultar barras de scroll en todos los navegadores */
::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }

/* ==================================================================
   PROTECCIÓN DE MATERIAL AUDIOVISUAL (Rec.709 Shield)
================================================================== */
iframe, video, img.raw-media {
    filter: none !important;
    background-color: var(--color-bg-absolute);
}

/* ==================================================================
   COMPONENTES UI GLOBALES
================================================================== */

/* 1. Navbar Glassmorphism */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: none;
    z-index: 1000;
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    color: var(--color-text-accent);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(1) contrast(1);
    transition: filter 0.4s ease, transform 0.5s ease;
    flex-shrink: 0;
}

.logo:hover .logo-icon {
    filter: brightness(1) contrast(1) drop-shadow(0 0 8px rgba(229, 9, 20, 0.3));
    transform: rotate(20deg);
}

.logo:hover {
    text-shadow: 0 0 12px rgba(229, 9, 20, 0.2);
    color: #000;
}

.logo span {
    font-weight: 300;
    color: var(--color-text-secondary);
    transition: color 0.4s ease;
}

.logo:hover span {
    color: rgba(0, 0, 0, 0.85);
}

/* 1.5. Mobile Menu Toggle Button (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2005;
    padding: 0;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

/* 2. Micro-Interacciones (Glow Links) */
.glow-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.glow-link:hover {
    color: #000;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.glow-btn {
    background: rgba(229, 9, 20, 0.05);
    border: 1px solid var(--color-brand-red);
    color: var(--color-text-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    position: relative;
}

.glow-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.glow-btn:hover {
    color: #fff;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.3);
    background: var(--color-brand-red);
    border-color: var(--color-brand-red);
}

/* ==================================================================
   MOTOR ESPACIAL (Cubo 3D Absoluto Setup)
================================================================== */
#cinematic-layout {
    width: 100vw;
    height: 100vh;
    perspective: 2000px;
    overflow: hidden;
    position: relative;
    background: #fff;
}

/* Efecto de Grano Cinematográfico */
#cinematic-layout::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.02;
    pointer-events: none;
    z-index: 9999;
}

/* ESPACIO PROFUNDO */
.space-background {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at center, #eee 0%, #fff 100%);
    z-index: -1;
    overflow: hidden;
}

.stars {
    position: absolute;
    width: 200%; height: 200%;
    top: -50%; left: -50%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0));
    background-size: 200px 200px;
    opacity: 0.3;
    animation: space-drift 100s linear infinite;
}

.glow-vignette {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

@keyframes space-drift {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.1); }
}

#cube-transition-container {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1.6s var(--ease-cinematic); /* Más lento y elegante */
    transform: translateZ(0);
}

/* SISTEMA DE CAPAS DE PROFUNDIDAD (Reemplaza al cubo rígido) */
.cube-face {
    position: absolute;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent; /* Permitir ver el fondo de espacio */
    backface-visibility: hidden;
    padding-top: 80px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s var(--ease-cinematic), transform 1.6s var(--ease-cinematic), filter 1.2s ease;
    filter: blur(10px) brightness(0.5);
    transform: translateZ(-200px) scale(0.9);
}

.cube-face.active-face {
    opacity: 1;
    pointer-events: all;
    filter: blur(0) brightness(1);
    transform: translateZ(0) scale(1);
    z-index: 10;
}

/* Capa de Salida (Recesión hacia el fondo) */
.cube-face.exit-face {
    opacity: 0;
    transform: translateZ(-500px) scale(0.85);
    filter: blur(20px) brightness(0.2);
}

/* Capa de Entrada (Viniendo desde el frente/Z) */
.cube-face.enter-face {
    opacity: 0;
    transform: translateZ(300px) scale(1.1);
    filter: blur(5px) brightness(1.5);
}

/* Espacialidad Multidimensional: LA CONSTELACIÓN ESFÉRICA ASIMÉTRICA */
/* Face-6: Streaming (Especialización) - Ajustes tipográficos premium */
.face-6 .landing-content h1 {
    font-size: 5rem;
    letter-spacing: -3px;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
    background: none !important;
    filter: none !important;
    margin-bottom: 0.8rem;
}

.face-6 .landing-content h1 span {
    position: relative;
    display: inline-block;
    border-bottom: 3px solid var(--color-brand-red) !important;
    padding-bottom: 6px;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
    background: none !important;
    -webkit-background-clip: initial !important;
}

.streaming-specs {
    margin-top: 2rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
    position: relative;
    z-index: 5;
    width: 100%;
}

.streaming-specs div {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
}

.streaming-specs div:hover {
    transform: translateY(-10px) scale(1.1);
    border-color: var(--color-text-accent);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

/* INTERFAZ HUD STREAMING */
.streaming-hud-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(circle at 50% 50%, transparent 80%, rgba(229, 9, 20, 0.05) 100%),
                      linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 100% 100%, 40px 40px, 40px 40px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

.spec-box {
    border: 1px solid var(--glass-border);
    padding: 1.5rem 2.5rem;
    border-radius: 12px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 200px;
    border: 1px solid rgba(255,255,255,0.05);
}

.spec-icon {
    width: 40px;
    height: 40px;
    color: var(--color-text-secondary);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.spec-icon svg {
    width: 100%;
    height: 100%;
}

.spec-label {
    display: block;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-text-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spec-sub {
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.spec-box:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.spec-box:hover .spec-icon {
    color: #fff;
    opacity: 1;
    transform: scale(1.1);
}

/* ESTADO EN VIVO (ON AIR) */
.spec-box.on-air {
    border-color: rgba(229, 9, 20, 0.3);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.05);
}

.spec-box.on-air .spec-icon {
    color: var(--color-brand-red);
    animation: on-air-pulse 2s infinite ease-in-out;
}

.spec-box.on-air .spec-label {
    color: var(--color-brand-red);
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
}

@keyframes on-air-pulse {
    0%, 100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 5px rgba(229, 9, 20, 0.5)); }
    50% { opacity: 0.6; transform: scale(0.95); filter: drop-shadow(0 0 2px rgba(229, 9, 20, 0.2)); }
}



/* ==================================================================
   SECCIÓN: LANDING (REDISEÑO HERO LENS)
================================================================== */
.hero-lens-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    position: relative;
    z-index: 10;
}

.main-hero-lens {
    width: clamp(300px, 60vh, 600px);
    height: clamp(300px, 60vh, 600px);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    animation: lens-breathing 4s infinite ease-in-out;
    text-decoration: none;
}

.hero-lens-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1) drop-shadow(0 0 20px rgba(229, 9, 20, 0.3));
    transition: filter 0.5s ease, transform 0.5s ease;
}

.main-hero-lens:hover {
    transform: scale(1.05) rotate(5deg);
}

.main-hero-lens:hover .hero-lens-img {
    filter: brightness(1.3) contrast(1.2) drop-shadow(0 0 40px rgba(229, 9, 20, 0.8));
}

/* Keyframes de Respiración (Pulso Cinematográfico) */
@keyframes lens-breathing {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 15px rgba(229, 9, 20, 0.2));
    }
    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 30px rgba(229, 9, 20, 0.5));
    }
}

@keyframes text-breathing {
    0%, 100% {
        opacity: 0.6;
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    }
}

/* Efectos Textuales Simples para Fase 1 */
.typing-reveal {
    animation: fadeIn 2s ease-out;
}

.blur-reveal {
    animation: blurReveal 2s ease-out forwards;
    filter: blur(10px);
    opacity: 0;
    animation-delay: 0.5s;
}

/* ==================================================================
   BOTÓN WHATSAPP MINIMALISTA
================================================================== */
.wa-float-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-secondary);
    backdrop-filter: var(--glass-blur);
    z-index: 1000;
    transition: all 0.3s ease;
}

.wa-float-btn:hover {
    color: var(--color-text-accent);
    border-color: var(--color-text-accent);
    box-shadow: 0 0 20px var(--glow-color);
    transform: scale(1.05);
}

.wa-float-btn svg {
    width: 24px;
    height: 24px;
}

/* ==================================================================
   KEYFRAMES BÁSICOS
================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes blurReveal {
    to {
        filter: blur(0);
        opacity: 1;
    }
}

/* ==================================================================
   SECCIÓN: PORTAFOLIO Y FILTROS ORGÁNICOS
================================================================== */
.portfolio-container {
    width: 90vw;
    height: 80vh;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.filter-menu {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--color-text-secondary);
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family-base);
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.filter-btn:hover, .filter-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-text-primary);
    border-color: rgba(255, 255, 255, 0.4);
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* Sub-filtros */
.sub-filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-secondary);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family-base);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sub-filter-btn:hover, .sub-filter-btn.active {
    background: rgba(229, 9, 20, 0.1);
    color: var(--color-brand-red);
    border-color: rgba(229, 9, 20, 0.3);
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    grid-auto-rows: 90px; /* Unidad base del rompecabezas reducida */
    grid-auto-flow: dense; /* Magia: empaqueta llenando los huecos como Tetris */
    gap: 4px; /* Gap hiper-apretado para efecto mosaico denso */
    overflow-y: auto;
    padding-right: 1rem;
    flex-grow: 1;
}

.masonry-item {
    background: var(--glass-bg);
    border: none; /* Sin borde grueso para fundir mejor el collage */
    border-radius: 4px; /* Bordes menos redondos ayuda al puzzle */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.4s ease, filter 0.4s ease;
    overflow: hidden;
}

/* Modificadores Orgánicos del Puzzle */
.masonry-item.wide { grid-column: span 2; }
.masonry-item.tall { grid-row: span 2; }
.masonry-item.big { grid-column: span 2; grid-row: span 2; }
.masonry-item.epic { grid-column: span 3; grid-row: span 2; }

.masonry-item.hidden-filter,
.masonry-item.hidden-subfilter {
    opacity: 0.05; /* Casi invisible para el look espacial */
    filter: blur(12px) grayscale(100%);
    pointer-events: none;
    transform: scale(0.9) translateZ(-100px);
}

.masonry-item {
    background: var(--glass-bg);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transition: 
        transform 0.6s var(--ease-cinematic), 
        opacity 0.6s var(--ease-cinematic), 
        filter 0.6s var(--ease-cinematic),
        box-shadow 0.4s ease;
    cursor: pointer;
    transform-style: preserve-3d;
}

.masonry-item:hover {
    z-index: 50;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 30px rgba(229, 9, 20, 0.2);
}

/* Fachada de YouTube Premium */
.youtube-facade {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Modificador para Portadas de Podcast */
.podcast-facade {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: var(--color-bg-absolute);
}

.podcast-facade::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 15, 0.65); /* Filtro oscuro/desaturado */
    z-index: 1;
    pointer-events: none;
    transition: background 0.4s ease;
}

.masonry-item:hover .podcast-facade::before {
    background: rgba(10, 10, 15, 0.3); /* Se aclara ligeramente al pasar el mouse */
}

.podcast-watermark {
    position: absolute;
    top: 15px; right: 15px;
    width: 35px; height: 35px;
    background-image: url('../assets/img/lente @4x.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.8;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.podcast-desc {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 0.4rem;
    display: block;
    line-height: 1.4;
    font-weight: 300;
}

.facade-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.masonry-item:hover .facade-overlay {
    opacity: 1;
}

.facade-info {
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.masonry-item:hover .facade-info {
    transform: translateY(0);
}

.facade-category {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-brand-red);
    font-weight: 800;
    margin-bottom: 0.3rem;
    display: block;
}

.facade-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.facade-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60px; height: 60px;
    background: rgba(229, 9, 20, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.5);
}

.facade-play-btn svg {
    width: 24px; height: 24px;
    fill: currentColor;
}

.masonry-item:hover .facade-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.masonry-item.is-playing .facade-overlay {
    display: none;
}


.section-title {
    font-size: 2.2rem; /* Reducido de 4rem para ganar espacio vertical */
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    text-align: left;
    border-left: 4px solid var(--color-text-accent);
    padding-left: 1.5rem;
}

.section-title span {
    font-weight: 800;
    color: var(--color-text-accent);
}


/* Custom Scrollbar minimalista para el Grid */
.masonry-grid::-webkit-scrollbar {
    width: 6px;
}
.masonry-grid::-webkit-scrollbar-track {
    background: transparent;
}
.masonry-grid::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

/* Items inyectados por el Wrapper de JS */
.media-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
    animation: fadeIn 1s ease forwards;
    opacity: 0;
    
    /* Configuración clave para la asimetría fluida */
    break-inside: avoid;
    margin-bottom: 1.5rem; 
    display: block;
}

.media-item:hover {
    transform: scale(1.02);
    border-color: var(--color-text-accent);
    box-shadow: 0 0 30px var(--glow-color);
}

.media-item img {
    width: 100%;
    height: auto; /* Permite que la imagen dictamine su altura natural */
    display: block;
    /* Rec.709 protection asegurada en filtro global */
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 1rem;
    letter-spacing: 1px;
    margin-top: 5rem;
}

/* ==================================================================
   SECCIÓN: ÁREA PRIVADA DE CLIENTES (WORKSPACE / DRIVE)
================================================================== */
.workspace-container {
    width: 80%;
    max-width: 780px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 2rem auto 3rem auto;
    position: relative;
    z-index: 5;
}

.login-box {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 4rem 3rem;
    backdrop-filter: var(--glass-blur);
    text-align: center;
    position: relative;
}

.vault-box {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem 2rem 2rem;
    backdrop-filter: var(--glass-blur);
    text-align: left;
    position: relative;
}

/* MARCA DE AGUA: Solo el lente circular - gigante con efecto "Red Glow" */
.login-box::after, .vault-box::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    
    /* Usando el lente puro sin texto */
    width: 75%; 
    height: 75%;
    
    background-image: url('../assets/img/lente @4x.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    
    /* Sello de agua con brillo rojo de la marca */
    opacity: 0.35; 
    filter: brightness(1.2) drop-shadow(0 0 50px rgba(229, 9, 20, 0.6));
    z-index: 0; 
    pointer-events: none;
}

/* Eliminar marca de agua en el cotizador */
.quote-box::after {
    display: none !important;
}

/* Blindamos las etiquetas, títulos y formularios para que queden intactos sobre la marca de agua */
.login-box .section-title,
.login-box .blur-reveal,
.input-group,
.vault-box .section-title {
    position: relative;
    z-index: 2;
}

.input-group {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation-delay: 0.8s;
}

.input-group input,
.input-group div input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    color: var(--color-text-accent);
    font-size: 1.2rem;
    padding: 1rem 0.5rem;
    text-align: center;
    font-family: var(--font-family-base);
    letter-spacing: 2px;
    transition: border-color 0.3s ease;
    width: 100%;
}

/* Recuperación total visual de los Selectores de Opciones que se habían oscurecido/roto */
.input-group select.custom-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.5); /* Fondo oscuro translúcido para matching con glassmorphism */
    border: 1px solid var(--glass-border);
    color: var(--color-text-secondary);
    font-size: 1rem;
    padding: 0.8rem 1rem;
    font-family: var(--font-family-base);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none; /* Look moderno puro */
}

.input-group select.custom-select:focus,
.input-group select.custom-select:hover {
    outline: none;
    border-color: var(--color-text-accent);
    color: var(--color-text-primary);
    background: rgba(20, 20, 20, 0.8);
}

.input-group select.custom-select option {
    background-color: #111;
    color: #f5f5f7;
    padding: 10px;
}
.input-group input:focus {
    outline: none;
    border-bottom: 1px solid var(--color-text-accent);
}

.input-group input::placeholder {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    letter-spacing: normal;
}

.error-msg {
    color: #ff4a4a;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    min-height: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-viewer {
    width: 100%;
    max-width: 1000px;
    max-height: 70vh; /* No permitimos que el video ocupe toda la pantalla vertical */
    margin: 1rem auto;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.media-viewer img.raw-media {
    max-height: 70vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 0 0 20px rgba(0,0,0,0.8);
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.media-viewer:hover .play-button-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Lista de Archivos estilo Drive */
.drive-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
    text-align: left;
    position: relative;
    z-index: 5;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-text-secondary);
    transform: translateX(5px);
}

.file-icon {
    font-size: 1.2rem;
    margin-right: 1rem;
}

.file-name {
    flex-grow: 1;
    font-size: 0.9rem;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-date {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-left: 1rem;
}

/* ==================================================================
   SECCIÓN: ARCHIVO HISTÓRICO (CINTA HORIZONTAL RESPONSIVA)
================================================================== */

/* El contenedor que hace scroll lateral */
.film-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    padding: 1rem 0 1.5rem 0;
    /* Scroll suave al arrastrar */
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.film-scroll-wrapper:active {
    cursor: grabbing;
}

/* Scrollbar horizontal elegante */
.film-scroll-wrapper::-webkit-scrollbar {
    height: 5px;
}
.film-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.film-scroll-wrapper::-webkit-scrollbar-thumb {
    background: rgba(229, 9, 20, 0.4);
    border-radius: 10px;
}
.film-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(229, 9, 20, 0.8);
}

/* LA CINTA: ahora HORIZONTAL y crece automáticamente con cada frame */
.film-strip {
    display: inline-flex;          /* Crece hacia la derecha automáticamente */
    flex-direction: row;           /* Horizontal */
    flex-shrink: 0;
    min-width: 100%;               /* Nunca más angosta que la pantalla */
    height: 160px;                 /* Altura fija y compacta */
    
    background: #1a1a1a;
    padding: 10px 30px;            /* Perforaciones arriba y abajo */
    gap: 16px;
    
    position: relative;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    /* Glow rojo DETRÁS de la cinta, no encima */
    box-shadow: 
        0 8px 40px rgba(0,0,0,0.9),
        0 0 80px rgba(229, 9, 20, 0.18),
        0 0 120px rgba(229, 9, 20, 0.08);
    align-items: center;
    z-index: 1;
}

/* PERFORACIONES HORIZONTALES (arriba y abajo como celuloide real) */
.film-strip::before, .film-strip::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 10px;
    background-color: transparent;
    background-image: linear-gradient(to right, #000 50%, transparent 50%);
    background-size: 20px 100%;
    z-index: 2;
    pointer-events: none;
}

.film-strip::before {
    top: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.film-strip::after {
    bottom: 8px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* Cada cuadro de película */
.film-frame {
    flex: 0 0 auto;               /* No crecer ni encoger, solo su tamaño natural */
    width: clamp(100px, 14vw, 160px);  /* Responsivo: mínimo 100px, máximo 160px */
    height: 110px;                /* Altura más compacta */
    position: relative;
    background: var(--bg-primary);
    border: 1.5px solid var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.35s ease;
    cursor: pointer;
    z-index: 1;
}

.film-frame:hover {
    transform: scale(1.12) translateY(-8px);
    border-color: var(--color-text-accent);
    box-shadow: 0 12px 30px rgba(229, 9, 20, 0.35), 0 4px 15px rgba(0,0,0,0.6);
    z-index: 10;
}

.film-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.3) grayscale(0.5) contrast(1.1) brightness(0.85);
    transition: filter 0.4s ease;
}

.film-frame:hover img {
    filter: sepia(0) grayscale(0) contrast(1.05) brightness(1.1);
}

/* Etiqueta del año — ahora en la parte inferior derecha, más pequeña */
.film-year {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 6px #000;
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: rgba(0,0,0,0.6);
    padding: 2px 6px;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.film-frame:hover .film-year {
    opacity: 1;
    transform: scale(1.05);
    transform-origin: bottom right;
    color: var(--color-text-accent);
}

/* ==================================================================
   SECCIÓN: BÓVEDA POR AÑO (PISTA HORIZONTAL — SEGUIMIENTO DE MOUSE)
================================================================== */

/* La sección completa face-8 tiene una transición inmersiva */
#year-gallery-face {
    opacity: 0;
    transform-origin: center center;
    transition:
        opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#year-gallery-face.is-visible {
    opacity: 1;
}

/* Área de scroll horizontal con seguimiento de mouse */
.film-scroll-area {
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    cursor: grab;
    user-select: none;
}

.film-scroll-area:active {
    cursor: grabbing;
}

.film-scroll-area::-webkit-scrollbar {
    height: 4px;
}
.film-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}
.film-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(229, 9, 20, 0.4);
    border-radius: 10px;
}
.film-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(229, 9, 20, 0.8);
}

/* La cinta interna */
.year-horizontal-track {
    display: inline-flex;
    min-width: 100%;
    flex-shrink: 0;
    height: 230px;
    box-sizing: border-box;
    gap: 2.5rem;
    padding: 0 3rem;
    background: #1a1a1a;
    position: relative;
    align-items: center;
    margin: 15px 0 25px 0;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
    box-shadow:
        0 0 80px rgba(229, 9, 20, 0.15),
        0 0 30px rgba(229, 9, 20, 0.08),
        0 20px 60px rgba(0,0,0,0.9);
    /* Transición suave para el seguimiento de mouse */
    will-change: scroll-position;
}

/* Perforaciones horizontales arriba y abajo */
.year-horizontal-track::before,
.year-horizontal-track::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 10px;
    background-color: transparent;
    background-image: linear-gradient(to right, #000 50%, transparent 50%);
    background-size: 20px 100%;
    z-index: 2;
    pointer-events: none;
}

.year-horizontal-track::before {
    top: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.year-horizontal-track::after {
    bottom: 8px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* Cada viñeta de video — con entrada animada */
.year-film-item {
    flex: 0 0 200px;
    height: 160px;
    display: flex;
    flex-direction: column;
    background: #050505;
    padding: 8px;
    border: 1px solid #1a1a1a;
    position: relative;
    border-radius: 4px;
    cursor: pointer;
    /* Transición inmersiva de entrada */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition:
        opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

/* Estado visible (se activa desde JS con retraso escalonado) */
.year-film-item.item-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.year-film-item:hover {
    border-color: var(--color-text-accent);
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.3), 0 4px 15px rgba(0,0,0,0.6);
    z-index: 10;
    transform: translateY(-6px) scale(1.04);
}

.year-film-item img {
    width: 100%;
    flex-grow: 1;
    object-fit: cover;
    display: block;
    filter: sepia(0.3) grayscale(0.4) contrast(1.1) brightness(0.85);
    transition: filter 0.35s ease;
    border-radius: 2px;
    min-height: 0;
}

.year-film-item:hover img {
    filter: sepia(0) grayscale(0) contrast(1.05) brightness(1.05);
}

.year-film-title {
    color: var(--color-text-secondary);
    font-size: 0.72rem;
    text-align: center;
    padding: 5px 2px 2px;
    font-weight: 400;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.year-film-item:hover .year-film-title {
    color: var(--color-text-primary);
}

/* ==================================================================
   SECCIÓN: COTIZADOR (FORMULARIO CUSTOM)
================================================================== */
.quote-box {
    padding: 3rem 3rem 4rem; /* Igual que login-box pero con más aire abajo */
}

/* El título del cotizador hereda el centrado del login-box pero los campos van a la izquierda */
.quote-box .section-title {
    text-align: center;
    border-left: none;
    padding-left: 0;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1.5rem;
    margin-bottom: 0.5rem;
}

.quote-form {
    margin-top: 1.5rem;
    text-align: left;
}

/* Etiqueta numerada de sección del formulario */
.quote-section-label {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
}

.quote-form input {
    text-align: left;
    letter-spacing: normal;
    font-size: 1rem;
    color: var(--color-text-primary);
}

.quote-form input::placeholder {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* Selects del cotizador: igual al selector oscuro del workspace */
.custom-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-bottom: 1px solid var(--glass-border);
    color: var(--color-text-secondary);
    font-size: 1rem;
    padding: 0.9rem 0.5rem;
    font-family: var(--font-family-base);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.3s ease, color 0.3s ease;
    border-radius: 0;
}

.custom-select:focus,
.custom-select:hover {
    outline: none;
    border-bottom-color: var(--color-text-accent);
    color: var(--color-text-primary);
}

.custom-select option {
    background-color: #0d0d0d;
    color: var(--color-text-primary);
    padding: 10px;
}

/* Sub-campos condicionales: ocultos y revelados con transición suave */
.sub-field {
    display: none;
    opacity: 0;
    transform: translateY(-6px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-left: 1rem;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.sub-field.reveal {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: subtleReveal 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes subtleReveal {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ==================================================================
   YOUTUBE FACADES (Portadas Personalizadas No-Code)
================================================================== */
.youtube-facade {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.youtube-facade::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
    z-index: 1;
}

.youtube-facade:hover {
    border-color: var(--color-brand-red);
    transform: translateY(-5px);
}

.youtube-facade-title {
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: left;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    pointer-events: none;
}

.youtube-facade-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(5px);
}

.youtube-facade-play svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    margin-left: 4px; /* Centrado óptico del triángulo */
    transition: fill 0.3s ease;
}

.youtube-facade:hover .youtube-facade-play {
    background: var(--color-brand-red);
    border-color: var(--color-brand-red);
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-facade iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
    z-index: 3;
}

/* MODAL HUD STREAMING */
.hud-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 500px;
    max-height: 85vh; /* Evita que se salga de la pantalla */
    overflow-y: auto; /* Permite scroll si el formulario es largo */
    background: rgba(10, 10, 10, 0.98);
    border: 1px solid var(--color-brand-red);
    backdrop-filter: blur(25px);
    border-radius: 12px;
    z-index: 1000; /* Asegurar que esté por encima de todo */
    padding: 2rem;
    box-shadow: 0 0 50px rgba(229, 9, 20, 0.2), 0 0 100px rgba(0,0,0,0.8);
    animation: modalSlideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Scrollbar minimalista para el modal HUD */
.hud-modal::-webkit-scrollbar {
    width: 4px;
}
.hud-modal::-webkit-scrollbar-track {
    background: transparent;
}
.hud-modal::-webkit-scrollbar-thumb {
    background: var(--color-brand-red);
    border-radius: 10px;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.hud-modal-content {
    position: relative;
    color: var(--color-text-primary);
}

.close-hud-btn {
    position: absolute;
    top: -1.5rem;
    right: -1.5rem;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-hud-btn:hover {
    color: var(--color-brand-red);
}

.hud-title {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
}

.hud-title span {
    color: var(--color-brand-red);
}

.hud-desc {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.hud-input-group {
    margin-bottom: 1.2rem;
}

.hud-input-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.hud-input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem;
    color: var(--color-text-primary);
    font-family: var(--font-family-base);
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.hud-input-group input:focus {
    outline: none;
    border-color: var(--color-brand-red);
}

/* ============================================================================
   REPRODUCTOR CINEMATOGRÁFICO MODAL
============================================================================ */
.cinematic-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999; /* Por encima de todo */
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.cinematic-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop-click {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.close-modal-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--color-text-primary);
    padding: 0.8rem 1.2rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: var(--font-family-base);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.close-modal-btn svg {
    width: 18px;
    height: 18px;
}

.close-modal-btn:hover {
    background: rgba(229, 9, 20, 0.2);
    border-color: var(--color-brand-red);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.5);
    color: #fff;
    transform: scale(1.05);
}

.cinematic-modal-content {
    position: relative;
    z-index: 5;
    width: 90%;
    max-width: 1200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #000;
}

.cinematic-modal.show .cinematic-modal-content {
    transform: scale(1);
}

/* Modificadores dinámicos de proporción */
.cinematic-modal-content.ratio-16-9 {
    aspect-ratio: 16 / 9;
    max-height: 85vh;
    max-width: 90vw;
}

.cinematic-modal-content.ratio-9-16 {
    aspect-ratio: 9 / 16;
    max-width: 450px;
    max-height: 90vh;
}

.cinematic-modal-content iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* ============================================================================
   DISEÑO RESPONSIVO (MOBILE FIRST ADAPTATIONS)
   ============================================================================ */

@media (max-width: 1024px) {
    .glass-nav { padding: 1rem 2rem; }
    .hero-lens-container { gap: 2rem; }
    .main-hero-lens { width: 45vh; height: 45vh; }

    /* Protecciones para Face-6 (Streaming) en Tablet */
    #streaming-face {
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 120px 2rem 80px 2rem !important;
    }
    
    .streaming-specs {
        flex-wrap: wrap !important;
        gap: 1.5rem !important;
        margin-top: 1.5rem !important;
        justify-content: center !important;
    }
    
    .spec-box {
        min-width: 180px !important;
        padding: 1.2rem 1.5rem !important;
    }
    
    /* Mosaico en Tablet - 4 Columnas fijas estables */
    .masonry-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        grid-auto-rows: 120px !important;
        gap: 6px !important;
    }
    .masonry-item.wide { grid-column: span 2 !important; }
    .masonry-item.tall { grid-row: span 2 !important; }
    .masonry-item.big { grid-column: span 2 !important; grid-row: span 2 !important; }
    .masonry-item.epic { grid-column: span 3 !important; grid-row: span 2 !important; }
}

@media (max-width: 768px) {
    /* 1. Navbar Adaptativa - Estilo más compacto para móvil */
    .glass-nav {
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        border-radius: 0;
        padding: 1rem 1.5rem !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        background: rgba(255, 255, 255, 0.85) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
        height: 70px !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
    }
    
    .logo { color: var(--color-text-accent) !important; font-size: 1rem !important; }
    .logo span { color: var(--color-text-secondary) !important; }
    .logo-icon { width: 24px !important; height: 24px !important; }
    
    .menu-toggle {
        display: flex !important; /* Mostrar botón hamburguesa en móviles */
    }
    
    .menu-toggle .bar {
        background-color: var(--color-text-primary) !important;
    }
    
    /* Panel de Navegación Vertical Glassmorphic en Móvil */
    .nav-links {
        position: fixed !important;
        top: 70px !important;
        right: -100% !important; /* Oculto por defecto a la derecha */
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        background: rgba(255, 255, 255, 0.96) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 1.8rem !important;
        padding: 4rem 1rem 2rem 1rem !important;
        transition: right 0.5s cubic-bezier(0.645, 0.045, 0.355, 1) !important;
        z-index: 1999 !important;
        overflow-y: auto !important;
        border-left: none !important;
    }
    
    .nav-links.active {
        right: 0 !important; /* Desliza hacia adentro */
    }
    
    .glow-link {
        font-size: 1.15rem !important;
        padding: 10px 20px !important;
        width: 80% !important;
        text-align: center !important;
        color: var(--color-text-primary) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    }
    
    .glow-link:hover {
        color: var(--color-brand-red) !important;
    }
    
    .glow-btn {
        width: 80% !important;
        text-align: center !important;
        padding: 0.8rem 1.5rem !important;
        font-size: 1.1rem !important;
        background: rgba(229, 9, 20, 0.06) !important;
        border-color: var(--color-brand-red) !important;
        color: var(--color-brand-red) !important;
        border-radius: 6px !important;
        margin-top: 1rem !important;
    }

    /* 2. Hero y Secciones */
    .hero-lens-container { margin-top: 60px !important; }
    .main-hero-lens { width: 35vh !important; height: 35vh !important; }
    .face-6 .landing-content h1 { font-size: 2.2rem !important; letter-spacing: -1px !important; }
    .face-6 .landing-content p { font-size: 0.9rem !important; padding: 0 1rem !important; }
    
    .section-title { font-size: 1.5rem !important; padding-left: 0.8rem !important; margin-bottom: 1.2rem !important; }
    
    /* Protecciones para Face-6 (Streaming) en Móvil */
    #streaming-face {
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 100px 1rem 80px 1rem !important;
    }

    .streaming-specs {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
        margin-top: 1.5rem !important;
        width: 100% !important;
    }
    
    .spec-box {
        min-width: 90% !important;
        width: 90% !important;
        padding: 1rem 1.5rem !important;
    }

    /* 3. Portafolio (Mosaico Móvil y Filtros Horizontales) */
    .portfolio-container { 
        width: 100% !important; 
        height: 100% !important; 
        padding-top: 80px !important; /* Reducido para acortar el espacio feo */
        border: none !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .portfolio-header {
        margin-bottom: 0 !important; /* Eliminamos el margin-bottom feo */
        padding: 0 0.5rem !important;
        width: 100% !important;
        display: block !important;
        flex-shrink: 0 !important;
    }
    
    .filter-menu { 
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0.6rem !important; 
        padding: 0.2rem 0.2rem 0.6rem 0.2rem !important;
        width: 100% !important;
        scrollbar-width: none !important;
        justify-content: flex-start !important;
    }
    
    .filter-menu::-webkit-scrollbar {
        display: none !important;
    }
    
    .filter-btn { 
        flex: 0 0 auto !important;
        padding: 0.4rem 0.9rem !important; 
        font-size: 0.75rem !important;
        border-radius: 30px !important;
    }
    
    /* 2 Columnas fijas estables en móvil */
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: 120px !important;
        gap: 6px !important;
        padding: 0.5rem 0.5rem 2rem 0.5rem !important;
        flex-grow: 1 !important;
        height: 0 !important; /* Truco Flexbox para que scroll funcione perfecto */
        min-height: 0 !important;
        overflow-y: auto !important;
    }
    
    .masonry-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
    .masonry-item.wide { 
        grid-column: span 2 !important; 
        grid-row: span 1 !important;
    }
    .masonry-item.tall { 
        grid-column: span 1 !important; 
        grid-row: span 2 !important;
    }
    .masonry-item.big { 
        grid-column: span 2 !important; 
        grid-row: span 2 !important;
    }
    .masonry-item.epic { 
        grid-column: span 2 !important; 
        grid-row: span 2 !important; /* Reducido a 2 de ancho para evitar romper la grilla */
    }
    
    .facade-overlay { padding: 0.5rem !important; }
    .facade-title { font-size: 0.75rem !important; }
    .podcast-desc { font-size: 0.65rem !important; }

    /* 4. Formularios y Bóveda */
    .workspace-container { 
        width: 100% !important; 
        margin-top: 90px !important; 
        padding: 20px 1rem 100px !important;
        border-radius: 0 !important; 
        border: none !important;
    }
    
    .login-box, .vault-box { 
        padding: 2.2rem 1.2rem !important; 
        border-radius: 8px !important; 
    }
    
    .login-box .blur-reveal {
        font-size: 0.9rem !important;
    }
    
    .input-group { 
        margin-top: 1.5rem !important; 
        gap: 1.2rem !important;
    }
    
    .input-group input { 
        font-size: 1rem !important; 
        padding: 0.6rem 0.2rem !important;
    }
    
    .quote-box .section-title {
        font-size: 1.6rem !important;
        padding-bottom: 0.6rem !important;
    }
    
    .quote-section-label {
        margin-top: 1rem !important;
        margin-bottom: 0.4rem !important;
        font-size: 0.6rem !important;
    }
    
    /* 4.5. WhatsApp Floating Button */
    .wa-float-btn {
        width: 44px !important;
        height: 44px !important;
        bottom: 1.2rem !important;
        right: 1.2rem !important;
    }
    
    .wa-float-btn svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    /* 5. Modal de Video */
    .close-modal-btn {
        top: 0.5rem !important;
        right: 0.5rem !important;
        padding: 0.4rem 0.6rem !important;
    }
    
    .cinematic-modal-content.ratio-16-9 {
        width: 95% !important;
        aspect-ratio: 16/9 !important;
    }
}

/* Optimización para pantallas muy pequeñas (iPhone SE, etc) */
@media (max-width: 380px) {
    .masonry-grid {
        grid-template-columns: 1fr !important; /* Una sola columna para evitar apretamiento */
        grid-auto-rows: 150px !important;
    }
    .masonry-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
    .masonry-item.wide, .masonry-item.tall, .masonry-item.big, .masonry-item.epic {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
    .logo { font-size: 0.85rem !important; }
}

