/* ==========================================================================
   Indicador Político — Rediseño UX/UI Editorial Mobile-First
   Pure White Background, Abundant Whitespace, Serif Headlines & Subtle Shadows
   ========================================================================== */

:root {
    /* Superficie y Fondos */
    --bg-body: #ffffff;
    --surface: #ffffff;
    --surface-subtle: #f8fafc;
    --surface-hover: #f1f5f9;
    --border: #e2e8f0;
    --border-subtle: #f1f5f9;

    /* Colores Editoriales */
    --text-primary: #0f172a;
    --text-body: #334155;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;

    /* Acentos Noti Guerrero (Morado Institucional & Garras) */
    --primary: #7e22ce;
    --primary-dark: #6b21a8;
    --accent-orange: #9333ea;
    --accent-orange-hover: #7e22ce;
    --accent-purple: #a855f7;
    --accent-blue: #1877f2;

    /* Tipografías */
    --font-serif: 'Playfair Display', 'Merriweather', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Sombras Sutiles */
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-interactive-hover: 0 6px 20px rgba(0, 0, 0, 0.07);
    --shadow-button-hover: 0 4px 14px rgba(0, 0, 0, 0.08);

    /* Radios de Borde */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    /* Transiciones */
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Modo Oscuro Elegante (Dark Mode)
   ========================================================================== */
[data-theme="dark"] {
    --bg-body: #090d16;
    --surface: #111827;
    --surface-subtle: #1e293b;
    --surface-hover: #334155;
    --border: #1e293b;
    --border-subtle: #1e293b;

    --text-primary: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #475569;

    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-interactive-hover: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* Reset Global */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-body);
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* Contenedor Principal con Generoso Whitespace */
.container {
    width: 100%;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ==========================================================================
   1. Cabecera (Header Sticky)
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    height: 66px;
    display: flex;
    align-items: center;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Logo de Marca Oficial Noti Guerrero */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-logo-icon {
    height: 42px;
    width: 42px;
    object-fit: cover;
    border-radius: 8px;
    display: none;
}

.brand-logo-full {
    height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 640px) {
    .brand-logo-icon {
        display: block;
    }
    .brand-logo-full {
        display: none;
    }
}
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
    letter-spacing: -0.3px;
}

.brand-sub {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* Acciones en Header (Móvil / Desktop) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: var(--text-primary);
    background: transparent;
    transition: var(--transition);
}

.header-icon-btn:hover {
    background: var(--surface-subtle);
    box-shadow: var(--shadow-card);
}

/* Menú de Navegación */
.main-nav {
    display: none;
}

@media (min-width: 900px) {
    .main-nav {
        display: flex;
        align-items: center;
        gap: 24px;
        list-style: none;
    }
    .main-nav li a {
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-body);
        padding: 6px 2px;
        position: relative;
    }
    .main-nav li a:hover,
    .main-nav li a.active {
        color: var(--text-primary);
    }
    .main-nav li a.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--accent-orange);
        border-radius: 2px;
    }
    .nav-toggle-btn {
        display: none;
    }
}

/* Menú Móvil Desplegable */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: 290;
    display: none;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: #ffffff;
    z-index: 300;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    transition: right 0.3s ease;
}

.mobile-nav-drawer.open {
    right: 0;
}

.mobile-nav-close {
    align-self: flex-end;
    font-size: 1.4rem;
    padding: 6px 10px;
    color: var(--text-muted);
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mobile-nav-links a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: var(--surface-subtle);
    color: var(--accent-orange);
}

/* Barra de Búsqueda Flotante */
.search-modal {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    z-index: 190;
    display: none;
}

.search-modal.active {
    display: block;
}

.search-input-wrap {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-input-wrap input {
    flex: 1;
    padding: 12px 18px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    outline: none;
}

.search-input-wrap input:focus {
    border-color: var(--text-primary);
}

.search-input-wrap button {
    padding: 12px 24px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-card);
}

.search-input-wrap button:hover {
    box-shadow: var(--shadow-button-hover);
}

/* ==========================================================================
   2. Metadatos Discretos
   ========================================================================== */
.article-meta-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

/* Píldora de Categoría */
.category-pill {
    display: inline-block;
    background: linear-gradient(135deg, #fb923c, var(--accent-orange));
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.28);
    transition: var(--transition);
}

.category-pill:hover {
    background: var(--accent-orange-hover);
    box-shadow: var(--shadow-button-hover);
}

.article-meta-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   3. Flujo Principal de Lectura (Vista Artículo)
   ========================================================================== */
.article-wrapper {
    max-width: 820px;
    margin: 32px auto 60px auto;
}

/* 1. Fotografía Principal (Lead Visual) */
.article-lead-visual {
    margin-bottom: 24px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
}

.article-lead-img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

.article-photo-credit {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: right;
}

/* 2. Titular de la Noticia */
.article-headline {
    font-family: var(--font-serif);
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 28px;
}

@media (min-width: 768px) {
    .article-headline {
        font-size: 2.65rem;
    }
}

/* 3. Cuerpo del Artículo */
.article-content {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--text-body);
    margin-bottom: 40px;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content p:last-child {
    margin-bottom: 0;
}

/* Video Orgánico Incrustado */
.article-inline-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin: 32px 0;
    background: #000;
}

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

/* 4. Módulo de Reacciones Minimalista */
.reactions-module {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    margin: 32px 0 20px 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
}

.reaction-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reaction-item.likes { color: #2563eb; }
.reaction-item.comments { color: #0284c7; }
.reaction-item.shares { color: #475569; }

/* 5. Botón de Fuente Original */
.original-source-wrap {
    margin: 18px 0 32px 0;
}

.btn-source-original {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--surface-subtle);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.btn-source-original:hover {
    background: #ffffff;
    border-color: var(--text-primary);
    box-shadow: var(--shadow-interactive-hover);
    transform: translateY(-1px);
}

@media (min-width: 600px) {
    .btn-source-original {
        max-width: 380px;
        margin: 0 auto;
    }
}

/* 6. Botonera para Compartir */
.share-section {
    margin: 32px 0;
}

.share-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.share-buttons-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-btn-circle {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.share-btn-circle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}

.share-btn-circle.whatsapp { background: #25D366; }
.share-btn-circle.facebook { background: #1877F2; }
.share-btn-circle.x-twitter { background: #000000; }
.share-btn-circle.telegram { background: #229ED9; }

/* 7. Sección de Comentarios Minimalista */
.comments-section {
    margin: 40px 0 60px 0;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
}

.comments-title {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.comment-box-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    resize: vertical;
    transition: var(--transition);
}

.comment-textarea:focus {
    background: #ffffff;
    border-color: var(--text-primary);
    box-shadow: var(--shadow-card);
}

.btn-submit-comment {
    align-self: flex-start;
    padding: 11px 22px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.btn-submit-comment:hover {
    box-shadow: var(--shadow-button-hover);
    transform: translateY(-1px);
}

/* ==========================================================================
   4. Noticias Relacionadas (Grid 2 columnas móvil / 3-4 columnas PC)
   ========================================================================== */
.related-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-subtle);
}

.section-headline {
    font-family: var(--font-serif);
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.3px;
}

/* Cuadrícula Responsiva Estricta: 2 cols móvil / 3 cols desktop / 4 cols wide */
.news-grid-responsive {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .news-grid-responsive {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}

@media (min-width: 1100px) {
    .news-grid-responsive {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* Tarjeta de Noticia (Interactive Drop-Shadow Exclusiva al Hover) */
.editorial-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
}

.editorial-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-orange), #fb923c);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.editorial-card:hover {
    box-shadow: var(--shadow-interactive-hover);
    border-color: var(--border);
    transform: translateY(-3px);
}

.editorial-card:hover::after { transform: scaleX(1); }

.card-image-wrap {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #0f172a;
}

@media (min-width: 768px) {
    .card-image-wrap {
        height: 170px;
    }
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.editorial-card:hover .card-image {
    transform: scale(1.04);
}

.card-body {
    padding: 14px 14px 16px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-pill {
    align-self: flex-start;
    background: linear-gradient(135deg, #fb923c, var(--accent-orange));
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
}

/* Título de Tarjeta: TRUNCADO ESTRICTAMENTE A 3 LÍNEAS */
.card-title {
    font-family: var(--font-serif);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(0.96rem * 1.35 * 3);
}

.editorial-card:hover .card-title {
    color: var(--accent-orange);
}

.card-footer {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Botón Inferior "Cargar Más" */
.load-more-wrap {
    margin: 48px 0 20px 0;
    text-align: center;
}

.btn-load-more {
    display: inline-block;
    padding: 13px 32px;
    background: var(--surface-subtle);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.btn-load-more:hover {
    background: #ffffff;
    border-color: var(--text-primary);
    box-shadow: var(--shadow-button-hover);
    transform: translateY(-1px);
}

/* ==========================================================================
   5. Portada (Home) — Hero Editorial y Layout
   ========================================================================== */
.home-hero-grid {
    margin: 32px 0 48px 0;
}

.hero-lead-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.hero-lead-card:hover {
    box-shadow: var(--shadow-interactive-hover);
}

.hero-lead-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

@media (min-width: 768px) {
    .hero-lead-img {
        height: 480px;
    }
}

.hero-lead-card:hover .hero-lead-img {
    transform: scale(1.02);
}

.hero-lead-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 24px 24px 24px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(15,23,42,0.88) 100%);
    color: #ffffff;
}

.hero-lead-title {
    font-family: var(--font-serif);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 10px 0 10px 0;
    color: #ffffff;
}

@media (min-width: 768px) {
    .hero-lead-title {
        font-size: 2.1rem;
    }
}

/* Footer Minimalista */
.site-footer {
    margin-top: 80px;
    padding: 40px 0 32px 0;
    border-top: 1px solid var(--border-subtle);
    background: #ffffff;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Contenedores Fluidos de Video & Reels de Facebook (Sistema Aspect Ratio)
   ========================================================================== */
.fb-video-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000000;
    border-radius: 8px;
}

.fb-video-wrapper.ratio-horizontal {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.fb-video-wrapper.ratio-vertical {
    aspect-ratio: 9 / 16;
    width: 100%;
}

/* ==========================================================================
   Estructura Estricta de Capas: Tarjeta Reel Inmersiva (Estilo TikTok / FB Reels)
   ========================================================================== */
.reel-card-layout {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 9 / 16; /* Fuerza el rectángulo vertical perfecto */
    margin: 0 auto 30px auto;
    background-color: #000000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* El video debe ocupar absolutamente todo el fondo */
.reel-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.reel-video-background iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* El texto debe flotar encima del video en la parte inferior */
.reel-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
    padding: 60px 20px 20px 20px;
    /* Degradado para que el texto blanco sea legible sobre el video */
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0.95) 100%);
    color: #ffffff;
    box-sizing: border-box;
    pointer-events: none;
}

.reel-text-overlay a, 
.reel-text-overlay button {
    pointer-events: auto;
}

.reel-badge {
    display: inline-block;
    background: rgba(225, 29, 72, 0.9);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.reel-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 6px 0;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.reel-title a {
    color: #ffffff;
    text-decoration: none;
}

.reel-title a:hover {
    text-decoration: underline;
}

.reel-excerpt {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.88);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Ajuste para los botones flotantes de WhatsApp/FB */
.reel-floating-actions {
    position: absolute;
    right: 15px;
    bottom: 120px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reel-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.reel-action-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.85);
}

/* ==========================================================================
   Padding Hack Infalible para Videos y Reels de Facebook
   ========================================================================== */
/* Limpia cualquier altura fija en el contenedor padre de la tarjeta multimedia */
.card-multimedia, 
.card-multimedia .card-img-top,
.card-multimedia .media-wrapper,
.editorial-card,
.editorial-card .card-image-wrap {
    height: auto !important; 
    max-height: none !important;
}

/* Base del contenedor responsivo */
.fb-video-box {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 8px 8px 0 0;
}

/* Proporción para videos horizontales (16:9) */
.fb-video-box.is-horizontal {
    padding-bottom: 56.25%; /* (9 / 16) * 100 */
}

/* Proporción para Reels verticales (9:16) */
.fb-video-box.is-vertical {
    padding-bottom: 177.77%; /* (16 / 9) * 100 */
}

/* El reproductor se estira al tamaño exacto de su caja */
.fb-video-box iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* Contenedores de respaldo complementarios */
.fb-responsive-wrapper {
    position: relative !important;
    width: 100% !important;
    overflow: hidden !important;
    background: #000 !important;
    border-radius: 8px 8px 0 0 !important; 
}

.fb-horizontal {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
}

.fb-vertical {
    aspect-ratio: 9 / 16 !important;
    height: auto !important;
    max-height: 65vh !important;
}

.fb-responsive-wrapper iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

/* ==========================================================================
   Nube de Etiquetas (Tag Cloud) — clases dedicadas
   ========================================================================== */
.tag-cloud-section {
    margin: 48px 0 36px 0;
    padding: 28px 24px;
    background: var(--surface-subtle);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.tag-cloud-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.tag-cloud-item--major {
    background: #ffffff;
    border-color: var(--text-primary);
    font-weight: 700;
    font-size: 0.92rem;
}

.tag-cloud-item:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-button-hover);
}

.tag-cloud-count {
    font-size: 0.72rem;
    opacity: 0.75;
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.tag-cloud-item:hover .tag-cloud-count { background: rgba(255, 255, 255, 0.2); }

/* ==========================================================================
   Footer — refinamiento visual
   ========================================================================== */
.site-footer {
    position: relative;
}

.site-footer::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent-orange), var(--primary));
}

/* ==========================================================================
   Sidebar Editorial (Widgets) — estilos que faltaban en el tema
   ========================================================================== */
.sidebar-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.widget-title {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-subtle);
}

.sidebar-post-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.sidebar-post-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post-item:first-child { padding-top: 0; }

.sidebar-post-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: var(--transition);
}

.sidebar-post-item:hover .sidebar-post-img { transform: scale(1.04); }

.sidebar-post-title {
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-post-title a { color: var(--text-primary); }
.sidebar-post-title a:hover { color: var(--accent-orange); }

/* ==========================================================================
   Botones genéricos (usados en widgets como el buscador de sidebar)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #fb923c, var(--accent-orange));
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.38);
    transform: translateY(-1px);
}

.sidebar-search-form { display: flex; gap: 8px; }
.sidebar-search-input {
    flex-grow: 1;
    padding: 10px 12px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
    transition: var(--transition);
}
.sidebar-search-input:focus {
    outline: none;
    border-color: var(--accent-orange);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
.sidebar-search-btn { padding: 10px 16px; font-size: 0.85rem; }

/* ==========================================================================
   PWA & Componentes Interactivos Modernos
   ========================================================================== */

/* Barra de Progreso de Lectura */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #f97316, #e11d48);
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Badge En Vivo NotiGRR */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e11d48;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    letter-spacing: 0.5px;
    vertical-align: middle;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.82; transform: scale(0.96); }
}

/* Botón de Instalación PWA (Header) */
.btn-pwa-install {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(249, 115, 22, 0.35);
    transition: var(--transition);
}

.btn-pwa-install:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.45);
}

.btn-pwa-install-drawer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 12px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Botón Toggle Modo Oscuro */
.theme-toggle-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    background: var(--surface-hover);
    transform: rotate(15deg);
}

[data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: inline-block; }
[data-theme="light"] .theme-icon-dark { display: inline-block; }
[data-theme="light"] .theme-icon-light { display: none; }

/* Barra Inferior Móvil (Bottom App Bar) */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-subtle);
    z-index: 190;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .mobile-bottom-bar {
    background: rgba(17, 24, 39, 0.95);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.mobile-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    background: none;
    border: none;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-bottom-item .bottom-item-icon {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.mobile-bottom-item.active,
.mobile-bottom-item:hover {
    color: var(--accent-orange);
}

/* Toast Notificación PWA */
.pwa-toast {
    position: fixed;
    bottom: 74px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9990;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwa-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Enlaces multimedia del header */
.nav-multimedia-link {
    color: #e11d48 !important;
    font-weight: 700 !important;
}

/* Media Queries para Responsive Móvil */
@media (max-width: 768px) {
    body {
        padding-bottom: 68px; /* Espacio para no solapar el Bottom Bar */
    }
    .mobile-bottom-bar {
        display: flex;
    }
    .btn-pwa-install {
        display: none !important; /* En móvil se muestra en el Bottom Bar o Drawer */
    }
}

