:root {
  --purple: #4a1a8a;
  --purple2: #7a3ee0;
  --dark: #1a1a2e;
  --gray: #666;
  --bg: #f7f7f9;
  --border: #e4e4ea;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--fuente-cuerpo, -apple-system, Segoe UI, Arial, sans-serif); background: var(--bg); color: var(--dark); }
h1, h2, h3, h4, .logo { font-family: var(--fuente-titulos, inherit); }
a { color: inherit; text-decoration: none; }
.ad-slot { text-align: center; }
.ad-header { padding: 8px; background: #f3f0fb; border-bottom: 1px solid var(--border); }
.ad-sidebar { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 12px; font-size: 12px; color: var(--gray); }
.ad-slot img { max-width: 100%; }
.ad-top { padding: 8px; background: #f3f0fb; border-bottom: 1px solid var(--border); }
.ad-slot-fila { display: flex; gap: 10px; padding: 8px 10px; background: #f7f5fc; border-bottom: 1px solid var(--border); }
.ad-header-izq, .ad-header-der { flex: 1; min-height: 60px; }
.ad-inarticle { margin: 20px 0; padding: 10px; background: #f7f5fc; border: 1px solid var(--border); border-radius: 8px; }
.ad-content-h2 { margin: 0 0 20px; padding: 10px; background: #f7f5fc; border: 1px solid var(--border); border-radius: 8px; text-align: center; }
.ad-content-h34 { margin: 0 0 20px; }
.ad-content-h34 .ad-slot { background: #f7f5fc; border: 1px solid var(--border); border-radius: 8px; min-height: 60px; }
.ad-skyscraper { position: fixed; top: 140px; width: 300px; z-index: 5; }
.ad-skyscraper .ad-slot { display: flex; flex-direction: column; align-items: center; }
.ad-skyscraper .ad-slot img,
.ad-skyscraper .ad-slot video,
.ad-skyscraper .ad-slot iframe { width: 100%; max-width: 100%; height: auto; display: block; }
.ad-skyscraper-izq { left: 8px; }
.ad-skyscraper-der { right: 8px; }
@media (max-width: 1650px) { .ad-skyscraper { display: none; } }

.maqueta-pub-wrap { position: relative; width: 100%; height: 1180px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.maqueta-pub-iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.slot-overlay {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-align: center; background: rgba(122, 62, 224, 0.18); border: 2px dashed #7a3ee0;
  border-radius: 6px; color: #4a1fa8; text-decoration: none; font-size: 12px; z-index: 10;
  transition: background .15s ease;
}
.slot-overlay:hover { background: rgba(122, 62, 224, 0.32); }
.slot-overlay span { font-weight: 700; font-size: 13px; }
.slot-overlay small { font-size: 11px; opacity: .85; }
.slot-overlay em { font-style: normal; font-size: 10px; background: #16a34a; color: #fff; padding: 1px 6px; border-radius: 10px; margin-top: 2px; }

.rte-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px; background: #f7f5fc; border: 1px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; }
.rte-toolbar button { border: 1px solid var(--border); background: #fff; border-radius: 4px; padding: 4px 9px; cursor: pointer; font-size: 13px; }
.rte-toolbar button:hover { background: #ece5fb; }
.rte-toolbar select, .rte-toolbar input[type="color"] { border: 1px solid var(--border); border-radius: 4px; padding: 3px; font-size: 13px; }
.rte-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.rte-editor { min-height: 320px; border: 1px solid var(--border); border-top: none; border-radius: 0 0 8px 8px; padding: 14px; background: #fff; line-height: 1.6; }
.rte-editor:focus { outline: 2px solid var(--purple2); outline-offset: -2px; }
.rte-editor p { margin: 0 0 12px; }

.slot-top    { top: 0;    left: 0;    width: 100%; height: 40px; }
.slot-h1     { top: 140px; left: 0;   width: 49%;  height: 70px; }
.slot-h2     { top: 140px; left: 51%; width: 49%;  height: 70px; }
.slot-e-izq  { top: 220px; left: 0;   width: 130px; height: 640px; }
.slot-e-der  { top: 220px; right: 0;  left: auto;  width: 130px; height: 640px; }
.slot-content-h2 { top: 265px; left: 4%;  width: 70%; height: 60px; }
.slot-content-h3 { top: 335px; left: 4%;  width: 34%; height: 70px; }
.slot-content-h4 { top: 335px; left: 40%; width: 34%; height: 70px; }
.slot-fh1    { top: 560px; left: 66%; width: 32%;  height: 160px; }
.slot-fh2    { top: 760px; left: 20%; width: 60%;  height: 100px; }
.slot-content-h5    { top: 890px; left: 4%;  width: 92%; height: 60px; }
.slot-footer-top    { top: 970px; left: 4%;  width: 92%; height: 60px; }
.slot-inarticle-medio { top: 1050px; left: 4%; width: 92%; height: 40px; }

.site-header {
  background: white; border-bottom: none;
}
.header-top { display: flex; align-items: center; justify-content: center; position: relative; padding: 22px 24px 18px; }
.logo { font-size: 30px; font-weight: 800; color: var(--dark); display: flex; align-items: center; letter-spacing: -0.5px; }
.logo span { color: var(--purple2); }
.logo-img-movil { display: none; }
@media (max-width: 600px) {
  .logo-img-movil { display: block; }
  .logo-img-desktop { display: none; }
}

.social-links { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); display: flex; gap: 12px; align-items: center; }
.social-links a { color: var(--gray); transition: color .15s ease; }
.social-links a:hover { color: var(--purple2); }
@media (max-width: 780px) { .social-links { position: static; transform: none; justify-content: center; margin-bottom: 10px; } .header-top { flex-wrap: wrap; } }

.micro-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: white;
  border-bottom: 1px solid var(--border); box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 8px 24px; display: flex; justify-content: center;
  transform: translateY(-110%); transition: transform .25s ease;
}
.micro-header.visible { transform: translateY(0); }
.micro-logo { font-size: 18px; font-weight: 800; color: var(--dark); display: flex; align-items: center; }
.micro-logo span { color: var(--purple2); }
.micro-logo img { height: 34px; width: auto; }
.tpl-oscura .micro-header { background: #1b1b26; border-color: #2a2a38; }
.tpl-oscura .micro-logo { color: #eaeaf0; }
.logo-img { max-height: 56px; }
.menu-bar { background: #fafafa; border-top: 1px solid var(--border); border-bottom: 3px solid var(--purple2); }
.menu { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 1100px; margin: 0 auto; padding: 0 12px; }
.menu a { color: var(--gray); font-weight: 600; font-size: 14px; padding: 14px 14px; border-bottom: 2px solid transparent; display: flex; align-items: center; gap: 6px; }
.menu a.activo, .menu a:hover { color: var(--purple2); border-color: var(--purple2); }
.home-ico { flex-shrink: 0; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px; }
.grid { display: grid; grid-template-columns: repeat(var(--cols, auto-fill), minmax(220px, 1fr)); gap: 28px 24px; }
.card { background: transparent; border: none; border-bottom: 1px solid var(--border); border-radius: 0; overflow: hidden; padding-bottom: 20px; }
.card img { width: 100%; height: 160px; object-fit: cover; border-radius: 4px; order: 4; }
.card h2 { font-size: 18px; margin: 6px 0 2px; order: 2; font-weight: 800; line-height: 1.25; }
.card { display: flex; flex-direction: column; }
.cat { display: inline-block; margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; color: var(--purple2); text-transform: uppercase; order: 1; }
.copete { margin: 8px 0 0; color: var(--gray); font-size: 14px; order: 5; }
.meta { margin: 2px 0 8px; color: #999; font-size: 12px; order: 3; }

.nota { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 32px; max-width: 760px; margin: 0 auto; }
.nota h1 { font-size: 32px; margin: 8px 0; }
.nota .portada { width: 100%; border-radius: 6px; margin: 16px 0; }
.nota .cuerpo p { line-height: 1.7; font-size: 17px; }
.nota .cuerpo .cita-destacada { margin: 24px 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--purple2); font-size: 22px; font-style: italic; color: var(--dark); line-height: 1.5; }
.nota .cuerpo .galeria-modular { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 20px 0; }
.nota .cuerpo .galeria-modular img { width: 100%; height: 160px; object-fit: cover; border-radius: 6px; }
.nota .cuerpo .embed-modular { margin: 20px 0; }
.nota .cuerpo .embed-modular iframe, .nota .cuerpo .embed-modular video { max-width: 100%; }
.nota .cuerpo .bloque-datos { margin: 20px 0; padding: 16px; background: #f7f5fc; border: 1px solid var(--border); border-radius: 8px; }
.nota .cuerpo .bloque-datos h4 { margin: 0 0 12px; font-size: 15px; color: var(--purple2); text-transform: uppercase; letter-spacing: 0.4px; }
.nota .cuerpo .datos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.nota .cuerpo .dato-item { display: flex; flex-direction: column; gap: 2px; text-align: center; background: white; border-radius: 6px; padding: 10px; }
.nota .cuerpo .dato-item strong { font-size: 22px; color: var(--dark); }
.nota .cuerpo .dato-item span { font-size: 12px; color: var(--gray); }

.rte-toolbar #btnCita, .rte-toolbar #btnGaleria, .rte-toolbar #btnEmbed, .rte-toolbar #btnDatos { font-size: 12px; }
.nota .copete-destacada { font-size: 20px; font-weight: 600; color: var(--dark, #1a1a2e); line-height: 1.5; margin: 4px 0 20px; }
.nota .meta-final { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--border); }

.logo-footer-img { display: block; margin: 0 auto 14px; max-width: 100%; }

.site-footer { text-align: center; padding: 24px; color: #999; font-size: 13px; }
.newsletter-box { margin-bottom: 16px; }
.newsletter-box form { display: inline-flex; gap: 6px; align-items: center; }
.newsletter-box input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.newsletter-box button { background: var(--purple2); color: white; border: none; padding: 8px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.rss-link a { color: var(--purple2); }

.compartir { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; gap: 12px; align-items: center; font-size: 13px; }
.compartir a { color: var(--purple2); font-weight: 600; }
.tags-nota { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag-pill { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: 12px; color: var(--gray); }
.nota-galeria .portada { max-height: 520px; object-fit: cover; }
.nota-video .portada { aspect-ratio: 16/9; height: auto; max-height: none; }

.relacionadas { max-width: 760px; margin: 32px auto 0; }
.relacionadas h2, .comentarios h2 { font-size: 20px; }

.comentarios { max-width: 760px; margin: 32px auto 0; background: white; border: 1px solid var(--border);
  border-radius: 8px; padding: 24px; }
.comentario { border-bottom: 1px solid var(--border); padding: 12px 0; }
.comentario p { margin: 4px 0; }
.comentario-form { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.comentario-form input, .comentario-form textarea { padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 14px; }
.comentario-form button { align-self: flex-start; }

.admin-subnav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; background: white;
  border: 1px solid var(--border); border-radius: 8px; padding: 8px; }
.admin-subnav a { padding: 8px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--gray); }
.admin-subnav a:hover { background: var(--bg); color: var(--purple2); }

.comentario-mod { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 12px; }
.comentario-mod .acciones { display: flex; gap: 8px; margin-top: 8px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--purple2); }
.stat-card span:last-child { font-size: 12px; color: var(--gray); }

/* ===== Plantillas del sitio público ===== */

/* Revista: hero + sidebar de mas leidos */
.revista-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 32px; }
.hero-card { background: white; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.hero-card img { width: 100%; height: 320px; object-fit: cover; }
.hero-card h1 { font-size: 28px; margin: 8px 16px 4px; }
.hero-card .copete { font-size: 15px; }
.sidebar-ranking { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.sidebar-ranking h3 { margin-top: 0; font-size: 15px; border-bottom: 2px solid var(--purple2); padding-bottom: 8px; }
.sidebar-ranking ol { padding-left: 18px; margin: 0; }
.sidebar-ranking li { margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.sidebar-ranking li a:hover { color: var(--purple2); }
@media (max-width: 720px) { .revista-layout { grid-template-columns: 1fr; } }

/* Portada diario: foto full-width con titulo superpuesto */
.hero-portada { margin-bottom: 24px; border-radius: 8px; overflow: hidden; position: relative; }
.hero-portada a { position: relative; display: block; }
.hero-portada img { width: 100%; height: 420px; object-fit: cover; display: block; }
.hero-portada-overlay { position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent); padding: 32px 28px 20px; color: white; }
.hero-portada-overlay h1 { font-size: 34px; margin: 8px 0; color: white; }
.hero-portada-overlay .copete { color: #eee; }
.hero-portada-overlay .cat { color: var(--purple2); background: rgba(255,255,255,0.9); padding: 2px 8px; border-radius: 4px; }

/* Grid moderno: fotos grandes, 3 col fijas */
.tpl-grid .grid { grid-template-columns: repeat(3, 1fr); }
.tpl-grid .card img { height: 220px; }
.tpl-grid .card h2 { font-size: 20px; }

/* Minimalista: lista sin tarjetas */
.lista-minimal { max-width: 760px; margin: 0 auto; }
.item-minimal { padding: 20px 0; border-bottom: 1px solid var(--border); }
.item-minimal h2 { font-size: 20px; margin: 6px 0 4px; }
.item-minimal .cat { margin: 0; }
.item-minimal .copete { margin: 0 0 4px; }
.item-minimal .meta { margin: 0; }
.tpl-minimal .card,
.tpl-minimal .grid { all: unset; }

/* Oscura */
.tpl-oscura { background: #14141c; color: #eaeaf0; }
.tpl-oscura .site-header { background: #1b1b26; border-color: #2a2a38; }
.tpl-oscura .logo { color: #eaeaf0; }
.tpl-oscura .nota h1 { color: #eaeaf0; }
.tpl-oscura .card, .tpl-oscura .hero-card, .tpl-oscura .sidebar-ranking,
.tpl-oscura .nota, .tpl-oscura .comentarios { background: #1b1b26; border-color: #2a2a38; color: #eaeaf0; }
.tpl-oscura .copete, .tpl-oscura .meta { color: #a0a0b0; }
.tpl-oscura .menu a { color: #a0a0b0; }
.tpl-oscura .site-footer { color: #777; }
.tpl-oscura .item-minimal { border-color: #2a2a38; }

/* Clon del layout original: grid principal + sidebar con Ranking numerado y Newsletter */
.clon-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 32px; align-items: start; }
.clon-layout .grid { grid-template-columns: repeat(var(--cols, 3), minmax(180px, 1fr)); }
.sidebar-clon { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 16px; }
.sidebar-clon h3 { margin: 0 0 4px; font-size: 15px; color: var(--purple2); text-transform: uppercase; letter-spacing: 0.5px; }
.ranking-clon-item { display: flex; flex-direction: column; gap: 4px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.ranking-clon-item img { width: 100%; height: 110px; object-fit: cover; border-radius: 4px; }
.ranking-clon-item h4 { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.3; }
.ranking-clon-item h4 a { color: var(--dark); }
.ranking-clon-item .rk-num { color: var(--purple2); }
.newsletter-sidebar { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 18px; }
.newsletter-sidebar h3 { color: var(--purple2); margin-top: 0; }
.newsletter-sidebar p { font-size: 13px; color: var(--gray); margin: 4px 0 12px; }
.newsletter-sidebar form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-sidebar input { padding: 10px; border: 1px solid var(--border); border-radius: 6px; }
.newsletter-sidebar button { background: var(--purple2); color: white; border: none; padding: 10px; border-radius: 6px; font-weight: 700; cursor: pointer; }
@media (max-width: 800px) { .clon-layout { grid-template-columns: 1fr; } }

/* Elegante: serif, blanco y negro editorial */
.tpl-elegante body, .tpl-elegante { font-family: Georgia, 'Times New Roman', serif; }
.tpl-elegante .logo { font-family: Georgia, serif; letter-spacing: 1px; }
.tpl-elegante .site-header { border-bottom: 2px solid var(--dark); }
.tpl-elegante .card img, .tpl-elegante .hero-elegante img { filter: grayscale(100%); }
.tpl-elegante .hero-elegante .hero-portada-overlay { background: linear-gradient(to top, rgba(0,0,0,0.92), transparent); }
.tpl-elegante .hero-elegante h1 { font-family: Georgia, serif; font-weight: 400; font-style: italic; }
.tpl-elegante .card h2, .tpl-elegante .nota h1 { font-family: Georgia, serif; font-weight: 700; }
.tpl-elegante .cat { color: var(--dark); border-bottom: 1px solid var(--dark); padding-bottom: 2px; letter-spacing: 1.5px; }
.tpl-elegante .card { border-radius: 0; border-color: #ccc; }

/* Numerada: sidebar de ranking con numeros grandes de acento */
.numerada-layout .sidebar-ranking { border-top: 4px solid var(--purple2); }
.ranking-numerado ol { list-style: none; padding-left: 0; }
.ranking-numerado li { display: flex; align-items: center; gap: 10px; }
.num-rank { font-size: 22px; font-weight: 800; color: var(--purple2); min-width: 26px; }
.tpl-numerada .site-header { border-top: 4px solid var(--purple2); }

/* Fotografica: dos notas destacadas lado a lado + grid de fotos */
.dual-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.hero-dual img { height: 260px; }
.tpl-fotografica .card img { height: 240px; }
.tpl-fotografica .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 720px) { .dual-hero { grid-template-columns: 1fr; } }

/* Colorida: header e identidad de color, tarjetas redondeadas con cinta */
.tpl-colorida .site-header { background: var(--purple2); border-bottom: none; }
.tpl-colorida .logo, .tpl-colorida .logo span { color: white; }
.tpl-colorida .menu a { color: rgba(255,255,255,0.85); }
.tpl-colorida .menu a.activo, .tpl-colorida .menu a:hover { color: white; border-color: white; }
.tpl-colorida .card { border-radius: 16px; border: none; box-shadow: 0 2px 10px rgba(0,0,0,0.08); position: relative; background: white; padding: 14px; }
.tpl-colorida .card img { border-radius: 12px; }
.tpl-colorida .cat { background: var(--purple2); color: white; border-radius: 20px; padding: 3px 10px; display: inline-block; margin-bottom: 4px; }
.tpl-colorida .newsletter-box button { border-radius: 20px; }

/* Selector de plantillas en el admin */
.plantillas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.plantilla-card { background: white; border: 2px solid var(--border); border-radius: 8px; padding: 12px;
  cursor: pointer; display: flex; flex-direction: column; gap: 4px; position: relative; }
.plantilla-card.activa { border-color: var(--purple2); }
.plantilla-card input { position: absolute; top: 12px; right: 12px; }
.plantilla-card span { font-size: 12px; color: var(--gray); }
.tag-activa { display: inline-block; background: var(--purple2); color: white; font-size: 11px;
  padding: 2px 8px; border-radius: 4px; width: fit-content; }
.plantilla-preview { height: 110px; background: #f0f0f4; border-radius: 4px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.pp-header { height: 12px; background: #ccc; border-radius: 2px; }
.pp-row { display: flex; gap: 4px; flex: 1; }
.pp-card { flex: 1; background: #ddd; border-radius: 2px; }
.pp-card.big { background: #bbb; }
.pp-hero { height: 40px; background: #bbb; border-radius: 2px; }
.pp-list { display: flex; flex-direction: column; gap: 6px; flex: 1; justify-content: center; }
.pp-line { height: 8px; background: #ccc; border-radius: 2px; width: 90%; }

/* Plantillas: galeria con captura real, igual estilo que el picker de Medios */
.plantillas-grid-foto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.plantilla-card-foto { background: white; border: 2px solid var(--border); border-radius: 10px; overflow: hidden;
  position: relative; transition: border-color .15s, box-shadow .15s; }
.plantilla-card-foto:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.plantilla-card-foto.activa { border-color: var(--purple2); box-shadow: 0 0 0 3px rgba(122,62,224,0.15); }
.plantilla-foto { width: 100%; height: 150px; object-fit: cover; object-position: top; display: block;
  border-bottom: 1px solid var(--border); background: #eee; }
.plantilla-card-foto-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.plantilla-card-foto-body strong { font-size: 15px; }
.plantilla-card-foto-body span { font-size: 12.5px; color: var(--gray); line-height: 1.4; }
.plantilla-card-foto-body form { margin-top: 6px; }
.plantilla-card-foto-body button { width: 100%; }
.plantilla-card-foto-body button[disabled] { background: #ccc; cursor: default; }
.ribbon-premium { position: absolute; top: 10px; left: 10px; background: #ffb703; color: #3a2a00;
  font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 20px; z-index: 2; letter-spacing: 0.3px; }
.tag-activa-foto { position: absolute; top: 10px; right: 10px; background: var(--purple2); color: white;
  font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 20px; z-index: 2; }

/* Admin: shell con sidebar igual al panel original */
.admin-body { background: #f0f0f4; margin: 0; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; flex-shrink: 0; background: #1a1a2e; color: #cfcfe0; height: 100vh;
  position: sticky; top: 0; overflow-y: auto; padding-bottom: 24px; }
.admin-brand { padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-brand a { color: white; font-weight: 800; font-size: 17px; }
.admin-brand a span { color: var(--purple2); font-weight: 600; }
.sidebar-toggle { background: rgba(255,255,255,0.08); color: #cfcfe0; border: none; width: 26px; height: 26px;
  border-radius: 6px; font-size: 16px; cursor: pointer; flex-shrink: 0; line-height: 1; }
.sidebar-toggle:hover { background: rgba(255,255,255,0.18); color: white; }
.btn-nuevo-articulo { display: block; margin: 14px 20px; background: var(--purple2); color: white;
  text-align: center; padding: 10px; border-radius: 6px; font-weight: 700; font-size: 13.5px; }
.btn-nuevo-articulo:hover { opacity: 0.9; }
.sidebar-reabrir { display: none; position: fixed; left: 0; top: 18px; z-index: 20; background: #1a1a2e;
  color: white; border: none; width: 26px; height: 40px; border-radius: 0 8px 8px 0; font-size: 18px; cursor: pointer; }
.admin-shell.sidebar-colapsada .admin-sidebar { width: 0; overflow: hidden; padding: 0; }
.admin-shell.sidebar-colapsada .sidebar-reabrir { display: block; }
.admin-nav { display: flex; flex-direction: column; padding: 8px 0; }
.admin-nav a { color: #b8b8cc; padding: 9px 20px; font-size: 13.5px; font-weight: 500; }
.admin-nav a:hover { background: rgba(255,255,255,0.05); color: white; }
.admin-nav a.activo { background: var(--purple2); color: white; font-weight: 700; }
.admin-nav a.admin-nav-top { font-weight: 700; color: white; padding-top: 14px; padding-bottom: 14px; }
.admin-nav-section { margin: 14px 20px 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 1px;
  color: #7c7c9a; text-transform: uppercase; }

.admin-nav-group { margin-top: 6px; }
.admin-nav-group-header { width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none; border: none; cursor: pointer; margin: 8px 20px 2px; padding: 4px 0;
  font-size: 10.5px; font-weight: 800; letter-spacing: 1px; color: #9a9ab8; text-transform: uppercase; }
.admin-nav-group-header:hover { color: white; }
.admin-nav-group-header .chev { font-size: 10px; transition: transform .15s; color: #7c7c9a; }
.admin-nav-group.colapsado .admin-nav-group-header .chev { transform: rotate(-90deg); }
.admin-nav-group-links { display: flex; flex-direction: column; }
.admin-nav-group.colapsado .admin-nav-group-links { display: none; }
.admin-nav-group:not(.colapsado) .admin-nav-group-header { color: white; }
.admin-main { flex: 1; min-width: 0; padding: 24px 32px; }
.admin-topbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.admin-section-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-section-tabs a { padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
  color: var(--gray); background: white; border: 1px solid var(--border); }
.admin-section-tabs a.activo { background: var(--purple2); color: white; border-color: var(--purple2); }
.admin-section-tabs-sm a { padding: 5px 12px; font-size: 12px; }
.buscar-form { display: flex; gap: 8px; margin-bottom: 16px; max-width: 320px; }
.buscar-form input { flex: 1; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.inline-form label { display: flex; flex-direction: column; font-size: 12px; font-weight: 700; color: var(--gray); gap: 4px; }
.inline-form input, .inline-form select, .inline-form textarea { padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: white; border: 1px solid var(--border); border-radius: 20px; padding: 6px 8px 6px 14px;
  display: flex; align-items: center; gap: 8px; font-size: 13px; }
.chip .link-danger { font-size: 15px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.media-item { background: white; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; padding: 6px; }
.media-item img, .media-item video { width: 100%; height: 100px; object-fit: cover; border-radius: 4px; background: #000; }
.media-item .url-box { font-size: 10px; color: var(--gray); word-break: break-all; margin: 4px 0; }
.destacados-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.destacado-row { display: flex; align-items: center; gap: 10px; background: white; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px; }
.destacado-row img { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; }
.destacado-row .titulo { flex: 1; font-weight: 600; font-size: 14px; }
.destacado-row .acciones { display: flex; gap: 4px; }
.destacado-row .acciones button { background: #eee; border: none; border-radius: 4px; padding: 4px 8px; cursor: pointer; }
.sitio-preview-wrap { background: white; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.sitio-preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; background: #f5f5f8; border-bottom: 1px solid var(--border); }
.sitio-preview-url { font-size: 12px; color: var(--gray); font-family: monospace; }
.sitio-preview { width: 100%; height: calc(100vh - 340px); min-height: 420px; border: none; display: block; }

/* Admin (anterior, standalone) */
.admin-body { background: #f0f0f4; }
.login-box { max-width: 340px; margin: 80px auto; background: white; padding: 32px; border-radius: 8px;
  border: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; text-align: center; }
.login-box h1 { margin: 0; font-size: 26px; }
.login-box h1 span { color: var(--purple2); }
.login-box .sub { color: var(--gray); margin-top: -8px; }
.login-box input { padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.login-box button, .btn { background: var(--purple2); color: white; border: none; padding: 10px 16px;
  border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 14px; }
.btn.secundario { background: #ddd; color: var(--dark); }
.login-box .error { color: #c0392b; font-size: 13px; margin: 0; }

.admin-wrap { max-width: 1100px; margin: 32px auto; padding: 0 24px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.admin-top .btn { margin-left: 8px; }
.api-info { background: #fffbe6; border: 1px solid #ffe58f; padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; font-size: 13px; }
.admin-table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.admin-table th { background: #fafafa; font-size: 12px; text-transform: uppercase; color: var(--gray); }
.link-danger { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 13px; padding: 0; }
.link-editar { background: none; border: none; color: var(--primary, #1a1a2e); cursor: pointer; font-size: 13px; padding: 0; margin-right: 10px; text-decoration: underline; }

.personalizacion-panel { background: white; border-radius: 8px; padding: 28px; max-width: 640px; }
.personalizacion-panel p { line-height: 1.55; margin: 0 0 14px; }
.personalizacion-estado { margin: 18px 0; }
.btn-toggle-on { background: #1b7a3d; }
.btn-toggle-off { background: #c0392b; }
.para-vos-aviso { font-size: 13px; color: var(--gray); margin: -6px 0 18px; }

.dash-estados-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 24px; }
.dash-estado-card { background: white; border-radius: 8px; padding: 14px 10px; text-align: center; text-decoration: none; border-top: 4px solid var(--border); display: flex; flex-direction: column; gap: 4px; transition: transform .1s; }
.dash-estado-card:hover { transform: translateY(-2px); }
.dash-estado-card.estado-borrador { border-top-color: #999; }
.dash-estado-card.estado-revision { border-top-color: #e0a800; }
.dash-estado-card.estado-aprobado { border-top-color: #3d7fe0; }
.dash-estado-card.estado-publicado { border-top-color: #1b7a3d; }
.dash-estado-card.estado-actualizado { border-top-color: #7a3ee0; }
.dash-estado-card.estado-archivado { border-top-color: #555; }
.dash-estado-num { font-size: 26px; font-weight: 800; color: var(--dark); }
.dash-estado-label { font-size: 12px; color: var(--gray); }

.dash-alertas-list, .dash-recientes-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.dash-alerta-item, .dash-reciente-item { background: white; border-radius: 6px; padding: 10px 14px; text-decoration: none; color: inherit; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-alerta-item { border-left: 3px solid #e0a800; }
.dash-alerta-titulo { font-weight: 600; flex: 1; min-width: 160px; }

.preview-multi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.preview-bloque { background: white; border-radius: 8px; padding: 16px; }
.preview-google { font-family: arial, sans-serif; }
.pg-url { color: #202124; font-size: 13px; margin-bottom: 2px; }
.pg-title { color: #1a0dab; font-size: 18px; line-height: 1.3; margin-bottom: 4px; }
.pg-desc { color: #4d5156; font-size: 13px; line-height: 1.4; }
.preview-social-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; font-family: arial, sans-serif; }
.preview-social-card img { width: 100%; aspect-ratio: 1.91/1; object-fit: cover; display: block; background: #eee; }
.preview-social-card .psc-body { padding: 10px 12px; }
.psc-dominio { color: #65676b; font-size: 12px; text-transform: uppercase; margin-bottom: 3px; }
.psc-title { font-weight: 700; font-size: 14px; line-height: 1.3; margin-bottom: 3px; }
.psc-desc { color: #65676b; font-size: 12px; line-height: 1.35; }
.preview-x-card .psc-dominio { text-transform: none; margin-top: 4px; margin-bottom: 0; }

.nota .cuerpo .bloque-contexto { background: #f5f3fb; border-left: 4px solid #7a3ee0; border-radius: 4px; padding: 14px 18px; margin: 20px 0; }
.nota .cuerpo .bloque-contexto h4 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: #7a3ee0; }
.nota .cuerpo .bloque-contexto p { margin: 0; line-height: 1.55; }

.nota .cuerpo .bloque-que-sabemos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.nota .cuerpo .qs-confirmado, .nota .cuerpo .qs-desarrollo { border-radius: 6px; padding: 12px 16px; }
.nota .cuerpo .qs-confirmado { background: #e8f6ec; border: 1px solid #bfe6c9; }
.nota .cuerpo .qs-desarrollo { background: #fff8e6; border: 1px solid #f0dfa8; }
.nota .cuerpo .qs-confirmado h5, .nota .cuerpo .qs-desarrollo h5 { margin: 0 0 6px; font-size: 13px; }
.nota .cuerpo .qs-confirmado p, .nota .cuerpo .qs-desarrollo p { margin: 0; font-size: 14px; line-height: 1.5; }

.nota .cuerpo .bloque-fuentes { background: #f7f7f8; border-radius: 6px; padding: 14px 18px; margin: 20px 0; }
.nota .cuerpo .bloque-fuentes h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; color: var(--gray); }
.nota .cuerpo .bloque-fuentes ul { margin: 0; padding-left: 18px; }
.nota .cuerpo .bloque-fuentes li { margin-bottom: 4px; font-size: 14px; }
.nota .cuerpo .bloque-fuentes a { color: var(--purple2); }

@media (max-width: 640px) {
  .nota .cuerpo .bloque-que-sabemos { grid-template-columns: 1fr; }
}

.nota .cuerpo .bloque-hero { position: relative; border-radius: 8px; overflow: hidden; min-height: 280px; background-size: cover; background-position: center; display: flex; align-items: flex-end; margin: 22px 0; }
.nota .cuerpo .bloque-hero .hero-overlay { background: linear-gradient(0deg, rgba(0,0,0,.75), rgba(0,0,0,0)); color: white; padding: 26px 22px 18px; width: 100%; }
.nota .cuerpo .bloque-hero h3 { margin: 0 0 6px; font-size: 24px; line-height: 1.25; }
.nota .cuerpo .bloque-hero p { margin: 0; font-size: 14px; opacity: .9; }

.nota .cuerpo .bloque-timeline { margin: 22px 0; border-left: 2px solid var(--border); padding-left: 18px; }
.nota .cuerpo .bloque-timeline h4 { margin: 0 0 14px; font-size: 15px; }
.nota .cuerpo .timeline-item { position: relative; margin-bottom: 16px; }
.nota .cuerpo .timeline-item::before { content: ''; position: absolute; left: -23px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--purple2); }
.nota .cuerpo .ti-fecha { display: block; font-weight: 700; font-size: 13px; color: var(--purple2); margin-bottom: 2px; }
.nota .cuerpo .timeline-item p { margin: 0; line-height: 1.5; }

.nota .cuerpo .bloque-ranking { background: #f7f7f8; border-radius: 8px; padding: 16px 18px; margin: 22px 0; }
.nota .cuerpo .bloque-ranking h4 { margin: 0 0 10px; font-size: 15px; }
.nota .cuerpo .ranking-list { margin: 0; padding-left: 26px; }
.nota .cuerpo .ranking-list li { margin-bottom: 8px; font-weight: 600; }

.nota .cuerpo .bloque-comparador { margin: 22px 0; overflow-x: auto; }
.nota .cuerpo .bloque-comparador table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nota .cuerpo .bloque-comparador th, .nota .cuerpo .bloque-comparador td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.nota .cuerpo .bloque-comparador th { background: #f7f7f8; font-weight: 700; }
.nota .cuerpo .bloque-comparador td:first-child { font-weight: 600; background: #fafafa; }

.especial-header { position: relative; border-radius: 10px; overflow: hidden; min-height: 220px; background-size: cover; background-position: center; background-color: #1a1a2e; display: flex; align-items: flex-end; }
.especial-header-overlay { background: linear-gradient(0deg, rgba(0,0,0,.8), rgba(0,0,0,.25)); color: white; padding: 28px 26px 22px; width: 100%; }
.especial-tag { display: inline-block; background: var(--purple2); color: white; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; }
.especial-header-overlay h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.2; }
.especial-desc { margin: 0; opacity: .92; max-width: 700px; line-height: 1.5; }

.dash-alerta-evergreen { border-left-color: #2e8b57; }
.aviso-correccion { background: #fff4e5; border: 1px solid #f0cd8f; color: #7a4a00; border-radius: 6px; padding: 8px 14px; font-size: 13px; margin: 10px 0 0; }

.modo-redaccion { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.modo-redaccion-label { font-size: 13px; font-weight: 700; color: var(--gray); }
.modo-btn { background: white; border: 1px solid var(--border); border-radius: 20px; padding: 6px 16px; font-size: 13px; cursor: pointer; }
.modo-btn.activo { background: var(--dark, #1a1a2e); color: white; border-color: var(--dark, #1a1a2e); }

.texto-compartir { width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 10px; font-size: 13px; font-family: inherit; resize: vertical; margin-bottom: 8px; }
.copiar-btn { width: 100%; }

.nota .cuerpo .bloque-audio { background: #f7f7f8; border-radius: 8px; padding: 14px 16px; margin: 20px 0; }
.nota .cuerpo .audio-titulo { margin: 0 0 8px; font-weight: 600; font-size: 14px; }
.nota .cuerpo .bloque-audio audio { width: 100%; }
.media-audio-icon { font-size: 40px; text-align: center; padding: 20px 0 6px; }

.perfil-autor { background: white; border-radius: 8px; padding: 28px; margin-bottom: 30px; display: flex; gap: 20px; align-items: flex-start; }
.perfil-autor img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.perfil-autor h1 { margin: 0 0 8px; }
.perfil-autor .bio { color: var(--gray); line-height: 1.5; }
.perfil-autor .redes-autor a { margin-right: 12px; font-size: 13px; }

.edit-form { display: flex; flex-direction: column; gap: 6px; background: white; padding: 24px; border-radius: 8px; }
.edit-form label { font-size: 12px; font-weight: 700; color: var(--gray); margin-top: 8px; }
.edit-form input, .edit-form textarea { padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; }
.inline-fields { display: flex; gap: 16px; }
.inline-fields > div { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.sub-title-sm { font-size: 14px; color: var(--gray); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: 0.4px; }

.estado-inline-form { display: inline-block; }
.estado-pill {
  border: none; border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; appearance: none; -webkit-appearance: none; text-align: center;
}
.estado-borrador { background: #ececec; color: #555; }
.estado-revision { background: #fff3cd; color: #8a6400; }
.estado-aprobado { background: #d6ecff; color: #0a5fa8; }
.estado-publicado { background: #d9f7e3; color: #157347; }
.estado-actualizado { background: #e3d9fb; color: #5b2fb0; }
.estado-archivado { background: #f3d4d4; color: #a13030; }

.revision-list { display: flex; flex-direction: column; gap: 12px; }
.revision-item { display: flex; gap: 14px; align-items: center; background: white; border: 1px solid var(--border); border-radius: 8px; padding: 12px; flex-wrap: wrap; }
.revision-item img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.revision-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.revision-info .copete-preview { font-size: 13px; color: var(--gray); margin: 0; }
.revision-acciones { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn-publicar { background: #157347; }
.modo-portada-opciones { display: flex; flex-wrap: wrap; gap: 18px; background: #f7f5fc; border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-bottom: 4px; }
.modo-opcion { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.hint-inline { color: var(--gray); font-weight: 400; font-size: 12px; }
.portada-secciones { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.seccion-row { display: flex; align-items: center; gap: 10px; background: white; border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; flex-wrap: wrap; }
.seccion-row label { display: flex; align-items: center; gap: 6px; min-width: 220px; font-size: 14px; }
.seccion-row input[type="number"] { width: 70px; padding: 6px; border: 1px solid var(--border); border-radius: 4px; }
.seccion-row select { padding: 6px; border: 1px solid var(--border); border-radius: 4px; }
.edit-form button { align-self: flex-start; margin-top: 12px; }
.ok-msg { color: #1a7a3e; background: #e6ffed; border: 1px solid #a3e6b8; padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.hint { color: var(--gray); font-size: 13px; margin-bottom: 16px; }
.sub-title { font-size: 16px; margin-top: 28px; }
input[type="color"] { padding: 2px; height: 38px; width: 80px; }

/* Widget de transmisión en vivo (YouTube embed) */
.envivo-widget { background: var(--dark, #1a1a2e); border-radius: 10px; overflow: hidden; }
.envivo-widget-header { color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; padding: 8px 12px; background: rgba(0,0,0,.25); }
.envivo-widget-player { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; }
.envivo-widget-player iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

.envivo-widget-header, .envivo-widget-footer, .envivo-widget-top-home { max-width: 900px; margin: 14px auto; }
.envivo-widget.envivo-widget-header, .envivo-widget.envivo-widget-footer, .envivo-widget.envivo-widget-top-home { max-width: 900px; margin: 14px auto; }

.envivo-widget.envivo-widget-flotante {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 320px;
  max-width: calc(100vw - 24px);
  z-index: 900;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.envivo-widget-flotante .envivo-widget-cerrar {
  position: absolute;
  top: 6px;
  right: 8px;
  background: rgba(0,0,0,.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
}
.envivo-widget-flotante .envivo-widget-cerrar:hover { background: rgba(0,0,0,.65); }

.envivo-preview-box { max-width: 500px; }
.envivo-widget-preview .envivo-widget-header { text-transform: none; }

@media (max-width: 640px) {
  .envivo-widget.envivo-widget-flotante { width: calc(100vw - 24px); right: 12px; bottom: 12px; }
}

.envivo-widget.envivo-widget-ranking { max-width: 100%; width: 100%; margin: 0 0 16px 0; }

.footer-menu-pie { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 4px 0 14px; }
.footer-menu-pie a { color: var(--gray); font-size: 12.5px; }
.footer-menu-pie a:hover { color: var(--purple2); }
.tpl-oscura .footer-menu-pie a { color: #a0a0b0; }

.ad-content-h5 { margin: 20px 0 0; padding: 10px; background: #f7f5fc; border: 1px solid var(--border); border-radius: 8px; text-align: center; }
.ad-footer-top { padding: 10px; background: #f7f5fc; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.nota .ad-slot.ad-inarticle-medio { margin: 20px 0; text-align: center; }

.newsletter-popup-overlay { position: fixed; inset: 0; background: rgba(26,26,46,.6); z-index: 950; display: none; align-items: center; justify-content: center; padding: 16px; }
.newsletter-popup-box { background: white; border-radius: 10px; padding: 28px; max-width: 380px; width: 100%; position: relative; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.newsletter-popup-box h3 { margin: 0 0 8px; color: var(--purple2); }
.newsletter-popup-box p { color: var(--gray); font-size: 13.5px; margin: 0 0 16px; line-height: 1.5; }
.newsletter-popup-box form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-popup-box input { padding: 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.newsletter-popup-box button { background: var(--purple2); color: white; border: none; padding: 10px; border-radius: 6px; font-weight: 700; cursor: pointer; }
.newsletter-popup-cerrar { position: absolute; top: 8px; right: 10px; background: none; border: none; font-size: 20px; color: var(--gray); cursor: pointer; line-height: 1; }

.config-newsletter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 8px; }
.config-newsletter-col { display: flex; flex-direction: column; }
@media (max-width: 800px) { .config-newsletter-grid { grid-template-columns: 1fr; } }

.nota-newsletter { text-align: center; }
.newsletter-page-form { display: inline-flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; justify-content: center; }
.newsletter-page-form input { padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; min-width: 220px; }
.newsletter-page-form button { background: var(--purple2); color: white; border: none; padding: 10px 18px; border-radius: 6px; font-weight: 700; cursor: pointer; }

/* Footer rediseñado: fondo propio, logo+redes a la izquierda, columnas del menú pie a la derecha */
.site-footer { text-align: left; padding: 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 44px 24px 30px; display: flex; flex-wrap: wrap; gap: 40px; }
.footer-left { flex: 0 0 240px; display: flex; flex-direction: column; gap: 16px; }
.footer-logo-texto { font-size: 22px; font-weight: 800; color: #fff; }
.footer-logo-texto span { color: var(--purple2); }
.footer-social-links { position: static; transform: none; }
.footer-social-links a { color: inherit; opacity: .85; }
.footer-social-links a:hover { opacity: 1; color: var(--purple2); }
.footer-newsletter-box { margin: 0; }
.footer-newsletter-box span { display: block; font-size: 12.5px; opacity: .85; margin-bottom: 8px; line-height: 1.4; max-width: 220px; }
.footer-newsletter-box form { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-newsletter-box input { flex: 1; min-width: 140px; }
.footer-columnas { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px; min-width: 0; }
.footer-columna h4 { margin: 0 0 12px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: #fff; opacity: .55; }
.footer-columna ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-columna a { font-size: 13.5px; opacity: .85; }
.footer-columna a:hover { opacity: 1; color: var(--purple2); }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 16px 24px 24px; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; opacity: .7; }
.footer-bottom p { margin: 0; }
.footer-bottom .rss-link a { color: inherit; }
@media (max-width: 720px) {
  .footer-inner { flex-direction: column; gap: 28px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* Admin: columnas del menú pie */
.menu-pie-columnas-admin { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.menu-pie-columna-admin { background: white; border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.menu-pie-columna-admin-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.menu-pie-columna-admin-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.menu-pie-columna-admin-links li { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; padding: 4px 0; }
.menu-pie-columna-admin-links small { color: var(--gray); font-size: 11.5px; }
.menu-pie-columna-admin-acciones { margin-left: auto; display: flex; gap: 4px; }

/* Pie flotante de publicidad (visible tambien en mobile, a diferencia de los laterales) */
.ad-pie-flotante { position: fixed; left: 0; right: 0; bottom: 0; z-index: 890; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0,0,0,.12); padding: 6px 40px 6px 10px; text-align: center; }
.ad-pie-flotante img, .ad-pie-flotante video, .ad-pie-flotante iframe { max-width: 100%; max-height: 90px; }
.ad-pie-flotante-cerrar { position: absolute; top: 4px; right: 8px; background: rgba(0,0,0,.06); border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 15px; line-height: 1; cursor: pointer; color: var(--gray); }
.ad-pie-flotante-cerrar:hover { background: rgba(0,0,0,.12); }

/* Modo por espacio (cascada / aleatorio) */
.ads-modo-grid { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; max-width: 480px; }
.ads-modo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: white; border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.ads-modo-row select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 12.5px; }
.slot-flotante-pie { top: 1100px; left: 4%; width: 92%; height: 40px; }

/* Centro multimedia: badges, meta, grid */
.media-grid-full { margin-top: 16px; }
.media-item { position: relative; }
.media-badge-cat { position: absolute; top: 6px; left: 6px; z-index: 2; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 10px; background: rgba(0,0,0,.55); color: #fff; }
.media-badge-cat.media-badge-publicidad { background: #7a3ee0; }
.media-badge-cat.media-badge-otro { background: #555; }
.media-badge-ia { position: absolute; top: 6px; right: 6px; z-index: 2; font-size: 9.5px; font-weight: 800; padding: 2px 7px; border-radius: 10px; background: #16a34a; color: #fff; }
.media-meta { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--gray); margin: 4px 0 2px; }

/* Header en tiempo real: cotizaciones + zócalo AHORA */
.cotiz-ticker { background: #10101c; color: #d8d8e6; overflow-x: auto; white-space: nowrap; }
.cotiz-ticker-inner { display: flex; gap: 22px; padding: 6px 24px; font-size: 12px; max-width: 1200px; margin: 0 auto; }
.cotiz-ticker-inner span { flex-shrink: 0; }
.cotiz-ticker-inner b { color: #fff; font-weight: 700; margin-right: 4px; }
.zocalo-ahora { display: flex; align-items: center; gap: 14px; background: #fff3f0; border-top: 1px solid #f3c9be; border-bottom: 1px solid #f3c9be; padding: 7px 24px; overflow: hidden; }
.zocalo-ahora-label { flex-shrink: 0; font-weight: 800; font-size: 11.5px; letter-spacing: .04em; color: #c1361a; text-transform: uppercase; }
.zocalo-ahora-items { display: flex; gap: 26px; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.zocalo-ahora-items a { font-size: 12.5px; color: #333; text-decoration: none; flex-shrink: 0; }
.zocalo-ahora-items a:hover { text-decoration: underline; }
.zocalo-ahora-items a:not(:last-child)::after { content: "•"; margin-left: 26px; color: #d8b3aa; }
@media (max-width: 720px) {
  .cotiz-ticker-inner { gap: 14px; padding: 6px 14px; font-size: 11px; }
  .zocalo-ahora { padding: 6px 14px; gap: 10px; }
}

/* Admin: preview de cotizaciones */
.cotiz-ticker-preview { display: flex; flex-wrap: wrap; gap: 16px; background: #10101c; color: #d8d8e6; border-radius: 6px; padding: 10px 16px; font-size: 12.5px; margin: 8px 0 4px; }
.cotiz-ticker-preview b { color: #fff; margin-right: 4px; }
