/* =========================================================
   NEXO NOTICIAS — style.css
   Metodología de nombrado: BEM simplificado
   Mobile-first → tablet (768px) → desktop (1024px, 1280px)
   ========================================================= */

/* -------------------- 1. VARIABLES -------------------- */
:root {
  /* Colores */
  --primary: #7600b3;
  --primary-dark: #58008a;
  --primary-light: #a855f7;
  --text: #1e293b;
  --text-muted: #64748b;
  --background: #FFFFFF;
  --background-soft: #f8fafc;
  --border: #e2e8f0;
  --danger: #DC2626;
  --overlay: rgba(88, 0, 135, 0.55);

  /* Tipografía */
  --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Escala tipográfica */
  --fs-xs: 0.75rem;    /* 12px */
  --fs-sm: 0.8125rem;  /* 13px */
  --fs-base: 0.9375rem;/* 15px */
  --fs-md: 1.0625rem;  /* 17px */
  --fs-lg: 1.25rem;    /* 20px */
  --fs-xl: 1.5rem;     /* 24px */
  --fs-2xl: 1.875rem;  /* 30px */
  --fs-3xl: 2.25rem;   /* 36px */

  /* Espaciado */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  /* Layout */
  --container-max: 1280px;
  --content-max: 680px; /* ancho de lectura */
  --radius: 6px;
  --header-height: 56px;

  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition-base: 220ms ease;
}

/* -------------------- 2. RESET -------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Saca el retardo del doble toque y el zoom por doble toque en celulares */
  touch-action: manipulation;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  color: var(--text);
  background-color: var(--background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, p, figure {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

/* Foco visible accesible */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: var(--space-4);
  background: var(--primary);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  z-index: 200;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

.section-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  gap: var(--space-3);
}

.section-heading__link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary-light);
  white-space: nowrap;
}

.section {
  padding-block: var(--space-6);
  border-top: 1px solid var(--border);
}

.section:first-of-type {
  border-top: none;
}

/* -------------------- 3. HEADER -------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 110;
  background: var(--background);
}

.header__top {
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding-inline: var(--space-2);
  gap: var(--space-2);
}

.header__icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--primary);
  border-radius: var(--radius);
  transition: background-color var(--transition-fast);
}

.header__icon-btn:hover,
.header__icon-btn:active {
  background-color: var(--background-soft);
}

.header__icon-btn svg {
  width: 22px;
  height: 22px;
}

.header__logo {
  text-align: center;
  line-height: 1;
  color: var(--primary);
  flex: 1;
}

.header__logo-img {
  height: var(--header-height);
  width: auto;
  max-width: 100%;
  display: inline-block;
  position: relative;
  z-index: 1;
}

.header__logo-main {
  display: block;
  font-size: var(--fs-md);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.header__logo-sub {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--primary-light);
}

/* Categorías: ocultas en mobile, visibles en desktop */
.header__categories {
  display: none;
}

.header__categories::-webkit-scrollbar {
  display: none;
}

.header__category {
  flex: 0 0 auto;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-muted);
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.header__category:hover {
  color: var(--primary);
}

.header__category.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary-light);
}

/* -------------------- 4. MENÚ MÓVIL (drawer) -------------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  z-index: 150;
}

.overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 84%;
  max-width: 320px;
  background: var(--primary);
  color: #fff;
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  z-index: 160;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.drawer.is-open {
  transform: translateX(0);
}

/* Evitar que el gesto del menú arrastre la página y bloquear el zoom por doble toque */
.drawer {
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) calc(var(--space-3) - 2px);
  background: #eef2f7;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 6px rgba(30, 41, 59, 0.06);
}

.drawer__logo {
  line-height: 1.1;
  min-width: 0;
}

.drawer__logo-img {
  height: 58px;
  width: auto;
  display: block;
}

.drawer__logo-main {
  display: block;
  font-size: var(--fs-lg);
  font-weight: 800;
}

.drawer__logo-sub {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #93C5FD;
}

.drawer__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.drawer__close:hover {
  background: rgba(30, 41, 59, 0.08);
}

.drawer__band {
  position: relative;
  height: 1px;
  margin: 0 var(--space-4) var(--space-2);
  background: linear-gradient(to right, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12) 72%, transparent);
}

.drawer__band::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 var(--space-2);
}

.drawer__link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px var(--space-4);
  font-size: 1.125rem; /* 18px */
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
  border-radius: calc(var(--radius) - 2px);
  transition: background-color var(--transition-fast);
}

.drawer__link i {
  flex: 0 0 18px;
  width: 18px;
  text-align: center;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.42);
  transition: color var(--transition-fast);
}

.drawer__link:hover i,
.drawer__link:focus-visible i {
  color: rgba(255, 255, 255, 0.75);
}

.drawer__link:hover,
.drawer__link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.drawer__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
  margin: var(--space-2) var(--space-4);
}

.drawer__footer {
  margin-top: auto;
  padding: var(--space-2) var(--space-4) var(--space-3);
}

.drawer__social {
  display: flex;
  gap: var(--space-2);
  margin-bottom: 6px;
}

.drawer__social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
}

.drawer__social-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.drawer__copyright {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.55);
}

/* -------------------- 5. BÚSQUEDA -------------------- */
.search-panel {
  position: fixed;
  inset: 0;
  background: var(--background);
  z-index: 170;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform var(--transition-base);
}

.search-panel.is-open {
  transform: translateY(0);
}

.search-panel__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.search-panel__form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--background-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding-inline: var(--space-3);
}

.search-panel__form svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-panel__input {
  flex: 1;
  border: none;
  background: transparent;
  padding-block: var(--space-3);
  font-size: var(--fs-base);
  color: var(--text);
}

.search-panel__input:focus {
  outline: none;
}

.search-panel__cancel {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary-light);
  white-space: nowrap;
  padding: var(--space-2);
}

.search-panel__results {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
}

.search-panel__label {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.search-panel__label strong {
  color: var(--text);
}

.search-panel__empty {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-align: center;
  padding-top: var(--space-6);
}

/* -------------------- 6. NOTICIA PRINCIPAL (HERO) -------------------- */
.hero {
  padding-top: var(--space-2);
}

.hero__article {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

.hero__link {
  display: block;
}

.hero__figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  background-color: var(--background-soft);
  position: relative;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  z-index: 2;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 27, 42, 0.92) 0%, rgba(13, 27, 42, 0.55) 42%, rgba(13, 27, 42, 0) 70%);
  z-index: 1;
}

.hero__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-5);
  z-index: 2;
}

.hero__badge {
  display: inline-block;
  background: var(--primary-light);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: var(--space-1) var(--space-2);
  border-radius: 3px;
  margin-bottom: var(--space-3);
}

.hero__title {
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: var(--space-3);
}

.hero__excerpt {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero__meta {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.7);
}

/* -------------------- 6.1 SLIDER HERO -------------------- */
.hero-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

/* La disposición concreta del slider se define al final del archivo
   (sección "SLIDER DE NOTICIAS DESTACADAS — carrusel deslizante"). */
.hero-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(13, 27, 42, 0.55);
  color: #fff;
  font-size: var(--fs-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.hero-slider__arrow:hover {
  background: rgba(13, 27, 42, 0.85);
}

.hero-slider__arrow--prev { left: var(--space-3); }
.hero-slider__arrow--next { right: var(--space-3); }

.hero-slider__dots {
  position: absolute;
  right: var(--space-5);
  bottom: var(--space-4);
  z-index: 3;
  display: flex;
  gap: var(--space-2);
}

.hero-slider__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-slider__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

/* -------------------- 6.1.1 ACCESOS RÁPIDOS -------------------- */
.accesos-rapidos {
  width: 100%;
  display: flex;
  gap: 8px;
  margin: 12px 0 8px;
}

.acceso {
  flex: 1;
  min-width: 0;
  height: 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 6px 8px;
  gap: 7px;

  border-radius: 7px;
  color: #fff;
  text-decoration: none;

  box-sizing: border-box;

  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.acceso > i {
  flex-shrink: 0;

  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;

  font-size: 16px;
  color: #fff;
}

.acceso span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.acceso strong {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.acceso small {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 700;
  color: #FFC928;
  white-space: nowrap;
}

.acceso-reporte {
  background: #087CC9;
}

.acceso-empleos {
  background: #08A957;
}

.acceso-ofertas {
  background: #F47B16;
}

.acceso:active {
  transform: scale(0.97);
}

@media (max-width: 380px) {
  .accesos-rapidos {
    gap: 5px;
  }

  .acceso {
    height: 52px;
    padding: 5px;
    gap: 5px;
    border-radius: 6px;
  }

  .acceso > i {
    width: 28px;
    height: 28px;
    font-size: 13px;
    border-width: 1.5px;
  }

  .acceso strong {
    font-size: 11px;
  }

  .acceso small {
    font-size: 10px;
  }
}

@media (max-width: 768px) {
  .accesos-rapidos {
    margin: 8px 0 10px;
  }

  .hero {
    padding-top: 0;
  }
}

/* -------------------- 6.2 SLIDER DE AUSPICIANTES -------------------- */
.banner-slider {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: var(--background);
  box-shadow: 0 4px 18px rgba(30, 41, 59, 0.07);
  margin-block: var(--space-5);
  touch-action: pan-y;
}

.home-layout__sidebar .banner-slider {
  margin-block: 0;
}

.banner-slider__screen {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.banner-slider--home-top .banner-slider__screen { height: 112px; }
.banner-slider--noticia-inline .banner-slider__screen { height: 116px; }
.banner-slider--sidebar-top .banner-slider__screen,
.banner-slider--sidebar-bottom .banner-slider__screen { height: 240px; }

.banner-slider__slide {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.banner-slider__slide.is-active {
  display: flex;
  z-index: 1;
  animation: bannerFadeIn 0.55s ease;
}

@keyframes bannerFadeIn {
  from { opacity: 0; transform: scale(1.015); }
  to   { opacity: 1; transform: scale(1); }
}

.banner-slider__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--background);
}

.banner-slider__text-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 var(--space-5);
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: var(--primary);
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Banner por defecto: «Espacio Disponible» → WhatsApp de la empresa */
.banner-slider__fallback {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  padding: 0 var(--space-5);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, var(--primary-dark) 100%);
  color: #fff;
  overflow: hidden;
}

.banner-slider__fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.14), transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(255, 255, 255, 0.1), transparent 44%);
}

.banner-slider__fallback::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-20deg);
  animation: bannerSheen 5.5s ease-in-out infinite;
}

@keyframes bannerSheen {
  0%, 55% { left: -60%; }
  100%    { left: 135%; }
}

.banner-slider__fallback-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  margin-bottom: 2px;
}

.banner-slider__fallback-title {
  position: relative;
  z-index: 1;
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.banner-slider__fallback-text {
  position: relative;
  z-index: 1;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.85);
  max-width: 46ch;
  line-height: 1.4;
}

/* En el líder de portada el contenido va horizontal para que quepa el texto */
.banner-slider--home-top .banner-slider__fallback {
  flex-direction: row;
  text-align: left;
  align-items: center;
  gap: var(--space-4);
}

.banner-slider--home-top .banner-slider__fallback-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.banner-slider--home-top .banner-slider__fallback-title {
  font-size: var(--fs-base);
}

.banner-slider--home-top .banner-slider__fallback-text {
  font-size: var(--fs-sm);
  max-width: 70ch;
}

/* Etiqueta «Publicidad» flotando por encima del banner */
.banner-slider__tag {
  position: absolute;
  top: -13px;
  right: 12px;
  z-index: 6;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  padding: 1px 8px;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(30, 41, 59, 0.1);
}

/* Controles */
.banner-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: var(--fs-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.12);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.banner-slider:hover .banner-slider__arrow,
.banner-slider__arrow:focus-visible {
  opacity: 1;
}

.banner-slider__arrow:hover {
  background: #fff;
}

.banner-slider__arrow--prev { left: 6px; }
.banner-slider__arrow--next { right: 6px; }

.banner-slider__dots {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 4;
  display: flex;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
}

.banner-slider__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.banner-slider__dot.is-active {
  background: var(--primary);
  transform: scale(1.15);
}

@media (max-width: 768px) {
  .banner-slider--home-top .banner-slider__screen { height: 92px; }
  .banner-slider--noticia-inline .banner-slider__screen { height: 96px; }
  .banner-slider--home-top .banner-slider__fallback { gap: var(--space-3); }
  .banner-slider--home-top .banner-slider__fallback-icon { width: 32px; height: 32px; }
  .banner-slider--home-top .banner-slider__fallback-text { display: none; }
}

@media (max-width: 520px) {
  .banner-slider__arrow { display: none; }
}

/* -------------------- 6.3 REPRODUCTOR DE TV EN VIVO -------------------- */
.tv-player {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #000;
  box-shadow: 0 4px 18px rgba(30, 41, 59, 0.07);
  margin-block: var(--space-5);
}

.home-layout__sidebar .tv-player { margin-top: 20px; margin-bottom: 0; }

.tv-player__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.tv-player__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.tv-player__tag {
  position: absolute;
  top: -13px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.35);
}

.tv-player__tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: tvPulse 1.4s ease-in-out infinite;
}

@media (min-width: 1024px) {
  .tv-player__tag {
    right: auto;
    left: 12px;
  }
}

@keyframes tvPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* -------------------- 7. NEWS CARD (últimas noticias) -------------------- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.news-card {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.news-card__link {
  display: flex;
  gap: var(--space-3);
  width: 100%;
}

.news-card__figure {
  flex: 0 0 96px;
  width: 96px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--background-soft);
  position: relative;
}

.news-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.news-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, var(--background-soft), var(--border-color, #e3e3e3));
}

.news-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  transition: transform var(--transition-base), background var(--transition-base);
}

.news-card__link:hover .news-card__play {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(0, 0, 0, 0.75);
}

.news-card__link:hover .news-card__image {
  transform: scale(1.04);
}

.news-card__content {
  flex: 1;
  min-width: 0;
}

.news-card__category {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--primary-light);
  margin-bottom: var(--space-1);
}

.news-card__title {
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__link:hover .news-card__title {
  color: var(--primary-light);
}

.news-card__time {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* -------------------- 8. LO MÁS LEÍDO -------------------- */
.ranked-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.ranked-item {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
}

.ranked-item__number {
  flex: 0 0 auto;
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--border);
  width: 2ch;
  line-height: 1;
}

.ranked-item__title {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.ranked-item__link:hover .ranked-item__title {
  color: var(--primary-light);
}

/* -------------------- 9. CATEGORÍAS (explorar) -------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.category-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4);
  background: var(--background-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--primary);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.category-tile:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

/* -------------------- 10. NEWSLETTER -------------------- */
.newsletter {
  background: var(--background-soft);
  border-radius: var(--radius);
  padding: var(--space-6) var(--space-5);
  text-align: center;
}

.newsletter__title {
  font-size: var(--fs-lg);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.newsletter__text {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 420px;
  margin-inline: auto;
}

.newsletter__input {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--fs-base);
  background: var(--background);
  color: var(--text);
}

.newsletter__input:focus {
  outline: none;
  border-color: var(--primary-light);
}

.newsletter__input.is-invalid {
  border-color: var(--danger);
}

.newsletter__button {
  padding: var(--space-3) var(--space-4);
  background: var(--primary);
  color: #fff;
  font-size: var(--fs-base);
  font-weight: 700;
  border-radius: var(--radius);
  transition: background-color var(--transition-fast);
}

.newsletter__button:hover {
  background: var(--primary-light);
}

.newsletter__feedback {
  font-size: var(--fs-xs);
  min-height: 1em;
}

.newsletter__feedback.is-error {
  color: var(--danger);
}

.newsletter__feedback.is-success {
  color: #16A34A;
}

/* -------------------- 11. FOOTER -------------------- */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-7) 0 var(--space-5);
  margin-top: var(--space-7);
}

.footer__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* En responsive: ocultar columnas de categorías/enlaces */
.footer__col--links {
  display: none;
}

.footer__brand {
  text-align: center;
}

.footer__brand-logo {
  /* display: inline-block; */
  font-size: var(--fs-xl);
  font-weight: 800;
  color: #fff;
  margin-bottom: var(--space-1);
  letter-spacing: 0.02em;
}

.footer__logo-img {
  height: 110px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.footer__brand-sub {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #93C5FD;
  margin-bottom: var(--space-4);
}

.footer__description {
  font-size: var(--fs-sm);
  line-height: 1.65;
  max-width: 36ch;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  margin-inline: auto;
}

.footer__heading {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__list a {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.78);
  transition: color var(--transition-fast);
  display: inline-block;
  padding: 2px 0;
}

.footer__list a:hover {
  color: #fff;
  transform: translateX(3px);
}

.footer__social {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.footer__social-empty {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.45);
}

.footer__social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  transition: all var(--transition-fast);
}

.footer__social-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  letter-spacing: 0.02em;
}
.footer__admin-link {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.25);
  vertical-align: middle;
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer__admin-link:hover {
  color: rgba(255, 255, 255, 0.85);
  transform: scale(1.1);
}
.footer__credit {
  margin-top: 6px;
}
.footer__credit a {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer__credit a:hover {
  color: #fff;
  text-decoration: underline;
}

/* -------------------- 12. ARTÍCULO (noticia.html) -------------------- */
.article-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding-inline: var(--space-2);
}

.article-header__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--primary);
  border-radius: var(--radius);
}

.article-header__back:hover {
  background-color: var(--background-soft);
}

.article-header__logo {
  text-align: center;
  line-height: 1.1;
  color: var(--primary);
}

.article-header__share {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--primary);
  border-radius: var(--radius);
}

.article-header__share:hover {
  background-color: var(--background-soft);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: var(--content-max);
  margin: var(--space-4) auto 0;
  color: var(--primary);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  padding: var(--space-2) 0;
}

.back-link:hover {
  text-decoration: underline;
}

.article__back {
  margin-top: var(--space-6);
  text-align: center;
}

.back-link--center {
  display: inline-flex;
  margin-inline: auto;
}

.article {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--space-5) var(--space-4) var(--space-7);
}

.article__category {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  margin-bottom: var(--space-3);
}

.article__title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: var(--space-4);
}

.article__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

.article__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.article__figure {
  margin: 0 0 var(--space-5);
  border-radius: var(--radius);
  overflow: hidden;
}

.article__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.article__figure--video {
  background: #000;
}

.article__video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.article__video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.article-gallery {
  position: relative;
  background: #000;
}
.article-gallery__track {
  position: relative;
}
.article-gallery__slide {
  display: none;
}
.article-gallery__slide.is-active {
  display: block;
}
.article-gallery__slide .article__image {
  display: block;
}
.article-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  transition: background 0.18s ease;
}
.article-gallery__arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}
.article-gallery__arrow--prev { left: var(--space-3); }
.article-gallery__arrow--next { right: var(--space-3); }
.article-gallery__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--space-3);
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.article-gallery__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.article-gallery__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}
.article-gallery__counter {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 3;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: var(--fs-xs, 12px);
  font-weight: 600;
}
@media (max-width: 640px) {
  .article-gallery__arrow { display: none; }
}

.article__body {
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--text);
}

.article__lead {
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: var(--space-5);
}

.article__body p {
  margin-bottom: var(--space-4);
}

.article__body h2 {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text);
  margin: var(--space-6) 0 var(--space-4);
}

.article__quote {
  border-left: 3px solid var(--primary-light);
  padding-left: var(--space-4);
  margin: var(--space-5) 0;
  font-size: var(--fs-lg);
  font-weight: 600;
  font-style: italic;
  color: var(--primary);
  line-height: 1.5;
}

.article__inline-figure {
  margin: var(--space-5) 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.article__inline-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.article__caption {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  padding: var(--space-2) var(--space-1) 0;
}

.article__fuente {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--background-soft);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
}

.article__fuente-label {
  font-weight: 700;
  color: var(--text);
}

.article__fuente-link {
  color: var(--primary);
  font-weight: 600;
  word-break: break-all;
}

.article__fuente-link:hover {
  text-decoration: underline;
}

.article__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.article__tags-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
}

.article__tag {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--primary-light);
  background: var(--background-soft);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
}

.article__tag:hover {
  background: #E9EEFB;
}

.article__share {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.article__share-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.article__share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
  transition: box-shadow 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.share-btn svg {
  flex-shrink: 0;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(16, 24, 40, 0.14);
  filter: brightness(1.05);
}

.share-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
  filter: brightness(0.98);
}

.share-btn--facebook {
  background: #1877f2;
  color: #fff;
  border-color: #1877f2;
}

.share-btn--whatsapp {
  background: #25d366;
  color: #fff;
  border-color: #25d366;
}

.share-btn--native {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@media (max-width: 520px) {
  .article__share-buttons {
    flex-wrap: wrap;
    gap: 8px;
  }

  .share-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 8px;
    gap: 6px;
    font-size: 12px;
    white-space: nowrap;
  }

  .share-btn svg {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
  }
}

.related {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--space-4) var(--space-7);
}

/* Barra de navegación inferior (móvil, sólo en noticia.html) */
.tabbar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--background);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 90;
}

.tabbar__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2) 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tabbar__link svg {
  width: 20px;
  height: 20px;
}

.tabbar__link.is-active {
  color: var(--primary-light);
}

/* -------------------- 20. RADIO PLAYER -------------------- */
.radio-player {
  position: sticky;
  top: var(--header-height);
  z-index: 115;
  background: linear-gradient(135deg, var(--radio-bg-from, #3d2f5b) 0%, var(--radio-bg-to, #241a3d) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: clip;
  overflow-y: visible;
}

.radio-player__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}

.radio-player__info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
}

.radio-player__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: radio-pulse 1.8s ease-in-out infinite;
}

.radio-player__dot.is-paused {
  animation: none;
  background: rgba(255, 255, 255, 0.35);
}

@keyframes radio-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.radio-player__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 10px;
  font-weight: 700;
  color: #22c55e;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  animation: radio-blink 1.8s ease-in-out infinite;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
  margin-right: var(--space-2);
  cursor: pointer;
  transition: opacity var(--transition-fast);
  line-height: 1;
  gap: 2px;
}

.radio-player__label-text {
  font-size: 10px;
  font-weight: 700;
}

.radio-player__listeners {
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  animation: none;
  text-shadow: none;
}

.radio-player__label:hover {
  opacity: 0.85;
}

@keyframes radio-blink {
  0%, 100% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.65), 0 0 3px rgba(34, 197, 94, 0.4);
  }
  50% {
    opacity: 0.45;
    text-shadow: 0 0 3px rgba(34, 197, 94, 0.25);
  }
}

.radio-player__station {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.radio-player__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  padding: 0;
  border: none;
  background: none;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-fast);
}

.radio-player__btn-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.radio-player__btn .radio-player__icon {
  position: relative;
  z-index: 1;
  opacity: 0.55;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.radio-player__btn:hover {
  transform: scale(1.05);
}

/* Onda expansiva para invitar a reproducir */
.radio-player__btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.8);
  pointer-events: none;
  animation: radio-wave 2s ease-out infinite;
}

.radio-player__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 50%;
  border: 1px solid rgba(34, 197, 94, 0.45);
  pointer-events: none;
  animation: radio-wave 2s ease-out 1s infinite;
}

@keyframes radio-wave {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

.radio-player:not(.is-paused) .radio-player__btn::before,
.radio-player:not(.is-paused) .radio-player__btn::after {
  animation: none;
  border-color: rgba(255, 255, 255, 0.25);
}

.radio-player__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.radio-player__app {
  position: relative;
  z-index: 2;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: background-color var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
  white-space: nowrap;
}

.radio-player__app:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.04);
}

.radio-player__app svg {
  flex-shrink: 0;
}

@media (max-width: 400px) {
  .radio-player__app {
    padding: 3px 6px;
    font-size: 11px;
  }

  .radio-player__actions {
    gap: var(--space-2);
  }

  .radio-player__btn {
    width: 68px;
    height: 68px;
  }

  .radio-player__info {
    gap: var(--space-2);
  }

  .radio-player__station {
    font-size: var(--fs-xs);
  }
}

/* En reproducción, solo entonces se muestra "Instalar" */
.radio-player:not(.is-paused) .radio-player__app {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.radio-player__icon {
  width: 20px;
  height: 20px;
}

.radio-player__icon--play {
  display: none;
  margin-left: 2px;
}

.radio-player.is-paused .radio-player__icon--pause {
  display: none;
}

.radio-player.is-paused .radio-player__icon--play {
  display: block;
}

/* -------------------- 13. UTILIDADES -------------------- */
.icon-btn { background: none; }

.hidden { display: none !important; }

/* -------------------- 14. TABLET (>=768px) -------------------- */
@media (min-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .container {
    padding-inline: var(--space-6);
  }

  .header__top {
    padding-inline: var(--space-4);
  }

  .header__logo-img {
    height: 42px;
  }

  .header__categories {
    display: flex;
    gap: var(--space-5);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0;
    margin-left: auto;
  }

  .header__categories::-webkit-scrollbar {
    display: none;
  }

  .hero__figure {
    aspect-ratio: 16 / 9;
  }

  .hero__title {
    font-size: var(--fs-2xl);
    max-width: 34ch;
  }

  .news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }

  .news-card__figure {
    flex: 0 0 120px;
    width: 120px;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-6);
    align-items: start;
  }

  .footer__col--links {
    display: block;
  }

  .footer__brand {
    grid-column: 1;
    text-align: left;
  }

  .footer__description {
    text-align: left;
    margin-inline: 0;
  }

  .footer__social {
    justify-content: flex-start;
  }

  .footer__heading {
    text-align: left;
  }

  .footer__bottom {
    margin-top: var(--space-7);
  }

  .article__title {
    font-size: var(--fs-3xl);
  }
}

/* -------------------- 15. DESKTOP (>=1024px) -------------------- */
@media (min-width: 1024px) {
  .header__top {
    height: 72px;
    padding-inline: 0;
    gap: var(--space-4);
  }

  .header__icon-btn[data-menu-toggle] {
    display: none;
  }

  .header__logo {
    flex: 0 0 auto;
    margin-bottom: 0;
    text-align: left;
  }

  .header__logo-main { font-size: var(--fs-lg); }

  .header__logo-img {
    height: 42px;
  }

  .header__menu-toggle {
    display: none;
  }

  .header__nav-desktop {
    display: flex;
  }

  .header__categories {
    display: flex;
    flex: 1;
    justify-content: center;
    gap: var(--space-6);
    overflow: visible;
  }

  .radio-player__inner {
    height: 40px;
  }

  .home-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-7);
    align-items: start;
  }

  .home-layout__main {
    grid-column: 1;
    grid-row: 1 / span 3;
  }

  .home-layout__sidebar {
    grid-column: 2;
    grid-row: 1 / span 3;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }

  .hero__figure {
    aspect-ratio: 21 / 9;
  }

  .hero__title {
    font-size: var(--fs-3xl);
    max-width: 40ch;
  }

  .hero__excerpt {
    max-width: 60ch;
    font-size: var(--fs-base);
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .newsletter {
    padding: var(--space-7);
  }

  .newsletter__form {
    flex-direction: row;
  }

  .newsletter__button {
    flex: 0 0 auto;
  }

  .footer {
    padding: var(--space-7) 0 var(--space-6);
  }

  .footer__grid {
    grid-template-columns: 1.8fr 1fr 1fr auto;
    gap: var(--space-7);
  }

  .footer__bottom {
    margin-top: var(--space-7);
    padding-top: var(--space-5);
  }

  .tabbar {
    display: none;
  }

  .article__title {
    font-size: 2.5rem;
  }
}

@media (min-width: 1280px) {
  .home-layout {
    gap: var(--space-7);
  }
}

/* -------------------- 16. MOVIMIENTO REDUCIDO -------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------------------- 17. PÁGINA DE ERROR -------------------- */
.error-page {
  text-align: center;
  padding: var(--space-7) var(--space-4);
}

.error-page__code {
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: 0;
}

.error-page__title {
  font-size: var(--fs-xl);
  margin: var(--space-4) 0 var(--space-2);
  color: var(--text);
}

.error-page__text {
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.error-page__link {
  display: inline-block;
  background: var(--primary-light);
  color: #fff;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: background var(--transition-fast);
}

.error-page__link:hover {
  background: var(--primary);
}

/* -------------------- 18. BÚSQUEDA (página dedicada) -------------------- */
.search-page {
  max-width: 500px;
  margin: 0 auto var(--space-6);
}

.search-page__form {
  display: flex;
  gap: var(--space-2);
}

.search-page__input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--fs-base);
  font-family: inherit;
}

.search-page__input:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.search-page__button {
  padding: var(--space-3) var(--space-5);
  background: var(--primary-light);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-page__button:hover {
  background: var(--primary);
}

.search-page__count {
  color: var(--text-muted);
  margin-bottom: var(--space-5);
}

/* -------------------- 19. COMENTARIOS -------------------- */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.comment {
  background: var(--background-soft);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius);
}

.comment__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.comment__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.comment__edit-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
}

.comment__edit-btn:hover {
  color: var(--primary-dark);
}

.comment-form--edit {
  margin-top: var(--space-3);
  margin-bottom: 0;
  padding: var(--space-3);
}

.comment-form--edit textarea {
  min-height: 80px;
}

.comment-form__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.comment-form__cancel {
  padding: 10px 18px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.comment-form__cancel:hover {
  background: var(--background-soft);
  color: var(--text);
}

.comment__author {
  font-weight: 600;
  color: var(--text);
}

.comment__date {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.comment__text {
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.comment-feedback {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  font-size: var(--fs-sm);
}
.comment-feedback--ok {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.comment-feedback--error {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.section--comments {
  margin-top: var(--space-7);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--background-soft);
  border-radius: var(--radius);
  margin-bottom: var(--space-6);
}

.comment-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.comment-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.comment-form__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
}

.comment-form__input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius);
  background: var(--background, #fff);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.comment-form__input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.15);
}

.comment-form__input--textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.comment-form__submit {
  align-self: flex-start;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-contrast, #fff);
  font: inherit;
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.comment-form__submit:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

@media (min-width: 640px) {
  .comment-form__row {
    grid-template-columns: 1fr 1fr;
  }
}

/* -------------------- 20. PÁGINA INTERIOR / CONTACTO -------------------- */
.page-content {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-block: var(--space-6);
}

.page-content__title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: var(--space-6);
  position: relative;
}

.page-content__title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--primary);
  margin: var(--space-3) auto 0;
}

.page-content__body {
  color: var(--text);
  line-height: 1.7;
  font-size: var(--fs-base);
}

.page-content__lead {
  color: var(--text-muted);
  text-align: center;
  max-width: 520px;
  margin: 0 auto var(--space-6);
  font-size: var(--fs-base);
  line-height: 1.6;
}

/* -------------------- 20.1 TARJETA EN CONSTRUCCIÓN -------------------- */
.construction-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-7) var(--space-5);
  background: var(--background-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 18px rgba(13, 27, 42, 0.07);
}

.construction-card__icon {
  font-size: 44px;
  color: var(--primary);
  background: rgba(168, 85, 247, 0.12);
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: var(--space-5);
}

.construction-card__label {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(168, 85, 247, 0.12);
  border-radius: 999px;
  padding: var(--space-1) var(--space-3);
  margin-bottom: var(--space-3);
}

.construction-card__title {
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.construction-card__text {
  color: var(--text-muted);
  font-size: var(--fs-base);
  line-height: 1.6;
  max-width: 38ch;
  margin-bottom: var(--space-6);
}

.construction-card__btn {
  display: inline-block;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 700;
  padding: 11px 26px;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.construction-card__btn:hover {
  background: var(--primary-dark);
}

.construction-card__btn:active {
  transform: scale(0.97);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--background-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(13, 27, 42, 0.08);
  border-color: var(--primary-light);
}

.contact-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.12);
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.contact-card__title {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.contact-card__link {
  font-size: var(--fs-base);
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}

.contact-card__link:hover {
  text-decoration: underline;
}

.contact-card__text {
  font-size: var(--fs-base);
  color: var(--text);
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(13, 27, 42, 0.06);
}

.contact-map__iframe {
  display: block;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* -------------------- 21. VIDEOS (MARQUESINA + PÁGINA) -------------------- */
.videos-band {
  margin-top: var(--space-7);
  padding: var(--space-7) 0;
  background: transparent;
  border-top: 1px solid var(--border);
}

.videos-band__heading {
  max-width: var(--container-width, 1200px);
  margin: 0 auto;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.videos-band__title {
  color: var(--text);
  font-size: var(--fs-xl);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.videos-band__title::before {
  content: "";
  width: 5px;
  height: 1.2em;
  border-radius: 3px;
  background: var(--primary);
}

.videos-band__more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--primary);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: var(--space-2) var(--space-4);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.videos-band__more:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.videos-marquee {
  overflow: hidden;
  padding: var(--space-2) 0;
  cursor: grab;
}

.videos-marquee:active {
  cursor: grabbing;
}

.videos-marquee__track {
  display: flex;
  width: max-content;
  animation: videos-marquee-scroll 45s linear infinite;
  will-change: transform;
}

.videos-marquee:hover .videos-marquee__track {
  animation-play-state: paused;
}

.videos-marquee__group {
  display: flex;
  gap: var(--space-5);
  padding-right: var(--space-5);
}

@keyframes videos-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Tarjeta de video (marquesina y página de videos) */
.video-card {
  flex: 0 0 auto;
  width: 400px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(13, 27, 42, 0.08);
  cursor: pointer;
}

.video-card:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.video-card__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: transparent;
}

.video-card__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card__poster {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: filter var(--transition-fast);
}

.video-card:hover .video-card__poster {
  filter: brightness(1.12);
}

.video-card__play {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-fast);
}

.video-card__play svg {
  margin-left: 3px;
}

.video-card:hover .video-card__play {
  transform: scale(1.1);
}

/* Modal fullscreen de videos (portada) */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  background: #000;
  padding: var(--space-5);
}

.video-modal__frame {
  width: min(92vw, 1280px);
  aspect-ratio: 16 / 9;
}

.video-modal__frame--portrait {
  width: auto;
  height: min(94dvh, 1100px);
  aspect-ratio: 9 / 16;
}

.video-modal__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

.video-modal__close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.video-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.video-modal__title {
  color: #fff;
  font-size: var(--fs-md);
  margin: 0;
  max-width: 92vw;
  text-align: center;
}

@media (max-width: 640px) {
  .video-modal { padding: var(--space-3); }
  .video-modal__close { top: var(--space-3); right: var(--space-3); }
}

.video-card__title {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-sm);
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.6em;
}

/* Página /videos */
.videos-page {
  padding-top: var(--space-6);
}

.videos-page__intro {
  color: var(--text-muted);
  margin: var(--space-2) 0 var(--space-5);
}

.videos-page__empty {
  color: var(--text-muted);
  padding: var(--space-7) 0;
}

.videos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.video-card--static {
  width: 100%;
  box-shadow: 0 2px 12px rgba(13, 27, 42, 0.08);
}

@media (min-width: 640px) {
  .videos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .videos-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .video-card { width: 310px; }
  .videos-band__heading { margin-bottom: var(--space-4); }
}

/* -------------------- CLIMA (widget sidebar) -------------------- */
.weather-widget {
  margin-block: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 12%, #0369a1 55%, #075985 100%);
  color: #fff;
  padding: var(--space-4);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  position: relative;
  transition: background 0.6s ease, box-shadow 0.6s ease;
}

.weather-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.18), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.1), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.weather-widget__header,
.weather-widget__body,
.weather-widget__forecast {
  position: relative;
  z-index: 1;
}

/* Fondo por defecto si no llega un tema (respaldo) */
.weather-widget:not([class*="weather-widget--"]) {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 12%, #0369a1 55%, #075985 100%);
}

/* --- TEMA: SOL (despejado) --- */
.weather-widget--sunny {
  background: linear-gradient(160deg, #0c8de0 0%, #38bdf8 52%, #60a5fa 100%);
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.3);
}

.weather-widget--sunny::after {
  content: "";
  position: absolute;
  top: -46px;
  right: -46px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 90, 0.95) 0%, rgba(255, 214, 90, 0.5) 45%, transparent 70%);
  filter: blur(2px);
  z-index: 0;
  animation: weather-glow 7s ease-in-out infinite;
}

@keyframes weather-glow {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%      { transform: scale(1.08); opacity: 1; }
}

/* --- TEMA: LUNA (despejado de noche) --- */
.weather-widget--moon {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #312e81 135%);
  box-shadow: 0 6px 22px rgba(30, 41, 59, 0.45);
}

.weather-widget--moon::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-size: 120px 120px;
  background-image:
    radial-gradient(1.5px 1.5px at 22px 28px, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 55px 80px, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 95px 45px, rgba(255, 255, 255, 0.75), transparent);
  z-index: 0;
  animation: weather-stars 40s linear infinite;
}

@keyframes weather-stars {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 120px 120px, 120px 120px, 120px 120px; }
}

/* --- TEMA: NUBES --- */
.weather-widget--clouds {
  background: linear-gradient(160deg, #40536a 0%, #5c7188 55%, #7b8fa5 100%);
  box-shadow: 0 6px 22px rgba(71, 85, 105, 0.4);
}

.weather-widget--clouds::after {
  content: "";
  position: absolute;
  top: 16%;
  left: -30%;
  width: 92px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    22px -15px 0 -3px rgba(255, 255, 255, 0.55),
    45px -4px 0 -8px rgba(255, 255, 255, 0.45);
  filter: blur(0.5px);
  z-index: 0;
  animation: weather-clouds 26s linear infinite;
}

.weather-widget--clouds-night {
  background: linear-gradient(160deg, #1e293b 0%, #334155 55%, #475569 100%);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.45);
}

.weather-widget--clouds-night::after {
  content: "";
  position: absolute;
  top: 14%;
  left: -30%;
  width: 92px;
  height: 30px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.4);
  box-shadow:
    22px -15px 0 -3px rgba(226, 232, 240, 0.45),
    45px -4px 0 -8px rgba(226, 232, 240, 0.35);
  z-index: 0;
  animation: weather-clouds 26s linear infinite;
}

@keyframes weather-clouds {
  from { left: -30%; }
  to   { left: 125%; }
}

/* --- TEMA: LLUVIA (incluye llovizna) --- */
.weather-widget--rain {
  background: linear-gradient(165deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.45);
}

.weather-widget--rain::after {
  content: "";
  position: absolute;
  inset: -60px -30px;
  background-image: repeating-linear-gradient(
    161deg,
    transparent 0 11px,
    rgba(255, 255, 255, 0.34) 11px 13px
  );
  z-index: 0;
  animation: weather-rain 0.85s linear infinite;
}

@keyframes weather-rain {
  from { transform: translate(0, -45px); }
  to   { transform: translate(-7px, 45px); }
}

/* --- TEMA: TORMENTA --- */
.weather-widget--storm {
  background: linear-gradient(165deg, #0f172a 0%, #1e1b4b 55%, #3b0764 130%);
  box-shadow: 0 6px 22px rgba(59, 7, 100, 0.45);
}

.weather-widget--storm::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 12%, rgba(253, 224, 71, 0.5), transparent 34%),
    repeating-linear-gradient(
      161deg,
      transparent 0 9px,
      rgba(255, 255, 255, 0.18) 9px 11px
    );
  mix-blend-mode: screen;
  z-index: 0;
  animation: weather-storm 4.5s infinite;
}

@keyframes weather-storm {
  0%, 100% { opacity: 0.6; }
  9%        { opacity: 1; }
  11%       { opacity: 0.3; }
  13%       { opacity: 0.9; }
  15%       { opacity: 0.6; }
  54%       { opacity: 0.6; }
  59%       { opacity: 1; }
  61%       { opacity: 0.35; }
  63%       { opacity: 0.85; }
  65%       { opacity: 0.6; }
}

/* --- TEMA: NIEVE --- */
.weather-widget--snow {
  background: linear-gradient(165deg, #3f4f63 0%, #57697f 55%, #6f8196 100%);
  box-shadow: 0 6px 22px rgba(71, 85, 105, 0.4);
}

.weather-widget--snow::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-size: 120px 120px;
  background-image:
    radial-gradient(2px 2px at 22px 32px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(2px 2px at 64px 74px, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(3px 3px at 96px 42px, rgba(255, 255, 255, 0.65), transparent);
  z-index: 0;
  animation: weather-snow 7s linear infinite;
}

@keyframes weather-snow {
  from { background-position: 0 0; }
  to   { background-position: 0 120px; }
}

/* --- TEMA: NIEBLA --- */
.weather-widget--fog {
  background: linear-gradient(165deg, #3d4f64 0%, #5a6c80 55%, #74879a 100%);
  box-shadow: 0 6px 22px rgba(71, 85, 105, 0.4);
}

.weather-widget--fog::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -24px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  filter: blur(16px);
  z-index: 0;
  animation: weather-fog 11s ease-in-out infinite alternate;
}

@keyframes weather-fog {
  from { transform: translateX(-7%); }
  to   { transform: translateX(7%); }
}

.home-layout__sidebar .weather-widget {
  margin-block: 0;
}

.weather-widget__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.weather-widget__clock {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: #e0f2fe;
}

.weather-widget__icon {
  color: #e0f2fe;
}

.weather-widget__title {
  font-size: var(--fs-base);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e0f2fe;
}

.weather-widget__body {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.weather-widget__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.weather-widget__img {
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.weather-widget__temp {
  font-size: var(--fs-2xl);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.weather-widget__details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.weather-widget__desc {
  font-size: var(--fs-base);
  font-weight: 700;
}

.weather-widget__location {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.85);
}

.weather-widget__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-3);
  margin-top: var(--space-2);
}

.weather-widget__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.14);
  padding: 2px 8px;
  border-radius: 999px;
}

.weather-widget__forecast {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-widget__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  padding: var(--space-2) 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.weather-widget__day-name {
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e0f2fe;
}

.weather-widget__day-icon {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.weather-widget__day-temps {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.weather-widget__day-max {
  font-size: var(--fs-base);
  font-weight: 800;
}

.weather-widget__day-min {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.75);
}

/* -------------------- COTIZACIONES (al guaraní) -------------------- */
.section-subtitle {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.quotes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.quotes-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background);
  box-shadow: 0 1px 4px rgba(30, 41, 59, 0.04);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.quotes-item:hover {
  border-color: var(--primary-light);
  box-shadow: 0 2px 10px rgba(30, 41, 59, 0.08);
}

.quotes-item__top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.quotes-item__flag {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(30, 41, 59, 0.25);
  object-fit: cover;
  flex-shrink: 0;
}

.quotes-item__name {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quotes-item__code {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  background: rgba(168, 85, 247, 0.1);
  padding: 1px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.quotes-item__value {
  margin-left: auto;
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Escritorio: cotizaciones en línea para ocupar menos espacio */
@media (min-width: 1024px) {
  .quotes-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-2);
  }

  .quotes-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  .quotes-item__value {
    margin-left: 0;
    font-size: var(--fs-base);
  }
}

@media (max-width: 400px) {
  .quotes-item__name {
    font-size: var(--fs-sm);
  }
  .quotes-item__value {
    font-size: var(--fs-base);
  }
}

/* =========================================================
   PLANTILLA 2 — REDISEÑO DE PORTADA
   Fila doble clima + cotizaciones, clima en banner ancho con
   pronóstico en fila y cotizaciones en una sola tarjeta.
   Todo aislado: solo afecta a la Plantilla 2 y no toca los
   colores del sitio (--primary y compañía siguen viniendo del panel).
   ========================================================= */

/* -------------------- FILA DOBLE (clima + cotizaciones) -------------------- */
.info-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding-block: var(--space-6);
  border-top: 1px solid var(--border);
}

@media (min-width: 900px) {
  .info-pair {
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
  }
}

/* -------------------- CLIMA (banner ancho) -------------------- */
.weather-widget--banner {
  margin-block: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.weather-widget--banner .weather-widget__header {
  margin-bottom: 0;
}

.weather-widget--banner .weather-widget__body {
  gap: var(--space-4);
}

.weather-widget--banner .weather-widget__main {
  flex-shrink: 0;
}

.weather-widget--banner .weather-widget__img {
  width: 64px;
  height: 64px;
}

.weather-widget--banner .weather-widget__details {
  gap: var(--space-1);
}

.weather-widget--banner .weather-widget__temp {
  font-size: var(--fs-3xl);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.weather-widget--banner .weather-widget__forecast {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-top: 0;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.weather-widget--banner .weather-widget__day {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2);
}

.weather-widget--banner .weather-widget__day-name {
  min-width: 3.5ch;
  text-align: left;
}

.weather-widget--banner .weather-widget__day-temps {
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

@media (max-width: 520px) {
  .weather-widget--banner .weather-widget__forecast {
    grid-template-columns: 1fr;
  }

  .weather-widget--banner .weather-widget__day {
    justify-content: flex-start;
  }
}

/* -------------------- COTIZACIONES (tarjeta única horizontal) -------------------- */
.quotes-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--background);
  box-shadow: 0 4px 18px rgba(30, 41, 59, 0.07);
  padding: var(--space-4) var(--space-5);
  margin-block: 0;
}

.quotes-card .section-heading {
  margin-bottom: var(--space-3);
}

.quotes-list--cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  flex: 1;
}

.quotes-list--cards .quotes-item {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.quotes-list--cards .quotes-item:hover {
  border-color: transparent;
  box-shadow: none;
}

.quotes-list--cards .quotes-item__top {
  gap: var(--space-2);
}

.quotes-list--cards .quotes-item__flag {
  width: 28px;
  height: 19px;
}

.quotes-list--cards .quotes-item__value {
  margin-left: 0;
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quotes-list--cards .quotes-item__name {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (min-width: 900px) {
  .quotes-list--cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quotes-list--cards .quotes-item {
    padding-inline: var(--space-4);
  }

  .quotes-list--cards .quotes-item:nth-child(2n) {
    border-left: 1px solid var(--border);
  }

  .quotes-list--cards .quotes-item:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

@media (min-width: 900px) and (max-width: 1100px) {
  .quotes-list--cards .quotes-item__value {
    font-size: var(--fs-base);
  }

  .quotes-list--cards .quotes-item__code {
    display: none;
  }
}


/* -------------------- BANNER INSTALAR PWA (móvil) -------------------- */
.install-banner {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  background: var(--background);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 22px rgba(30, 41, 59, 0.16);
}

.install-banner.is-hidden {
  display: none;
}

.install-banner__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.2);
  flex-shrink: 0;
}

.install-banner__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.install-banner__title {
  font-size: var(--fs-base);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.install-banner__subtitle {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.35;
}

.install-banner__btn {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 800;
  padding: 9px 18px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.install-banner__btn:hover {
  background: var(--primary-dark);
}

.install-banner__btn:active {
  transform: scale(0.97);
}

.install-banner__close {
  flex-shrink: 0;
  align-self: flex-start;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-banner__close:hover {
  background: var(--background-soft);
  color: var(--text);
}

@media (max-width: 768px) {
  .install-banner {
    display: flex;
  }

  body.install-open {
    padding-bottom: 78px;
  }
}

/* -------------------- 21. FEED CIUDADANO (reportes / empleos / ofertas) -------------------- */
.pub-feed {
  max-width: 680px;
  margin-inline: auto;
  padding-block: var(--space-4) var(--space-7);
}

.pub-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: nowrap;
}

.pub-header__body {
  flex: 1 1 auto;
  min-width: 0;
}

.pub-header__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pub-header__title {
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pub-header__sub {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Buscador: lupa al final del título; el input se despliega arriba de "Publicar" */
.pub-header__search {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.pub-header__search-toggle {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

.pub-header__search-toggle:hover {
  background: #08A957;
  border-color: #08A957;
  color: #fff;
}

.pub-header__search-toggle:active {
  transform: scale(0.94);
}

.pub-publish__search {
  margin-bottom: var(--space-3);
}

.pub-publish__search-form {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  overflow: hidden;
  animation: pubSearchOpen 0.22s ease;
}

@keyframes pubSearchOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pub-publish__search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0 12px;
  height: 46px;
  font-size: var(--fs-sm);
  color: var(--text);
  outline: none;
}

.pub-publish__search-input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.pub-publish__search-clear {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
}

.pub-publish__search-clear:hover {
  color: var(--text);
}

.pub-publish__search-go {
  flex: 0 0 auto;
  border: none;
  background: #08A957;
  color: #fff;
  width: 48px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.15s;
}

.pub-publish__search-go:hover {
  background: #06994b;
}

.pub-publish__search-go:active {
  background: #058a42;
}

/* Línea de resultados de búsqueda */
.pub-search-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
  padding: 9px 14px;
  border-radius: var(--radius);
  background: rgba(8, 169, 87, 0.08);
  border: 1px solid rgba(8, 169, 87, 0.2);
  font-size: var(--fs-sm);
  color: var(--text);
}

.pub-search-info__clear {
  margin-left: 6px;
  font-weight: 700;
  color: #08A957;
  text-decoration: none;
}

.pub-search-info__clear:hover {
  text-decoration: underline;
}

.pub-alert {
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
  transition: opacity 0.5s ease;
}

.pub-alert--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.pub-alert--ok {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.pub-alert.is-fading {
  opacity: 0;
}

.pub-publish {
  margin-bottom: var(--space-5);
}

.pub-publish__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  border-radius: 10px;
  background: #08A957;
  color: #fff;
  font-weight: 800;
  font-size: var(--fs-base);
  box-shadow: 0 3px 10px rgba(8, 169, 87, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pub-publish__toggle:hover {
  box-shadow: 0 4px 14px rgba(8, 169, 87, 0.35);
}

.pub-publish__toggle:active {
  transform: scale(0.97);
}

.pub-publish__form {
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--background-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.pub-publish__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-2);
}

.pub-publish__add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 62px;
  height: 62px;
  border-radius: 10px;
  border: 2px dashed var(--border);
  background: var(--background);
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
  cursor: pointer;
  padding: 4px;
  transition: border-color 0.15s, color 0.15s;
}

.pub-publish__add i {
  font-size: 22px;
}

.pub-publish__add:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

.pub-publish__thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 62px;
}

.pub-publish__thumb-imgwrap {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.pub-publish__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pub-publish__thumb-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: #dc2626;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.pub-publish__thumb-remove i {
  font-size: 10px;
}

.pub-publish__thumb-remove:hover {
  color: #b91c1c;
  text-decoration: underline;
}

.pub-publish__desc {
  position: relative;
  margin-bottom: var(--space-3);
}

.pub-publish__textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px 40px;
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--background);
}

.pub-publish__textarea:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 1px;
}

.pub-publish__mic {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--background);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.pub-publish__mic:hover {
  background: var(--background-soft);
  color: var(--primary);
  border-color: var(--primary-light);
}

.pub-publish__mic:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(118, 0, 179, 0.2);
}

.pub-publish__mic.is-recording {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  animation: mic-breathe 1.2s ease-in-out infinite;
}

@keyframes mic-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5); }
  50%      { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

/* Toast para feedback del dictado */
.mic-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #1e293b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1000;
  pointer-events: none;
  text-align: center;
}

.mic-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mic-toast--ok {
  background: #08A957;
}

.mic-toast--warn {
  background: #f59e0b;
  color: #212529;
}

.mic-toast--error {
  background: #dc2626;
}

/* Fila: numero de WhatsApp + toggle "Permitir contacto" */
.pub-publish__wa-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-3);
}

.pub-publish__wa {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
  font-size: var(--fs-sm);
  height: 46px;
}

.pub-publish__wa-icon {
  flex: 0 0 auto;
  width: 44px;
  color: #25D366;
  font-size: 22px;
  text-align: center;
}

.pub-publish__wa-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0 12px 0 0;
  color: var(--text);
  font-size: inherit;
}

.pub-publish__wa-input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.pub-publish__wa-input:focus {
  outline: none;
}

/* Toggle elegante: "Permitir contacto" */
.pub-publish__contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  cursor: pointer;
  user-select: none;
}

.pub-publish__contact-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pub-publish__switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s;
}

.pub-publish__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.pub-publish__contact-check:checked + .pub-publish__switch {
  background: #08A957;
}

.pub-publish__contact-check:checked + .pub-publish__switch::after {
  transform: translateX(20px);
}

.pub-publish__contact-check:focus-visible + .pub-publish__switch {
  box-shadow: 0 0 0 3px rgba(8, 169, 87, 0.35);
}

.pub-publish__contact-text {
  display: block;
  line-height: 1.1;
  color: var(--text);
  text-align: center;
  font-size: 11px;
}

.pub-publish__contact-text strong {
  font-size: 11px;
  font-weight: 600;
}

.pub-publish__contact-text small {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

@media (max-width: 380px) {
  .pub-publish__contact-text {
    display: none;
  }
}

.pub-publish__contact-msg {
  margin: 0 0 var(--space-3);
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #b91c1c;
  font-size: var(--fs-xs);
  line-height: 1.35;
}

.pub-publish__submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-radius: 10px;
  background: #08A957;
  color: #fff;
  font-weight: 800;
  font-size: var(--fs-base);
  box-shadow: 0 3px 10px rgba(8, 169, 87, 0.25);
  transition: background 0.15s, transform 0.15s;
}

.pub-publish__submit:hover {
  background: #06994b;
}

.pub-publish__submit:active {
  transform: scale(0.97);
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.pub-card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(13, 27, 42, 0.05);
  display: flex;
  flex-direction: column;
}

.pub-gallery {
  position: relative;
  display: grid;
  grid-auto-rows: 1fr;
  gap: 3px;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0f172a;
  overflow: hidden;
}

.pub-gallery--1 {
  grid-template-columns: 1fr;
}

.pub-gallery--2 {
  grid-template-columns: repeat(2, 1fr);
}

.pub-gallery--3,
.pub-gallery--4 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

.pub-gallery--3 .pub-gallery__item:first-child {
  grid-row: 1 / 3;
}

.pub-gallery__item {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: #0f172a;
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.pub-gallery__item img,
.pub-gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pub-gallery__more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* ---- Lightbox / modal ---- */
.pub-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.93);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pub-modal.is-open {
  display: flex;
  opacity: 1;
}

.pub-modal__stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-modal__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pub-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s;
}

.pub-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.pub-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s;
}

.pub-modal__nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.pub-modal__nav--prev {
  left: 10px;
}

.pub-modal__nav--next {
  right: 10px;
}

.pub-modal__counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

body.pub-modal-open {
  overflow: hidden;
}

.pub-card__body {
  padding: var(--space-3) var(--space-4);
}

.pub-card__text {
  font-size: var(--fs-base);
  color: var(--text);
  line-height: 1.55;
  white-space: pre-line;
  margin: 0;
}

.pub-card__text--muted {
  color: var(--text-muted);
  font-style: italic;
}

.pub-card__meta {
  display: flex;
  align-items: center;
  margin-top: var(--space-3);
}

.pub-card__time {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pub-card__wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 var(--space-4) var(--space-3);
  padding: 11px;
  border-radius: 9px;
  border: none;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-sm);
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.pub-card__wa:hover {
  background: #1ebe5b;
}

.pub-card__wa:active {
  transform: scale(0.98);
}

.pub-empty {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  color: var(--text-muted);
}

.pub-empty i {
  font-size: 34px;
  color: var(--border);
  display: block;
  margin-bottom: var(--space-2);
}

.pub-empty p {
  font-size: var(--fs-sm);
}

.pub-loading {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  padding: var(--space-4);
}

/* --- Anti desbordamiento horizontal en móvil --- */
@media (max-width: 640px) {
  html,
  body {
    overflow-x: clip;
  }

  /* Contenidos anclados no deben ensanchar la página */
  .overlay,
  .search-panel,
  .drawer,
  .install-banner,
  .tabbar,
  .radio-player {
    max-width: 100vw;
  }
}


/* =========================================================
   PLANTILLA 2 — SLIDER DE NOTICIAS DESTACADAS (carrusel deslizante)
   Carrusel con track horizontal que se desplaza (translateX) +
   zoom lento (Ken Burns) de la foto activa. Totalmente aislado:
   solo afecta a la Plantilla 2 y no toca la Plantilla 1 ni el master.
   ========================================================= */

/* El marco redondeado recorta el track que se desliza. */
.hero-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-slider__viewport {
  overflow: hidden;
  border-radius: var(--radius);
}

/* Riel horizontal: todas las diapositivas en fila, una junto a otra. */
.hero-slider__track {
  display: flex;
  align-items: stretch;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Cada diapositiva ocupa el 100% del ancho visible y no se encoge. */
.hero-slider__track .hero-slider__slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  isolation: isolate;
}

/* El track define la altura con la relación de aspecto del hero. */
.hero-slider__track .hero__figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  position: relative;
  background-color: var(--background-soft);
}

.hero-slider__track .hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ken Burns: la foto de la diapositiva activa se acerca despacio. */
.hero-slider__track .hero-slider__slide.is-active .hero__image {
  animation: heroKenBurns 7s ease-out both;
}

@keyframes heroKenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.09); }
}

/* Entrada escalonada del texto de la diapositiva activa. */
.hero-slider__track .hero-slider__slide.is-active .hero__badge,
.hero-slider__track .hero-slider__slide.is-active .hero__title,
.hero-slider__track .hero-slider__slide.is-active .hero__excerpt,
.hero-slider__track .hero-slider__slide.is-active .hero__meta {
  animation: heroBodyIn 0.6s ease both;
}

.hero-slider__track .hero-slider__slide.is-active .hero__title   { animation-delay: 0.08s; }
.hero-slider__track .hero-slider__slide.is-active .hero__excerpt { animation-delay: 0.16s; }
.hero-slider__track .hero-slider__slide.is-active .hero__meta    { animation-delay: 0.24s; }

@keyframes heroBodyIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Numeración "1 / N" sobre las flechas del carrusel. */
.hero-slider__counter {
  position: absolute;
  left: var(--space-4);
  bottom: var(--space-4);
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  background: rgba(13, 27, 42, 0.6);
  color: #fff;
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}

.hero-slider__counter-current {
  font-weight: 800;
  font-size: var(--fs-sm);
}

/* Flechas circulares más grandes y con acento del sitio. */
.hero-slider__arrow {
  width: 48px;
  height: 48px;
  background: rgba(13, 27, 42, 0.5);
  backdrop-filter: blur(2px);
}

.hero-slider__arrow:hover {
  background: var(--primary);
}

/* Puntitos: el activo se alarga en píldora. */
.hero-slider__dots {
  gap: var(--space-2);
}

.hero-slider__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-slider__dot.is-active {
  width: 26px;
  background: var(--primary-light);
  transform: none;
}

/* En pantallas chicas el hero pasa a 16/10 y las flechas se achican. */
@media (max-width: 640px) {
  .hero-slider__track .hero__figure {
    aspect-ratio: 16 / 11;
  }

  .hero-slider__arrow {
    width: 38px;
    height: 38px;
  }

  .hero-slider__counter {
    left: var(--space-3);
    bottom: var(--space-3);
  }
}

/* Con movimiento reducido: el riel no anima ni hay zoom. */
@media (prefers-reduced-motion: reduce) {
  .hero-slider__track {
    transition: none;
  }

  .hero-slider__track .hero-slider__slide.is-active .hero__image,
  .hero-slider__track .hero-slider__slide.is-active .hero__badge,
  .hero-slider__track .hero-slider__slide.is-active .hero__title,
  .hero-slider__track .hero-slider__slide.is-active .hero__excerpt,
  .hero-slider__track .hero-slider__slide.is-active .hero__meta {
    animation: none !important;
  }
}

/* =========================================================
   PLANTILLA 2 — banner home_top sobre el slider destacado
   Se ubica arriba del hero y se separa del contenido previo
   con un margen superior propio.
   ========================================================= */
.banner-slider--home-top {
  margin-top: var(--space-5);
  margin-bottom: var(--space-5);
}

/* =========================================================
   PLANTILLA 2 — clima y cotizaciones un poco más angostos en móvil
   En pantallas chicas la fila doble no ocupa todo el ancho: se
   limita y centra, y se recortan los paddings internos.
   ========================================================= */
@media (max-width: 899px) {
  .info-pair {
    max-width: 420px;
    margin-inline: auto;
    padding-inline: 0;
    gap: var(--space-4);
  }

  .weather-widget--banner,
  .quotes-card {
    padding-inline: var(--space-4);
  }

  .quotes-list--cards .quotes-item {
    padding-inline: var(--space-3);
  }
}

/* =========================================================
   PLANTILLA 2 — anuncio del sidebar después del TV en vivo
   Se separa del player con un margen superior propio.
   ========================================================= */
.home-layout__sidebar .banner-slider--sidebar-top {
  margin-top: var(--space-5);
}
