/* ==========================================================================
   SBFSC.com — Seminario Bíblico Fundamental del Sur de California
   Palette and type measured from the live WordPress site.
   ========================================================================== */

:root {
  /* Brand */
  --gold: #daa520; /* fills, borders, the footer — never body text */
  --gold-text: #8a6413; /* gold-as-text on light: 5.4:1, passes AA */
  --gold-large: #b8860b; /* gold for LARGE display text only: 3.3:1 */
  --gold-dark: #b8891a;
  --ink: #1a1a1a;
  --body: #333333;
  --muted: #6b6660;
  --rule: #e2ded7;
  --paper: #ffffff;
  --paper-warm: #faf8f4;
  --black: #000000;

  /* Type */
  --display: "Cormorant SC", "Cormorant Garamond", Georgia, serif;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --label: "Oswald", "Arial Narrow", Helvetica, sans-serif;
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --measure: 68ch;
  --shell: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* Every anchor target has to clear the sticky header or a jumped-to heading
   lands underneath it. One rule covers the whole page because every scroll
   target is a <section> with an id. */
section[id] {
  scroll-margin-top: 5.5rem;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--gold-text);
}
a:hover {
  color: var(--gold-dark);
}

:focus-visible {
  outline: 3px solid var(--gold-text);
  outline-offset: 3px;
}

.shell {
  width: min(100% - 2.5rem, var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* --------------------------------------------------------------- headings */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h2 {
  font-size: clamp(2rem, 4vw, 3.125rem);
} /* 50px on the live site */
h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.eyebrow {
  font-family: var(--label);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 0.75rem;
}

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.section--warm {
  background: var(--paper-warm);
}
.section--dark {
  background: var(--black);
  color: #e8e4dc;
}
.section--dark h2,
.section--dark h3 {
  color: #fff;
}
.section--dark .eyebrow {
  color: var(--gold);
}

.section__head {
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}
.section__head--center {
  margin-inline: auto;
  text-align: center;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  font-family: var(--label);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.9rem;
  border: 2px solid transparent;
  border-radius: 3px;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
.btn--gold {
  background: var(--gold);
  color: #241b05;
  border-color: var(--gold);
}
.btn--gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: #241b05;
}
.btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}
.btn--ghost:hover {
  background: #fff;
  color: var(--ink);
}
.btn--outline {
  color: var(--gold-text);
  border-color: var(--gold);
}
.btn--outline:hover {
  background: var(--gold);
  color: #241b05;
}

/* --------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(140%) blur(6px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}
.brand img {
  width: 52px;
  height: auto;
}
.brand__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.15;
  color: var(--ink);
  max-width: 15ch;
}

.nav-toggle {
  display: none;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: none;
  border: 2px solid var(--rule);
  border-radius: 3px;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}

.nav > ul {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* all of them flex, not just the one with a submenu — a lone flex <li>
   blockifies its <a>, which makes padding and border count toward layout and
   drops the text a few px below the inline siblings */
.nav > ul > li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav a {
  font-family: var(--label);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
/* bare [aria-current] because the scroll-spy writes "location" — the correct
   ARIA token for a position within a page, where "page" means a whole document */
.nav a:hover,
.nav a[aria-current] {
  color: var(--gold-text);
  border-bottom-color: var(--gold);
}

/* ------------------------------------------- dropdown (Objetivos) */

.nav__has-sub {
  position: relative;
}

.nav__sub-toggle {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: var(--ink);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.18s ease;
}
/* the caret is drawn, not typed: Oswald has no U+25BE and falls back to a dash */
.nav__sub-toggle::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: border-top-color 0.18s ease;
}
.nav__sub-toggle:hover {
  color: var(--gold-text);
}
.nav__sub-toggle[aria-expanded="true"] {
  transform: rotate(180deg);
}

.nav__sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 12rem;
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--rule);
  border-top: 2px solid var(--gold);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  display: none;
  z-index: 60;
}
.nav__has-sub:hover > .nav__sub,
.nav__has-sub:focus-within > .nav__sub,
.nav__sub[data-open="true"] {
  display: block;
}

.nav__sub a {
  display: block;
  padding: 0.55rem 1.1rem;
  border-bottom: 0;
  white-space: nowrap;
}
.nav__sub a:hover {
  background: var(--paper-warm);
  border-bottom: 0;
  color: var(--gold-text);
}
/* submenu links carry border-bottom: 0, so an active Objetivos can't show an
   underline — it gets the same warm background the hover state uses */
.nav__sub a[aria-current] {
  background: var(--paper-warm);
  color: var(--gold-text);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--rule);
    padding: 1rem 1.25rem 1.5rem;
  }
  .nav[data-open="true"] {
    display: block;
  }
  .nav > ul {
    flex-direction: column;
    gap: 0.25rem;
  }
  .nav a {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .nav > ul > li {
    display: block;
  }
  .nav__has-sub {
    display: block;
    position: relative;
  }
  .nav__has-sub > a {
    padding-right: 3rem;
  }
  .nav__sub-toggle {
    position: absolute;
    top: 0.35rem;
    right: 0;
    width: 40px;
    height: 40px; /* real touch target on mobile */
    border: 1px solid var(--rule);
  }
  .nav__sub {
    position: static;
    min-width: 0;
    padding: 0 0 0 1.1rem;
    border: 0;
    box-shadow: none;
    border-left: 2px solid var(--gold);
    margin: 0.25rem 0 0.5rem;
  }
  /* on mobile only the button opens it — hover/focus-within would trap a tap.
     the open rule needs matching specificity (0,3,0) to beat those two, and
     comes after them so it wins the tie. */
  .nav__has-sub:hover > .nav__sub,
  .nav__has-sub:focus-within > .nav__sub {
    display: none;
  }
  .nav__has-sub > .nav__sub[data-open="true"] {
    display: block;
  }
  .nav__sub a {
    padding: 0.6rem 0;
  }
}

/* --------------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: clamp(28rem, 62vh, 39.375rem); /* 630px on the live site */
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  background: #14100b;
  overflow: hidden; /* the ken burns zoom must not spill */
}

/* Five slides on one 25s loop: each holds 5s, crossfading into the next.
   Change --hero-count and the 25s below together if slides are added. */
.hero__slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__slide {
  position: absolute;
  inset: 0;
  background-position: center 40%;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  will-change: opacity, transform;
  animation:
    heroFade 25s infinite,
    heroZoom 25s infinite;
}
.hero__slide:nth-child(1) {
  animation-delay: 0s, 0s;
}
.hero__slide:nth-child(2) {
  animation-delay: 5s, 5s;
}
.hero__slide:nth-child(3) {
  animation-delay: 10s, 10s;
}
.hero__slide:nth-child(4) {
  animation-delay: 15s, 15s;
}
.hero__slide:nth-child(5) {
  animation-delay: 20s, 20s;
}

/* 20% of 25s = one 5s slot. The fade spans ~1.2s at each end, and the two
   neighbours overlap during it, so the crossfade never shows the dark ground. */
@keyframes heroFade {
  0% {
    opacity: 0;
  }
  4.8% {
    opacity: 1;
  }
  20% {
    opacity: 1;
  }
  24.8% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
/* ken burns: a slow push in across the slide's own slot, then reset unseen */
@keyframes heroZoom {
  0% {
    transform: scale(1);
  }
  24.8% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  /* no drift, no crossfade — just hold the first image */
  .hero__slide {
    animation: none;
    opacity: 0;
    transform: none;
  }
  .hero__slide:nth-child(1) {
    opacity: 1;
  }
}
/* Stacking order matters: ::before is generated before .hero__slides in DOM
   order, so without z-index the slides paint OVER the scrim and the headline
   loses its contrast on the bright frames. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(8, 7, 5, 0.62) 0%,
    rgba(8, 7, 5, 0.58) 45%,
    rgba(8, 7, 5, 0.72) 100%
  );
}
.hero__inner {
  position: relative;
  z-index: 2;
  padding: 5rem 0;
  max-width: 50rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 5.2vw, 3.3125rem); /* 53px */
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
  margin-bottom: 1.6rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* --------------------------------------------------------------- video */

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--rule);
  overflow: hidden;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* the player was running the full 1180px shell, which made the section
   taller than anything around it */
.video-frame--narrow {
  max-width: 46rem;
  margin-inline: auto;
}

/* a section that carries its own content's height rather than a full band */
.section--tight {
  padding-block: clamp(2.25rem, 4.5vw, 3.25rem);
}
.section--tight .section__head {
  margin-bottom: 1.75rem;
}

/* --------------------------------------------------------------- gallery */

.carousel {
  position: relative;
}
.carousel__viewport {
  overflow: hidden;
}

.carousel__track {
  display: flex;
  gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
  will-change: transform;
}

/* slides per view is a variable so one carousel can show photos and another faces */
.carousel {
  --per-view: 3;
  --gap: 0.75rem;
}
.carousel__slide {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
}
@media (max-width: 860px) {
  .carousel {
    --per-view: 2;
  }
}
@media (max-width: 560px) {
  .carousel {
    --per-view: 1;
  }
}

.carousel__slide > img {
  /* direct child only — testimonial photos sit inside a button */
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.carousel__controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.carousel__btn {
  min-width: 44px;
  height: 44px; /* 44px: a real touch target */
  display: grid;
  place-items: center;
  padding: 0 1rem;
  font-family: var(--label);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}
.carousel__btn--play {
  font-size: 0.8rem;
}
.carousel__btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #241b05;
}

/* ---------------------------------------------------------- filosofia */

.filosofia {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 820px) {
  .filosofia {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

/* no portrait -> one centred column, held to a readable measure.
   Written with :has() so it re-flows on its own if the portrait comes back. */
.filosofia:not(:has(.filosofia__portrait)) {
  grid-template-columns: minmax(0, 56rem);
  justify-content: center;
}

.filosofia__mark {
  margin: 0 0 -0.6rem;
  font-family: var(--serif);
  font-size: 5.5rem;
  line-height: 1;
  color: var(--gold);
  /* decorative only — the real quotation is marked up as a <blockquote> */
}

.filosofia__quote {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-variant: small-caps;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.85;
  letter-spacing: 0.012em;
  text-align: justify;
  hyphens: auto; /* justified small-caps rivers badly without it */
  color: var(--body);
}

.filosofia__attrib {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--gold-large);
}

.filosofia__portrait {
  margin: 0;
  text-align: center;
}
.filosofia__portrait img {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 50%; /* an oval, not a circle — matches the original */
  margin: 0 auto 0.9rem;
}
.filosofia__portrait figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--body);
}

/* dark variant — active only when the <section> carries .section--dark.
   Without these the quote stays #333 and disappears on black. */
.section--dark .filosofia__quote {
  color: #e8e4dc;
}
.section--dark .filosofia__portrait figcaption {
  color: #b5aea2;
}
.section--dark .filosofia__attrib {
  color: var(--gold);
} /* 9.4:1 on black */
.section--dark .filosofia__mark {
  color: var(--gold);
}
/* --------------------------------------------------------------- objetivos */

/* Numbers come from a CSS counter, not typed into the markup — add or remove
   an <li> and they renumber themselves. */
.objetivos {
  counter-reset: obj;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 52rem;
}
.objetivos li {
  counter-increment: obj;
  display: flex;
  align-items: baseline; /* number's baseline meets the first text line */
  gap: clamp(1rem, 2.2vw, 1.6rem);
  padding-block: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--rule);
}
.objetivos li:first-child {
  border-top: 0;
  padding-top: 0;
}
.objetivos li p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--body);
}
.objetivos li::before {
  content: counter(obj);
  flex: none;
  min-width: 2.25rem; /* keeps every text column flush left */
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  line-height: 1;
  color: var(--gold-large); /* 3.3:1 — large display text only */
}
/* -------------------------------------------------------------- requisitos */

/* Same rhythm as .objetivos above — label column left, copy right, thin rules
   between items. No media query: the label and body columns wrap on their own
   once .requisitos__body can no longer hold its 18rem flex-basis. */
.requisitos {
  margin: 0 auto;
  max-width: 52rem;
}
.requisitos__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline; /* label baseline meets the first text line */
  gap: clamp(1rem, 2.2vw, 1.6rem);
  padding-block: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid var(--rule);
}
.requisitos__item:first-child {
  border-top: 0;
  padding-top: 0;
}
.requisitos__label {
  flex: 0 0 auto;
  min-width: 9.5rem; /* keeps every body column flush left */
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.1vw, 1.6rem);
  line-height: 1;
  color: var(--gold-text); /* 5.4:1 — safe at any size, unlike --gold-large */
}
.requisitos__body {
  flex: 1 1 18rem; /* drops to its own line below ~29rem of container */
}
.requisitos__body p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--body);
}
.requisitos__body p + p {
  margin-top: 0.85em;
}
/* ---------------------------------------------------------------- facultad */

/* auto-fit grid: three across on desktop, two, then one, with no media
   query and no breakpoint number to keep in sync. */
.facultad {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 58rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
  justify-items: center;
}
.facultad__member {
  max-width: 17rem;
  text-align: center;
}
.facultad__photo {
  display: block;
  width: clamp(7rem, 12vw, 9.5rem);
  aspect-ratio: 1; /* square crop regardless of the source file */
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto clamp(0.9rem, 1.8vw, 1.25rem);
}
.facultad__name {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.2;
  color: var(--gold-large); /* 3.3:1 — large display text only */
}
/* No font-family here on purpose: these inherit the page body face. */
.facultad__contact,
.facultad__church {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-wrap: break-word; /* long addresses can't overflow the column */
}
.facultad__contact a,
.facultad__church a {
  color: var(--gold-text); /* 5.4:1 — safe at this small size */
  text-decoration: underline;
  text-underline-offset: 2px;
}
.facultad__contact a:hover,
.facultad__church a:focus-visible,
.facultad__church a:hover,
.facultad__contact a:focus-visible {
  text-decoration-thickness: 2px;
}
/* --------------------------------------------------------------- band */

.band {
  min-height: 25rem;
  background: #1b1611 url("../images/hero/band-graduation.webp") center / cover
    no-repeat;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
}
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.6);
}
.band__inner {
  position: relative;
  color: #fff;
  padding: 4rem 0;
  max-width: 46rem;
}
.band__inner h2 {
  color: #fff;
}

/* --------------------------------------------------------------- split */

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  align-items: start;
}
.split img {
  border: 1px solid var(--rule);
  width: 100%;
}

/* portrait on the right. The <img> stays first in the DOM so the stacked
   mobile order is unchanged; only the visual column order flips. */
.split--reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
}
.split--reverse > img {
  order: 2;
}

@media (max-width: 760px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split--reverse > img {
    order: 0;
  } /* back to image-then-text stacked */
}

.questions {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.questions li {
  border-left: 3px solid var(--gold);
  padding: 0.35rem 0 0.35rem 1.1rem;
  font-family: var(--serif);
  font-size: 1.1rem;
}

/* --------------------------------------------------------------- people */

.people {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------- contact */

.contact-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.field {
  display: block;
  margin-bottom: 1.1rem;
}
.field span {
  display: block;
  font-family: var(--label);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  padding: 0.8rem 0.9rem;
  border: 1px solid #cfc9c0;
  border-radius: 3px;
  background: #fff;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--gold);
}
.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}
.contact-list dt,
.contact-list__label {
  font-family: var(--label);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.contact-list a {
  font-size: 1.05rem;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  background: var(--gold);
  color: #241b05;
  padding: 3.5rem 0 2rem;
}
.site-footer a {
  color: #241b05;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer a:hover {
  color: #000;
}
.site-footer__grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}
.site-footer h2 {
  font-family: var(--label);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #241b05;
  margin-bottom: 1rem;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.site-footer img {
  width: 70px;
  margin-bottom: 1rem;
  border-radius: 50%;
}
.site-footer__base {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(36, 27, 5, 0.28);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  font-size: 0.875rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------- modal */

.modal {
  width: min(92vw, 56rem);
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #12100d;
  color: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}
.modal::backdrop {
  background: rgba(8, 7, 5, 0.78);
}

.modal__head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.35rem 1rem;
}
.modal__title {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
  flex: 1;
  color: #fff;
}
.modal__role {
  margin: 0;
  font-size: 0.875rem;
  color: #b5aea2;
  align-self: center;
}
.modal__close {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease;
}
.modal__close:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #241b05;
}

.modal__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}
.modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.modal__frame[hidden] {
  display: none;
}

.modal__missing {
  margin: 0;
  padding: 3rem 1.35rem;
  text-align: center;
  color: #b5aea2;
  font-size: 0.95rem;
}
/* ------------------------------------- modal: spring classes variant */

.modal--clases {
  width: min(92vw, 52rem);
  background: #fff;
  color: var(--body);
}

.modal--clases .modal__head {
  position: relative; /* containing block for the close button */
  padding: clamp(1.6rem, 4vw, 2.25rem) clamp(1.35rem, 4vw, 3rem) 0;
}

/* Taken out of the flex row so the heading centres on the panel itself
   rather than on the space left over beside the close button. */
.modal--clases .modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  color: var(--ink);
  border-color: transparent;
}
.modal--clases .modal__close:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #241b05;
}

.modal--clases .modal__title {
  text-align: center;
  color: var(--gold-large);
  font-size: clamp(1.55rem, 3.4vw, 2.3rem);
  line-height: 1.15;
}

.clases__intro {
  margin: 1.1rem 0 0;
  padding: 0 clamp(1.35rem, 4vw, 3rem);
  text-align: center;
  line-height: 1.65;
  color: var(--body);
}

/* auto-fit drops two cards to one with no media query — same reasoning
   as Requisitos and Facultad, and nothing to keep in sync elsewhere. */
.clases__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.35rem, 4vw, 3rem)
    clamp(1.75rem, 4vw, 2.5rem);
}

/* The dark wash is part of the background shorthand rather than a
   positioned ::before, so there is no scrim-under-the-image stacking
   trap to re-check later. */
.clases__card {
  padding: clamp(1.25rem, 3vw, 1.75rem) 1.15rem;
  text-align: center;
  color: #fff;
  border-radius: 2px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.clases__card--lunes {
  background-image:
    linear-gradient(rgba(18, 14, 8, 0.62), rgba(18, 14, 8, 0.62)),
    url("../images/modal/pentateuch-300x300.webp");
}
.clases__card--jueves {
  background-image:
    linear-gradient(rgba(18, 14, 8, 0.62), rgba(18, 14, 8, 0.62)),
    url("../images/modal/discipleship-300x300.webp");
}

.clases__day {
  margin: 0 0 1.1rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.clases__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.clases__course + .clases__course {
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
}

.clases__name,
.clases__prof {
  margin: 0;
  line-height: 1.5;
}
.clases__name {
  font-size: 0.95rem;
}
.clases__prof {
  margin-top: 0.3rem;
  font-size: 0.95rem;
}

/* --------------------------------------------------- testimonials */

.testimonios {
  text-align: center;
}
.testimonios + .testimonios {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
}

.testimonios__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  color: var(--ink);
  margin: 0 0 0.3rem;
}
.testimonios__hint {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  color: var(--gold-text);
  margin: 0 0 clamp(2rem, 4vw, 3rem);
}

.carousel--testimonios {
  --per-view: 2;
  --gap: 2.5rem;
}
@media (max-width: 760px) {
  .carousel--testimonios {
    --per-view: 1;
  }
}

.testimonio {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  padding: 0.25rem;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
}
.testimonio__photo {
  flex: none;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.testimonio__text {
  flex: 1;
  min-width: 0;
}
.testimonio__name {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
  line-height: 1.1;
  color: var(--gold-large);
}
.testimonio__role {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-variant: small-caps;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  color: var(--gold-text);
}
.testimonio:hover .testimonio__photo,
.testimonio:focus-visible .testimonio__photo {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.testimonio:focus-visible {
  outline: none;
}
.testimonio:focus-visible .testimonio__photo {
  outline: 3px solid var(--gold-text);
  outline-offset: 3px;
}

/* ------------------------------------------------------ dot nav */

.carousel__dots {
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  align-items: center;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}
.carousel__dot {
  position: relative;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #cbc5bc;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}
.carousel__dot::before {
  /* 44px touch target without a 44px dot */
  content: "";
  position: absolute;
  inset: -17px;
}
.carousel__dot:hover {
  background: var(--gold);
}
.carousel__dot[aria-current="true"] {
  background: var(--ink);
  transform: scale(1.2);
}

/* the pause control stays out of the way until a keyboard reaches it */
.carousel__pause {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.carousel__pause:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 1rem auto 0;
  padding: 0.5rem 1.1rem;
  clip: auto;
  overflow: visible;
  display: block;
  font-family: var(--label);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
