/* ── Componentes globales compartidos ────────────────────
   Estilos reutilizables en portada, noticia y taxonomías.
   Depende de tokens.css.
──────────────────────────────────────────────────────────── */

/* ── Botón Dark Mode ────────────────────────────────────── */
#diario-mode-toggle {
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
    color: var(--c-nav-text);
    border-radius: var(--r-xl);
    padding: 5px 12px;
    font-size: 12px;
    font-family: var(--f-sans);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0 12px 0 8px;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
    letter-spacing: .3px;
}
#diario-mode-toggle:hover {
    background: rgba(255,255,255,.12);
    color: var(--c-nav-hover);
    border-color: rgba(255,255,255,.4);
}
#diario-mode-toggle .mode-icon { font-size: 14px; line-height: 1; }
#diario-mode-toggle .mode-label { display: none; }
@media (min-width: 900px) { #diario-mode-toggle .mode-label { display: inline; } }

/* ── Badge de sección ───────────────────────────────────── */
.hero-badge {
    display: inline-block;
    background: var(--c-accent);
    color: #fff;
    font-family: var(--f-sans);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--r-sm);
}
.hero-badge--sm { font-size: 9px; padding: 2px 6px; }

/* ── Cabeceras de sección editorial (estilo NewsXO) ─────── */
.seccion-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 2px solid var(--c-border);
    padding-bottom: 0;
    margin-bottom: 14px;
    position: relative;
}
.seccion-heading::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 44px; height: 3px;
    background: var(--c-accent);
}
.seccion-heading h2 {
    font-family: var(--f-sans);
    font-size: 18px;
    font-weight: 700;
    color: var(--c-heading);
    margin: 0;
    padding-bottom: 10px;
}
.seccion-heading__link {
    font-size: 11px;
    color: var(--c-accent);
    text-decoration: none;
    font-family: var(--f-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding-bottom: 10px;
    transition: opacity var(--t-fast);
}
.seccion-heading__link:hover { opacity: .75; }

/* ── Tag / Chip ─────────────────────────────────────────── */
.chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--r-xl);
    font-size: 12px;
    text-decoration: none;
    font-family: var(--f-sans);
    font-weight: 600;
    transition: opacity var(--t-fast);
}
.chip:hover { opacity: .8; }
.chip--accent { background: var(--c-accent); color: #fff; }
.chip--muted  { background: var(--c-surface-alt); color: var(--c-text-sec); border: 1px solid var(--c-border); }

/* ── Botones de compartir ───────────────────────────────── */
.btn-compartir {
    padding: 6px 14px;
    border-radius: var(--r-md);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    transition: opacity var(--t-fast);
}
.btn-compartir:hover { opacity: .85; }
.btn-fb { background: #1877F2; }
.btn-tw { background: #000; }
.btn-wa { background: #25D366; }

/* ── Nota mini (sidebar) ────────────────────────────────── */
.nota-mini {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--c-border);
    transition: background var(--t-fast);
}
.nota-mini:last-child { border-bottom: none; }
.nota-mini:hover { background: var(--c-surface-alt); }
.nota-mini__img img { width: 70px; height: 50px; object-fit: cover; border-radius: var(--r-md); display: block; }
.nota-mini__seccion { font-size: 10px; font-weight: 700; color: var(--c-accent); text-transform: uppercase; display: block; margin-bottom: 3px; font-family: var(--f-sans); }
.nota-mini__titulo { font-size: 13px; font-weight: 600; color: var(--c-text); text-decoration: none; line-height: 1.3; font-family: var(--f-serif); display: block; }
.nota-mini__titulo:hover { color: var(--c-accent); }

/* ── Nota rank (sidebar) ────────────────────────────────── */
.nota-rank {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--c-border);
    align-items: flex-start;
    transition: background var(--t-fast);
}
.nota-rank:last-child { border-bottom: none; }
.nota-rank:hover { background: var(--c-surface-alt); }
.nota-rank__num { font-size: 22px; font-weight: 900; color: var(--c-accent); font-family: var(--f-serif); line-height: 1; min-width: 24px; }
.nota-rank__seccion { font-size: 10px; font-weight: 700; color: var(--c-accent); text-transform: uppercase; display: block; margin-bottom: 3px; font-family: var(--f-sans); }
.nota-rank__titulo { font-size: 13px; font-weight: 600; color: var(--c-text); text-decoration: none; line-height: 1.3; font-family: var(--f-serif); display: block; margin-bottom: 4px; }
.nota-rank__titulo:hover { color: var(--c-accent); }
.nota-rank__lecturas { font-size: 11px; color: var(--c-text-muted); font-family: var(--f-sans); }

/* ── Sidebar panel ──────────────────────────────────────── */
.noticia-sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-panel {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.sidebar-panel__titulo {
    background: var(--c-nav-bg);
    color: var(--c-nav-hover);
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--f-sans);
    border-left: 3px solid var(--c-accent);
}
.sidebar-panel__lista { padding: 4px 0; }

/* ── Ad-box ─────────────────────────────────────────────── */
.ad-box { margin-bottom: 4px; }
.ad-box img { width: 100%; height: auto; display: block; border-radius: var(--r-md); }

/* ── Meta badges genéricos ──────────────────────────────── */
.badge-seccion { display: inline-block; background: var(--c-accent); color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 3px 8px; border-radius: var(--r-sm); margin-bottom: 10px; font-family: var(--f-sans); text-decoration: none; }
.meta-autor   { color: var(--c-accent); font-weight: 600; text-decoration: none; }
.meta-fecha   { color: var(--c-text-muted); }
.meta-lecturas { color: var(--c-text-muted); }
.meta-actualiz { color: var(--c-gold); font-size: 11px; font-family: var(--f-sans); }
