/* ==========================================================================
   UNIVERSALIS LINGUA — Edición "Lienzo Rojigualda" (Rojo · Amarillo · Rojo)
   Fondo inspirado en la bandera de España en tonos claros y armónicos
   ========================================================================== */

:root {
  /* Único rojo base: cambia este valor para ajustar todos los rojos de la página. */
  --es-red: #CE6A6A;
  --es-red-hover: color-mix(in srgb, var(--es-red) 90%, black);
  --es-red-soft: color-mix(in srgb, var(--es-red) 10%, transparent);
  --es-gold: #E8B422;          /* Oro Español equilibrado */

  /* 1. LIENZO PRINCIPAL DE FONDO: Rojo (Izq) -> Amarillo (Centro) -> Rojo (Der) */
  --flag-bg-main: linear-gradient(
    90deg,
    color-mix(in srgb, var(--es-red) 15%, var(--bg-card-solid)) 0%,
    color-mix(in srgb, var(--es-red) 8%, var(--bg-card-solid)) 18%,
    #FFF8E4 25%,
    #FFFDF4 50%,
    #FFF8E4 75%,
    color-mix(in srgb, var(--es-red) 8%, var(--bg-card-solid)) 82%,
    color-mix(in srgb, var(--es-red) 15%, var(--bg-card-solid)) 100%
  );

  /* 2. SECCIONES SUAVES (.section-paper): Versión luminosa del Rojo-Amarillo-Rojo */
  --flag-bg-soft: linear-gradient(
    90deg,
    color-mix(in srgb, var(--es-red) 9%, var(--bg-card-solid)) 0%,
    color-mix(in srgb, var(--es-red) 4%, var(--bg-card-solid)) 18%,
    #FFFAEB 25%,
    #FFFEF8 50%,
    #FFFAEB 75%,
    color-mix(in srgb, var(--es-red) 4%, var(--bg-card-solid)) 82%,
    color-mix(in srgb, var(--es-red) 9%, var(--bg-card-solid)) 100%
  );

  /* 3. SECCIONES DESTACADAS (.section-dark y .marquee): Rojigualda pastel */
  --flag-bg-vivid: linear-gradient(
    90deg,
    color-mix(in srgb, var(--es-red) 23%, var(--bg-card-solid)) 0%,
    color-mix(in srgb, var(--es-red) 13%, var(--bg-card-solid)) 18%,
    #FCF3D0 26%,
    #FFF9E6 50%,
    #FCF3D0 74%,
    color-mix(in srgb, var(--es-red) 13%, var(--bg-card-solid)) 82%,
    color-mix(in srgb, var(--es-red) 23%, var(--bg-card-solid)) 100%
  );

  /* 4. CABECERA TRANSLÚCIDA (.site-header): Bandera suave con efecto cristal */
  --flag-bg-header: linear-gradient(
    90deg,
    color-mix(in srgb, var(--es-red) 12%, rgba(255, 253, 249, 0.94)) 0%,
    color-mix(in srgb, var(--es-red) 5%, rgba(255, 253, 249, 0.94)) 18%,
    rgba(255, 249, 230, 0.95) 26%,
    rgba(255, 253, 245, 0.96) 50%,
    rgba(255, 249, 230, 0.95) 74%,
    color-mix(in srgb, var(--es-red) 5%, rgba(255, 253, 249, 0.94)) 82%,
    color-mix(in srgb, var(--es-red) 12%, rgba(255, 253, 249, 0.94)) 100%
  );

  /* Cinta superior fina de alta definición (Proporción 1:2:1) */
  --rojigualda-stripe: linear-gradient(
    90deg,
    var(--es-red) 0%,
    var(--es-red) 25%,
    #F1BF00 25%,
    #F1BF00 75%,
    var(--es-red) 75%,
    var(--es-red) 100%
  );

  /* Superficies de tarjetas y textos de alto contraste */
  --bg-card: rgba(255, 253, 249, 0.88);
  --bg-card-solid: #FFFDF9;
  --text-main: #241917;        /* Expreso oscuro para lectura nítida sobre cualquier franja */
  --text-muted: #52433F;       /* Tono tierra cálido */
  --border-warm: color-mix(in srgb, var(--es-red) 14%, transparent);

  /* WhatsApp */
  --wa-green: #1F8E4D;
  --wa-green-hover: #18733D;

  /* Fuentes del proyecto */
  --font-serif: 'Ibarra Real Nova', Georgia, serif;
  --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;

  /* Sombras y bordes */
  --shadow-sm: 0 6px 20px rgba(36, 25, 23, 0.06);
  --shadow-md: 0 14px 34px rgba(36, 25, 23, 0.10);
  --shadow-lg: 0 22px 48px rgba(36, 25, 23, 0.14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-main);
  /* Fondo de pantalla completa: Rojo - Amarillo - Rojo */
  background: var(--flag-bg-main);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

/* Barra superior de progreso de lectura */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: var(--rojigualda-stripe);
  z-index: 1001;
  transition: width 0.1s linear;
}

/* Enlace de accesibilidad */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--es-red);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 2000;
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

/* Contenedor principal */
.wrap {
  width: min(1180px, 92%);
  margin-inline: auto;
}

main > section[id] {
  scroll-margin-top: 94px;
}

/* ==========================================================================
   HEADER CON FONDO ROJO - AMARILLO - ROJO SUAVE
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--flag-bg-header);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  border-bottom: 1px solid var(--border-warm);
  box-shadow: 0 4px 18px rgba(36, 25, 23, 0.06);
}

/* Filete superior con los colores vivos de la bandera de España */
.site-header::before {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  background: var(--rojigualda-stripe);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 74px;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-main);
  position: relative;
  padding-bottom: 4px;
  white-space: nowrap;
}

.brand em {
  font-style: italic;
  color: var(--es-red);
  font-weight: 700;
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--rojigualda-stripe);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav > a:not(.btn) {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  position: relative;
  padding: 0.25rem 0;
}

.nav > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--es-red);
  transition: width 0.25s ease;
}

.nav > a:not(.btn):hover {
  color: var(--es-red);
}

.nav > a:not(.btn):hover::after {
  width: 100%;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Selector de idiomas */
.langs {
  display: inline-flex;
  background: rgba(255, 253, 249, 0.75);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border-warm);
}

.langs button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.langs button:hover {
  color: var(--text-main);
}

.langs button.is-active {
  background: var(--es-red);
  color: #FFFFFF;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--es-red) 28%, transparent);
}

.nav-toggle {
  display: none;
  background: rgba(255, 253, 249, 0.85);
  border: 1px solid var(--border-warm);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.78rem 1.45rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
}

.btn-primary {
  background: var(--es-red);
  color: #FFFFFF;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--es-red) 28%, transparent);
}

.btn-primary:hover {
  background: var(--es-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--es-red) 36%, transparent);
}

.btn-ghost {
  background: rgba(255, 253, 249, 0.2);
  color: #FFFFFF;
  border: 1px solid rgba(255, 248, 220, 0.75);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  background: rgba(255, 248, 220, 0.32);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--es-red);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.btn-dark:hover {
  background: var(--es-red-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-wa {
  background: var(--wa-green);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(31, 142, 77, 0.25);
}

.btn-wa:hover {
  background: var(--wa-green-hover);
  transform: translateY(-2px);
}

.nav .btn {
  padding: 0.55rem 1.05rem;
  font-size: 0.88rem;
}

/* ==========================================================================
   HERO / PORTADA (Con portada.jpg y halo lateral Rojigualda)
   ========================================================================== */
.hero {
  position: relative;
  min-height: clamp(540px, 82vh, 760px);
  display: flex;
  align-items: center;
  color: #FFFFFF;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Velo sutil que proyecta el Rojo - Amarillo - Rojo también sobre la portada */
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--es-red) 68%, transparent) 0%,
      rgba(60, 35, 15, 0.45) 28%,
      rgba(60, 40, 10, 0.32) 65%,
      color-mix(in srgb, var(--es-red) 55%, transparent) 100%
    );
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding-block: 4.5rem;
  margin-left: max(4%, calc((100vw - 1180px) / 2));
}

/* Kicker con emblema de la bandera de España */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--es-red);
  margin: 0 0 0.75rem 0;
}

.kicker::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 12px;
  border-radius: 2px;
  background: var(--rojigualda-stripe);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.hero .kicker {
  color: #FFF6D6;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1.12;
  margin: 0 0 1rem 0;
  font-weight: 700;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.32);
}

.hero .lede {
  font-size: clamp(1.15rem, 2vw, 1.38rem);
  font-weight: 600;
  color: #FCEEAE;
  margin: 0 0 0.6rem 0;
}

.hero p {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 1.6rem 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.gift,
.hero .gift {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-warm);
  color: var(--es-red);
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  box-shadow: var(--shadow-sm);
}

.gift::before {
  content: "★";
  color: var(--es-red);
}

/* ==========================================================================
   MARQUEE (Cinta con el degradado Rojo - Amarillo - Rojo)
   ========================================================================== */
.marquee {
  background: var(--flag-bg-vivid);
  color: var(--text-main);
  border-top: 2px solid color-mix(in srgb, var(--es-red) 22%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--es-red) 22%, transparent);
  overflow: hidden;
  padding: 0.85rem 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 2.2rem;
  animation: marquee-scroll 34s linear infinite;
}

.marquee-track span {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
}

.marquee-track span b {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--es-red);
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   SECCIONES (Todas mantienen la estructura lateral Rojo - Amarillo - Rojo)
   ========================================================================== */
.section {
  padding: clamp(4rem, 7vw, 6.2rem) 0;
  background: transparent; /* Deja ver el lienzo Rojo-Amarillo-Rojo del body */
}

.section-paper {
  background: var(--flag-bg-soft);
  border-top: 1px solid var(--border-warm);
  border-bottom: 1px solid var(--border-warm);
}

.section-dark {
  background: var(--flag-bg-vivid);
  color: var(--text-main);
  position: relative;
  border-top: 2px solid color-mix(in srgb, var(--es-red) 20%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--es-red) 20%, transparent);
}

.section-head {
  max-width: 720px;
  margin-bottom: 2.8rem;
}

h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  line-height: 1.18;
  margin: 0 0 1rem 0;
  color: var(--text-main);
}

h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 0.55rem 0;
  color: var(--text-main);
}

/* Split layout (Presentación y Profesora) */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split-rev {
  grid-template-columns: 0.95fr 1.05fr;
}

.photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  border: 2px solid rgba(255, 253, 249, 0.9);
  transition: transform 0.2s ease-out;
  transform-style: preserve-3d;
}

.photo::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--rojigualda-stripe);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-classroom picture {
  display: block;
  aspect-ratio: 1307 / 1093;
}

.photo-classroom img {
  height: auto;
}

/* ==========================================================================
   MOSAICO "¿POR QUÉ CONMIGO?" (#por-que)
   ========================================================================== */
.mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.tile {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  padding: 2rem 1.8rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-warm);
  border-top: 4px solid var(--es-red);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-solid);
}

.tile h3 {
  color: var(--es-red);
}

.tile p {
  margin: 0;
  color: var(--text-muted);
}

/* ==========================================================================
   CHIPS DE MÉTODO (#metodo)
   ========================================================================== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.chip {
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid color-mix(in srgb, var(--es-red) 22%, transparent);
  color: var(--text-main);
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  box-shadow: 0 3px 10px rgba(36, 25, 23, 0.05);
  transition: all 0.2s ease;
}

.chip:hover {
  background: var(--es-red);
  color: #FFFFFF;
  border-color: var(--es-red);
  transform: translateY(-2px);
}

/* ==========================================================================
   PANELES DE IDIOMAS (#idiomas - Deutsch & English)
   ========================================================================== */
.lang-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.panel {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  padding: clamp(1.8rem, 3.5vw, 2.6rem);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-warm);
  position: relative;
  overflow: hidden;
}

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

.panel ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.6rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.55rem 1rem;
}

.panel li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.96rem;
}

.panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--es-red);
}

.quote {
  margin: 0;
  padding: 1.1rem 1.3rem;
  background: rgba(253, 240, 188, 0.55);
  border-left: 4px solid var(--es-red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--text-main);
}

/* ==========================================================================
   PASOS PRIMERA CLASE GRATIS (#primera-clase)
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  counter-reset: step-counter;
}

.step {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-warm);
  box-shadow: var(--shadow-sm);
  position: relative;
  counter-increment: step-counter;
}

.step::before {
  content: "0" counter(step-counter);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--es-red);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   MODALIDADES PRESENCIAL Y ONLINE (#clases)
   ========================================================================== */
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 2rem;
}

.mode {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-warm);
  display: flex;
  flex-direction: column;
}

.mode img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-bottom: 4px solid var(--es-red);
}

.mode-copy {
  padding: 1.8rem;
}

.mode-copy p {
  margin: 0;
  color: var(--text-muted);
}

/* ==========================================================================
   PARA QUIÉN SON MIS CLASES (#para-quien)
   ========================================================================== */
.who {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}

.who article {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  padding: 1.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-warm);
  border-left: 4px solid var(--es-red);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.who article:hover {
  transform: translateY(-3px);
  background: var(--bg-card-solid);
}

.who article p {
  margin: 0;
  color: var(--text-muted);
}

/* ==========================================================================
   BANDA INSPIRACIONAL (.band)
   ========================================================================== */
.band {
  position: relative;
  padding: clamp(4.5rem, 8vw, 7rem) 0;
  color: #FFFFFF;
  overflow: hidden;
  text-align: center;
}

.band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.band-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--es-red) 76%, transparent) 0%,
    rgba(50, 35, 15, 0.62) 50%,
    color-mix(in srgb, var(--es-red) 76%, transparent) 100%
  );
  z-index: 2;
}

.band .wrap {
  position: relative;
  z-index: 3;
  max-width: 780px;
}

.band h2 {
  color: #FFFFFF;
}

.band p {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.95);
}

.band strong {
  color: #FCEEAE;
  font-size: 1.2rem;
}

/* ==========================================================================
   CARRUSEL DE GALERÍA (#galeria)
   ========================================================================== */
.carousel-wrap {
  max-width: 960px;
  margin-inline: auto;
}

.carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--bg-card-solid);
  aspect-ratio: 16 / 9;
  border: 2px solid rgba(255, 253, 249, 0.9);
}

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.slide picture {
  display: block;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.1rem 1.5rem;
  background: linear-gradient(transparent, rgba(36, 25, 23, 0.84));
  color: #FFFFFF;
  font-weight: 600;
  font-size: 1rem;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-warm);
  background: var(--bg-card-solid);
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: var(--es-red);
  color: #FFFFFF;
  border-color: var(--es-red);
}

.dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(36, 25, 23, 0.25);
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
}

.dot.is-active {
  width: 26px;
  background: var(--es-red);
}

/* ==========================================================================
   SECCIÓN DE RESERVA Y FORMULARIO (#reserva)
   ========================================================================== */
.cta {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1rem;
  margin: 1.5rem 0;
}

.fact {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fact::before {
  content: "✓";
  color: var(--es-red);
  font-weight: 800;
}

.contact-phone {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--es-red);
  margin: 0.6rem 0 1.2rem 0;
}

.form {
  background: var(--bg-card-solid);
  color: var(--text-main);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-warm);
  position: relative;
  overflow: hidden;
}

.form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--rojigualda-stripe);
}

.form h2 {
  font-size: 1.75rem;
  margin-bottom: 0.4rem;
}

.form > p {
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(36, 25, 23, 0.2);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.96rem;
  color: var(--text-main);
  background: #FCF9F2;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--es-red);
  box-shadow: 0 0 0 3px var(--es-red-soft);
  background: #FFFFFF;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400 !important;
  font-size: 0.9rem !important;
  color: var(--text-muted) !important;
  cursor: pointer;
}

.consent input {
  margin-top: 0.25rem;
  accent-color: var(--es-red);
}

.error {
  color: var(--es-red);
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.3rem;
  margin: 0.5rem 0;
}

.submit-btn {
  width: 100%;
  padding: 0.95rem;
  font-size: 1.02rem;
}

.form-success {
  display: none;
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  background: #FEF5CE;
  border-left: 4px solid var(--es-red);
  border-radius: var(--radius-sm);
}

.form.is-sent .form-success {
  display: block;
}

/* ==========================================================================
   FOOTER CON EL FONDO ROJO - AMARILLO - ROJO & WHATSAPP
   ========================================================================== */
.site-footer {
  background: var(--flag-bg-soft);
  color: var(--text-main);
  padding: 3.2rem 0;
  border-top: 4px solid transparent;
  border-image: var(--rojigualda-stripe) 1;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.25rem 0;
}

.footer-brand em {
  color: var(--es-red);
}

.footer-teacher {
  margin: 0.2rem 0;
}

.footer-phone {
  color: var(--es-red);
  font-weight: 700;
}

.wa-float {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--wa-green);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(31, 142, 77, 0.35);
  z-index: 950;
}

.wa-float svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.wa-float:hover {
  transform: scale(1.07);
  background: var(--wa-green-hover);
}

/* ==========================================================================
   RESPONSIVE (Móviles y Tablets)
   ========================================================================== */
@media (max-width: 1100px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    background: var(--flag-bg-soft);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 3px solid var(--es-red);
    box-shadow: var(--shadow-lg);
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 820px) {
  .split,
  .split-rev,
  .cta {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  main > section[id] {
    scroll-margin-top: 132px;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    padding-block: 0.6rem;
  }

  .header-tools {
    justify-content: flex-end;
    margin-left: auto;
  }

  .nav {
    position: absolute;
    top: 100%;
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
  }

  .mosaic,
  .lang-panels,
  .modes {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
