/* ============================================================
   IGLESIA DE CRISTO MAHANAIM — Sistema de diseño
   Paleta extraída del logo oficial. No sustituir por otra.
   ============================================================ */

:root {
  --color-brand-primary: #0B1330;
  --color-brand-primary-alt: #10193F;
  --color-brand-gold: #C9A227;
  --color-brand-gold-light: #F0D999;
  --color-brand-gold-dark: #8A6A15;
  --color-cream: #F5F1E6;
  --color-surface: #FAF8F2;
  --color-ink: #14182B;
  --color-nebula-accent: #5B3E8C;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --container-max: 1240px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-soft: 0 20px 50px -20px rgba(11, 19, 48, 0.35);
  --shadow-gold: 0 8px 24px -8px rgba(201, 162, 39, 0.45);
  --transition: 0.25s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; line-height: 1.15; overflow-wrap: break-word; word-break: break-word; }
p { margin: 0; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }

/* --- Utilidades --- */
.text-gold-gradient {
  background: linear-gradient(180deg, var(--color-brand-gold-light) 0%, var(--color-brand-gold) 55%, var(--color-brand-gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kicker {
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.78rem;
  color: var(--color-brand-gold);
  margin-bottom: 14px;
}
.kicker::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 28px;
  height: 1px;
  margin-right: 10px;
  background: var(--color-brand-gold);
}

.section-heading { max-width: 640px; margin-bottom: 48px; }
.section-heading.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-heading h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); }
.section-heading p { margin-top: 14px; color: var(--color-ink); opacity: 0.75; font-size: 1.05rem; }
.section-heading.on-dark p { color: var(--color-cream); opacity: 0.8; }

.section-light { background: var(--color-surface); padding: 96px 0; }
.section-alt { background: #fff; padding: 96px 0; }
.section-dark {
  background: var(--color-brand-primary);
  color: var(--color-cream);
  padding: 96px 0;
  position: relative;
  overflow: hidden;
}

/* --- Nebula background (solo hero, footer, CTAs oscuros) --- */
.nebula-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.nebula-bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 600px 400px at 15% 20%, rgba(91, 62, 140, 0.18), transparent 60%),
    radial-gradient(ellipse 500px 500px at 85% 75%, rgba(91, 62, 140, 0.14), transparent 60%),
    radial-gradient(ellipse 700px 500px at 50% 100%, rgba(201, 162, 39, 0.08), transparent 60%);
}
.nebula-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(245,241,230,0.5), transparent),
    radial-gradient(1px 1px at 30% 70%, rgba(245,241,230,0.4), transparent),
    radial-gradient(1.5px 1.5px at 50% 15%, rgba(245,241,230,0.5), transparent),
    radial-gradient(1px 1px at 70% 55%, rgba(245,241,230,0.3), transparent),
    radial-gradient(1.5px 1.5px at 85% 30%, rgba(245,241,230,0.45), transparent),
    radial-gradient(1px 1px at 92% 80%, rgba(245,241,230,0.35), transparent),
    radial-gradient(1px 1px at 22% 45%, rgba(245,241,230,0.3), transparent),
    radial-gradient(1.5px 1.5px at 60% 90%, rgba(245,241,230,0.4), transparent);
  opacity: 0.5;
}

/* --- Botones --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(180deg, var(--color-brand-gold-light), var(--color-brand-gold));
  color: var(--color-brand-primary);
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { box-shadow: 0 14px 30px -10px rgba(201, 162, 39, 0.6); }
.btn-secondary {
  background: transparent;
  border-color: var(--color-brand-gold);
  color: var(--color-brand-gold-light);
}
.btn-secondary:hover { background: rgba(201, 162, 39, 0.1); }
.btn-ghost {
  background: rgba(11,19,48,0.05);
  color: var(--color-ink);
}
.btn-ghost:hover { background: rgba(11,19,48,0.1); }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.icon-slot { display: inline-flex; align-items: center; justify-content: center; }

/* --- LogoBadge --- */
.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand-primary);
  border: 1.5px solid var(--color-brand-gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  flex-shrink: 0;
}
.logo-badge img { width: 100%; height: 100%; object-fit: contain; }
.logo-badge-sm { width: 52px; height: 52px; border-radius: 12px; padding: 4px; }
.logo-badge-md { width: 92px; height: 92px; border-radius: 16px; padding: 6px; }
.logo-badge-lg { width: 190px; height: 190px; border-radius: var(--radius-lg); padding: 14px; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 19, 48, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup .brand-name {
  font-family: var(--font-display);
  color: var(--color-cream);
  font-size: 1.05rem;
  line-height: 1.2;
}
.brand-lockup .brand-name strong {
  display: block;
  font-size: 1.3rem;
  background: linear-gradient(180deg, var(--color-brand-gold-light), var(--color-brand-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-lockup .brand-name small { display: none; }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  color: var(--color-cream);
  opacity: 0.82;
  font-size: 0.94rem;
  font-weight: 500;
  transition: opacity var(--transition), color var(--transition);
  position: relative;
}
.main-nav a:hover, .main-nav a.active { opacity: 1; color: var(--color-brand-gold-light); }
.main-nav .has-submenu { position: relative; }
.submenu {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-brand-primary-alt);
  border: 1px solid rgba(201,162,39,0.2);
  border-radius: var(--radius-sm);
  padding: 10px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition);
}
.main-nav .has-submenu:hover .submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.submenu a { display: block; padding: 9px 12px; border-radius: 6px; opacity: 0.85; }
.submenu a:hover { background: rgba(201,162,39,0.1); opacity: 1; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-cream);
  padding: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; }

/* --- Radio mini player (persistente) --- */
.radio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #E24C4C;
  box-shadow: 0 0 0 0 rgba(226,76,76,0.6);
  animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(226,76,76,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(226,76,76,0); }
  100% { box-shadow: 0 0 0 0 rgba(226,76,76,0); }
}

.mini-player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: rgba(11, 19, 48, 0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(201, 162, 39, 0.25);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.mini-player.is-visible { transform: translateY(0); }
.mini-player .container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
  height: auto;
}
.mp-play {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--color-brand-gold-light), var(--color-brand-gold));
  color: var(--color-brand-primary);
  border: none;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mp-play svg { width: 20px; height: 20px; }
.mp-info { flex: 1; min-width: 0; }
.mp-info .mp-status { font-size: 0.78rem; color: var(--color-brand-gold-light); display: flex; align-items: center; gap: 6px; letter-spacing: 0.04em; }
.mp-info .mp-track { color: var(--color-cream); font-size: 0.92rem; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-close { background: transparent; border: none; color: var(--color-cream); opacity: 0.6; padding: 8px; }
.mp-close:hover { opacity: 1; }

/* --- Waveform ecualizador --- */
.waveform { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.waveform span {
  width: 3px;
  background: var(--color-brand-gold);
  border-radius: 2px;
  height: 30%;
  animation: wave 1.1s ease-in-out infinite;
  animation-play-state: paused;
}
.waveform.is-playing span { animation-play-state: running; }
.waveform span:nth-child(1) { animation-delay: -1.0s; }
.waveform span:nth-child(2) { animation-delay: -0.8s; }
.waveform span:nth-child(3) { animation-delay: -0.6s; }
.waveform span:nth-child(4) { animation-delay: -0.4s; }
.waveform span:nth-child(5) { animation-delay: -0.2s; }
.waveform span:nth-child(6) { animation-delay: -0.9s; }
.waveform span:nth-child(7) { animation-delay: -0.5s; }
@keyframes wave {
  0%, 100% { height: 25%; }
  50% { height: 100%; }
}

/* --- Hero --- */
.hero {
  background: var(--color-brand-primary);
  color: var(--color-cream);
  padding: 76px 0 90px;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero-copy, .hero-visual { min-width: 0; }
.hero-copy .kicker { color: var(--color-brand-gold-light); }
.hero-copy h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: 0.01em; }
.hero-copy h1 span.line2 { display: block; }
.hero-copy .lead { margin-top: 22px; font-size: 1.12rem; color: var(--color-cream); opacity: 0.82; max-width: 520px; }
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 16px; }

.hero-player-card {
  margin-top: 40px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,162,39,0.25);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 460px;
  backdrop-filter: blur(6px);
}
.hero-player-card .mp-play { width: 54px; height: 54px; }
.hero-player-card .mp-play svg { width: 22px; height: 22px; }

.hero-visual { display: flex; justify-content: center; position: relative; }
.hero-visual .logo-badge-lg { width: 260px; height: 260px; }

/* --- Pilares strip --- */
.pilares-strip { background: var(--color-brand-primary-alt); padding: 0; }
.pilares-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.pilar-item {
  padding: 44px 32px;
  border-right: 1px solid rgba(201,162,39,0.12);
  color: var(--color-cream);
}
.pilar-item:last-child { border-right: none; }
.pilar-icon {
  width: 46px; height: 46px;
  color: var(--color-brand-gold);
  margin-bottom: 16px;
}
.pilar-icon svg { width: 100%; height: 100%; }
.pilar-item h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--color-brand-gold-light); }
.pilar-item p { font-size: 0.92rem; opacity: 0.72; }

/* --- Accesos rápidos --- */
.accesos-strip { background: #fff; padding: 0; box-shadow: var(--shadow-soft); }
.accesos-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.acceso-item {
  padding: 34px 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-right: 1px solid rgba(20,24,43,0.08);
  transition: background var(--transition);
}
.acceso-item:hover { background: var(--color-surface); }
.acceso-item:last-child { border-right: none; }
.acceso-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(201,162,39,0.12);
  color: var(--color-brand-gold-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.acceso-icon svg { width: 22px; height: 22px; }
.acceso-item h4 { font-size: 1rem; margin-bottom: 2px; }
.acceso-item p { font-size: 0.85rem; opacity: 0.6; }
.acceso-item.acceso-donar h4 { color: var(--color-brand-gold-dark); }

/* --- Cards genéricas --- */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.card-dark {
  background: var(--color-brand-primary-alt);
  color: var(--color-cream);
}

/* --- Programación destacada (grid horizontal) --- */
.prog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.prog-card { display: flex; flex-direction: column; }
.prog-card .prog-img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.prog-card .prog-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.prog-card:hover .prog-img img { transform: scale(1.06); }
.prog-time {
  position: absolute; top: 12px; left: 12px;
  background: var(--color-brand-primary);
  color: var(--color-brand-gold-light);
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(201,162,39,0.4);
}
.prog-body { padding: 18px 4px 4px; }
.prog-body h4 { font-size: 1.02rem; margin-bottom: 4px; }
.prog-body p { font-size: 0.85rem; opacity: 0.6; }

.top-row-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 40px; gap: 20px; flex-wrap: wrap; }
.top-row-heading .section-heading { margin-bottom: 0; }
.link-arrow { font-weight: 600; color: var(--color-brand-gold-dark); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--transition); }
.link-arrow:hover svg { transform: translateX(4px); }

/* --- Split versículo / visión --- */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; }
.split-grid > * { min-width: 0; }
.verse-card {
  background: var(--color-brand-primary);
  color: var(--color-cream);
  border-radius: var(--radius-md);
  padding: 44px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.verse-quote-mark { font-family: var(--font-display); font-size: 4.5rem; color: var(--color-brand-gold); opacity: 0.5; line-height: 0.5; margin-bottom: 18px; }
.verse-card p.verse-text { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.5; position: relative; z-index: 1; }
.verse-ref { display: block; margin-top: 18px; color: var(--color-brand-gold-light); font-weight: 600; letter-spacing: 0.02em; }
.verse-card .btn { margin-top: 28px; align-self: flex-start; position: relative; z-index: 1; }

.vision-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.vision-card p { opacity: 0.75; margin-top: 14px; }

/* --- Nosotros: visión / misión --- */
.texto-largo p { font-size: 1.08rem; opacity: 0.8; margin-bottom: 18px; max-width: 780px; }
.texto-largo p.lead-first::first-letter {
  font-family: var(--font-display);
  font-size: 3.2rem;
  color: var(--color-brand-gold-dark);
  float: left;
  line-height: 0.8;
  margin: 6px 8px 0 0;
}

/* --- Pilares extendidos (zigzag) --- */
.pilar-ext { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 72px; }
.pilar-ext:last-child { margin-bottom: 0; }
.pilar-ext:nth-child(even) .pilar-ext-copy { order: 2; }
.pilar-ext-visual {
  aspect-ratio: 4/3.3;
  border-radius: var(--radius-md);
  background: var(--color-brand-primary);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.pilar-ext-visual .pilar-icon { width: 84px; height: 84px; margin: 0; }
.pilar-ext-copy .badge-ref {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-brand-gold-dark);
  border: 1px solid var(--color-brand-gold);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.pilar-ext-copy h3 { font-size: 1.7rem; margin-bottom: 14px; }
.pilar-ext-copy p { opacity: 0.75; font-size: 1.02rem; }

/* --- Pastores / liderazgo --- */
.lideres-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.lider-card { text-align: center; }
.lider-photo {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-brand-gold);
  box-shadow: var(--shadow-soft);
  margin: 0 auto 20px;
  max-width: 220px;
}
.lider-photo img { width: 100%; height: 100%; object-fit: cover; }
.lider-card h4 { font-size: 1.15rem; margin-bottom: 4px; }
.lider-card span { color: var(--color-brand-gold-dark); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.lider-card.placeholder .lider-photo { display: flex; align-items: center; justify-content: center; background: var(--color-surface); color: var(--color-brand-gold); opacity: 0.5; }
.lider-card.placeholder .lider-photo svg { width: 40%; height: 40%; }

/* --- Historia timeline --- */
.timeline { border-left: 2px solid rgba(201,162,39,0.35); margin-left: 8px; padding-left: 32px; display: flex; flex-direction: column; gap: 30px; }
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -40px; top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--color-brand-gold);
  border: 3px solid var(--color-surface);
}
.timeline-item h4 { font-size: 1rem; margin-bottom: 4px; }
.timeline-item p { opacity: 0.65; font-size: 0.95rem; }
.empty-state {
  border: 1.5px dashed rgba(201,162,39,0.4);
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  color: var(--color-ink);
  opacity: 0.6;
}

/* --- Radio página/sección grande --- */
.radio-hero-card {
  background: var(--color-brand-primary);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  color: var(--color-cream);
  position: relative;
  overflow: hidden;
}
.radio-hero-card > * { position: relative; z-index: 1; }
.radio-big-play {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--color-brand-gold-light), var(--color-brand-gold));
  color: var(--color-brand-primary);
  border: none;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-gold);
}
.radio-big-play svg { width: 38px; height: 38px; }
.radio-hero-card .waveform { justify-content: center; height: 32px; margin: 22px auto 0; }
.radio-hero-card .waveform span { width: 4px; }
.stream-error { margin-top: 18px; color: #E8A0A0; font-size: 0.9rem; display: none; }
.stream-error.is-visible { display: block; }
.nowplaying-box { margin-top: 30px; display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(201,162,39,0.2); padding: 10px 20px; border-radius: 999px; font-size: 0.9rem; display: none; }
.nowplaying-box.is-visible { display: inline-flex; }

/* --- Programación semanal --- */
.dias-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.dia-tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(20,24,43,0.15);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-ink);
  opacity: 0.6;
}
.dia-tab.active { background: var(--color-brand-primary); color: var(--color-brand-gold-light); opacity: 1; border-color: var(--color-brand-primary); }
.programa-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  background: #fff;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: 0 4px 16px -10px rgba(11,19,48,0.15);
}
.programa-row .hora { font-family: var(--font-display); font-weight: 700; color: var(--color-brand-gold-dark); }
.programa-row h4 { font-size: 1.02rem; margin-bottom: 3px; }
.programa-row p { font-size: 0.85rem; opacity: 0.6; }
.programa-row .responsable { font-size: 0.82rem; color: var(--color-brand-gold-dark); font-weight: 600; text-align: right; }

/* --- Multimedia / galería --- */
.tabs-media { display: flex; gap: 10px; margin-bottom: 36px; }
.tab-btn {
  padding: 11px 26px;
  border-radius: 999px;
  border: 1px solid rgba(20,24,43,0.15);
  background: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0.6;
}
.tab-btn.active { background: var(--color-brand-primary); color: var(--color-brand-gold-light); border-color: var(--color-brand-primary); opacity: 1; }
.media-panel { display: none; }
.media-panel.active { display: block; }
.gallery-grid {
  columns: 4 220px;
  column-gap: 16px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}
.gallery-item img { width: 100%; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.videos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.video-card { border-radius: var(--radius-md); overflow: hidden; background: var(--color-brand-primary); box-shadow: var(--shadow-soft); }
.video-card video { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; background: #000; }
.video-card .video-caption { padding: 16px 20px; color: var(--color-cream); font-size: 0.92rem; opacity: 0.8; }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(11,19,48,0.94);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(201,162,39,0.3);
  color: var(--color-cream);
  border-radius: 50%;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close svg, .lightbox-nav svg { width: 20px; height: 20px; }

/* --- Contacto --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info-list { display: flex; flex-direction: column; gap: 22px; margin-top: 28px; }
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-info-item .ci-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(201,162,39,0.12); color: var(--color-brand-gold-dark);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-info-item .ci-icon svg { width: 20px; height: 20px; }
.contact-info-item h4 { font-size: 0.95rem; margin-bottom: 2px; }
.contact-info-item p { font-size: 0.92rem; opacity: 0.65; }
.social-row { display: flex; gap: 12px; margin-top: 24px; }
.social-row a {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--color-brand-primary); color: var(--color-brand-gold-light);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition);
}
.social-row a:hover { transform: translateY(-3px); }
.social-row a svg { width: 18px; height: 18px; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-soft); margin-top: 32px; }
.map-embed iframe { width: 100%; height: 280px; border: 0; display: block; }

.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; opacity: 0.75; }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(20,24,43,0.15);
  background: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-ink);
}
.form-field input:focus, .form-field textarea:focus {
  outline: none;
  border-color: var(--color-brand-gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-success {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(201,162,39,0.12);
  border: 1px solid rgba(201,162,39,0.35);
  color: var(--color-brand-gold-dark);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-size: 0.92rem;
  font-weight: 600;
}
.form-success.is-visible { display: flex; }
.form-success svg { width: 20px; height: 20px; flex-shrink: 0; }

/* --- Donar --- */
.donar-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.donar-copy p { opacity: 0.8; font-size: 1.05rem; margin-bottom: 16px; max-width: 560px; }
.donar-methods { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.donar-method {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,162,39,0.2);
  border-radius: var(--radius-sm);
}
.donar-method span { font-size: 0.95rem; opacity: 0.85; }
.donar-visual {
  aspect-ratio: 1/1;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(201,162,39,0.15), transparent);
  border: 1px solid rgba(201,162,39,0.25);
  display: flex; align-items: center; justify-content: center;
}
.donar-visual svg { width: 34%; height: 34%; color: var(--color-brand-gold); opacity: 0.85; }

/* --- Footer --- */
.site-footer { background: var(--color-brand-primary); color: var(--color-cream); padding: 72px 0 28px; position: relative; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.9fr 0.9fr 1fr; gap: 40px; position: relative; z-index: 1; }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand-text h3 { font-size: 1.2rem; color: var(--color-brand-gold-light); margin-bottom: 8px; }
.footer-brand-text p { font-size: 0.9rem; opacity: 0.65; max-width: 280px; }
.footer-col h5 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-brand-gold); margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col a, .footer-col p { font-size: 0.9rem; opacity: 0.7; }
.footer-col a:hover { opacity: 1; color: var(--color-brand-gold-light); }
.footer-bottom {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid rgba(201,162,39,0.15);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; opacity: 0.55;
  position: relative; z-index: 1;
  flex-wrap: wrap; gap: 12px;
}

/* --- Reveal on scroll --- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* --- 404 --- */
.error-page {
  min-height: 70vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 24px;
}
.error-page h1 { font-size: clamp(4rem, 12vw, 7rem); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .prog-grid { grid-template-columns: repeat(2, 1fr); }
  .pilares-grid { grid-template-columns: repeat(2, 1fr); }
  .pilar-item { border-bottom: 1px solid rgba(201,162,39,0.12); }
  .accesos-grid { grid-template-columns: repeat(2, 1fr); }
  .acceso-item { border-bottom: 1px solid rgba(20,24,43,0.08); }
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .lideres-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-brand-primary);
    border-bottom: 1px solid rgba(201, 162, 39, 0.15);
    padding: 8px 24px 20px;
    box-shadow: var(--shadow-soft);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid rgba(201,162,39,0.1); opacity: 0.85; }
  .main-nav .has-submenu { display: flex; flex-direction: column; }
  .main-nav .submenu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    background: transparent;
    border: none;
    padding: 0 0 8px 16px;
    min-width: 0;
  }
  .main-nav .has-submenu.is-open .submenu { display: flex; flex-direction: column; }
  .site-header { position: relative; }
  .nav-toggle { display: inline-flex; }
  .header-actions .btn-primary span,
  .header-actions .btn-primary { }
  .header-actions .btn-primary { padding: 12px; }
  .header-actions .btn-primary .btn-label { display: none; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-player-card { margin-left: auto; margin-right: auto; }
  .hero-visual { order: -1; }
  .hero-visual .logo-badge-lg { width: 160px; height: 160px; }
  .split-grid { grid-template-columns: 1fr; }
  .pilar-ext { grid-template-columns: 1fr; gap: 24px; }
  .pilar-ext:nth-child(even) .pilar-ext-copy { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .donar-grid { grid-template-columns: 1fr; }
  .donar-visual { max-width: 280px; margin: 0 auto; }
  .gallery-grid { columns: 2 200px; }
}

/* Evita que hijos con contenido sin wrap (botones nowrap, etc.)
   fuercen el track de un grid a expandirse más allá del contenedor. */
.pilares-grid > *, .accesos-grid > *, .prog-grid > *, .lideres-grid > *,
.pilar-ext > *, .contact-grid > *, .donar-grid > *, .footer-grid > * {
  min-width: 0;
}

@media (max-width: 640px) {
  .site-header .container { height: 72px; }
  .logo-badge-sm { width: 42px; height: 42px; }
  .brand-lockup .brand-name strong { font-size: 1.05rem; }
  .hero-copy h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; white-space: normal; }
  .hero-player-card { max-width: 100%; }
  .mp-track { white-space: normal; }
  .prog-grid { grid-template-columns: 1fr; }
  .pilares-grid { grid-template-columns: 1fr; }
  .accesos-grid { grid-template-columns: 1fr; }
  .lideres-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .programa-row { grid-template-columns: 1fr; text-align: left; }
  .programa-row .responsable { text-align: left; }
  .section-light, .section-alt, .section-dark { padding: 64px 0; }
  .radio-hero-card { padding: 44px 24px; }
  .videos-grid { grid-template-columns: 1fr; }
  .gallery-grid { columns: 2 160px; }
}
