:root {
    --bg-dark: #0f172a;
    /* Azul muy oscuro, más elegante que el negro puro */
    --card-bg: rgba(30, 41, 59, 0.7);
    /* Glassmorphism base */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-primary: #38bdf8;
    /* Sky 400 */
    --accent-secondary: #818cf8;
    /* Indigo 400 */
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.85);
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --radius-lg: 24px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    /* Texto más nítido en Mac */
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.8;
    /* Mejor legibilidad */
    font-size: 18px;
    /* Base más grande para lectura cómoda */
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo,
.btn {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
    /* Toque moderno */
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Header Premium --- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    /* Fondo Blanco */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    transition: transform 0.3s ease;
}

/* Clase para ocultar header al bajar (JS required) */
header.scrolled-down {
    transform: translateY(-100%);
}

/* --- Header & Navigation --- */
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    /* Evitar que baje */
    height: 60px;
    position: relative;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 200px;
    /* Límite de seguridad */
    object-fit: contain;
    display: block;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    gap: 2rem;
}

.menu-toggle {
    display: none;
    /* Oculto en desktop grande */
}

/* --- RESPONSIVE (Tablets y Móviles) --- */
@media (max-width: 1024px) {
    .nav-menu {
        display: none;
        /* Ocultar menú normal */
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
        padding: 10px;
        /* OPCIÓN NUCLEAR: Posición Absoluta */
        position: absolute;
        right: 1.5rem;
        /* Pegado a la derecha (coincide con padding del container) */
        top: 50%;
        transform: translateY(-50%);
    }

    .logo {
        margin-right: auto;
        /* Forzar logo a la izquierda */
        display: flex;
        align-items: center;
    }

    .logo img {
        max-width: 140px;
        /* Un pelín más pequeño para asegurar que cabe */
        object-position: left center;
        /* Alineación interna de la imagen */
    }

    .menu-toggle span {
        display: block;
        width: 30px;
        height: 3px;
        background-color: #0f172a;
        /* Hamburguesa oscura */
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Hamburger Animation */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    /* Menú Desplegable */
    .nav-menu.active {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }

    .nav-menu.active .nav-link {
        font-size: 2rem;
        margin-bottom: 2rem;
        color: #fff;
        /* En el menú desplegable (fondo oscuro) sigue blanco */
    }

    /* Layout Vertical Forzado */
    .hero-card {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .hero-image-wrapper {
        width: 100%;
        aspect-ratio: 16/9;
    }

    .news-grid {
        grid-template-columns: 1fr;
        /* Una sola columna */
        gap: 2rem;
    }

    .container {
        padding: 1rem;
    }
}

/* --- Layout --- */
.container {
    max-width: 1100px;
    /* Un poco más estrecho para mejor lectura */
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* --- Hero Section (Portada Real) --- */
.hero-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 4rem;
    position: relative;
}

.hero-image-wrapper {
    width: 100%;
    aspect-ratio: 21/9;
    /* Panorámico de cine */
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--glass-border);
    position: relative;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.hero-category {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: 3.5rem;
    /* Título Gigante */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to bottom, #fff 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-excerpt {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Ajuste Móvil para la Portada */
@media (max-width: 768px) {
    .hero-image-wrapper {
        aspect-ratio: 16/9;
        /* Más alto en móvil */
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-excerpt {
        font-size: 1.1rem;
    }
}

.nav-link {
    color: #1e293b;
    /* Color oscuro para fondo blanco */
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
    gap: 8px;
}

.read-more:hover {
    gap: 12px;
    /* Animación sutil */
}

/* --- Grid de Noticias --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 40px -10px rgba(56, 189, 248, 0.15);
}

.card-image-wrapper {
    height: 220px;
    overflow: hidden;
    position: relative;
}

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

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

.card-content {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

.card-title a:hover {
    color: var(--accent-primary);
}

/* --- Página de Artículo (Lectura Zen) --- */
.article-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.article-title {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.article-content {
    max-width: 720px;
    /* Ancho óptimo para lectura (60-75 caracteres por línea) */
    margin: 0 auto;
    font-size: 1.25rem;
    /* Letra grande */
    color: #e2e8f0;
}

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

.article-content h2 {
    font-size: 2rem;
    margin: 3.5rem 0 1.5rem;
    color: #fff;
    border-left: 4px solid var(--accent-primary);
    padding-left: 1rem;
}

/* --- Mobile First Adjustments --- */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        /* Ajuste ligero para móvil */
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
        padding: 0.5rem 1rem;
    }

    /* Menú móvil estilo "Stories" */
    .nav-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
        gap: 1.5rem;
        -webkit-overflow-scrolling: touch;
        /* Scroll suave en iOS */
        scrollbar-width: none;
        /* Ocultar scrollbar Firefox */
    }

    .nav-menu::-webkit-scrollbar {
        display: none;
        /* Ocultar scrollbar Chrome/Safari */
    }

    .nav-link {
        white-space: nowrap;
        /* Evitar saltos de línea */
        font-size: 0.95rem;
        padding: 4px 0;
    }

    .hero-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .article-title {
        font-size: 2.2rem;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .card-content {
        padding: 1.5rem;
    }
}

/* --- Footer --- */
.site-footer {
    background: #020617;
    border-top: 1px solid var(--glass-border);
    padding: 5rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-links h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.2s;
}

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

/* --- AdSense Placeholders (Estilo Sutil) --- */
.ad-placeholder,
.ad-in-article,
.ad-placeholder-bottom {
    background: repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.03),
            rgba(255, 255, 255, 0.03) 10px,
            rgba(255, 255, 255, 0.05) 10px,
            rgba(255, 255, 255, 0.05) 20px) !important;
    border: 1px dashed rgba(255, 255, 255, 0.1) !important;
}

/* --- Video Wrapper (16:9) --- */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #000;
    margin: 2.5rem 0;
    box-shadow: var(--shadow-soft);
}

.video-wrapper iframe,
.video-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Subscription Bell --- */
.sub-bell {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
    z-index: 9000;
    transition: all 0.3s ease;
}

.sub-bell:hover {
    transform: scale(1.1);
    background: var(--accent-secondary);
}

.sub-bell svg {
    width: 24px !important;
    height: 24px !important;
    fill: white;
    display: block;
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    /* Oculto inicialmente */
    width: 90%;
    max-width: 600px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cookie-icon {
    font-size: 2rem;
}

.cookie-text {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--accent-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(56, 189, 248, 0.3);
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-cookie {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.btn-accept {
    background: var(--accent-primary);
    color: #0f172a;
    /* Texto oscuro para contraste */
    border: none;
}

.btn-accept:hover {
    background: #fff;
    transform: translateY(-2px);
}

.btn-reject {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
}

.btn-reject:hover {
    border-color: #fff;
    color: #fff;
}

@media (min-width: 768px) {
    .cookie-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .cookie-actions {
        flex-shrink: 0;
    }
}