/* Publicidad AdSense para páginas independientes. Los huecos están ocultos hasta que hay anuncio activo. */
.lvh-ad { display: none; flex-direction: column; align-items: center; gap: .3rem; width: 100%; max-width: 100%; margin: 1.75rem auto; padding: 0; clear: both; }
.lvh-ad.is-active { display: flex; }
.lvh-ad-label { font: 600 .62rem/1 system-ui, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #777; opacity: .85; }
.lvh-ad-box { width: 100%; max-width: 728px; min-height: 50px; overflow: hidden; border-radius: 8px; }
.lvh-ad-box > ins.adsbygoogle { width: 100% !important; max-width: 100% !important; }
.lvh-ad-box iframe { max-width: 100% !important; }
/* Sin anuncio disponible: se pliega el espacio entero. */
.lvh-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none !important; }
.lvh-ad-in-article { margin: 2rem auto; }
/* Raíles laterales: solo pantallas muy anchas, fuera del contenido. */
.lvh-ad-rail { display: none !important; position: fixed; top: 96px; z-index: 20; width: 160px; margin: 0; }
.lvh-ad-rail .lvh-ad-box { width: 160px; min-height: 600px; }
@media (min-width: 1480px) and (min-height: 720px) {
  .lvh-ad-rail.is-active { display: flex !important; }
  .lvh-ad-rail-left  { left: calc(50% - var(--lvh-rail-half, 550px) - 24px - 160px); }
  .lvh-ad-rail-right { left: calc(50% + var(--lvh-rail-half, 550px) + 24px); }
}
@media (max-width: 899px) { .lvh-ad { margin: 1.25rem auto; } .lvh-ad-box { max-width: 468px; } }
@media (max-width: 520px) { .lvh-ad { margin: 1rem auto; padding: 0 .75rem; } .lvh-ad-label { font-size: .56rem; } .lvh-ad-box { max-width: 320px; } }
html[data-theme="dark"] .lvh-ad-label { color: #aaa; }
@media print { .lvh-ad { display: none !important; } }
