/* ==========================================================================
   LEGADIGMA — página Boletín
   Usa los tokens y componentes de styles.css (colores, tipografías, botones).
   ========================================================================== */

[hidden] { display: none !important; }

/* ---------- Encabezado de página ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--header-h) + 56px) 84px;
  background: radial-gradient(120% 140% at 15% 0%, var(--navy-700) 0%, var(--navy-900) 60%, #0d1226 100%);
  color: var(--white);
}
.page-hero__inner { position: relative; z-index: 1; }
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
}
.page-hero .eyebrow::before { transform: scaleX(1); }
.crumbs a { transition: color 0.25s ease; }
.crumbs a:hover { color: var(--gold-light); }
.crumbs [aria-current] { color: var(--white); }
.page-hero h1 {
  font-size: clamp(2.3rem, 4.8vw, 3.7rem);
  max-width: 22ch;
  margin-bottom: 22px;
  font-variation-settings: "opsz" 144, "wght" 420, "SOFT" 0, "WONK" 0;
}
.page-hero__lede {
  max-width: 56ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255,255,255,0.82);
}

/* ---------- Barra de búsqueda y filtros ---------- */
.bl-controls {
  position: sticky;
  top: calc(var(--header-h) - 14px);
  z-index: 20;
  background: rgba(255,255,255,0.93);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--gray-12);
}
.bl-controls__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding-block: 14px;
}
.bl-search { position: relative; flex: 0 1 320px; width: 100%; }
.bl-search svg {
  position: absolute;
  left: 16px; top: 50%;
  width: 16px; height: 16px;
  transform: translateY(-50%);
  fill: var(--gray-50);
  pointer-events: none;
}
.bl-search input {
  width: 100%;
  padding: 12px 18px 12px 44px;
  border: 1.5px solid var(--gray-12);
  border-radius: 999px;
  background: var(--off-white);
  color: var(--ink);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.bl-search input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(185,160,60,0.22);
}
.bl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1.5px solid var(--gray-12);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease);
}
.bl-chip:hover { border-color: var(--gold); transform: translateY(-2px); }
.bl-chip__n { font-size: 0.75rem; color: var(--gray-50); transition: color 0.3s ease; }
.bl-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.bl-chip[aria-pressed="true"] .bl-chip__n { color: var(--gold-light); }

/* ---------- Cuerpo ---------- */
.bl-body { background: var(--off-white); padding-block: 56px clamp(80px, 10vw, 120px); }
.bl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
}

/* Boletín destacado */
.bl-featured {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 4.5vw, 52px);
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-900) 100%);
  color: var(--white);
  box-shadow: var(--shadow-soft);
  animation: bl-in 0.7s var(--ease) both;
}
.bl-featured__body { position: relative; z-index: 1; max-width: 54ch; }
.bl-featured__top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.bl-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.bl-kicker::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.bl-featured h2 {
  margin: 10px 0 16px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--white);
  font-variation-settings: "opsz" 100, "wght" 420, "SOFT" 0, "WONK" 0;
}
.bl-featured__sum { color: rgba(255,255,255,0.8); line-height: 1.7; margin-bottom: 28px; }
.bl-featured .bl-meta { color: rgba(255,255,255,0.7); }
.bl-featured__mark {
  position: absolute;
  right: -34px; bottom: -46px;
  width: 280px;
  height: auto;
  opacity: 0.09;
  pointer-events: none;
  animation: float-soft-dark 9s ease-in-out infinite;
}

/* Metadatos, etiquetas */
.bl-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}
.bl-meta::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.bl-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(185,160,60,0.2);
  color: var(--navy-900);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}
.bl-featured .bl-badge { background: rgba(185,160,60,0.28); color: var(--gold-light); }
.btn.is-soon { opacity: 0.6; pointer-events: none; box-shadow: none; }

.bl-count {
  margin: 38px 0 4px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-50);
}
#blFeatured:empty + .bl-count { margin-top: 0; }

/* Año */
.bl-year {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 34px 0 6px;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  color: var(--navy-900);
  font-variation-settings: "opsz" 60, "wght" 400, "SOFT" 0, "WONK" 0;
}
.bl-year::after { content: ""; flex: 1; height: 1px; background: var(--gray-25); }

/* Fila de boletín */
.bl-item {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 44px;
  gap: 24px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--gray-12);
  border-radius: 10px;
  animation: bl-in 0.6s var(--ease) both;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding-inline 0.4s var(--ease);
}
.bl-item::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 3px;
  border-radius: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transition: transform 0.4s var(--ease);
}
.bl-item.has-link:hover {
  background: var(--white);
  box-shadow: var(--shadow-card);
  padding-inline: 20px;
  margin-inline: -20px;
}
.bl-item.has-link:hover::before { transform: scaleY(1); }
.bl-item__date { display: flex; flex-direction: column; gap: 4px; }
.bl-item__day {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 60, "wght" 400, "SOFT" 0, "WONK" 0;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--navy);
}
.bl-item__mon {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-50);
}
.bl-item__body h3 {
  margin: 10px 0 8px;
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  color: var(--navy-900);
  line-height: 1.25;
}
.bl-item__link { color: inherit; }
.bl-item__link::after { content: ""; position: absolute; inset: 0; }
.bl-item__sum { color: var(--gray-75); line-height: 1.65; font-size: 0.95rem; max-width: 62ch; }
.bl-item__action { display: flex; justify-content: flex-end; padding-top: 4px; }
.bl-item__go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-25);
  color: var(--navy);
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.4s var(--ease);
}
.bl-item__go svg { width: 18px; height: 18px; fill: currentColor; }
.bl-item.has-link:hover .bl-item__go { background: var(--gold); border-color: var(--gold); color: var(--navy-900); transform: translateX(4px); }
.bl-soon {
  padding-top: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-50);
  white-space: nowrap;
}
.btn svg, .btn-icon { flex-shrink: 0; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

.bl-more { margin-top: 36px; text-align: center; }

.bl-empty {
  margin-top: 24px;
  padding: 56px 24px;
  text-align: center;
  border: 1.5px dashed var(--gray-25);
  border-radius: var(--radius);
  background: var(--white);
}
.bl-empty__t {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 40, "wght" 440, "SOFT" 0, "WONK" 0;
  font-size: 1.35rem;
  color: var(--navy-900);
  margin-bottom: 8px;
}
.bl-empty__s { color: var(--gray-50); }

/* ---------- Columna lateral ---------- */
.bl-aside { position: sticky; top: calc(var(--header-h) + 84px); display: flex; flex-direction: column; gap: 18px; }
.bl-sub {
  padding: 30px 28px;
  border-radius: var(--radius);
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-900) 100%);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.bl-sub__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  color: var(--gold);
}
.bl-sub__icon svg { width: 20px; height: 20px; fill: currentColor; }
.bl-sub h2 { margin: 18px 0 10px; font-size: 1.4rem; color: var(--white); }
.bl-sub p { color: rgba(255,255,255,0.78); font-size: 0.93rem; line-height: 1.6; margin-bottom: 22px; }
.bl-sub__alt {
  display: block;
  margin-top: 14px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.bl-sub__alt:hover { color: var(--gold); }
.bl-note {
  padding: 24px 26px;
  border: 1px solid var(--gray-12);
  border-radius: var(--radius);
  background: var(--white);
}
.bl-note__t { font-variation-settings: "wght" 700; color: var(--navy-900); margin-bottom: 6px; }
.bl-note p { color: var(--gray-75); font-size: 0.9rem; line-height: 1.6; }
.bl-note__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.9rem;
  font-variation-settings: "wght" 700;
  color: var(--navy);
  transition: gap 0.3s var(--ease), color 0.3s ease;
}
.bl-note__link svg { width: 16px; height: 16px; fill: currentColor; }
.bl-note__link:hover { gap: 14px; color: var(--navy-900); }

@keyframes bl-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .bl-featured, .bl-item { animation: none; }
  .bl-featured__mark { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .bl-layout { grid-template-columns: 1fr; }
  .bl-aside { position: static; }
  .bl-controls { position: static; }
}
@media (max-width: 640px) {
  .page-hero { padding-block: calc(var(--header-h) + 36px) 60px; }
  .bl-item { grid-template-columns: 58px minmax(0, 1fr); gap: 16px; }
  .bl-item__day { font-size: 1.9rem; }
  .bl-item__action { grid-column: 2; justify-content: flex-start; }
  .bl-item.has-link:hover { padding-inline: 0; margin-inline: 0; }
  .bl-featured__mark { width: 200px; }
}
