/* ==========================================================================
   EL ACCITANO (elaccitano.com) — Identidad Corporativa Accitana Moderna
   Colores oficiales del logotipo 'ea' (#0C4DA2 · #1E73BE · #4E7EEA · #82A4E7 · #0A1428)
   con degradados dinámicos, glassmorphism y silueta de la Catedral de Guadix
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Paleta Corporativa Oficial elaccitano.com + Degradados Modernos */
  --bg-page: #F0F5FC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #E4EEFB;
  --bg-warm: #D8E6FA;
  --bg-dark-band: #061229;
  --bg-blue-band: #0A2458;

  --text-primary: #091326;
  --text-secondary: #334563;
  --text-muted: #5B6E8C;
  --text-inverse: #F8FAFC;

  /* Colores corporativos oficiales (#0C4DA2, #1E73BE, #4E7EEA, #82A4E7) */
  --corp-blue-deep: #082F72;
  --corp-blue: #0C4DA2;
  --corp-blue-mid: #1E73BE;
  --corp-blue-ea: #4E7EEA;
  --corp-blue-light: #82A4E7;
  --corp-cyan: #0EA5E9;

  /* Mapeo de variables semánticas al Azul Corporativo Accitano */
  --accent-terracota: #0C4DA2;
  --accent-terracota-hover: #1E64D8;
  --accent-terracota-soft: rgba(12, 77, 162, 0.11);
  --accent-blue: #1E73BE;
  --accent-blue-hover: #0C4DA2;
  --accent-blue-soft: rgba(78, 126, 234, 0.14);
  --accent-gold: #F59E0B;
  --accent-green: #059669;

  /* Degradados Corporativos Modernos */
  --grad-primary: linear-gradient(135deg, #072862 0%, #0C4DA2 45%, #3B76F6 100%);
  --grad-ea: linear-gradient(135deg, #0C4DA2 0%, #4E7EEA 52%, #38BDF8 100%);
  --grad-hero-mesh:
    radial-gradient(at 0% 0%, rgba(78, 126, 234, 0.16) 0px, transparent 50%),
    radial-gradient(at 98% 8%, rgba(14, 165, 233, 0.13) 0px, transparent 48%),
    radial-gradient(at 50% 100%, rgba(12, 77, 162, 0.08) 0px, transparent 55%);
  --grad-masthead: linear-gradient(135deg, #051129 0%, #0A2558 45%, #0C4DA2 82%, #2563EB 100%);
  --grad-card-border: linear-gradient(135deg, rgba(78, 126, 234, 0.45), rgba(14, 165, 233, 0.15));
  --grad-badge: linear-gradient(135deg, #0C4DA2 0%, #2563EB 60%, #0EA5E9 100%);
  --grad-insignes: linear-gradient(135deg, #040D21 0%, #09204E 48%, #0C4DA2 88%, #1D4ED8 100%);

  --border-light: #D5E2F6;
  --border-strong: #A9C3EA;
  --border-editorial: #0C4DA2;

  --shadow-xs: 0 2px 6px rgba(9, 19, 38, 0.05);
  --shadow-sm: 0 8px 24px -4px rgba(12, 77, 162, 0.10);
  --shadow-md: 0 18px 38px -8px rgba(12, 77, 162, 0.18);
  --shadow-lg: 0 26px 60px -12px rgba(6, 18, 41, 0.30);
  --shadow-glow: 0 8px 24px rgba(37, 99, 235, 0.32);

  /* Tipografía moderna geométrica y digital */
  --font-serif: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  --container-max: 1340px;
  --header-sticky-h: 58px;
}

[data-theme="dark"] {
  --bg-page: #060C1A;
  --bg-surface: #0D172B;
  --bg-subtle: #13213D;
  --bg-warm: #192B4F;
  --bg-dark-band: #030712;
  --bg-blue-band: #081A3A;

  --text-primary: #F1F6FF;
  --text-secondary: #B9CBE6;
  --text-muted: #7F95B8;
  --text-inverse: #FFFFFF;

  --accent-terracota: #4E7EEA;
  --accent-terracota-hover: #6E98F8;
  --accent-terracota-soft: rgba(78, 126, 234, 0.2);
  --accent-blue: #60A5FA;
  --accent-blue-hover: #93C5FD;
  --accent-blue-soft: rgba(96, 165, 250, 0.18);

  --border-light: #1C2E52;
  --border-strong: #2B4578;
  --border-editorial: #4E7EEA;

  --shadow-xs: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 18px 40px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.75);
}

/* Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  background-image: var(--grad-hero-mesh);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.18s ease;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--grad-ea);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  z-index: 9999;
}
.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2.5px solid var(--corp-blue-ea);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 32px);
}

/* ==========================================================================
   1. BARRA SUPERIOR EN DEGRADADO AZUL NOCHE ACCITANO
   ========================================================================== */
.topbar {
  background: linear-gradient(90deg, #040D21 0%, #081F4D 50%, #0A2E6E 100%);
  color: #DCE8FF;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(130, 164, 231, 0.22);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding-block: 6px;
  flex-wrap: wrap;
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: #fff;
  background: rgba(78, 126, 234, 0.22);
  border: 1px solid rgba(130, 164, 231, 0.35);
  padding: 3px 11px;
  border-radius: var(--radius-pill);
}

.topbar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38BDF8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28);
}

.topbar__weather {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(78, 126, 234, 0.24));
  border: 1px solid rgba(130, 164, 231, 0.3);
  color: #FFFFFF;
  font-weight: 700;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar__link {
  color: #C7DBFF;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.topbar__link:hover {
  color: #FFFFFF;
  transform: translateY(-1px);
}

.topbar__link--highlight {
  background: var(--grad-ea);
  color: #fff !important;
  padding: 4px 13px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(78, 126, 234, 0.4);
}
.topbar__link--highlight:hover {
  filter: brightness(1.08);
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(130, 164, 231, 0.3);
  color: #fff;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
}
.theme-toggle:hover {
  background: rgba(78, 126, 234, 0.3);
}

/* ==========================================================================
   2. CABECERA CORPORATIVA MODERNA (MASTHEAD CON DEGRADADO Y SKYLINE DE GUADIX)
   ========================================================================== */
.masthead {
  position: relative;
  background: var(--grad-masthead);
  color: #FFFFFF;
  padding-block: clamp(18px, 2.8vw, 30px);
  border-bottom: 3px solid #38BDF8;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(6, 18, 41, 0.22);
}

/* Resplandor atmosférico de fondo en la cabecera */
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(130, 164, 231, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 82% 25%, rgba(56, 189, 248, 0.22) 0%, transparent 42%);
  pointer-events: none;
}

.masthead__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
}

.masthead__edition {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.masthead__edition-tag {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: #7DD3FC;
}

.masthead__edition-sub {
  font-size: 0.84rem;
  color: rgba(235, 244, 255, 0.86);
  max-width: 290px;
  line-height: 1.4;
}

.masthead__brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.masthead__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.masthead__emblem {
  width: clamp(62px, 6.8vw, 82px);
  height: clamp(56px, 6.2vw, 74px);
  flex-shrink: 0;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(130, 164, 231, 0.45);
}

.masthead__titles {
  text-align: left;
}

.masthead__kicker {
  display: inline-block;
  font-size: clamp(0.66rem, 0.95vw, 0.75rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #93C5FD;
  margin-bottom: 3px;
}

.masthead__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 4.4vw, 3.45rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.025em;
  background: linear-gradient(90deg, #FFFFFF 0%, #E0EEFF 55%, #93C5FD 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.masthead__subtitle {
  margin: 5px 0 0;
  font-size: clamp(0.76rem, 1.05vw, 0.86rem);
  color: rgba(224, 238, 255, 0.88);
  font-weight: 600;
}

.masthead__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(191, 213, 237, 0.35);
  border-radius: var(--radius-pill);
  color: #FFFFFF;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.search-trigger:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #7DD3FC;
  transform: translateY(-1px);
}
.search-trigger kbd {
  background: rgba(6, 18, 41, 0.55);
  border: 1px solid rgba(191, 213, 237, 0.4);
  color: #BAE6FD;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-family: var(--font-sans);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--grad-ea);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.btn--blue {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(12, 77, 162, 0.25);
}
.btn--blue:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn--outline {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--border-strong);
  color: var(--corp-blue);
}
.masthead .btn--outline {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(191, 213, 237, 0.45);
  color: #FFFFFF;
}
.btn--outline:hover {
  border-color: var(--corp-blue-ea);
  background: var(--accent-blue-soft);
}

/* Barra de Navegación Pegajosa (Glassmorphism Corporativo) */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: 0 6px 20px rgba(12, 77, 162, 0.08);
}

[data-theme="dark"] .main-nav {
  background: rgba(13, 23, 43, 0.88);
}

.main-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--header-sticky-h);
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav__list::-webkit-scrollbar {
  display: none;
}

.main-nav__btn {
  background: transparent;
  border: none;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.main-nav__btn:hover {
  color: var(--corp-blue);
  background: var(--accent-blue-soft);
}

.main-nav__btn.is-active {
  background: var(--grad-ea);
  color: #fff;
  box-shadow: 0 4px 14px rgba(12, 77, 162, 0.3);
}

.main-nav__cta-ad {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(12, 77, 162, 0.12), rgba(78, 126, 234, 0.2));
  border: 1px solid rgba(78, 126, 234, 0.35);
  color: var(--corp-blue);
  white-space: nowrap;
  flex-shrink: 0;
}
.main-nav__cta-ad:hover {
  background: var(--grad-ea);
  color: #fff;
  border-color: transparent;
}

/* ==========================================================================
   3. CINTA DE ÚLTIMA HORA Y FILTRO DE MUNICIPIOS DE LA COMARCA
   ========================================================================== */
.ticker-bar {
  background: linear-gradient(90deg, #E6F0FF 0%, #F2F7FF 50%, #E6F0FF 100%);
  border-bottom: 1px solid var(--border-light);
  padding-block: 9px;
  font-size: 0.85rem;
}

[data-theme="dark"] .ticker-bar {
  background: linear-gradient(90deg, #0A152B 0%, #102040 50%, #0A152B 100%);
}

.ticker-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticker-bar__label {
  background: var(--grad-ea);
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(12, 77, 162, 0.25);
}

.ticker-bar__items {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.ticker-bar__items::-webkit-scrollbar {
  display: none;
}

.ticker-bar__item {
  color: var(--text-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.ticker-bar__item:hover {
  color: var(--corp-blue-mid);
}
.ticker-bar__sep {
  color: var(--corp-blue-ea);
  font-weight: 900;
}

/* Filtro de Pueblos de la Comarca Accitana */
.comarca-strip {
  padding-block: 11px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.comarca-strip__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.comarca-strip__inner::-webkit-scrollbar {
  display: none;
}

.comarca-strip__title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--corp-blue);
  margin-right: 4px;
  white-space: nowrap;
}

.town-pill {
  border: 1px solid var(--border-light);
  background: var(--bg-page);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.town-pill:hover {
  border-color: var(--corp-blue-ea);
  color: var(--corp-blue);
  background: var(--accent-blue-soft);
}
.town-pill.is-active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(12, 77, 162, 0.25);
}

/* ==========================================================================
   4. ESPACIOS PUBLICITARIOS CON DEGRADADO CORPORATIVO
   ========================================================================== */
.ad-slot {
  position: relative;
  margin-block: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(78, 126, 234, 0.35);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ad-slot__badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  color: #E0EEFF;
  font-weight: 700;
}

.ad-megabanner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 28px;
  background: linear-gradient(125deg, #06183D 0%, #0C4DA2 48%, #2563EB 82%, #0EA5E9 100%);
  color: #fff;
}

.ad-megabanner__content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ad-megabanner__kicker {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #7DD3FC;
  font-weight: 800;
}

.ad-megabanner__title {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 800;
  margin: 0;
  line-height: 1.22;
}

.ad-megabanner__desc {
  margin: 0;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.9);
}

.ad-megabanner__cta {
  background: linear-gradient(135deg, #FFFFFF 0%, #E0F2FE 100%);
  color: #082F72;
  font-weight: 800;
  font-size: 0.86rem;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.ad-megabanner__cta:hover {
  transform: translateY(-2px);
  background: #FFFFFF;
}

/* ==========================================================================
   5. PORTADA: APERTURA EDITORIAL (HERO LCP + DESTACADAS + AGENDA EN VIVO)
   ========================================================================== */
.hero-section {
  padding-block: 24px 34px;
  border-bottom: 2px solid var(--border-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr 0.95fr;
  gap: 26px;
  align-items: start;
}

.lead-story {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.lead-story:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--corp-blue-ea);
}

.lead-story__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-subtle);
}

.lead-story__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(6, 18, 41, 0.55), transparent);
  pointer-events: none;
}

.lead-story__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.lead-story:hover .lead-story__media img {
  transform: scale(1.03);
}

.lead-story__body {
  padding: clamp(20px, 2.6vw, 30px);
}

.story-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--corp-blue);
  margin-bottom: 8px;
}

.story-kicker__town {
  background: var(--grad-ea);
  color: #FFFFFF;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
}

.lead-story__title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.35vw, 2.15rem);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.lead-story__excerpt {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.58;
}

.story-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

.story-meta__author {
  font-weight: 700;
  color: var(--corp-blue);
}

/* Columna central de subportada */
.sublead-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sublead-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  grid-template-columns: 114px 1fr;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}
.sublead-card:hover {
  border-color: var(--corp-blue-ea);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.sublead-card__thumb {
  width: 114px;
  height: 90px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
}
.sublead-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sublead-card__title {
  margin: 4px 0 6px;
  font-family: var(--font-serif);
  font-size: 1.01rem;
  line-height: 1.26;
  font-weight: 700;
  color: var(--text-primary);
}

.sublead-card__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Columna derecha: Widget Agenda de Guadix con Borde Superior Degradado */
.agenda-panel {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.agenda-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--grad-ea);
}

.agenda-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.agenda-panel__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.agenda-panel__badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--grad-ea);
  color: #FFFFFF;
}

.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agenda-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 11px;
  border-bottom: 1px dashed var(--border-light);
}
.agenda-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.agenda-item__datebox {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 6px 4px;
  line-height: 1.1;
  color: var(--corp-blue);
}
.agenda-item--highlight .agenda-item__datebox {
  background: var(--grad-ea);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 10px rgba(12, 77, 162, 0.25);
}

.agenda-item__day {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
}

.agenda-item__month {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.92;
}

.agenda-item__info h4 {
  margin: 0 0 3px;
  font-size: 0.88rem;
  line-height: 1.32;
  font-weight: 700;
}
.agenda-item__info h4 a:hover {
  color: var(--corp-blue-mid);
}
.agenda-item__info p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==========================================================================
   6. SECCIONES TEMÁTICAS Y TARJETAS DE NOTICIAS MODERNAS
   ========================================================================== */
.editorial-section {
  padding-block: 38px;
  border-bottom: 1px solid var(--border-light);
}

/* Guía modern-web-guidance: defer-rendering-heavy-content */
.deferred-section {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 520px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-strong);
  flex-wrap: wrap;
}

.section-header__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header__accent {
  display: inline-block;
  width: 12px;
  height: 24px;
  border-radius: 4px;
  background: var(--grad-ea);
  box-shadow: 0 3px 10px rgba(78, 126, 234, 0.35);
}

.section-header__sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 22px;
}

.news-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--corp-blue-ea);
}

.news-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
  overflow: hidden;
}
.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.news-card:hover .news-card__media img {
  transform: scale(1.04);
}

.news-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--grad-badge);
  color: #fff;
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(6, 18, 41, 0.35);
}

.news-card__body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card__title {
  margin: 6px 0 10px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.28;
  font-weight: 800;
  color: var(--text-primary);
}

.news-card__excerpt {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex-grow: 1;
}

/* ==========================================================================
   7. BANDA ESPECIAL: ACCITANOS INSIGNES (DEGRADADO AZUL PROFUNDO Y CIAN)
   ========================================================================== */
.insignes-band {
  background: var(--grad-insignes);
  color: #F8FAFC;
  padding-block: 48px;
  margin-block: 14px;
  border-top: 3px solid #38BDF8;
  border-bottom: 3px solid #38BDF8;
  position: relative;
  overflow: hidden;
}

.insignes-band .section-header {
  border-bottom-color: rgba(130, 164, 231, 0.35);
}
.insignes-band .section-header__title {
  color: #FFFFFF;
}
.insignes-band .section-header__sub {
  color: #7DD3FC;
}

.insignes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.insigne-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(130, 164, 231, 0.3);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.insigne-card:hover {
  transform: translateY(-4px);
  border-color: #38BDF8;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

.insigne-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.insigne-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.insigne-card__body {
  padding: 18px;
}

.insigne-card__tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7DD3FC;
  font-weight: 800;
}

.insigne-card__title {
  margin: 6px 0 8px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.28;
  color: #fff;
}

.insigne-card__excerpt {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(241, 245, 249, 0.85);
}

/* ==========================================================================
   8. SERVICIO PÚBLICO: EMPLEO Y FORMACIÓN EN GUADIX Y COMARCA
   ========================================================================== */
.empleo-box {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow-sm);
}

.empleo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.empleo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--corp-blue-ea);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.empleo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--corp-blue-ea);
}

.empleo-card__status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-blue-soft);
  color: var(--corp-blue);
  margin-bottom: 8px;
}

.empleo-card__title {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 800;
}

/* ==========================================================================
   9. MODALES NATIVOS (<dialog closedby="any">)
   ========================================================================== */
dialog {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 0;
  max-width: 860px;
  width: calc(100% - 24px);
  max-height: 90vh;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

dialog::backdrop {
  background-color: rgba(6, 18, 41, 0.72);
  backdrop-filter: blur(6px);
}

.dialog-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reading-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: var(--grad-ea);
  width: 0%;
  transition: width 0.1s linear;
}

.reader-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reader-tool-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.reader-tool-btn:hover {
  border-color: var(--corp-blue-ea);
  color: var(--corp-blue);
}

.article-reader {
  padding: clamp(20px, 4vw, 40px);
}

.article-reader__title {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.18;
  margin: 8px 0 16px;
}

.article-reader__byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 12px;
  border-block: 1px solid var(--border-light);
  margin-bottom: 22px;
  font-size: 0.85rem;
}

.article-reader__hero {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--bg-subtle);
}
.article-reader__hero img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

.article-reader__content {
  font-size: var(--reader-font-size, 1.08rem);
  line-height: 1.75;
  color: var(--text-primary);
}
.article-reader__content p {
  margin-block: 0 1.2em;
}
.article-reader__content h2,
.article-reader__content h3 {
  font-family: var(--font-serif);
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.share-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   10. PIE DE PÁGINA CORPORATIVO Y BARRA INFERIOR MÓVIL
   ========================================================================== */
.site-footer {
  background: linear-gradient(135deg, #040B1A 0%, #07193C 60%, #0A275C 100%);
  color: #CBD5E1;
  padding-block: 52px 90px;
  border-top: 4px solid #4E7EEA;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.footer-col h3 {
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0 0 14px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.88rem;
}
.footer-links a:hover {
  color: #7DD3FC;
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(130, 164, 231, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: #94A3B8;
}

/* Barra de Navegación Inferior Móvil */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -6px 24px rgba(12, 77, 162, 0.14);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
}

[data-theme="dark"] .mobile-bottom-nav {
  background: rgba(13, 23, 43, 0.94);
}

.mobile-bottom-nav__list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-bottom-nav__btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}
.mobile-bottom-nav__btn.is-active {
  color: var(--corp-blue);
}

/* ==========================================================================
   11. RESPONSIVE Y ADAPTACIÓN A MÓVILES / TABLETS
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1.3fr 1fr;
  }
  .agenda-panel {
    grid-column: 1 / -1;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 780px) {
  .masthead__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 12px;
  }
  .masthead__edition {
    display: none;
  }
  .masthead__tools {
    justify-content: center;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .ad-megabanner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .mobile-bottom-nav {
    display: block;
  }
}

/* ==========================================================================
   MODO IMPRESIÓN / EXPORTACIÓN PDF EJECUTIVO (Dossiers y Artículos)
   ========================================================================== */
@media print {
  .topbar, .utility-bar, .main-nav, .ticker-bar, .mobile-bottom-nav,
  .masthead__tools, .reader-tools, #closeReaderBtn, .share-strip {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
    color: #091326 !important;
  }
  .container {
    max-width: 100% !important;
    padding: 0 12px !important;
  }
  dialog[open] {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
  }
}
