/* ==========================================================================
   El Dato Hoy — Hoja de estilos principal
   Organización:
     1. Tokens de diseño y tema
     2. Reset y base
     3. Utilidades y layout
     4. Cabecera y navegación
     5. Tarjetas de nota
     6. Portada
     7. Artículo
     8. Barra lateral y componentes
     9. Formularios y botones
    10. Pie de página
    11. Publicidad
    12. Responsive
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
    /* Marca */
    --brand:        #E11D2E;
    --brand-dark:   #B00F1E;
    --brand-soft:   #FDECEE;
    --accent:       #FFB800;

    /* Texto y superficies (tema claro) */
    --bg:           #FFFFFF;
    --surface:      #F6F7F9;
    --surface-2:    #EDEFF3;
    --ink:          #10131A;
    --ink-2:        #39414F;
    --muted:        #6B7484;
    --line:         #E4E7EC;
    --line-strong:  #CFD5DE;

    /* Cabecera */
    --header-bg:    #FFFFFF;
    --topbar-bg:    #10131A;
    --topbar-ink:   #C7CCD6;

    /* Formas */
    --radius-sm:    6px;
    --radius:       10px;
    --radius-lg:    16px;

    /* Sombras */
    --shadow-sm:    0 1px 2px rgba(16, 19, 26, .06);
    --shadow:       0 4px 16px rgba(16, 19, 26, .08);
    --shadow-lg:    0 12px 32px rgba(16, 19, 26, .12);

    /* Medidas */
    --container:    1240px;
    --gap:          24px;

    /* Tipografía */
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
                 Arial, "Noto Sans", sans-serif;
    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
                  "Times New Roman", serif;

    color-scheme: light;
}

/* Tema oscuro: por preferencia del sistema… */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:          #0E1116;
        --surface:     #161A21;
        --surface-2:   #1E232C;
        --ink:         #F1F3F7;
        --ink-2:       #C3CAD6;
        --muted:       #8D96A6;
        --line:        #262C36;
        --line-strong: #333B48;
        --brand:       #FF4757;
        --brand-dark:  #E11D2E;
        --brand-soft:  #2A171B;
        --header-bg:   #0E1116;
        --topbar-bg:   #060809;
        --topbar-ink:  #9AA3B2;
        --shadow-sm:   0 1px 2px rgba(0, 0, 0, .4);
        --shadow:      0 4px 16px rgba(0, 0, 0, .45);
        --shadow-lg:   0 12px 32px rgba(0, 0, 0, .55);
        color-scheme: dark;
    }
}

/* …y por elección explícita del lector (el botón de la cabecera). */
:root[data-theme="dark"] {
    --bg:          #0E1116;
    --surface:     #161A21;
    --surface-2:   #1E232C;
    --ink:         #F1F3F7;
    --ink-2:       #C3CAD6;
    --muted:       #8D96A6;
    --line:        #262C36;
    --line-strong: #333B48;
    --brand:       #FF4757;
    --brand-dark:  #E11D2E;
    --brand-soft:  #2A171B;
    --header-bg:   #0E1116;
    --topbar-bg:   #060809;
    --topbar-ink:  #9AA3B2;
    --shadow-sm:   0 1px 2px rgba(0, 0, 0, .4);
    --shadow:      0 4px 16px rgba(0, 0, 0, .45);
    --shadow-lg:   0 12px 32px rgba(0, 0, 0, .55);
    color-scheme: dark;
}

/* 2. RESET Y BASE ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color .15s ease;
}
a:hover { color: var(--brand); }

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    line-height: 1.18;
    letter-spacing: -.022em;
    font-weight: 800;
    color: var(--ink);
    text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.9rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* Foco visible sólo para navegación por teclado */
:focus { outline: none; }
:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 3px;
}

::selection { background: var(--brand); color: #fff; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* 3. UTILIDADES Y LAYOUT --------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* Se oculta desplazándolo hacia arriba, no con left:-9999px: así no crea
   un desbordamiento horizontal del documento. */
.skip-link {
    position: absolute;
    left: 0;
    top: -100px;
    z-index: 999;
    background: var(--brand);
    color: #fff;
    padding: 12px 20px;
    font-weight: 700;
    border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; color: #fff; }

.section {
    margin-block: clamp(2rem, 4vw, 3.25rem);
}

/* Encabezado de sección con línea de color */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--line);
    position: relative;
}
.section-head::after {
    content: "";
    position: absolute;
    left: 0; bottom: -2px;
    width: 64px; height: 2px;
    background: var(--section-color, var(--brand));
}
.section-head h2 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -.02em;
}
.section-head .section-more {
    font-size: .875rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}
.section-head .section-more:hover { color: var(--brand); }

/* Rejillas */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.layout-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(24px, 3vw, 44px);
    align-items: start;
}

/* 4. CABECERA -------------------------------------------------------------- */
.topbar {
    background: var(--topbar-bg);
    color: var(--topbar-ink);
    font-size: .78rem;
    letter-spacing: .01em;
}
.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 34px;
}
/* El día ya viene capitalizado desde PHP; capitalize aquí rompería
   "4 de septiembre" convirtiéndolo en "4 De Septiembre". */
.topbar__date { text-transform: none; }
.topbar__links { display: flex; align-items: center; gap: 18px; }
.topbar a { color: var(--topbar-ink); }
.topbar a:hover { color: #fff; }

.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 68px;
}

/* Logotipo */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -.04em;
    color: var(--ink);
    flex-shrink: 0;
}
.logo:hover { color: var(--ink); }
.logo__mark {
    width: 38px; height: 38px;
    border-radius: 9px;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -.05em;
    flex-shrink: 0;
}
.logo__text { display: inline-flex; align-items: baseline; gap: .18em; }
.logo__accent {
    background: linear-gradient(transparent 62%, var(--accent) 62%, var(--accent) 92%, transparent 92%);
    padding-inline: 1px;
}

.header-spacer { flex: 1; }

/* Acciones de la cabecera */
.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.icon-btn:hover {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--brand);
}
.icon-btn svg { width: 19px; height: 19px; }

/* Buscador de la cabecera */
.header-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 240px;
}
.header-search input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: .9rem;
    font-family: inherit;
    transition: border-color .15s ease, background .15s ease;
}
.header-search input:focus {
    border-color: var(--brand);
    background: var(--bg);
}
.header-search input::placeholder { color: var(--muted); }
.header-search button {
    position: absolute;
    right: 4px;
    width: 32px; height: 32px;
    border: 0; border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: grid; place-items: center;
}
.header-search button:hover { color: var(--brand); }
.header-search svg { width: 17px; height: 17px; }

/* Navegación de secciones */
.site-nav {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 68px;
    z-index: 45;
}
.site-nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0; padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.site-nav__list::-webkit-scrollbar { display: none; }

.site-nav__link {
    display: block;
    padding: 13px 14px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink-2);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.site-nav__link:hover { color: var(--ink); }
.site-nav__link.is-active {
    color: var(--ink);
    border-bottom-color: var(--nav-color, var(--brand));
}

/* Menú desplegable "Más" */
.nav-more { position: relative; }
.nav-more__toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 13px 14px;
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--ink-2);
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}
.nav-more__toggle svg { width: 13px; height: 13px; transition: transform .2s ease; }
.nav-more[open] .nav-more__toggle svg { transform: rotate(180deg); }
.nav-more__panel {
    position: absolute;
    top: 100%; left: 0;
    min-width: 190px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 60;
}
.nav-more__panel a {
    display: block;
    padding: 9px 12px;
    font-size: .9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
}
.nav-more__panel a:hover { background: var(--surface); color: var(--brand); }

/* Menú móvil */
.mobile-menu { display: none; }
.mobile-menu[open] { display: block; }

/* Cinta de último momento */
.breaking {
    display: flex;
    align-items: stretch;
    background: var(--brand);
    color: #fff;
    overflow: hidden;
}
.breaking__label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, .22);
    white-space: nowrap;
    flex-shrink: 0;
}
.breaking__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .45; transform: scale(.8); }
}
.breaking__items {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 10px 16px;
    overflow-x: auto;
    scrollbar-width: none;
}
.breaking__items::-webkit-scrollbar { display: none; }
.breaking__items a {
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
}
.breaking__items a:hover { color: #fff; text-decoration: underline; }

/* 5. TARJETAS -------------------------------------------------------------- */
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.card__media {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--surface-2);
    aspect-ratio: 16 / 10;
    margin-bottom: 12px;
}
.card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.2, .7, .3, 1);
}
.card:hover .card__media img { transform: scale(1.045); }

.card__kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .075em;
    text-transform: uppercase;
    color: var(--kicker-color, var(--brand));
    margin-bottom: 7px;
}
.card__kicker::before {
    content: "";
    width: 14px; height: 2px;
    background: currentColor;
    flex-shrink: 0;
}

.card__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.018em;
    margin: 0 0 8px;
}
.card__title a { background-image: linear-gradient(var(--brand), var(--brand));
    background-size: 0 2px; background-repeat: no-repeat;
    background-position: 0 100%; transition: background-size .3s ease, color .15s ease; }
.card:hover .card__title a { background-size: 100% 2px; }

.card__excerpt {
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0 0 10px;
}

.card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .76rem;
    color: var(--muted);
    margin-top: auto;
}
.card__meta span { display: inline-flex; align-items: center; gap: 4px; }
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

/* Variante horizontal (imagen chica a la izquierda) */
.card--row {
    flex-direction: row;
    gap: 14px;
    align-items: flex-start;
}
.card--row .card__media {
    width: 116px;
    flex-shrink: 0;
    aspect-ratio: 4 / 3;
    margin-bottom: 0;
}
.card--row .card__title { font-size: .95rem; margin-bottom: 6px; }
.card--row .card__excerpt { display: none; }

/* Variante sin imagen, numerada (lo más leído) */
.card--rank {
    flex-direction: row;
    gap: 14px;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.card--rank:last-child { border-bottom: 0; padding-bottom: 0; }
.card--rank .card__num {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
    color: var(--line-strong);
    letter-spacing: -.05em;
    flex-shrink: 0;
    width: 30px;
}
.card--rank .card__title { font-size: .92rem; margin-bottom: 5px; }

/* Etiqueta flotante sobre la imagen */
.card__badge {
    position: absolute;
    top: 10px; left: 10px;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: rgba(16, 19, 26, .78);
    color: #fff;
    backdrop-filter: blur(6px);
}

/* 6. PORTADA --------------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: clamp(20px, 2.5vw, 36px);
    padding-top: clamp(20px, 3vw, 34px);
}

.hero__main .card__media { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
.hero__main .card__title {
    font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.35rem);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -.03em;
    margin-bottom: 10px;
}
.hero__main .card__excerpt { font-size: 1rem; }
.hero__main .card__kicker { font-size: .75rem; }

.hero__side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.hero__side .card {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.hero__side .card:last-child { border-bottom: 0; padding-bottom: 0; }

/* Bloque de sección de la portada */
.section-block { --section-color: var(--brand); }

/* 7. ARTÍCULO -------------------------------------------------------------- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    font-size: .8rem;
    color: var(--muted);
    padding: 18px 0 0;
    margin: 0;
    list-style: none;
}
.breadcrumb li { display: flex; align-items: center; gap: 7px; }
.breadcrumb li::after { content: "›"; opacity: .5; }
.breadcrumb li:last-child::after { content: none; }
.breadcrumb a:hover { color: var(--brand); }

.article-header { padding: 18px 0 0; }
.article-header .card__kicker { font-size: .78rem; margin-bottom: 12px; }
.article-header h1 {
    font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.6rem);
    line-height: 1.13;
    letter-spacing: -.032em;
    margin-bottom: 14px;
}
.article-lead {
    font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem);
    line-height: 1.55;
    color: var(--ink-2);
    font-weight: 400;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 14px 0;
    border-block: 1px solid var(--line);
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 24px;
}
.article-meta strong { color: var(--ink-2); font-weight: 600; }
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .5; }

.article-figure { margin: 0 0 26px; }
.article-figure img {
    width: 100%;
    border-radius: var(--radius-lg);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--surface-2);
}
.article-figure figcaption {
    font-size: .78rem;
    color: var(--muted);
    padding-top: 9px;
    line-height: 1.45;
}

/* Cuerpo del texto */
.article-body {
    font-size: 1.075rem;
    line-height: 1.75;
    color: var(--ink-2);
    max-width: 43rem;
}
.article-body > * + * { margin-top: 1.15em; }
.article-body p { margin: 0; }
.article-body h2 {
    font-size: 1.42rem;
    margin: 1.9em 0 .1em;
    color: var(--ink);
    letter-spacing: -.024em;
}
.article-body h3 {
    font-size: 1.15rem;
    margin: 1.6em 0 .1em;
    color: var(--ink);
}
.article-body a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}
.article-body a:hover { text-decoration-thickness: 2.5px; }
.article-body ul, .article-body ol { padding-left: 1.35em; }
.article-body li { margin-bottom: .5em; }
.article-body li::marker { color: var(--brand); font-weight: 700; }
.article-body img { border-radius: var(--radius); margin-block: 1.4em; }
.article-body blockquote {
    margin: 1.7em 0;
    padding: 4px 0 4px 22px;
    border-left: 4px solid var(--brand);
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--ink);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body strong { color: var(--ink); font-weight: 700; }

/* Caja de atribución a la fuente original */
.source-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius);
    font-size: .875rem;
    color: var(--muted);
}
.source-box strong { color: var(--ink); }
.source-box a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Etiquetas */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
    padding: 0;
    list-style: none;
}
.tag {
    display: inline-block;
    padding: 6px 13px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--ink-2);
    transition: all .15s ease;
}
.tag:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* Botones para compartir */
.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}
.share__label {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    margin-right: 4px;
}
.share__btn {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
    transition: all .18s ease;
}
.share__btn:hover { color: #fff; border-color: transparent; transform: translateY(-2px); }
.share__btn[data-net="whatsapp"]:hover { background: #25D366; }
.share__btn[data-net="x"]:hover        { background: #0F1419; }
.share__btn[data-net="facebook"]:hover { background: #1877F2; }
.share__btn[data-net="telegram"]:hover { background: #26A5E4; }
.share__btn[data-net="copy"]:hover     { background: var(--brand); }
.share__btn svg { width: 18px; height: 18px; }

/* 8. BARRA LATERAL Y COMPONENTES ------------------------------------------- */
.sidebar { display: flex; flex-direction: column; gap: 26px; }

.widget {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.widget__title {
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0 0 16px;
    padding-bottom: 11px;
    border-bottom: 2px solid var(--brand);
    display: inline-block;
}
.widget__list { display: flex; flex-direction: column; gap: 16px; }

.widget--sticky { position: sticky; top: 128px; }

/* Boletín */
.newsletter {
    background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    border: 0;
}
.newsletter .widget__title { color: #fff; border-bottom-color: rgba(255, 255, 255, .45); }
.newsletter p {
    font-size: .875rem;
    line-height: 1.55;
    opacity: .93;
    margin-bottom: 14px;
}
.newsletter input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: var(--radius-sm);
    font-size: .92rem;
    font-family: inherit;
    margin-bottom: 9px;
    background: rgba(255, 255, 255, .96);
    color: #10131A;
}
.newsletter .btn {
    width: 100%;
    background: #10131A;
    color: #fff;
    border: 0;
}
.newsletter .btn:hover { background: #000; color: #fff; }
.newsletter__note {
    font-size: .72rem;
    opacity: .8;
    margin: 10px 0 0;
    line-height: 1.4;
}
.newsletter__msg {
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .18);
    font-size: .82rem;
}

/* 9. FORMULARIOS Y BOTONES ------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #fff;
    font-family: inherit;
    font-size: .93rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }

.btn--ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}
.btn--ghost:hover { background: var(--surface); color: var(--ink); box-shadow: none; }

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

/* Paginación */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin: 40px 0 10px;
    padding: 0;
    list-style: none;
}
.pagination a, .pagination span {
    min-width: 42px; height: 42px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink-2);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .is-current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* Cabecera de archivo/categoría */
.page-head {
    padding: clamp(28px, 4vw, 44px) 0 clamp(20px, 3vw, 30px);
    border-bottom: 1px solid var(--line);
    margin-bottom: clamp(24px, 3vw, 36px);
}
.page-head__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--head-color, var(--brand));
    margin-bottom: 10px;
}
.page-head h1 { margin-bottom: 10px; }
.page-head p {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 46rem;
    margin: 0;
}

/* Página estática */
.static-page {
    max-width: 46rem;
    margin-inline: auto;
    padding-block: clamp(28px, 4vw, 48px);
    font-size: 1.03rem;
    line-height: 1.75;
    color: var(--ink-2);
}
.static-page h2 {
    font-size: 1.35rem;
    margin: 1.8em 0 .5em;
    color: var(--ink);
}
.static-page a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: clamp(48px, 8vw, 90px) 20px;
    color: var(--muted);
}
.empty-state svg { width: 56px; height: 56px; opacity: .3; margin: 0 auto 18px; }
.empty-state h2 { color: var(--ink); margin-bottom: 8px; }
.empty-state p { max-width: 34rem; margin-inline: auto; }

/* 10. PIE DE PÁGINA -------------------------------------------------------- */
.site-footer {
    background: var(--topbar-bg);
    color: #A9B1BF;
    margin-top: clamp(48px, 7vw, 88px);
    padding-top: clamp(38px, 5vw, 56px);
    font-size: .9rem;
}
.site-footer a { color: #A9B1BF; }
.site-footer a:hover { color: #fff; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1.4fr;
    gap: clamp(24px, 3vw, 46px);
    padding-bottom: 38px;
}
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand p { line-height: 1.65; max-width: 30rem; margin-bottom: 16px; }

.footer-col h3 {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }

.social-list { display: flex; gap: 9px; margin-top: 4px; }
.social-list a {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    transition: all .18s ease;
}
.social-list a:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    transform: translateY(-2px);
}
.social-list svg { width: 17px; height: 17px; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: .82rem;
    color: #79828F;
}
.footer-bottom__links { display: flex; flex-wrap: wrap; gap: 18px; }

/* Crédito de autoría: discreto, con la paleta apagada del pie. */
.credito-autor {
    font-size: .82rem;
    color: #79828F;
}
.credito-autor a {
    color: #A9B1BF;
    font-weight: 600;
    display: inline-block;      /* área de toque cómoda en el celular */
    padding: .3rem 0;
    text-decoration: underline;
    text-decoration-color: rgba(169, 177, 191, .35);
    text-underline-offset: 3px;
}
.credito-autor a:hover { color: #fff; text-decoration-color: currentColor; }

/* 11. PUBLICIDAD ----------------------------------------------------------- */
.ad-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 92px;
    margin-block: clamp(24px, 3vw, 34px);
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    overflow: hidden;
}
.ad-slot::before {
    content: "Publicidad";
    font-size: .64rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
    opacity: .65;
}
.ad-slot--article { margin-block: 34px; max-width: 43rem; }
.ad-slot--sidebar { min-height: 250px; margin: 0; }
.ad-slot:empty { display: none; }

/* 12. RESPONSIVE ----------------------------------------------------------- */
@media (max-width: 1080px) {
    .layout-main { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
    .widget--sticky { position: static; }
}

@media (max-width: 900px) {
    .hero { grid-template-columns: minmax(0, 1fr); }
    .hero__side {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .hero__side .card { border-bottom: 0; padding-bottom: 0; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .header-search { display: none; }
    .header-search.is-open {
        display: flex;
        position: absolute;
        left: 20px; right: 20px;
        top: 100%;
        width: auto;
        padding-block: 10px;
        background: var(--header-bg);
        z-index: 60;
    }
    .site-header__inner { min-height: 60px; }
    .site-nav { top: 60px; }
    .topbar__links .hide-mobile { display: none; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    :root { --gap: 20px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .hero__side { grid-template-columns: minmax(0, 1fr); }
    .hero__side .card {
        border-bottom: 1px solid var(--line);
        padding-bottom: 18px;
    }
    .hero__side .card:last-child { border-bottom: 0; }
    .sidebar { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .breaking__label span:not(.breaking__dot) { display: none; }
    .article-body { font-size: 1.03rem; }
    .logo { font-size: 1.3rem; }
    .logo__mark { width: 34px; height: 34px; font-size: .95rem; }
}

/* Impresión: sólo el contenido */
@media print {
    .topbar, .site-header, .site-nav, .breaking, .sidebar,
    .share, .ad-slot, .site-footer, .related { display: none !important; }
    body { color: #000; background: #fff; }
    .article-body { max-width: none; font-size: 12pt; }
    a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
