/* ─────────────────────────────────────────────────────────────
   EnLlamas — Brand styles
   Brand reference: docs/brandbook.pdf
   ───────────────────────────────────────────────────────────── */

/* ── Brand fonts ──────────────────────────────────────────────
   Body + UI:  Questrial (Google Fonts)         ✅ free
   Display:    The Seasons Bold                 ⚠️ commercial — fallback: Cormorant Garamond
   Accent:     Amsterdam One                    ⚠️ commercial — fallback: Dancing Script
   When licenses are acquired, replace fallbacks with the real faces.
   ───────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Questrial&family=Cormorant+Garamond:wght@500;700&family=Dancing+Script:wght@500;700&display=swap');

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  /* Brand palette */
  --color-coral:       #F7525F;   /* energy, transformation */
  --color-orange:      #FC8F54;   /* warmth, optimism */
  --color-ivory:       #FDF6ED;   /* calm, background */
  --color-lavender:    #6C67D4;   /* introspection */
  --color-deep-blue:   #2D3E95;   /* authority, wisdom */

  /* Functional roles */
  --bg:                var(--color-ivory);
  --bg-alt:            #FFFFFF;
  --text:              #2A2A2A;
  --text-muted:        #6E6E6E;
  --accent:            var(--color-coral);
  --accent-warm:       var(--color-orange);
  --accent-deep:       var(--color-deep-blue);
  --accent-soft:       var(--color-lavender);

  /* Type stacks */
  --font-display:      'Cormorant Garamond', 'The Seasons', Georgia, serif;
  --font-body:         'Questrial', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-accent:       'Dancing Script', 'Amsterdam One', cursive;

  /* Type scale — compacta para que cada sección quepa en viewport */
  --fs-xs:    0.75rem;
  --fs-sm:    0.875rem;
  --fs-md:    1rem;
  --fs-lg:    1.125rem;
  --fs-xl:    1.5rem;
  --fs-2xl:   2rem;
  --fs-3xl:   2.5rem;
  --fs-4xl:   3.75rem;

  /* Spacing — reducido para secciones más compactas */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  1rem;
  --space-4:  1.5rem;
  --space-5:  2rem;
  --space-6:  2.5rem;
  --space-7:  3rem;

  /* Layout */
  --container:        1180px;
  --container-narrow: 760px;
  --radius:           12px;
  --radius-lg:        24px;
  --shadow-sm:        0 2px 8px rgba(45, 62, 149, 0.08);
  --shadow-md:        0 8px 24px rgba(45, 62, 149, 0.12);

  /* Motion */
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --dur:      300ms;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--accent-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--accent-deep);
  margin: 0 0 var(--space-3);
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--space-3); }

.accent-script {
  font-family: var(--font-accent);
  color: var(--accent);
  font-size: 1.4em;
  line-height: 1;
}

/* ── Layout primitives ──────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.container--narrow { max-width: var(--container-narrow); }

/* Breathing room on tablet/mobile — full-bleed text was sitting flush against the viewport edge */
@media (max-width: 1024px) {
  .container { padding: 0 var(--space-5); }
}

.section {
  padding: var(--space-7) 0;
}
.section--alt { background: var(--bg-alt); }
.section--coral {
  background: linear-gradient(135deg, var(--color-coral), var(--color-orange));
  color: #fff;
}
.section--coral h1,
.section--coral h2,
.section--coral h3 { color: #fff; }

/* ── Header / Nav ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(253, 246, 237, 0.92);
  backdrop-filter: blur(10px);
  z-index: 50;
  border-bottom: 1px solid rgba(45, 62, 149, 0.08);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  max-width: var(--container);
  margin: 0 auto;
}
.site-header__logo {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent-deep);
}
.site-header__logo-img {
  height: 24px;
  width: auto;
  display: block;
}
.site-header__logo em {
  font-family: var(--font-accent);
  font-style: normal;
  color: var(--accent);
  font-size: 1.1em;
}

.site-nav {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.site-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: var(--fs-sm);
  padding: var(--space-1) 0;
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.site-nav__toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  color: var(--accent-deep);
  cursor: pointer;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-sm);
  cursor: pointer;
  border: 0;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--accent-deep);
  border: 1.5px solid var(--accent-deep);
}
.btn--ghost:hover { background: var(--accent-deep); color: #fff; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: var(--space-3) 0 var(--space-6);
  text-align: center;
}
.hero__kicker {
  font-family: var(--font-accent);
  color: var(--accent);
  font-size: var(--fs-4xl);
  display: block;
  margin-bottom: var(--space-2);
}
.hero__title { font-size: calc(var(--fs-3xl) * 0.9); margin-bottom: var(--space-3); }
.hero__lead {
  font-size: var(--fs-lg);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto var(--space-3);
}
.hero__chispa {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.5;
  color: var(--accent-deep);
  max-width: 700px;
  margin: 0 auto var(--space-4);
}
.hero__chispa strong { color: var(--accent); }
.hero__chispa em {
  color: var(--accent-warm);
  font-style: italic;
}

/* ── Cards / grids ──────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--space-4);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  display: block;
  color: inherit;
  text-decoration: none;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card h3 { color: var(--accent); }
/* Third card centered below a two-column row */
.card--centered-row {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: calc(50% - var(--space-4) / 2);
}
@media (max-width: 768px) {
  .card--centered-row { max-width: 100%; }
}

/* Event card (Eventos page): image and title/date are two separate
   elements, not one shared card box \u2014 image keeps its own rounded/shadow
   box, text sits below it with a gap, centered. Only the image links out
   to WhatsApp \u2014 the title/date block is plain text, not clickable. */
.event-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.event-card > a {
  display: block;
}
.event-card__img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.event-card > a:hover .event-card__img {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.event-card__meta {
  text-align: center;
}
.event-card__meta h3 {
  color: var(--accent);
  margin: 0 0 4px;
}
.event-card__meta p {
  margin: 0;
}
/* Third event card centered below a two-column row */
.event-card--centered-row {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: calc(50% - var(--space-4) / 2);
}
@media (max-width: 768px) {
  .event-card--centered-row { max-width: 100%; }
}

/* ── Book block ─────────────────────────────────────────────── */
.book {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5) 0;
}
.book__cover {
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  padding: var(--space-3);
  text-align: center;
}
.book--alt .book__cover {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-deep));
}
.book + .book { border-top: 1px solid rgba(45, 62, 149, 0.1); }

/* ── Carousel (testimonials) ────────────────────────────────── */
.carousel {
  position: relative;
  overflow: hidden;
  padding: var(--space-3) 0;
}
.carousel__track {
  display: flex;
  gap: var(--space-3);
  transition: transform 500ms var(--ease);
}
.carousel__slide {
  flex: 0 0 100%;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.carousel__slide blockquote {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-style: italic;
  color: var(--accent-deep);
  margin: 0 0 var(--space-3);
  line-height: 1.4;
}
.carousel__slide cite {
  font-style: normal;
  font-weight: 500;
  color: var(--accent);
}
.carousel__controls {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.carousel__btn {
  background: var(--bg-alt);
  border: 1px solid rgba(45, 62, 149, 0.15);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--accent-deep);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.carousel__btn:hover {
  background: var(--accent-deep);
  color: #fff;
}
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
}
.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(45, 62, 149, 0.2);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}
.carousel__dot[aria-current="true"] { background: var(--accent); }

/* ── Section title helpers ──────────────────────────────────── */
.section-title-center { text-align: center; }
.team-heading {
  text-align: center;
  font-size: var(--fs-3xl);
}

/* ── Team members (Quiénes somos) ──────────────────────────────────────── */
.team-member {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  margin: var(--space-4) 0;
}
.team-member__info { flex: 1; }
.team-member__info h3 { margin-top: 0; }
.team-member + .team-member {
  border-top: 1px solid rgba(45, 62, 149, 0.1);
  padding-top: var(--space-4);
}
.team-photo {
  width: 180px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .team-member {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}


/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--accent-deep);
  color: #FDF6ED;
  padding: var(--space-6) 0 var(--space-4);
  margin-top: var(--space-7);
}
.site-footer a { color: #FDF6ED; }
.site-footer a:hover { color: var(--accent-warm); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}
.site-footer__brand {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  margin-bottom: var(--space-2);
}
.site-footer__brand em {
  font-family: var(--font-accent);
  font-style: normal;
  color: var(--accent-warm);
}
.site-footer__heading {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-xs);
  color: var(--accent-warm);
  margin-bottom: var(--space-2);
}
.site-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.site-footer__social {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: var(--space-2);
}
.site-footer__social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.site-footer__social a:hover {
  background: var(--accent);
  transform: translateY(-2px);
}
.site-footer__social svg { width: 18px; height: 18px; fill: currentColor; }
.site-footer__bottom {
  border-top: 1px solid rgba(253, 246, 237, 0.12);
  padding-top: var(--space-3);
  font-size: var(--fs-xs);
  color: rgba(253, 246, 237, 0.7);
  text-align: center;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --fs-xl:  1.25rem;
    --fs-2xl: 1.625rem;
    --fs-3xl: 2rem;
    --fs-4xl: 3rem;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid rgba(45, 62, 149, 0.08);
  }
  .site-nav[data-open="true"] { display: flex; }
  .site-nav a { padding: var(--space-2) 0; }
  .site-nav__toggle { display: block; }

  .section { padding: var(--space-5) 0; }
  .hero { padding: var(--space-3) 0 var(--space-4); }

  .grid--2, .grid--3 { grid-template-columns: 1fr; }

  .book {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .book__cover {
    max-width: 240px;
    margin: 0 auto;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* ── Swiper multimedia carousel (Testimonios) ── */
.mu-swiper-multimedia-outer-wrapper {
  position: relative;
  padding-bottom: var(--space-6);
  /* Arrow gutters: the navigation circles (44px) sit fully outside the
     slides, so they never overlay the first or last visible video.
     On narrow screens there is no room outside — the arrows hide and
     touch-swipe + pagination carry navigation instead. */
  padding-left: calc(44px + var(--space-3));
  padding-right: calc(44px + var(--space-3));
}

@media (max-width: 640px) {
  .mu-swiper-multimedia-outer-wrapper {
    padding-left: 0;
    padding-right: 0;
  }
  .mu-swiper-multimedia .swiper-button-prev,
  .mu-swiper-multimedia .swiper-button-next {
    display: none;
  }
}

.mu-swiper-multimedia {
  overflow: hidden;
}

.mu-swiper-multimedia .swiper-slide {
  display: flex;
  flex-direction: column;
  height: auto;
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.mu-swiper-multimedia .swiper-slide video {
  width: 100%;
  height: 100%;
  max-height: 480px;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #000;
}

/* Testimonios carousel needs more width than the standard container —
   3 slides at 1180px leave each video too small. 1600px only kicks in
   on large screens; below that the container just fills the viewport. */
.container--wide {
  max-width: 1600px;
}

/* Desktop: 3 slides over the wide container — give the videos real height */
@media (min-width: 1025px) {
  .mu-swiper-multimedia .swiper-slide video {
    max-height: 640px;
  }
}

.mu-swiper-multimedia .swiper-slide-footer {
  padding: var(--space-3);
  text-align: center;
  font-size: var(--fs-sm);
}

.mu-swiper-multimedia .swiper-slide-footer p {
  margin: 0;
}

.mu-swiper-multimedia .swiper-slide-footer small {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.mu-swiper-multimedia .swiper-pagination {
  position: absolute;
  bottom: var(--space-4);
  left: 0;
  width: 100%;
}

.mu-swiper-multimedia .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: var(--text-muted);
  opacity: 0.4;
}

.mu-swiper-multimedia .swiper-pagination-bullet-active {
  background: var(--accent);
  opacity: 1;
}

.mu-swiper-multimedia .swiper-button-prev,
.mu-swiper-multimedia .swiper-button-next {
  color: var(--accent);
  width: 56px;
  height: 56px;
  background: var(--bg-alt);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  /* Vertical center of the VIDEO area, not the slide: each slide is
     video + ~4rem of footer (small + caption + padding), and the video
     sits at the top — so the video's middle is the middle of
     (100% - footer). Also neutralize Swiper's default margin-top and
     self-center with translateY, so `top` is the exact center point. */
  top: calc((100% - 4rem) / 2);
  margin-top: 0;
  transform: translateY(-50%);
}

.mu-swiper-multimedia .swiper-button-prev::after,
.mu-swiper-multimedia .swiper-button-next::after {
  font-size: var(--fs-xl);
  font-weight: bold;
}

.mu-swiper-multimedia .swiper-button-prev:hover,
.mu-swiper-multimedia .swiper-button-next:hover {
  background: var(--accent);
  color: var(--bg-alt);
}

/* ── Nav list ── */
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.site-nav li { display: block; }

/* Footer nav reset */
.site-footer__links li { list-style: none; }

@media (max-width: 768px) {
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  .site-nav li { width: 100%; }
  .site-nav li a { display: block; padding: var(--space-2) 0; }
}

/* Tablet only — "Próximos eventos" centered relative to the image grid below it */
@media (min-width: 769px) and (max-width: 1024px) {
  .section-title-tablet-center { text-align: center; }
}

/* Inicio, Libros, Quiénes somos — the hero (first paragraph) sits on <section class="hero">,
   whose own padding shorthand zeroes left/right and overrides .container's horizontal padding.
   4px more than .container's tablet/mobile padding, applied as longhand so it wins the cascade. */
@media (max-width: 1024px) {
  .hero--pad { padding-left: calc(var(--space-5) + 4px); padding-right: calc(var(--space-5) + 4px); }
}
