/*
Theme Name: PentagonoTV Ultra Premium MAX
Author: Rafael González / Nova Agency
Description: Arquitectura CSS Monolítica. Glassmorphism, Ticker, Bento Grid, Dark Mode, Animaciones 3D.
Version: 9.0.Dios
*/

/* ==========================================================================
   1. SISTEMA DE DISEÑO Y VARIABLES GLOBALES (TOKENS)
   ========================================================================== */
:root {
    /* Identidad de Marca PentagonoTV */
    --brand-primary: #00994d;
    --brand-primary-light: #33b370;
    --brand-primary-dark: #006633;
    --brand-primary-glow: rgba(0, 153, 77, 0.4);
    --brand-primary-alpha: rgba(0, 153, 77, 0.1);
    
    --brand-accent: #ff0033; /* Rojo para Breaking News / En Vivo */
    --brand-accent-glow: rgba(255, 0, 51, 0.5);

    /* Paleta de Colores (Light Mode por defecto) */
    --bg-base: #f4f7f6;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f9fafb;
    --bg-surface-elevated: #ffffff;
    
    --text-heading: #111827;
    --text-body: #374151;
    --text-muted: #6b7280;
    
    --border-subtle: #e5e7eb;
    --border-strong: #d1d5db;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
    --glass-blur: blur(16px);

    /* Tipografía Fluida (Usa clamp para adaptarse a cualquier pantalla) */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --text-xs: clamp(0.75rem, 0.7vw + 0.5rem, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8vw + 0.5rem, 1rem);
    --text-base: clamp(1rem, 1vw + 0.5rem, 1.125rem);
    --text-lg: clamp(1.125rem, 1.2vw + 0.5rem, 1.25rem);
    --text-xl: clamp(1.25rem, 1.5vw + 0.5rem, 1.5rem);
    --text-2xl: clamp(1.5rem, 2vw + 0.5rem, 2rem);
    --text-3xl: clamp(2rem, 3vw + 0.5rem, 2.5rem);
    --text-4xl: clamp(2.5rem, 4vw + 0.5rem, 3.5rem);
    --text-5xl: clamp(3rem, 5vw + 0.5rem, 4.5rem);

    /* Espaciado Sistemático */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-24: 6rem;

    /* Sombras Elevadas (3D Feel) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px var(--brand-primary-glow);

    /* Radios de Borde (Bento Style) */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Curvas de Animación Profesionales */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
    --duration-fast: 200ms;
    --duration-normal: 400ms;
    --duration-slow: 800ms;
}

/* ==========================================================================
   2. DARK MODE AUTOMÁTICO (NATIVO DEL SISTEMA)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-base: #050505;
        --bg-surface: #111111;
        --bg-surface-hover: #1a1a1a;
        --bg-surface-elevated: #222222;
        
        --text-heading: #ffffff;
        --text-body: #d1d5db;
        --text-muted: #9ca3af;
        
        --border-subtle: #27272a;
        --border-strong: #3f3f46;

        --glass-bg: rgba(10, 10, 10, 0.75);
        --glass-border: rgba(255, 255, 255, 0.08);
        --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    }
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--duration-normal) var(--ease-out-expo), color var(--duration-normal) var(--ease-out-expo);
}

/* Scrollbar tipo MacOS para todos los navegadores */
::-webkit-scrollbar {
    width: 12px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
    border-left: 1px solid var(--border-subtle);
}
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: var(--radius-full);
    border: 3px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary);
}

/* Selección de texto épica */
::selection {
    background: var(--brand-primary);
    color: #ffffff;
    text-shadow: none;
}

/* Media básica */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--duration-fast) var(--ease-out-expo);
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font: inherit;
    border: none;
    background: none;
    outline: none;
}

/* ==========================================================================
   4. CLASES UTILITARIAS (TIPO TAILWIND)
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding-inline: var(--space-4);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: var(--space-4); }
.gap-8 { gap: var(--space-8); }

.hidden { display: none !important; }

/* ==========================================================================
   5. PANTALLA DE CARGA (PRELOADER CINEMÁTICO)
   ========================================================================== */
#preloader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: #000000;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.8s var(--ease-in-out-circ), visibility 0.8s;
}

.loader-brand {
    font-size: var(--text-4xl);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 4px;
    margin-bottom: var(--space-8);
    animation: textFocus 2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.loader-progress-wrap {
    width: 250px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
}

.loader-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, transparent, var(--brand-primary), transparent);
    animation: progressSlide 1.5s ease-in-out infinite;
}

/* ==========================================================================
   6. BARRA DE LECTURA E INDICADORES (SCROLL)
   ========================================================================== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), #00ff80);
    z-index: 100001; /* Siempre arriba del header */
    box-shadow: var(--shadow-glow);
    transition: width 0.1s linear;
}

/* ==========================================================================
   7. CINTILLO DE NOTICIAS (TICKER MARQUEE)
   ========================================================================== */
.ticker-section {
    background-color: #000000;
    color: #ffffff;
    height: 48px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--brand-primary);
    z-index: 999;
}

.ticker-label-box {
    background-color: var(--brand-primary);
    color: #ffffff;
    font-weight: 900;
    padding: 0 var(--space-8);
    height: 100%;
    display: flex;
    align-items: center;
    position: absolute;
    left: 0;
    z-index: 10;
    text-transform: uppercase;
    font-size: var(--text-sm);
    letter-spacing: 1.5px;
    box-shadow: 10px 0 20px rgba(0,0,0,0.5);
}

/* Flecha decorativa del label */
.ticker-label-box::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 24px solid transparent;
    border-bottom: 24px solid transparent;
    border-left: 12px solid var(--brand-primary);
}

.ticker-track {
    display: flex;
    white-space: nowrap;
    animation: scrollTicker 40s linear infinite;
    padding-left: 200px; /* Offset para el label */
}

.ticker-track:hover {
    animation-play-state: paused; /* Se detiene al leer */
}

.ticker-item {
    margin-right: var(--space-12);
    font-size: var(--text-sm);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.ticker-item::before {
    content: "⚡";
    color: var(--brand-primary);
    font-size: 1rem;
}

/* ==========================================================================
   8. CABECERA GLASSMORPHISM (STICKY NAVIGATION)
   ========================================================================== */
.site-header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--glass-shadow);
    transition: transform var(--duration-normal) var(--ease-out-expo), background var(--duration-normal);
}

/* Ocultar header al hacer scroll hacia abajo (Smart Header) */
.site-header.scroll-down {
    transform: translateY(-100%);
}
.site-header.scroll-up {
    transform: translateY(0);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.brand-logo h1 {
    font-size: var(--text-3xl);
    font-weight: 900;
    letter-spacing: -2px;
    margin: 0;
    background: linear-gradient(135deg, var(--text-heading) 0%, var(--brand-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

/* Efecto de brillo en el logo al pasar el mouse */
.brand-logo h1::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
    opacity: 0;
}
.brand-logo:hover h1::after {
    left: 150%;
    opacity: 1;
}

.desktop-nav ul {
    display: flex;
    gap: var(--space-8);
}

.desktop-nav a {
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding: var(--space-2) 0;
    display: inline-block;
    overflow: hidden;
}

/* Animación de subrayado magnético */
.desktop-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--brand-primary);
    transform: translateX(-101%);
    transition: transform var(--duration-normal) var(--ease-out-expo);
}
.desktop-nav a:hover::before {
    transform: translateX(0);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

/* Botón "En Vivo" con efecto Shimmer y Pulse */
.btn-live-stream {
    position: relative;
    background: var(--brand-accent);
    color: #ffffff;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    overflow: hidden;
    box-shadow: 0 0 20px var(--brand-accent-glow);
    animation: pulseRed 2.5s infinite;
}

.btn-live-stream .dot {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
}

/* ==========================================================================
   9. LAYOUT PRINCIPAL Y BENTO GRID AVANZADO
   ========================================================================== */
.main-content-wrapper {
    padding-top: var(--space-12);
    padding-bottom: var(--space-24);
    display: grid;
    grid-template-columns: 1fr 380px; /* Columna principal + Sidebar ancho */
    gap: var(--space-12);
    align-items: start;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 220px; /* Altura base para el bento */
    gap: var(--space-6);
}

/* ==========================================================================
   10. TARJETAS DE NOTICIAS (CARDS)
   ========================================================================== */
.post-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform var(--duration-normal) var(--ease-out-expo), 
                box-shadow var(--duration-normal) var(--ease-out-expo),
                border-color var(--duration-fast);
}

.post-card:hover {
    transform: translateY(-8px) scale(1.005);
    box-shadow: var(--shadow-xl);
    border-color: var(--brand-primary-alpha);
    z-index: 10;
}

/* Contenedor de la imagen con Overlay inteligente */
.card-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    background-color: var(--bg-surface-elevated);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.post-card:hover .card-media img {
    transform: scale(1.08) rotate(1deg);
}

/* Gradiente de lectura (Se oscurece más al hacer hover) */
.card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0) 100%);
    transition: opacity var(--duration-normal);
}
.post-card:hover .card-overlay {
    opacity: 0.8;
}

/* Contenido de la tarjeta */
.card-content {
    position: relative;
    z-index: 3;
    padding: var(--space-8);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff; /* El texto siempre es blanco por el overlay */
}

/* Insignias / Categorías */
.card-badge {
    align-self: flex-start;
    background: var(--brand-primary);
    color: #ffffff;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-glow);
    text-transform: uppercase;
}

/* Variantes de insignias */
.card-badge.breaking { background: var(--brand-accent); box-shadow: 0 0 15px var(--brand-accent-glow); }
.card-badge.opinion { background: #6366f1; box-shadow: 0 0 15px rgba(99, 102, 241, 0.4); }
.card-badge.sports { background: #f59e0b; box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); }

.card-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 var(--space-2) 0;
    text-wrap: balance;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.card-excerpt {
    font-size: var(--text-base);
    color: #d1d5db;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* Animación de revelado del excerpt */
    max-height: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.post-card:hover .card-excerpt {
    max-height: 100px;
    opacity: 1;
    transform: translateY(0);
    margin-top: var(--space-4);
}

/* ==========================================================================
   11. JERARQUÍA BENTO (TAMAÑOS DINÁMICOS)
   ========================================================================== */

/* 1. Tarjeta Hero (La Nota Principal - Gigante) */
.bento-hero {
    grid-column: span 12;
    grid-row: span 3; /* Ocupa 3 filas de alto */
    border-radius: var(--radius-xl);
}
.bento-hero .card-title { font-size: var(--text-5xl); letter-spacing: -1.5px; }
.bento-hero .card-excerpt { -webkit-line-clamp: 3; font-size: var(--text-lg); }
.bento-hero .card-content { padding: var(--space-12); }

/* 2. Tarjetas Estándar (Noticias Secundarias) */
.bento-standard {
    grid-column: span 6;
    grid-row: span 2;
}
.bento-standard .card-title { font-size: var(--text-2xl); }

/* 3. Tarjetas Altas (Formato Retrato / Stories) */
.bento-tall {
    grid-column: span 4;
    grid-row: span 3;
}
.bento-tall .card-title { font-size: var(--text-xl); }

/* 4. Tarjetas Pequeñas (Relleno de Grid) */
.bento-small {
    grid-column: span 4;
    grid-row: span 1;
    /* Estas no tienen imagen de fondo, son de lectura rápida */
    background: var(--bg-surface);
    color: var(--text-heading);
}
.bento-small .card-media, .bento-small .card-overlay { display: none; }
.bento-small .card-content { 
    color: var(--text-heading); 
    padding: var(--space-4) var(--space-6); 
    justify-content: center;
}
.bento-small .card-title {
    font-size: var(--text-lg);
    text-shadow: none;
    color: var(--text-heading);
}
.bento-small .card-excerpt { display: none; } /* Ocultamos excerpt en chicas */
.bento-small .card-badge {
    color: var(--brand-primary);
    background: var(--brand-primary-alpha);
    box-shadow: none;
}
.bento-small:hover {
    background: var(--brand-primary);
}
.bento-small:hover .card-content, 
.bento-small:hover .card-title,
.bento-small:hover .card-badge {
    color: #ffffff;
}

/* ==========================================================================
   12. BARRA LATERAL (SIDEBAR PROFESIONAL)
   ========================================================================== */
.sidebar-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    position: sticky;
    top: 120px; /* Se queda pegada al hacer scroll */
}

.widget-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-fast);
}
.widget-box:hover { box-shadow: var(--shadow-md); }

.widget-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--border-subtle);
    position: relative;
}
.widget-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30%;
    height: 2px;
    background: var(--brand-primary);
}
.widget-header h3 {
    font-size: var(--text-xl);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Widget: Lo Más Leído (Trending List) */
.trending-list {
    counter-reset: trending-counter;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.trending-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    position: relative;
    padding-bottom: var(--space-4);
    border-bottom: 1px dashed var(--border-subtle);
    transition: transform var(--duration-fast);
}
.trending-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.trending-item:hover {
    transform: translateX(5px);
}

.trending-item::before {
    counter-increment: trending-counter;
    content: "0" counter(trending-counter);
    font-size: var(--text-3xl);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 1px var(--border-strong);
    line-height: 0.8;
    transition: all var(--duration-normal);
}
.trending-item:hover::before {
    -webkit-text-stroke: 1px var(--brand-primary);
    color: var(--brand-primary-alpha);
}

.trending-text h4 {
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
    color: var(--text-heading);
}

/* Widget: Publicidad (Ad Space) */
.ad-space {
    background: var(--bg-base);
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md);
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: var(--text-xs);
    position: relative;
    overflow: hidden;
}
.ad-space::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmerAd 3s infinite;
}

/* Widget: Boletín (Newsletter) */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.newsletter-form input[type="email"] {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-body);
    font-size: var(--text-sm);
    transition: border-color var(--duration-fast);
}
.newsletter-form input[type="email"]:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--brand-primary-alpha);
}
.newsletter-btn {
    background: var(--text-heading);
    color: var(--bg-surface);
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--duration-fast);
}
.newsletter-btn:hover { background: var(--brand-primary); }

/* ==========================================================================
   13. ANIMACIONES ON-SCROLL (REVEAL ENGINE)
   ========================================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
    will-change: opacity, transform;
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger effect para elementos del Grid */
.bento-grid > :nth-child(1) { transition-delay: 0ms; }
.bento-grid > :nth-child(2) { transition-delay: 100ms; }
.bento-grid > :nth-child(3) { transition-delay: 200ms; }
.bento-grid > :nth-child(4) { transition-delay: 300ms; }
.bento-grid > :nth-child(5) { transition-delay: 400ms; }

/* ==========================================================================
   14. MEGA FOOTER CINEMÁTICO (ORBES Y CRISTAL)
   ========================================================================== */
.site-footer {
    position: relative;
    background: #000000;
    color: #ffffff;
    padding: var(--space-24) 0 var(--space-8);
    overflow: hidden;
    margin-top: var(--space-24);
    border-top: 1px solid #1a1a1a;
}

/* Orbes de luz de fondo para el footer */
.footer-orb-1, .footer-orb-2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
}
.footer-orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--brand-primary-dark) 0%, transparent 70%);
    bottom: -250px; right: -100px;
}
.footer-orb-2 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,0,51,0.2) 0%, transparent 70%);
    top: -100px; left: -100px;
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-16);
}

.footer-brand h2 {
    font-size: var(--text-4xl);
    font-weight: 900;
    margin: 0 0 var(--space-4) 0;
    background: linear-gradient(90deg, #ffffff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.footer-brand p {
    color: var(--text-muted);
    font-size: var(--text-base);
    max-width: 80%;
}

.footer-col h4 {
    color: var(--brand-primary);
    font-size: var(--text-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-6);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-col a {
    color: #9ca3af;
    font-size: var(--text-sm);
    position: relative;
    padding-left: 0;
    transition: all var(--duration-fast);
}
.footer-col a::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    color: var(--brand-primary);
    transition: all var(--duration-fast);
}
.footer-col a:hover {
    color: #ffffff;
    padding-left: 15px;
}
.footer-col a:hover::before {
    left: 0;
    opacity: 1;
}

.footer-bottom {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* ==========================================================================
   15. SISTEMA DE KEYFRAMES (ANIMACIONES MAESTRAS)
   ========================================================================== */
@keyframes scrollTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes textFocus {
    0% { filter: blur(4px); opacity: 0.5; }
    100% { filter: blur(0); opacity: 1; text-shadow: 0 0 20px rgba(255,255,255,0.8); }
}

@keyframes progressSlide {
    0% { left: -30%; }
    100% { left: 100%; }
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 51, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 0, 51, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 51, 0); }
}

@keyframes shimmerAd {
    0% { transform: translateX(-150%) rotate(45deg); }
    100% { transform: translateX(150%) rotate(45deg); }
}

/* Accesibilidad: Reducir movimiento si el usuario lo prefiere en su OS */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   16. MEDIA QUERIES (SISTEMA RESPONSIVO PERFECTO)
   ========================================================================== */

/* Laptops y Monitores Pequeños (max-width: 1200px) */
@media (max-width: 1200px) {
    .main-content-wrapper {
        grid-template-columns: 1fr 320px;
        gap: var(--space-8);
    }
    
    .bento-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

/* Tablets Landscape (max-width: 1024px) */
@media (max-width: 1024px) {
    .main-content-wrapper {
        grid-template-columns: 1fr; /* Sidebar cae abajo */
    }
    
    .sidebar-area {
        position: relative;
        top: 0;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bento-hero { grid-column: span 12; grid-row: span 2; }
    .bento-standard { grid-column: span 6; grid-row: span 2; }
    .bento-tall { grid-column: span 6; grid-row: span 2; }
    .bento-small { grid-column: span 6; grid-row: span 1; }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets Portrait & Móviles Grandes (max-width: 768px) */
@media (max-width: 768px) {
    .desktop-nav {
        display: none; /* Aquí iría un botón de menú hamburguesa */
    }
    
    .ticker-label-box {
        padding: 0 var(--space-4);
        font-size: 0.7rem;
    }
    
    .bento-grid {
        display: flex;
        flex-direction: column;
    }
    
    .post-card {
        min-height: 350px;
    }
    
    .bento-small {
        min-height: 150px;
    }
    
    .sidebar-area {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

/* Teléfonos Pequeños (max-width: 480px) */
@media (max-width: 480px) {
    .header-inner {
        height: 70px;
    }
    
    .brand-logo h1 {
        font-size: var(--text-2xl);
    }
    
    .btn-live-stream span {
        display: none; /* Oculta el texto "En vivo", deja solo el punto rojo */
    }
    
    .card-content {
        padding: var(--space-4);
    }
    
    .post-card:hover .card-excerpt {
        max-height: 0;
        opacity: 0; /* En móvil no activamos el hover del texto por espacio */
    }
}


/* ==========================================================================
   17. WIDGET DE HORA Y CLIMA (GÓMEZ PALACIO)
   ========================================================================== */
.live-status-widget {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    gap: var(--space-4);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.status-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: 0.5px;
}

.status-icon {
    font-size: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,153,77,0.2));
}

.weather-city {
    color: var(--brand-primary);
    text-transform: uppercase;
    font-size: 0.65rem;
    background: var(--brand-primary-alpha);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.status-divider {
    width: 1px;
    height: 16px;
    background: var(--border-strong);
    opacity: 0.5;
}

/* Ajuste Dark Mode automático */
@media (prefers-color-scheme: dark) {
    .live-status-widget {
        background: rgba(255, 255, 255, 0.03);
    }
}

/* Ocultar en celulares muy pequeños para que no rompa el diseño */
@media (max-width: 768px) {
    .live-status-widget {
        display: none;
    }
}