/* ============================================================
   PULSO CRÍTICO — Styles
   Newspaper editorial — Red / Black / White
   ============================================================ */

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

:root {
  --red:       #c8102e;
  --red-dark:  #a00d24;
  --black:     #111111;
  --dark:      #1a1a1a;
  --ink:       #2c2c2c;
  --ink-soft:  #444444;
  --muted:     #777777;
  --border:    #e0e0e0;
  --bg:        #ffffff;
  --bg-soft:   #f7f7f7;
  --font-head: 'Merriweather', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --radius:    4px;
  --shadow:    0 2px 8px rgba(0,0,0,.10);
}

html { font-size: 16px; scroll-behavior: smooth; overflow-x: clip; }
body { font-family: var(--font-body); color: var(--ink); background: var(--bg); line-height: 1.6; }
img  { display: block; max-width: 100%; height: auto; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ── Tags / Categorías ───────────────────────────────────── */
.tag {
  display: inline-block; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 2px;
}
.tag--nacional      { background: #1a5c96; }
.tag--economia      { background: #1a7a3a; }
.tag--seguridad     { background: #6a1a1a; }
.tag--mundo         { background: #5a1a7a; }
.tag--opinion       { background: #7a5a1a; }
.tag--politica      { background: var(--red); }
.tag--investigacion { background: #1a4a6a; }

/* ── Breaking ticker ──────────────────────────────────────── */
.header-breaking {
  background: var(--red); color: #fff; font-size: 12px;
  display: flex; align-items: center; overflow: hidden; height: 32px;
}
.breaking-label {
  flex-shrink: 0; background: var(--black); color: #fff;
  font-weight: 700; font-size: 10px; letter-spacing: .1em;
  padding: 0 14px; height: 100%; display: flex; align-items: center;
}
.breaking-ticker { padding: 0 16px; white-space: nowrap; overflow: hidden; }
.breaking-ticker a { color: #fff; margin-right: 24px; }
.breaking-ticker a:hover { text-decoration: underline; }

/* ── Header principal ────────────────────────────────────── */
.site-header { background: var(--bg); border-bottom: 3px solid var(--black); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.header-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 0; }
.site-logo    { grid-column: 2; justify-self: center; align-items: center; }
.header-search { grid-column: 3; justify-self: end; width: 260px; }

.site-logo { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.logo-name  { display: flex; align-items: baseline; white-space: nowrap; }
.logo-pulso  { font-family: var(--font-head); font-size: 2rem; font-weight: 900; color: var(--black); letter-spacing: -.02em; }
.logo-critico { font-family: var(--font-head); font-size: 2rem; font-weight: 900; color: var(--red); letter-spacing: -.02em; }
.logo-tagline { font-size: 10px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }


.header-search form { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.header-search input { flex: 1; padding: 8px 12px; border: none; outline: none; font-size: 14px; font-family: var(--font-body); }
.header-search button { padding: 8px 12px; background: var(--black); color: #fff; border: none; cursor: pointer; font-size: 14px; }
.header-search button:hover { background: var(--red); }

/* ── Navegación ──────────────────────────────────────────── */
.site-nav { background: var(--black); }
.nav-list  { display: flex; gap: 0; overflow-x: auto; }
.nav-list a {
  display: block; color: #ccc; font-size: 13px; font-weight: 600;
  padding: 10px 16px; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap; transition: color .15s, background .15s;
}
.nav-list a:hover, .nav-list a.active { color: #fff; background: var(--red); }

/* ── Main ────────────────────────────────────────────────── */
.site-main { padding: 28px 0 48px; }

/* ── Hero ────────────────────────────────────────────────── */
.hero-section { margin-bottom: 32px; }
.hero-card { display: block; position: relative; border-radius: 6px; overflow: hidden; background: var(--black); min-height: 420px; }
.hero-img-wrap { position: absolute; inset: 0; }
.hero-img-wrap img { width: 100%; height: 100%; object-fit: cover; opacity: .65; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85) 40%, transparent 100%); }
.hero-content { position: relative; padding: 40px 36px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 420px; }
.hero-titulo  { font-family: var(--font-head); font-size: 2rem; font-weight: 900; color: #fff; line-height: 1.25; margin: 10px 0 12px; }
.hero-bajada  { color: rgba(255,255,255,.85); font-size: 1rem; max-width: 620px; }
.hero-fecha   { color: rgba(255,255,255,.55); font-size: 12px; margin-top: 12px; }

/* ── Layout home ─────────────────────────────────────────── */
.home-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }

/* ── Cards de noticias ───────────────────────────────────── */
.section-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 900; color: var(--black); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 3px solid var(--black); }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.news-card { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--bg); transition: box-shadow .15s; }
.news-card:hover { box-shadow: var(--shadow); }
.card-img-wrap { display: block; overflow: hidden; height: 180px; }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .card-img-wrap img { transform: scale(1.03); }
.card-body   { padding: 14px 16px; }
.card-meta   { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.card-fecha  { font-size: 12px; color: var(--muted); }
.card-titulo { font-family: var(--font-head); font-size: 1rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.card-titulo a:hover { color: var(--red); }
.fotos-badge { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: #c8102e; border-radius: 3px; padding: 1px 5px; margin-right: 5px; vertical-align: middle; letter-spacing: .04em; }
.card-bajada { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar-section { margin-bottom: 24px; background: var(--bg-soft); border-radius: 6px; padding: 16px; }
.sidebar-head    { font-family: var(--font-head); font-size: 14px; font-weight: 900; color: var(--black); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--black); }
.sidebar-title   { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sidebar-ver-mas { font-size: 12px; color: var(--red); font-weight: 600; }
.sidebar-ver-mas:hover { text-decoration: underline; }
.sidebar-list    { display: flex; flex-direction: column; gap: 10px; }
.sidebar-item a  { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink); line-height: 1.4; }
.sidebar-item a:hover { color: var(--red); }
.sidebar-thumb   { width: 56px; height: 42px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.sidebar-cat-link { display: block; padding: 6px 0; }
.home-sidebar    { position: sticky; top: 120px; align-self: start; }

/* ── Artículo ────────────────────────────────────────────── */
.articulo-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--red); }
.art-meta   { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.art-fecha  { font-size: 13px; color: var(--muted); }
.art-fuente { font-size: 12px; color: var(--muted); }
.art-titulo { font-family: var(--font-head); font-size: 2rem; font-weight: 900; line-height: 1.2; color: var(--black); margin-bottom: 16px; }
.art-bajada { font-size: 1.1rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 20px; border-left: 4px solid var(--red); padding-left: 16px; }
.art-figura { margin-bottom: 24px; }
.art-img    { width: 100%; height: 380px; object-fit: cover; border-radius: 6px; }

.art-resumen { background: var(--bg-soft); border-left: 4px solid var(--red); border-radius: 0 6px 6px 0; padding: 16px 20px; margin-bottom: 24px; }
.art-resumen-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red); margin-bottom: 10px; }
.art-resumen ul { display: flex; flex-direction: column; gap: 6px; }
.art-resumen li { font-size: 14px; color: var(--ink); padding-left: 14px; position: relative; }
.art-resumen li::before { content: '▸'; position: absolute; left: 0; color: var(--red); font-size: 10px; top: 3px; }

.art-body h2 { font-family: var(--font-head); font-size: 1.35rem; font-weight: 900; color: var(--black); margin: 2rem 0 .75rem; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.art-body h3 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .5rem; color: var(--dark); }
.art-body p  { margin-bottom: 1.1rem; line-height: 1.85; font-size: 1.0625rem; }
.art-body ul, .art-body ol { margin: 1rem 0 1rem 1.5rem; }
.art-body li { margin-bottom: .4rem; line-height: 1.7; }
.art-body a  { color: var(--red); text-decoration: underline; }

.art-disclaimer { background: #fff8e1; border-left: 4px solid #f5a623; padding: 12px 16px; border-radius: 0 4px 4px 0; font-size: 13px; color: #555; margin: 24px 0; }

.art-share { display: flex; align-items: center; gap: 10px; margin: 24px 0; flex-wrap: wrap; }
.art-share span { font-size: 13px; color: var(--muted); font-weight: 600; }
.share-btn { padding: 7px 16px; border-radius: 4px; font-size: 13px; font-weight: 600; }
.share-x  { background: #000; color: #fff; }
.share-fb { background: #1877f2; color: #fff; }
.share-wa { background: #25d366; color: #fff; }
.share-btn:hover { opacity: .85; }

.articulo-sidebar { position: sticky; top: 120px; align-self: start; }

/* ── Página de categoría ─────────────────────────────────── */
.page-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 3px solid var(--black); }
.page-header h1 { font-family: var(--font-head); font-size: 1.8rem; font-weight: 900; color: var(--black); margin: 8px 0 4px; }
.page-header p  { font-size: 14px; color: var(--muted); }

/* ── Buscador ────────────────────────────────────────────── */
.buscar-form-wrap { margin-bottom: 28px; }
.buscar-form { display: flex; gap: 0; max-width: 600px; }
.buscar-form input  { flex: 1; padding: 12px 16px; border: 2px solid var(--border); border-right: none; border-radius: var(--radius) 0 0 var(--radius); font-size: 15px; font-family: var(--font-body); outline: none; }
.buscar-form input:focus { border-color: var(--red); }
.buscar-form button { padding: 12px 24px; background: var(--red); color: #fff; border: none; border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; font-weight: 600; cursor: pointer; }
.buscar-form button:hover { background: var(--red-dark); }
.buscar-count { font-size: 14px; color: var(--muted); margin-bottom: 20px; }

/* ── Paginación ──────────────────────────────────────────── */
.paginacion { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 32px; }
.pag-btn    { padding: 8px 20px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; font-weight: 600; color: var(--ink); }
.pag-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }
.pag-info   { font-size: 14px; color: var(--muted); }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); font-size: 15px; }
.empty-cats  { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }

/* ── Páginas estáticas ───────────────────────────────────── */
.page-content { max-width: 720px; }
.page-content h1 { font-family: var(--font-head); font-size: 2rem; font-weight: 900; color: var(--black); margin-bottom: 8px; }
.page-lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 28px; border-left: 4px solid var(--red); padding-left: 14px; }
.page-content h2 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 900; color: var(--black); margin: 28px 0 10px; }
.page-content p  { font-size: 1rem; line-height: 1.8; margin-bottom: 14px; color: var(--ink-soft); }
.page-content a  { color: var(--red); text-decoration: underline; }
.contact-box { background: var(--bg-soft); border-radius: 8px; padding: 20px 24px; margin: 20px 0; display: flex; flex-direction: column; gap: 16px; }
.contact-item strong { display: block; font-size: 13px; font-weight: 700; color: var(--black); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.contact-item span   { font-size: 14px; color: var(--ink-soft); }

/* ── AdSense slots ───────────────────────────────────────── */
.ad-slot { background: var(--bg-soft); border: 1px dashed var(--border); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 11px; }
.ad-slot--top    { width: 100%; min-height: 90px; margin: 0 0 24px; }
.ad-slot--inline { width: 100%; min-height: 90px; margin: 24px 0; }
.ad-slot--side   { width: 100%; min-height: 250px; margin-top: 20px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--black); color: #aaa; padding: 48px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 32px; }
.footer-logo { font-family: var(--font-head); font-size: 1.4rem; font-weight: 900; color: #fff; margin-bottom: 12px; }
.footer-logo span { color: var(--red); }
.footer-brand p { font-size: 13px; line-height: 1.7; color: #777; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a { color: #555; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.footer-social a:hover { color: var(--red); }
.footer-links h4 { color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a  { font-size: 13px; color: #666; }
.footer-links a:hover { color: var(--red); }
.footer-bottom { border-top: 1px solid #222; padding-top: 20px; font-size: 12px; color: #444; text-align: center; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .home-layout      { grid-template-columns: 1fr; }
  .home-sidebar     { position: static; }
  .articulo-layout  { grid-template-columns: 1fr; }
  .articulo-sidebar { position: static; }
  .footer-grid      { grid-template-columns: 1fr 1fr; }
  .hero-titulo      { font-size: 1.5rem; }
  .hero-content     { padding: 24px 20px; }
}
@media (max-width: 620px) {
  .card-grid    { grid-template-columns: 1fr; }
  .header-main  { display: flex; flex-direction: column; align-items: center; gap: 10px; }
  .header-search { width: 100%; }
  .logo-pulso, .logo-critico { font-size: 1.5rem; }
  .site-logo    { align-items: center; }
  .logo-tagline { text-align: center; }
  .art-titulo   { font-size: 1.4rem; }
  .art-img      { height: 220px; }
  .footer-grid  { grid-template-columns: 1fr; gap: 24px; }
  .hero-card    { min-height: 300px; }
  .hero-content { min-height: 300px; }
}
