/* ══════════════════════════════════════════════════
   DIARIO ONLINE — Estilos público (estilo periodístico)
══════════════════════════════════════════════════ */
:root {
  --rojo:    #cc0000;
  --negro:   #111111;
  --gris-o:  #333333;
  --gris-m:  #666666;
  --gris-c:  #999999;
  --gris-bg: #f5f5f5;
  --borde:   #e0e0e0;
  --blanco:  #ffffff;
  --sidebar: 300px;
  --font-s:  'Playfair Display', Georgia, serif;
  --font-p:  'Source Sans 3', 'Helvetica Neue', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font-p); background: var(--blanco); color: var(--negro); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--rojo); }
img { max-width: 100%; display: block; }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ── Barra top ── */
.barra-top { background: var(--negro); color: #ccc; font-size: .78rem; padding: .35rem 0; border-bottom: 3px solid var(--rojo); }
.barra-top .container { display: flex; justify-content: space-between; align-items: center; }
.top-links { display: flex; gap: 1rem; }
.top-links a { color: #ccc; transition: color .15s; }
.top-links a:hover { color: var(--rojo); }
.top-links span { color: #888; }

/* ── Cabecera ── */
.cabecera { padding: 1.2rem 0; border-bottom: 1px solid var(--borde); }
.cab-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.logo-texto { font-family: var(--font-s); font-size: 2.6rem; font-weight: 900; color: var(--negro); letter-spacing: -1px; line-height: 1; }
.logo-texto:hover { color: var(--rojo); }
.logo-img { max-height: 70px; }
.logo-slogan { font-size: .8rem; color: var(--gris-m); margin-top: .2rem; font-style: italic; }
.pub-cabecera img { max-height: 90px; border-radius: 4px; }

/* ── Navbar ── */
.navbar { background: var(--negro); border-bottom: 3px solid var(--rojo); position: sticky; top: 0; z-index: 100; }
.nav-inner { display: flex; align-items: center; gap: 0; }
.nav-menu { list-style: none; display: flex; }
.nav-menu li a {
  display: block; padding: .75rem 1rem; color: #eee; font-size: .88rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; transition: background .15s, color .15s;
  border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.nav-menu li a:hover, .nav-menu li a.activo { color: #fff; background: rgba(255,255,255,.07); border-bottom-color: var(--rojo); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; padding: .5rem .8rem; cursor: pointer; }
.nav-buscar { display: flex; margin-left: auto; }
.nav-buscar input { padding: .45rem .8rem; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 4px 0 0 4px; color: #fff; font-size: .85rem; width: 180px; outline: none; }
.nav-buscar input::placeholder { color: rgba(255,255,255,.5); }
.nav-buscar button { padding: .45rem .8rem; background: var(--rojo); border: none; color: #fff; cursor: pointer; border-radius: 0 4px 4px 0; }

/* ── Main ── */
.main-publico { padding: 1.5rem 0 2rem; }

/* ── HERO ── */
.hero-destacado { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 2rem; background: var(--negro); border-radius: 6px; overflow: hidden; min-height: 380px; }
.hero-imagen { overflow: hidden; }
.hero-imagen img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.hero-imagen:hover img { transform: scale(1.03); }
.hero-placeholder { width: 100%; height: 100%; min-height: 380px; background: linear-gradient(135deg,#1a1a1a,#2d2d2d); }
.hero-contenido { padding: 2rem 2rem 2rem; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(180deg,transparent 0%,rgba(0,0,0,.85) 100%); color: #fff; }
.hero-cat { display: inline-block; padding: .25rem .7rem; background: var(--rojo); color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; border-radius: 3px; margin-bottom: .7rem; align-self: flex-start; }
.hero-titulo { font-family: var(--font-s); font-size: 1.9rem; font-weight: 900; line-height: 1.2; margin-bottom: .8rem; color: #fff; }
.hero-titulo a { color: #fff; }
.hero-titulo a:hover { color: #ffd; }
.hero-extracto { color: rgba(255,255,255,.85); font-size: .95rem; line-height: 1.6; margin-bottom: .8rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { font-size: .78rem; color: rgba(255,255,255,.6); display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Layout dos columnas ── */
.layout-dos-col { display: grid; grid-template-columns: 1fr var(--sidebar); gap: 2rem; align-items: start; }

/* ── Grilla artículos ── */
.grilla-articulos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
.tarjeta-articulo { border-bottom: 1px solid var(--borde); padding-bottom: 1.2rem; transition: transform .2s; }
.tarjeta-articulo:hover { transform: translateY(-2px); }
.tarjeta-imagen-wrap { display: block; position: relative; overflow: hidden; border-radius: 4px; margin-bottom: .7rem; aspect-ratio: 16/9; background: var(--gris-bg); }
.tarjeta-imagen { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tarjeta-imagen-wrap:hover .tarjeta-imagen { transform: scale(1.04); }
.tarjeta-placeholder { width: 100%; height: 100%; min-height: 160px; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.tarjeta-cat { position: absolute; top: .5rem; left: .5rem; padding: .15rem .5rem; color: #fff; font-size: .7rem; font-weight: 700; text-transform: uppercase; border-radius: 3px; }
.tarjeta-titulo { font-family: var(--font-s); font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin-bottom: .4rem; }
.tarjeta-titulo a:hover { color: var(--rojo); }
.tarjeta-extracto { font-size: .85rem; color: var(--gris-m); line-height: 1.5; margin-bottom: .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tarjeta-meta { font-size: .75rem; color: var(--gris-c); display: flex; gap: .4rem; }

/* ── Sección header ── */
.seccion-header { display: flex; align-items: baseline; gap: 1rem; padding: .8rem 1rem; border-left: 4px solid var(--rojo); background: var(--gris-bg); margin-bottom: 1.5rem; border-radius: 0 4px 4px 0; }
.seccion-header h1 { font-family: var(--font-s); font-size: 1.6rem; }
.seccion-header span { color: var(--gris-c); font-size: .85rem; }

/* ── Artículo completo ── */
.articulo-completo { min-width: 0; }
.breadcrumb { font-size: .78rem; color: var(--gris-c); margin-bottom: .8rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.breadcrumb span { color: var(--gris-c); }
.art-cat { display: inline-block; padding: .2rem .6rem; color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; border-radius: 3px; margin-bottom: .7rem; }
.art-titulo { font-family: var(--font-s); font-size: 2.1rem; font-weight: 900; line-height: 1.2; margin-bottom: 1rem; }
.art-meta { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--borde); font-size: .85rem; }
.art-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.art-avatar-inicial { width: 36px; height: 36px; border-radius: 50%; background: var(--rojo); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.art-fecha, .art-vistas { color: var(--gris-c); margin-left: .3rem; font-size: .8rem; }
.art-imagen-wrap { margin-bottom: 1.2rem; }
.art-imagen { width: 100%; border-radius: 6px; }
.art-extracto { font-size: 1.1rem; color: var(--gris-o); font-weight: 600; border-left: 3px solid var(--rojo); padding-left: 1rem; margin-bottom: 1.5rem; line-height: 1.6; font-family: var(--font-s); font-style: italic; }
.art-contenido { font-size: 1rem; line-height: 1.85; color: #222; margin-bottom: 1.5rem; }
.art-contenido h2 { font-family: var(--font-s); font-size: 1.5rem; margin: 1.5rem 0 .7rem; border-bottom: 2px solid var(--rojo); padding-bottom: .3rem; }
.art-contenido h3 { font-family: var(--font-s); font-size: 1.2rem; margin: 1.2rem 0 .5rem; color: var(--gris-o); }
.art-contenido p { margin-bottom: 1.2rem; }
.art-contenido ul, .art-contenido ol { margin: 0 0 1.2rem 1.5rem; }
.art-contenido blockquote { border-left: 4px solid var(--rojo); margin: 1.5rem 0; padding: .8rem 1.2rem; background: var(--gris-bg); font-style: italic; font-size: 1.05rem; font-family: var(--font-s); }
.art-contenido a { color: var(--rojo); text-decoration: underline; }
.art-contenido img { border-radius: 6px; margin: 1rem auto; }
.art-etiquetas { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; }
.etiqueta { padding: .25rem .7rem; background: var(--gris-bg); border: 1px solid var(--borde); font-size: .78rem; border-radius: 3px; }
.etiqueta:hover { background: var(--rojo); color: #fff; border-color: var(--rojo); }

/* ── Compartir ── */
.art-compartir { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.btn-compartir { padding: .4rem 1rem; border-radius: 4px; font-size: .82rem; font-weight: 600; transition: opacity .15s; }
.btn-compartir:hover { opacity: .85; }
.facebook  { background: #1877f2; color: #fff; }
.twitter   { background: #000; color: #fff; }
.whatsapp  { background: #25d366; color: #fff; }

/* ── Autor bio ── */
.autor-bio { display: flex; gap: 1rem; padding: 1.2rem; background: var(--gris-bg); border-radius: 6px; margin-bottom: 1.5rem; }
.autor-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.autor-avatar-inicial { width: 56px; height: 56px; border-radius: 50%; background: var(--rojo); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; flex-shrink: 0; }
.autor-bio strong { display: block; margin-bottom: .3rem; }
.autor-bio p { font-size: .88rem; color: var(--gris-m); }

/* ── Relacionados ── */
.relacionados { margin-bottom: 2rem; }
.relacionados h3 { font-family: var(--font-s); font-size: 1.2rem; margin-bottom: 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--rojo); }
.rel-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.rel-item { display: block; }
.rel-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; margin-bottom: .4rem; transition: transform .2s; }
.rel-item:hover img { transform: scale(1.03); }
.rel-placeholder { aspect-ratio: 16/9; background: var(--gris-bg); display: flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 1.5rem; margin-bottom: .4rem; }
.rel-item span { font-size: .85rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rel-item:hover span { color: var(--rojo); }

/* ── Comentarios ── */
.comentarios { border-top: 2px solid var(--borde); padding-top: 1.5rem; }
.comentarios h3 { font-family: var(--font-s); font-size: 1.3rem; margin-bottom: 1.2rem; }
.comentario { display: flex; gap: .8rem; margin-bottom: 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--borde); }
.com-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--rojo); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; font-size: .9rem; }
.com-avatar img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.com-meta { display: flex; gap: .5rem; align-items: baseline; margin-bottom: .3rem; }
.com-meta strong { font-size: .9rem; }
.com-meta span { font-size: .75rem; color: var(--gris-c); }
.com-cuerpo p { font-size: .9rem; color: var(--gris-o); }
.form-comentario { margin-top: 1.5rem; padding: 1.2rem; background: var(--gris-bg); border-radius: 6px; }

/* ── Barra lateral ── */
.barra-lateral { position: sticky; top: 70px; }
.widget { background: #fff; border: 1px solid var(--borde); border-radius: 4px; margin-bottom: 1.5rem; overflow: hidden; }
.widget-titulo { font-family: var(--font-s); font-size: 1rem; font-weight: 700; padding: .7rem 1rem; border-bottom: 3px solid var(--rojo); background: var(--gris-bg); text-transform: uppercase; letter-spacing: .05em; font-size: .88rem; }
.pub-widget { cursor: pointer; }

/* ── Encuesta ── */
.encuesta-pregunta { font-family: var(--font-s); font-size: 1.05rem; font-weight: 700; padding: .8rem 1rem .4rem; }
.encuesta-desc { font-size: .82rem; color: var(--gris-m); padding: 0 1rem .6rem; }
.opcion-encuesta { display: flex; align-items: center; gap: .5rem; padding: .4rem 1rem; cursor: pointer; font-size: .88rem; }
.opcion-encuesta input[type=radio] { accent-color: var(--rojo); }
.opcion-texto { flex: 1; }
.opcion-pct { font-size: .78rem; color: var(--gris-m); min-width: 35px; text-align: right; }
.barra-resultado { height: 4px; background: #eee; margin: 0 1rem .2rem; border-radius: 2px; }
.barra-relleno { height: 100%; background: var(--rojo); border-radius: 2px; transition: width .5s; }
.btn-votar { display: block; width: calc(100% - 2rem); margin: .5rem 1rem 1rem; padding: .55rem; background: var(--rojo); color: #fff; border: none; border-radius: 4px; font-size: .88rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.btn-votar:hover { background: #aa0000; }

/* ── Más leídas ── */
.mas-leida-item { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem 1rem; border-bottom: 1px solid var(--borde); }
.mas-leida-item:last-child { border-bottom: none; }
.ml-num { font-family: var(--font-s); font-size: 1.5rem; font-weight: 900; color: var(--rojo); min-width: 24px; line-height: 1; }
.ml-titulo { display: block; font-size: .85rem; font-weight: 600; line-height: 1.3; margin-bottom: .15rem; }
.ml-titulo:hover { color: var(--rojo); }
.ml-vistas { font-size: .72rem; color: var(--gris-c); }

/* ── Categorías sidebar ── */
.cat-item { display: flex; align-items: center; padding: .55rem 1rem; border-bottom: 1px solid var(--borde); font-size: .88rem; transition: background .15s; }
.cat-item:hover { background: var(--gris-bg); color: var(--rojo); }
.cat-item:last-child { border-bottom: none; }
.cat-punto { width: 8px; height: 8px; border-radius: 50%; margin-right: .6rem; flex-shrink: 0; }
.cat-cnt { margin-left: auto; font-size: .75rem; color: var(--gris-c); }

/* ── Paginación ── */
.paginacion { display: flex; gap: .4rem; justify-content: center; margin: 2rem 0; flex-wrap: wrap; }
.pag-btn { padding: .5rem .9rem; border: 1px solid var(--borde); border-radius: 4px; font-size: .85rem; color: var(--gris-o); transition: border-color .15s, background .15s; }
.pag-btn:hover, .pag-btn.activo { border-color: var(--rojo); background: var(--rojo); color: #fff; }

/* ── Formularios públicos ── */
.form-pagina { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 2rem 0; }
.form-card { width: 420px; background: #fff; border: 1px solid var(--borde); border-radius: 8px; padding: 2rem; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.form-card h2 { font-family: var(--font-s); font-size: 1.6rem; margin-bottom: 1.2rem; }
.form-grupo { margin-bottom: 1rem; }
.form-grupo label { display: block; font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--gris-m); margin-bottom: .4rem; }
.form-grupo input, .form-grupo textarea, .form-grupo select { width: 100%; padding: .65rem .9rem; border: 1px solid var(--borde); border-radius: 4px; font-family: var(--font-p); font-size: .95rem; outline: none; transition: border-color .2s; }
.form-grupo input:focus, .form-grupo textarea:focus { border-color: var(--rojo); }
.form-grupo textarea { resize: vertical; }
.form-fila { display: flex; gap: 1rem; }
.form-fila .form-grupo { flex: 1; }
.check-label { display: flex; align-items: center; gap: .4rem; cursor: pointer; font-size: .88rem; text-transform: none; letter-spacing: 0; }
.form-link { text-align: center; margin-top: 1rem; font-size: .88rem; color: var(--gris-m); }
.form-link a { color: var(--rojo); font-weight: 600; }
.form-comentario .form-fila { flex-wrap: wrap; }

/* ── Botones ── */
.btn-primario { display: inline-block; padding: .65rem 1.4rem; background: var(--rojo); color: #fff; border: none; border-radius: 4px; font-family: var(--font-p); font-size: .95rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.btn-primario:hover { background: #aa0000; color: #fff; }
.btn-primario.full { width: 100%; text-align: center; }

/* ── Alertas ── */
.alerta { padding: .8rem 1.1rem; border-radius: 4px; margin-bottom: 1rem; font-size: .9rem; }
.alerta-exito { background: #e8f5e9; border: 1px solid #81c784; color: #2e7d32; }
.alerta-error  { background: #ffebee; border: 1px solid #ef9a9a; color: #c62828; }
.sin-resultados { text-align: center; padding: 3rem; color: var(--gris-c); }

/* ── Inline ad ── */
.pub-inline { text-align: center; padding: 1rem 0; margin: 1rem 0; }

/* ── Footer ── */
.footer { background: var(--negro); color: #ccc; padding: 2.5rem 0 0; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.footer-logo { font-family: var(--font-s); font-size: 1.6rem; font-weight: 900; color: #fff; margin-bottom: .5rem; }
.footer-desc { font-size: .85rem; color: #888; line-height: 1.6; }
.footer-redes { display: flex; gap: .6rem; margin-top: 1rem; }
.red-social { width: 34px; height: 34px; border: 1px solid #444; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .9rem; color: #aaa; transition: border-color .15s, color .15s; }
.red-social:hover { border-color: var(--rojo); color: var(--rojo); }
.footer-col h4 { color: #fff; font-size: .88rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .8rem; border-bottom: 1px solid #333; padding-bottom: .4rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a { color: #888; font-size: .85rem; transition: color .15s; }
.footer-col a:hover { color: var(--rojo); }
.footer-copy { border-top: 1px solid #222; margin-top: 2rem; padding: 1rem 0; font-size: .78rem; color: #666; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .layout-dos-col { grid-template-columns: 1fr 260px; }
  .grilla-articulos { grid-template-columns: repeat(2,1fr); }
  .hero-destacado { grid-template-columns: 1fr; }
  .hero-contenido { padding: 1.2rem; background: var(--negro); }
}
@media (max-width: 768px) {
  .layout-dos-col { grid-template-columns: 1fr; }
  .barra-lateral { position: static; }
  .grilla-articulos { grid-template-columns: 1fr; }
  .hero-destacado { display: block; }
  .rel-grid { grid-template-columns: 1fr; }
  .nav-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--negro); z-index: 200; border-top: 2px solid var(--rojo); }
  .nav-menu.abierto { display: flex; }
  .nav-menu li a { padding: .8rem 1.2rem; border-bottom: 1px solid #222; margin-bottom: 0; }
  .nav-toggle { display: block; }
  .nav-buscar { display: none; }
  .navbar { position: relative; }
  .footer-grid { grid-template-columns: 1fr; }
  .cab-inner { flex-direction: column; align-items: flex-start; }
  .pub-cabecera { display: none; }
  .form-fila { flex-direction: column; }
}
/* ══════════════════════════════════════════════
   FIXES — cabecera y banners centrados
   Agregar al FINAL de diario/assets/css/diario.css
══════════════════════════════════════════════ */

/* Reducir padding cabecera */
.cabecera { padding: .5rem 0 !important; }

/* Banners centrados con padding uniforme */
.pub-bloque {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: .8rem 0;
  margin: 0 auto;
}
.pub-bloque img,
.pub-bloque ins,
.pub-bloque iframe,
.pub-bloque a { margin: 0 auto; }

.pub-inline {
  display: flex;
  justify-content: center;
  text-align: center;
  padding: .8rem 0;
}

/* Banner en barra lateral */
.widget .pub-bloque { padding: .5rem 0; }

/* Banner cabecera — centrado verticalmente con el logo */
.cab-inner { align-items: center; }
.cab-inner .pub-bloque {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
}
.cab-inner .pub-bloque img,
.cab-inner .pub-bloque a,
.cab-inner .pub-bloque ins { margin: 0 auto; }