/* =====================================================================
   theme.css — Reconstrucción visual de MultimediosCA (FASE VISUAL 2-4)
   Se carga DESPUÉS de main-IrQGUGnX.css y sobreescribe por cascada.
   Fuente de verdad del markup: src/ui.js.
   ===================================================================== */

/* ---------- 1. DESIGN SYSTEM (tokens) ---------- */
:root {
  /* Tipografía */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.8125rem;    /* 13px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */

  /* Espaciado */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Bordes */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* Sombras */
  --shadow-1: 0 1px 2px rgba(15,23,42,.06);
  --shadow-2: 0 4px 12px rgba(15,23,42,.08);
  --shadow-3: 0 12px 32px rgba(15,23,42,.14);

  /* Transiciones */
  --transition-fast: .15s cubic-bezier(.4,0,.2,1);
  --transition-normal: .28s cubic-bezier(.4,0,.2,1);

  /* Colores institucionales */
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --primary-soft: #fef2f2;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;

  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Merriweather", Georgia, "Times New Roman", serif;
}

/* ---------- 2. Base ---------- */
body { font-family: var(--font); color: var(--body, #334155); background: var(--gray-50); }
::selection { background: var(--primary); color: #fff; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--primary); color: #fff; padding: var(--space-2) var(--space-4);
  font-weight: 700; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- 3. HEADER + NAV ---------- */
.topbar {
  background: var(--ink);
  color: #e2e8f0;
  font-size: var(--text-xs);
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar-date { letter-spacing: .01em; }
.topbar-live { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #fff; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.5);} 70% { box-shadow: 0 0 0 6px rgba(239,68,68,0);} 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0);} }

.main-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1000;
  height: var(--header-h, 64px);
  box-shadow: var(--shadow-1);
}
.main-header .container { display: flex; align-items: center; height: 100%; gap: var(--space-4); }
.logo { flex-shrink: 0; }
.logo img { max-height: 46px; width: auto; display: block; }

.nav { flex: 1; display: flex; justify-content: center; }
.nav-menu { display: flex; gap: 2px; }
.nav-menu a {
  position: relative;
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-600);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  white-space: nowrap;
}
.nav-menu a:hover { color: var(--ink); background: var(--gray-100); }
.nav-menu a[aria-current="page"], .nav-menu a.is-active { color: var(--primary); }
.nav-menu a[aria-current="page"]::after, .nav-menu a.is-active::after {
  content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 2px;
  height: 2px; background: var(--primary); border-radius: 1px;
}

.header-right { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.theme-btn, .search-btn {
  width: 40px; height: 40px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-600); background: transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.theme-btn:hover, .search-btn:hover { background: var(--gray-100); color: var(--ink); }
.theme-btn svg, .search-btn svg { display: block; }

.hamburger { display: none; width: 40px; height: 40px; border-radius: var(--radius-md); color: var(--ink); }
.hamburger:hover { background: var(--gray-100); }

@media (max-width: 900px) {
  .nav { display: none; }
  .hamburger { display: inline-flex; align-items: center; justify-content: center; }
}

/* ---------- 4. HERO ---------- */
.hero { margin: var(--space-5) 0; }
.hero-grid { display: grid; grid-template-columns: 1.8fr 1fr; gap: var(--space-5); align-items: stretch; }
.hero-main {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--gray-200); aspect-ratio: 16/9; min-height: 360px;
}
.hero-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; position: absolute; inset: 0; }
.hero-main:hover img { transform: scale(1.03); }
.hero-main-link { position: absolute; inset: 0; display: block; z-index: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--space-6) var(--space-5);
  background: linear-gradient(180deg, rgba(15,23,42,0) 30%, rgba(15,23,42,.88) 100%);
}
.hero-cat {
  align-self: flex-start;
  background: var(--cat-accent, var(--primary));
  color: #fff; font-size: var(--text-xs); font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 4px; margin-bottom: var(--space-3);
}
.hero-title { font-size: clamp(1.35rem, 2.4vw, 2.1rem); font-weight: 800; line-height: 1.18; color: #fff; letter-spacing: -.01em; }
.hero-title a { color: #fff; pointer-events: auto; }
.hero-title a:hover { text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); }
.hero-meta { margin-top: var(--space-3); font-size: var(--text-xs); color: rgba(255,255,255,.8); }

.hero-side { display: flex; flex-direction: column; gap: var(--space-3); }
.hero-side-item { flex: 1; min-height: 0; }
.hero-side-link { display: flex; gap: var(--space-3); height: 100%; align-items: center; }
.hero-side-num {
  font-size: var(--text-2xl); font-weight: 900; color: var(--gray-300);
  font-family: var(--font); line-height: 1; min-width: 34px; text-align: right;
  -webkit-text-stroke: 1px var(--gray-300);
}
.hero-side-img { width: 92px; height: 72px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--gray-200); }
.hero-side-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-side-content { display: flex; flex-direction: column; gap: 4px; }
.hero-side-cat { font-size: var(--text-xs); font-weight: 700; color: var(--cat-accent, var(--primary)); text-transform: uppercase; letter-spacing: .03em; }
.hero-side-title {
  font-size: var(--text-sm); font-weight: 700; line-height: 1.35; color: var(--dark);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color var(--transition-fast);
}
.hero-side-item:hover .hero-side-title { color: var(--primary); }
.hero-side-date { font-size: var(--text-xs); color: var(--gray-400); }

/* ---------- 5. CARDS ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.card-grid--featured { grid-template-columns: repeat(3, 1fr); }
.card {
  border-radius: var(--radius-md); overflow: hidden; background: var(--white);
  border: 1px solid var(--line); transition: box-shadow var(--transition-normal), transform var(--transition-normal);
  opacity: 0; transform: translateY(12px);
}
.card.is-visible { opacity: 1; transform: translateY(0); }
.card:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); border-color: var(--gray-300); }
.card-link { display: block; }
.card-img { position: relative; aspect-ratio: 16/9; background: var(--gray-200); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-cat {
  position: absolute; top: var(--space-2); left: var(--space-2);
  background: var(--cat-accent, var(--primary)); color: #fff;
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 4px;
}
.card-body { padding: var(--space-3) var(--space-4) var(--space-4); }
.card-title {
  font-size: var(--text-base); font-weight: 700; line-height: 1.35; color: var(--dark);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card:hover .card-title { color: var(--primary); }
.card-excerpt {
  margin-top: var(--space-2); font-size: var(--text-sm); color: var(--gray-500); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { margin-top: var(--space-3); font-size: var(--text-xs); color: var(--gray-400); }

/* Variante featured: primera tarjeta de "Últimas" */
.card--featured { grid-column: span 2; }
.card--featured .card-img { aspect-ratio: 16/8; }
.card--featured .card-title { font-size: var(--text-xl); }

/* Variante compact (sidebar/categoría densa) */
.card--compact .card-body { padding: var(--space-3); }
.card--compact .card-title { font-size: var(--text-sm); -webkit-line-clamp: 2; }

/* ---------- 6. Secciones ---------- */
.section { margin-bottom: var(--space-6); }
.section-title {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xl); font-weight: 800; color: var(--ink);
  margin-bottom: var(--space-4); padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--line);
}
.section-title > span { width: 4px; height: 20px; background: var(--primary); border-radius: 2px; }
.section-more { margin-left: auto; font-size: var(--text-sm); font-weight: 600; color: var(--primary); }
.section-more:hover { text-decoration: underline; }

/* ---------- 7. Responsive ---------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid--featured { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { min-height: 340px; }
  .hero-side { flex-direction: row; }
  .hero-side-item { flex: 1; }
  .hero-side-img { width: 100%; height: 80px; }
  .hero-side-link { flex-direction: column; align-items: flex-start; }
  .hero-side-num { display: none; }
}
@media (max-width: 768px) {
  .card-grid, .card-grid--featured { grid-template-columns: repeat(2, 1fr); }
  .card--featured { grid-column: span 2; }
  .hero-side { flex-direction: column; }
  .hero-side-link { flex-direction: row; align-items: center; }
  .hero-side-img { width: 92px; height: 72px; }
  .section-title { font-size: var(--text-lg); }
}
@media (max-width: 480px) {
  .card-grid, .card-grid--featured { grid-template-columns: 1fr; }
  .card--featured { grid-column: span 1; }
  .hero-main { min-height: 260px; }
  .hero-title { font-size: 1.3rem; }
}

/* ---------- 8. Dark mode (ampliado) ---------- */
[data-theme=dark] {
  --line: #1e293b;
  --surface: #0f172a;
  --ink: #f1f5f9;
  --muted: #94a3b8;
}
[data-theme=dark] .main-header { background: #0f172a; border-color: #1e293b; }
[data-theme=dark] .topbar { background: #0b1120; }
[data-theme=dark] .card { background: #0f172a; border-color: #1e293b; }
[data-theme=dark] .card:hover { border-color: #334155; }
[data-theme=dark] .card-title, [data-theme=dark] .hero-side-title { color: #f1f5f9; }
[data-theme=dark] .nav-menu a { color: #94a3b8; }
[data-theme=dark] .nav-menu a:hover { color: #f1f5f9; background: #1e293b; }
[data-theme=dark] .section-title { color: #f1f5f9; border-color: #1e293b; }

/* ---------- 9. Accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .card { opacity: 1; transform: none; }
}

/* =====================================================================
   FASE VISUAL 5-10
   ===================================================================== */

/* ---------- CARDS: variantes adicionales ---------- */
.card--sidebar { display: flex; }
.card--sidebar .card-img { width: 96px; height: 72px; aspect-ratio: auto; flex-shrink: 0; }
.card--sidebar .card-body { padding: var(--space-2) var(--space-3); }
.card--sidebar .card-title { font-size: var(--text-sm); -webkit-line-clamp: 2; }
.card--sidebar .card-meta { margin-top: var(--space-1); }

/* ---------- ARTICLE (FASE 6) ---------- */
.single-container { padding: var(--space-5) 0 var(--space-7); }
.single-col { max-width: 760px; }
.breadcrumbs { font-size: var(--text-xs); color: var(--gray-500); margin-bottom: var(--space-4); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.breadcrumbs a { color: var(--gray-500); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--gray-300); margin: 0 2px; }

.article-header { margin-bottom: var(--space-5); }
.article-cat {
  display: inline-block; background: var(--cat-accent, var(--primary)); color: #fff;
  font-size: var(--text-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: 5px 12px; border-radius: 4px; margin-bottom: var(--space-4);
}
.article-title { font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 800; line-height: 1.12; letter-spacing: -.015em; color: var(--ink); }
.article-excerpt { margin-top: var(--space-4); font-size: var(--text-lg); font-weight: 400; line-height: 1.6; color: var(--muted); }

.article-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4);
  margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--line);
}
.article-author-name { font-weight: 700; font-size: var(--text-sm); color: var(--ink); }
.article-author-role { display: block; font-size: var(--text-xs); color: var(--gray-500); }
.article-meta-items { display: flex; align-items: center; gap: var(--space-4); margin-left: auto; }
.article-meta-items span { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--gray-500); }
.article-meta-items svg { color: var(--gray-400); }

.article-share { display: flex; gap: var(--space-2); margin-left: var(--space-4); }
.share-btn-sm {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-600); background: var(--gray-100); transition: background var(--transition-fast), color var(--transition-fast);
}
.share-btn-sm:hover { background: var(--gray-200); color: var(--ink); }

.article-featured { margin: 0 0 var(--space-5); border-radius: var(--radius-lg); overflow: hidden; }
.article-featured img { width: 100%; height: auto; display: block; }

/* Cuerpo del artículo: tipografía editorial */
.article-content {
  font-family: var(--font-serif);
  font-size: clamp(1.0625rem, 1.2vw, 1.1875rem);
  line-height: 1.85; color: var(--ink);
  max-width: 720px;
}
.article-content p { margin-bottom: 1.6em; }
.article-content h2, .article-content h3, .article-content h4 {
  font-family: var(--font); font-weight: 800; color: var(--ink); line-height: 1.25;
  margin: 1.8em 0 .7em; letter-spacing: -.01em;
}
.article-content h2 { font-size: var(--text-2xl); }
.article-content h3 { font-size: var(--text-xl); }
.article-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.article-content img { border-radius: var(--radius-md); height: auto; }
.article-content blockquote {
  margin: 1.8em 0; padding: var(--space-3) var(--space-5);
  border-left: 4px solid var(--primary); background: var(--gray-100);
  font-style: italic; color: var(--gray-700); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-content ul, .article-content ol { margin: 0 0 1.6em 1.4em; }
.article-content li { margin-bottom: .4em; }
.wp-caption-text { font-family: var(--font); font-size: var(--text-sm); color: var(--gray-500); margin-top: var(--space-2); }

.article-footer { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-5); }
.tags-label { font-size: var(--text-sm); font-weight: 700; color: var(--gray-600); }
.tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--gray-100);
  color: var(--gray-700); font-size: var(--text-xs); font-weight: 600; transition: background var(--transition-fast);
}
.tag:hover { background: var(--primary-soft); color: var(--primary); }

.share-bottom { display: flex; flex-direction: column; gap: var(--space-3); }
.share-bottom-label { font-size: var(--text-sm); font-weight: 700; color: var(--gray-600); }
.share-bottom-buttons { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.sh-facebook, .sh-twitter, .sh-whatsapp, .sh-telegram, .sh-linkedin, .sh-copy {
  width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.sh-facebook:hover, .sh-twitter:hover, .sh-whatsapp:hover, .sh-telegram:hover, .sh-linkedin:hover, .sh-copy:hover { transform: translateY(-2px); }
.sh-facebook { background: #1877f2; }
.sh-twitter { background: #000; }
.sh-whatsapp { background: #25d366; }
.sh-telegram { background: #229ed9; }
.sh-linkedin { background: #0a66c2; }
.sh-copy { background: var(--gray-600); cursor: pointer; }

/* Related (sidebar artículo) */
.related-card { border-radius: var(--radius-md); overflow: hidden; background: var(--white); border: 1px solid var(--line); margin-bottom: var(--space-3); transition: box-shadow var(--transition-normal); }
.related-card:hover { box-shadow: var(--shadow-2); }
.related-card-img { aspect-ratio: 16/9; background: var(--gray-200); }
.related-card-img img { width: 100%; height: 100%; object-fit: cover; }
.related-card-body { padding: var(--space-3); }
.related-card-cat { font-size: var(--text-xs); font-weight: 700; color: var(--cat-accent, var(--primary)); text-transform: uppercase; letter-spacing: .03em; }
.related-card-title { font-size: var(--text-sm); font-weight: 700; line-height: 1.4; color: var(--dark); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-card:hover .related-card-title { color: var(--primary); }
.related-card-date { display: block; font-size: var(--text-xs); color: var(--gray-400); margin-top: var(--space-2); }

/* ---------- SIDEBAR (FASE 7) ---------- */
.sidebar { display: flex; flex-direction: column; gap: var(--space-6); }
.widget { border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--line); padding: var(--space-4); }
.widget-title {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink); margin-bottom: var(--space-4); padding-bottom: var(--space-2); border-bottom: 2px solid var(--line);
}
.widget-title::before { content: ""; width: 4px; height: 16px; background: var(--primary); border-radius: 2px; }
.widget-post { display: flex; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--gray-100); }
.widget-post:last-child { border-bottom: none; }
.widget-post-img { width: 76px; height: 56px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--gray-200); }
.widget-post-img img { width: 100%; height: 100%; object-fit: cover; }
.widget-post-title { font-size: var(--text-sm); font-weight: 600; line-height: 1.35; color: var(--dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.widget-post-title a:hover { color: var(--primary); }
.widget-post-date { font-size: var(--text-xs); color: var(--gray-400); }

.trending-item { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--gray-100); }
.trending-item:last-child { border-bottom: none; }
.trending-num { font-size: var(--text-2xl); font-weight: 900; color: var(--gray-200); line-height: 1; min-width: 32px; }
.trending-title { font-size: var(--text-sm); font-weight: 600; line-height: 1.4; color: var(--dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trending-item:hover .trending-title { color: var(--primary); }
.trending-date { display: block; font-size: var(--text-xs); color: var(--gray-400); margin-top: 2px; }

.cat-list li a { display: flex; justify-content: space-between; align-items: center; padding: var(--space-2) 0; font-size: var(--text-sm); color: var(--gray-700); border-bottom: 1px solid var(--gray-100); }
.cat-list li:last-child a { border-bottom: none; }
.cat-list li a:hover { color: var(--primary); }
.cat-count { font-size: var(--text-xs); color: var(--gray-400); font-weight: 700; }

/* ---------- FOOTER (FASE 7) ---------- */
.footer { margin-top: var(--space-7); }
.footer-top { background: var(--ink); color: #cbd5e1; padding: var(--space-7) 0 var(--space-6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: var(--space-6); }
.footer-brand img { display: block; margin-bottom: var(--space-3); }
.footer-desc { font-size: var(--text-sm); color: #94a3b8; line-height: 1.6; max-width: 32ch; }
.footer-title { font-size: var(--text-sm); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; margin-bottom: var(--space-3); }
.footer-links li { margin-bottom: var(--space-2); }
.footer-links a { font-size: var(--text-sm); color: #94a3b8; transition: color var(--transition-fast); }
.footer-links a:hover { color: #fff; }
.footer-bottom { background: #0b1120; color: #64748b; font-size: var(--text-xs); padding: var(--space-4) 0; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- RESPONSIVE (FASE 8) ---------- */
@media (max-width: 1280px) {
  :root { --sidebar-width: 300px; }
}
@media (max-width: 1024px) {
  .layout-row { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar .widget { flex: 1 1 260px; }
  .article-meta-items { margin-left: 0; width: 100%; margin-top: var(--space-2); }
  .article-share { margin-left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .single-container { padding: var(--space-4) 0 var(--space-6); }
  .article-meta { flex-direction: column; align-items: flex-start; }
  .article-meta-items { width: 100%; justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .sidebar { flex-direction: column; }
}
@media (max-width: 480px) {
  .article-title { font-size: 1.5rem; }
  .article-excerpt { font-size: var(--text-base); }
  .card--sidebar .card-img { width: 80px; height: 60px; }
}

/* ---------- DARK MODE (FASE 9, ampliado) ---------- */
[data-theme=dark] .article-title, [data-theme=dark] .article-content { color: #f1f5f9; }
[data-theme=dark] .article-excerpt { color: #94a3b8; }
[data-theme=dark] .article-content h2, [data-theme=dark] .article-content h3 { color: #f1f5f9; }
[data-theme=dark] .article-content blockquote { background: #1e293b; color: #cbd5e1; }
[data-theme=dark] .widget { background: #0f172a; border-color: #1e293b; }
[data-theme=dark] .widget-post { border-color: #1e293b; }
[data-theme=dark] .trending-item { border-color: #1e293b; }
[data-theme=dark] .cat-list li a { border-color: #1e293b; color: #cbd5e1; }
[data-theme=dark] .related-card { background: #0f172a; border-color: #1e293b; }
[data-theme=dark] .article-meta { border-color: #1e293b; }
[data-theme=dark] .article-footer { border-color: #1e293b; }
[data-theme=dark] .tag { background: #1e293b; color: #cbd5e1; }
[data-theme=dark] .share-btn-sm { background: #1e293b; color: #cbd5e1; }
[data-theme=dark] .share-btn-sm:hover { background: #334155; }
[data-theme=dark] .trending-num { color: #334155; }

/* transición suave de tema */
body, .main-header, .card, .widget, .related-card, .article-content, .topbar, .footer-top {
  transition: background-color var(--transition-normal), color var(--transition-normal), border-color var(--transition-normal);
}
