:root {
  --bg: #08121a;
  --bg-soft: #0f1d28;
  --bg-card: rgba(255,255,255,0.06);
  --line: rgba(255,255,255,0.12);
  --text: #edf3f6;
  --muted: #aab7c2;
  --gold: #d9b16f;
  --gold-soft: #f0ddba;
  --emerald: #7bd0c0;
  --shadow: 0 30px 80px rgba(0,0,0,0.35);
  --radius: 24px;
  --radius-sm: 18px;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(123,208,192,0.14), transparent 32%),
    radial-gradient(circle at top right, rgba(217,177,111,0.18), transparent 24%),
    linear-gradient(180deg, #071119 0%, #08121a 40%, #0b1720 100%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.site-shell { min-height: 100vh; }
.section { width: min(calc(100% - 32px), var(--max)); margin: 0 auto; }
.topbar {
  width: min(calc(100% - 32px), var(--max));
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 26px 22px;
  position: relative;
  z-index: 20;
  background: linear-gradient(115deg, #0b3a32 0%, #0b3a32 28%, #0d4539 36%, rgba(8,18,26,0.86) 60%);
  border: 1px solid rgba(123,208,192,0.32);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: visible;
}
.brand,
.nav-toggle,
.site-nav {
  position: relative;
  z-index: 2;
}
.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 50%, rgba(240,221,186,0.18), transparent 55%);
  pointer-events: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand img { width: 96px; height: 96px; object-fit: contain; border-radius: 18px; background: transparent; padding: 0; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.brand strong { display: block; font-size: 1rem; }
.brand span { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--muted); font-weight: 500; }
.site-nav a:hover { color: var(--text); }
.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  margin: 4px auto;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  transition: transform .25s ease, background .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #f3e1bd 100%);
  color: #12202a;
}
.btn-secondary, .btn-ghost {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}
/* Contact button — coral llamativo */
.site-nav a.btn-contact {
  background: linear-gradient(135deg, #ff7a59 0%, #ff5a8a 100%);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.24);
  padding: 12px 22px;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 14px 30px rgba(255,90,138,0.34), inset 0 0 0 1px rgba(255,255,255,0.18);
  text-transform: uppercase;
  font-size: 0.82rem;
}
.site-nav a.btn-contact:hover {
  background: linear-gradient(135deg, #ff8c70 0%, #ff6e9c 100%);
  color: #fff;
  box-shadow: 0 18px 36px rgba(255,90,138,0.5);
}
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
  padding: 84px 0 72px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .16em;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 36px; height: 1px;
  background: currentColor;
}
.hero h1, .section h2 {
  font-family: 'Cormorant Garamond', serif;
  line-height: .95;
  margin: 0 0 20px;
  letter-spacing: -.02em;
}
.hero h1 { font-size: clamp(3rem, 6vw, 6.2rem); max-width: 12ch; }
.hero-lead, .section-heading p, .split-copy p, .credibility-copy p, .video-copy p, .program-card p, .footer p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
}
.hero-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 32px 0;
}
.hero-points div, .card, .program-card, .credibility-panel, .video-card, .cta-band, .footer {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.hero-points div { padding: 18px; }
.hero-points strong { display: block; font-size: 1.15rem; margin-bottom: 6px; }
.hero-points span { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-media {
  position: relative;
  min-height: 620px;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 34px;
  box-shadow: var(--shadow);
}
.floating-quote {
  position: absolute;
  right: -14px;
  bottom: 32px;
  max-width: 290px;
  background: rgba(6,10,15,0.84);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.floating-quote span { color: var(--gold-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; }
.floating-quote p { margin: 10px 0 0; font-size: 1.1rem; line-height: 1.5; }
.split {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 54px;
  align-items: center;
  padding: 34px 0 28px;
}
.split-reverse { grid-template-columns: 1.05fr .95fr; }
.split-reverse .split-copy { order: 1; }
.split-reverse .split-media { order: 2; }
.split-media img {
  border-radius: 30px;
  min-height: 520px;
  object-fit: cover;
  width: 100%;
}
.section-heading {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 34px;
  padding-top: 40px;
}
.section-heading h2 { font-size: clamp(2.6rem, 5vw, 4.5rem); }
.narrow { max-width: 720px; }
.philosophy { padding: 34px 0 20px; }
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.resources { padding: 16px 0 8px; }
.resources .section-heading p { color: var(--muted); }
.resources .card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}
.resources .card p {
  color: var(--muted);
  margin: 0 0 4px;
}
.resources .btn {
  margin-top: auto;
  align-self: flex-start;
}
.course-poster-section {
  padding: 18px 0 28px;
}
.course-poster-wrap,
.course-posters-grid {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.course-poster-wrap a,
.course-posters-grid a {
  display: inline-block;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.course-poster-wrap a:hover,
.course-posters-grid a:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.course-poster-wrap img,
.course-posters-grid img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}
.course-posters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}
.course-posters-grid a:first-child,
.course-posters-grid a:last-child {
  display: flex;
}
.course-posters-grid img {
  height: 100%;
  object-fit: cover;
}
@media (max-width: 720px) {
  .course-poster-wrap { max-width: 100%; }
  .course-posters-grid { grid-template-columns: 1fr; gap: 18px; }
}
.card { padding: 28px; }
.card h3, .program-card h3, .video-copy h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  margin: 0 0 12px;
}
.programs { padding: 34px 0 10px; }
.program-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr .85fr;
  gap: 18px;
}
.program-card {
  overflow: hidden;
}
.program-card > img, .program-media img {
  height: 260px;
  width: 100%;
  object-fit: cover;
}
.program-card > div { padding: 24px; }
.featured {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
.program-copy { padding: 28px; }
.tag {
  display: inline-block;
  background: rgba(217,177,111,0.12);
  border: 1px solid rgba(217,177,111,0.28);
  color: var(--gold-soft);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.program-copy ul {
  margin: 20px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}
.method { padding: 46px 0 24px; }
.method-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.method-badges span {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: .92rem;
}
.credibility { padding: 30px 0 12px; }
.credibility-panel {
  padding: 30px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
}
.player-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.player-list li {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}
.videos { padding: 28px 0 18px; }
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.video-card { overflow: hidden; }
.video-frame { aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-copy { padding: 22px; }
.cta-band {
  margin-top: 30px;
  margin-bottom: 20px;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.cta-band h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); margin-bottom: 0; }
.footer {
  margin-bottom: 40px;
  padding: 30px;
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 26px;
}
.footer-brand img { width: 90px; background: #fff; border-radius: 50%; padding: 10px; margin-bottom: 16px; }
.footer-brand h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); margin-bottom: 10px; }
.footer-contact {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.footer-label {
  display: inline-block;
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  margin-bottom: 12px;
}
.footer-contact a { color: var(--text); }

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .hero, .split, .featured, .credibility-panel, .footer { grid-template-columns: 1fr; }
  .program-grid, .philosophy-grid, .video-grid, .footer-contact { grid-template-columns: 1fr; }
  .hero-media { min-height: auto; }
  .split-media img { min-height: auto; }
  .hero-points { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topbar {
    border-radius: 28px;
    padding: 16px 18px;
    overflow: visible;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
  }
  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 45;
    flex: 0 0 auto;
  }
  .site-nav {
    position: static;
    width: 100%;
    order: 3;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 2px;
    padding: 0 14px;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
    transform: none;
    background: rgba(8,18,26,0.98);
    border: 1px solid transparent;
    border-radius: 24px;
    box-shadow: none;
    transition: max-height .28s ease, opacity .22s ease, padding .22s ease, margin .22s ease, border-color .22s ease;
  }
  .site-nav a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .site-nav.is-open {
    max-height: 80vh;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    padding: 16px 14px;
    margin-top: 12px;
    border-color: var(--line);
    box-shadow: var(--shadow);
  }
  .hero { padding-top: 42px; }
  .hero h1 { max-width: 100%; }
  .hero-actions, .cta-band { flex-direction: column; align-items: stretch; }
  .floating-quote { position: static; margin-top: 14px; max-width: none; }
}


/* Ajustes solicitados: home 2x2 y nuevas secciones */
.programs .program-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
.programs .program-card,
.programs .program-card.featured {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.programs .program-card.featured .program-copy,
.programs .program-card > div {
  flex: 1;
}
.programs .program-card.featured .program-media {
  order: -1;
}
.programs .program-card.featured .program-media img,
.programs .program-card > img {
  height: 280px;
  object-fit: cover;
  object-position: center center;
}
.gallery-callout-section { padding-top: 10px; }
.gallery-callout { text-align: center; padding: 42px; }
.gallery-callout h2 { margin-bottom: 16px; }
.pepe-highlights { padding-top: 16px; }
.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.story-grid + .story-grid { margin-top: 22px; }
.story-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.story-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.story-card > div { padding: 24px; }
.story-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  margin: 0 0 12px;
}
.story-card p { color: var(--muted); }
.story-card--split {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
}
.story-card--split img { height: 100%; min-height: 100%; }
.gallery-page-section .gallery-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.gallery-landing { padding-bottom: 26px; }
@media (max-width: 980px) {
  .programs .program-grid,
  .story-grid,
  .story-card--split,
  .gallery-page-section .gallery-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}


/* Ajustes v3: menú móvil, galería más ligera y estructura de /pepe-imaz */
.nav-toggle.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle span { transition: transform .2s ease, opacity .2s ease; }
.gallery-link { display: block; }
.gallery-page-section .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery-page-section .gallery-item img { aspect-ratio: 1 / 1; object-fit: cover; }
.team-showcase .team-layout,
.books-layout,
.reflection-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: start;
}
.team-visual img,
.books-cover img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.team-copy,
.books-copy {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.coach-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.coach-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.coach-card img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}
.coach-card > div { padding: 22px; }
.coach-card h3 { margin: 0 0 10px; font-family: 'Cormorant Garamond', serif; font-size: 2rem; }
.coach-card p { color: var(--muted); margin: 0; }
.books-layout { margin-top: 18px; }
.books-copy .hero-actions { margin-top: 18px; }
.reflection-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.reflection-gallery img:first-child { grid-column: 1 / -1; height: 340px; }
.reflection-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.reflection-note { color: var(--gold-soft); font-weight: 600; }
@media (max-width: 980px) {
  .gallery-page-section .gallery-grid,
  .team-showcase .team-layout,
  .books-layout,
  .reflection-layout,
  .coach-grid,
  .coach-card {
    grid-template-columns: 1fr;
  }
  .coach-card img { min-height: 280px; }
}

/* --- Vídeos embebidos bajo los carteles de curso (formación) --- */
.course-poster-item {
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: center;
}
.course-posters-grid .course-poster-item > a {
  display: block;
  width: 100%;
}
.course-posters-grid .course-poster-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.course-video-embed {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #000;
}
.course-video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 720px) {
  .course-video-embed { max-width: 320px; }
}
