/* ==========================================================
   Buenos Aires English High School — Hero section styles
   ========================================================== */

:root {
  --maroon: #541518;
  --white: #ffffff;
  --text-dark: #2b2b2b;
  --gray-light: #f2f2f2;
  --gray-mid: #ddd;

  --header-height: 84px;
  --header-height-mobile: 64px;

  --container-padding: clamp(20px, 4vw, 48px);

  --font-base: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  color: var(--text-dark);
  line-height: 1.5;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ==========================================================
   Header / Navigation
   ========================================================== */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height-mobile);
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}

@media (min-width: 1024px) {
  .site-header {
    height: var(--header-height);
  }
}

.header-inner {
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--container-padding);
}

/* ---------- Logo ---------- */

.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo-img {
  width: 52px;
  height: 52px;
}

@media (min-width: 1024px) {
  .logo-img {
    width: 64px;
    height: 64px;
  }
}

/* ---------- Desktop nav list ---------- */

.main-nav {
  display: none;
}

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

.nav-list > li > a,
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--maroon);
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.nav-list > li > a:hover,
.nav-link:hover {
  color: color-mix(in srgb, var(--maroon) 70%, black);
}

.chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.has-dropdown.open > .nav-link .chevron {
  transform: rotate(-135deg) translateY(2px);
}

/* ---------- Dropdown menus ---------- */

.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-dark);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-menu li a:hover {
  background: var(--gray-light);
  color: var(--maroon);
}

/* Desktop: hover OR keyboard/click-open */
@media (min-width: 1024px) {
  .has-dropdown:hover > .dropdown-menu,
  .has-dropdown.open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }

  .has-dropdown:hover > .nav-link .chevron {
    transform: rotate(-135deg) translateY(2px);
  }
}

/* ---------- Admisiones button ---------- */

.btn-admisiones {
  display: none;
  flex-shrink: 0;
  background: var(--maroon);
  color: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-admisiones:hover {
  background: color-mix(in srgb, var(--maroon) 80%, white);
  transform: translateY(-1px);
}

/* ---------- Mobile hamburger toggle ---------- */

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================
   Desktop layout (>= 1024px)
   ========================================================== */

@media (min-width: 1024px) {
  .main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-left: 2.5rem;
  }

  .btn-admisiones {
    display: inline-flex;
    align-items: center;
  }

  .nav-toggle {
    display: none;
  }
}

/* ==========================================================
   Mobile nav panel (< 1024px)
   ========================================================== */

@media (max-width: 1023px) {
  .main-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height-mobile);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height-mobile));
    background: var(--white);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    padding: 1.5rem var(--container-padding) 2rem;
    z-index: 999;
  }

  .main-nav.open {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list > li {
    border-bottom: 1px solid var(--gray-mid);
  }

  .nav-list > li > a,
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 1rem 0;
    font-size: 1.05rem;
  }

  .chevron {
    margin-left: auto;
  }

  /* Dropdown becomes an accordion on mobile */
  .dropdown-menu {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    box-shadow: none;
    background: var(--gray-light);
    border-radius: 6px;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .has-dropdown.open > .dropdown-menu {
    max-height: 400px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }

  /* Admisiones button inside mobile menu */
  .btn-admisiones {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
  }
}

/* ==========================================================
   Hero section
   ========================================================== */

.hero {
  position: relative;
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero {
    min-height: 75vh;
  }
}

@media (min-width: 1280px) {
  .hero {
    min-height: 88vh;
  }
}

.hero-img,
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-slider {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}

.hero-slide--active {
  opacity: 1;
}

/* Mobile-only slides: hidden on desktop */
.hero-slide--mob { display: none; }

.hero-slide--top { object-position: center 20%; }

@media (max-width: 767px) {
  /* Hide desktop slides, show mobile slides */
  .hero-slide:not(.hero-slide--mob) { display: none; }
  .hero-slide--mob { display: block; }
}

@media (min-width: 1024px) {
  .hero-img,
  .hero-slide {
    transform: scale(1.25);
    transform-origin: 15% 50%;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    color-mix(in srgb, var(--maroon) 88%, transparent) 0%,
    color-mix(in srgb, var(--maroon) 88%, transparent) 28%,
    transparent 68%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.hero-title {
  color: var(--white);
  font-weight: 500;
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  line-height: 1.15;
  max-width: 14ch;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.hero-title-accent {
  font-weight: 800;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.75rem;
  background: var(--white);
  color: var(--maroon);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  padding: 0.9rem 2.3rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover {
  background: var(--gray-light);
  transform: translateY(-2px);
}

/* ==========================================================
   Mobile adjustments (< 1024px)
   ========================================================== */

@media (max-width: 1023px) {
  .hero-overlay {
    background: linear-gradient(
      to right,
      color-mix(in srgb, var(--maroon) 88%, transparent) 0%,
      color-mix(in srgb, var(--maroon) 88%, transparent) 55%,
      transparent 95%
    );
  }

  .hero-cta {
    font-size: 0.8rem;
    padding: 0.8rem 1.8rem;
  }
}

/* ==========================================================
   Hero — mobile redesign (< 768px, Opción 1a)
   ========================================================== */

.hero-mob-dots { display: none; }

.hero-scroll-arrow {
  position: absolute;
  bottom: -4px;
  right: 32px;
  left: auto;
  transform: none;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.75);
  padding: 8px;
  z-index: 3;
}
.hero-scroll-arrow:hover { color: #fff; }

@media (max-width: 767px) {
  .hero {
    height: calc(100svh - var(--header-height-mobile));
    min-height: 560px;
    max-height: 760px;
    display: block;
  }

  .hero-slide {
    transition: opacity .9s ease;
  }

  .hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(84,21,24,0)   0%,
      rgba(84,21,24,0)   38%,
      rgba(84,21,24,.94) 73%,
      rgba(84,21,24,.94) 100%
    );
  }

  .hero-content {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 34px;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .hero-title {
    font-size: clamp(36px, 11vw, 44px);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.02em;
    max-width: none;
    text-shadow: none;
  }

  .hero-mob-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 26px;
  }

  .hero-cta {
    margin-top: 0;
    background: #fff;
    color: #541518;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .08em;
    padding: 16px 32px;
    border-radius: 999px;
    box-shadow: none;
  }

  .hero-mob-dots {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .hero-mob-dot {
    height: 6px;
    width: 6px;
    border-radius: 999px;
    border: none;
    padding: 0;
    cursor: pointer;
    background: rgba(255,255,255,.5);
    transition: all .4s;
  }

  .hero-mob-dot--active {
    width: 20px;
    background: #fff;
  }
}

/* ==========================================================
   Programs section
   ========================================================== */

.programs {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) var(--container-padding);
}

.programs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 2rem);
}

.program-card {
  position: relative;
  display: block;
  aspect-ratio: 8 / 6;
  overflow: hidden;
  border-radius: 28px;
}

.program-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.program-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--maroon);
  transition: height 0.4s ease;
}

.program-title {
  color: var(--white);
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  text-align: center;
  padding: 0 1.5rem;
}

.program-card:hover .program-overlay,
.program-card:focus-visible .program-overlay {
  height: 100%;
}

@media (min-width: 1024px) {
  .programs-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================
   Overview — El colegio en números (tarjetas)
   ========================================================== */

.ovn-section {
  background: #fff;
  padding-top: 78px;
  padding-bottom: 88px;
}

.ovn-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

.ovn-header {
  max-width: 640px;
  margin: 0 auto 46px;
  text-align: center;
}

.ovn-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #a4666c;
}

.ovn-h2 {
  margin: 12px 0 0;
  font-size: clamp(32px, 6vw, 40px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #541518;
}

.ovn-desc {
  margin: 16px 0 0;
  font-size: 16.5px;
  line-height: 1.7;
  color: #6a5a5c;
}

.ovn-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.ovn-card {
  position: relative;
  height: 388px;
  border-radius: 22px;
  overflow: hidden;
  background: #ede8e2;
}

.ovn-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ovn-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(84,21,24,0) 30%, rgba(84,21,24,.55) 60%, rgba(84,21,24,.93) 100%);
  pointer-events: none;
}

.ovn-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 24px 28px;
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ovn-num {
  display: block;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: #fff;
}

.ovn-label {
  display: block;
  margin-top: 8px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #f4dadb;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .ovn-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .ovn-card--desktop-only {
    display: none;
  }
}

@media (max-width: 560px) {
  .programs {
    padding-bottom: 1.5rem;
  }

  .ovn-section {
    padding-top: 28px;
    padding-bottom: 72px;
  }

  .ovn-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .ovn-card {
    height: 320px;
  }

  .ovn-num {
    font-size: 40px;
  }
}

/* ==========================================================
   Level hero (Kindergarten / Primary)
   ========================================================== */

.lvl-hero {
  background: #fff;
  padding: 64px 0 72px;
  scroll-margin-top: var(--header-height-mobile);
}

@media (min-width: 1024px) {
  .lvl-hero {
    scroll-margin-top: var(--header-height);
  }
}

.lvl-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: grid;
  grid-template-columns: 1.18fr .9fr;
  gap: 60px;
  align-items: center;
}

.lvl-hero-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #a4666c;
}

.lvl-hero-title {
  margin: 12px 0 0;
  font-size: clamp(40px, 9vw, 68px);
  line-height: .98;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #541518;
}

.lvl-hero-phrase {
  font-size: clamp(26px, 6vw, 42px);
  line-height: 1.12;
  font-weight: 300;
  letter-spacing: -.015em;
  color: #7c2630;
  margin: 20px 0 32px;
}

.lvl-hero-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 560px;
}

.lvl-hero-body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.74;
  color: #5a4a4d;
}

.lvl-hero-body p:first-child {
  font-size: 16.5px;
  font-weight: 500;
  color: #473b3e;
}

.lvl-schedule-box {
  margin-top: 28px;
  background: var(--gray-light);
  border-radius: 16px;
  padding: 20px 24px;
  border-left: 3px solid var(--maroon);
  max-width: 560px;
}

.lvl-schedule-box-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--maroon);
  margin: 0 0 14px;
}

.lvl-schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lvl-schedule-list li {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-dark);
}

.lvl-schedule-list strong {
  font-weight: 600;
  color: #473b3e;
}

/* Photo column */
.lvl-hero-photo-wrap {
  position: relative;
  height: 620px;
}

.lvl-hero-photo {
  position: absolute;
  inset: 0;
  border-radius: 250px 250px 28px 28px;
  overflow: hidden;
  background: #ede8e2;
}

.lvl-hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Crossfade slider */
.lvl-hero-photo--slider {
  position: absolute;
  inset: 0;
}

.lvl-hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .9s ease-in-out;
}

.lvl-hero-slide--active {
  opacity: 1;
}

.lvl-hero-chip {
  position: absolute;
  left: -34px;
  bottom: 46px;
  background: #541518;
  color: #fff;
  border-radius: 20px;
  padding: 18px 24px;
  box-shadow: 0 14px 30px rgba(84,21,24,.28);
}

.lvl-hero-chip-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #e7b6b9;
}

.lvl-hero-chip-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.01em;
}

/* Responsive */
@media (max-width: 840px) {
  .lvl-hero {
    padding: 48px 0 56px;
  }

  .lvl-hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .lvl-hero-photo-wrap {
    height: 460px;
    order: -1;
  }

  .lvl-hero-chip {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 480px) {
  .lvl-hero-photo-wrap {
    height: 380px;
  }

  .lvl-hero-chip {
    bottom: 24px;
    padding: 14px 22px;
    white-space: nowrap;
  }
}

/* ==========================================================
   Kindergarten — "How do we learn?" slider
   ========================================================== */

.kinder-slider {
  background: var(--maroon);
  height: 85vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.kinder-slider-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) var(--container-padding);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.kinder-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.kinder-slider-heading {
  color: var(--white);
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 3rem);
}

.slider-controls {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.slider-arrow {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--maroon);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.slider-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.slider-arrow-icon {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.slider-prev .slider-arrow-icon {
  transform: rotate(135deg) translate(-1px, -1px);
}

.slider-next .slider-arrow-icon {
  transform: rotate(-45deg) translate(-1px, -1px);
}

.kinder-slider-track {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.kinder-slider-track::-webkit-scrollbar {
  display: none;
}

.slider-card {
  position: relative;
  flex: 0 0 58%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  scroll-snap-align: start;
}

.slider-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.slider-card img.img-focus-low {
  object-position: 68% 60%;
}

.slider-card img.img-focus-top {
  object-position: center 35%;
}

.slider-card img.img-zoom {
  transform: scale(1.15);
}

.slider-card-overlay {
  position: absolute;
  inset: auto 0 0 0;
  height: 65%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: linear-gradient(to top, color-mix(in srgb, var(--maroon) 95%, transparent) 0%, transparent 100%);
  color: var(--white);
}

.slider-card-overlay h3 {
  font-weight: 700;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  margin-bottom: 0.4rem;
}

.slider-card-overlay p {
  font-weight: 300;
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  max-width: 32rem;
}

@media (max-width: 768px) {
  .slider-card {
    flex: 0 0 80%;
  }
}

/* ==========================================================
   Instalaciones — facility rows
   ========================================================== */

.facility-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding) clamp(2rem, 5vw, 3rem);
}

.facility-section:last-of-type {
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.facility-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.facility-row--gallery-left {
  grid-template-columns: 2fr 1fr;
}

.facility-row--gallery-right {
  grid-template-columns: 1fr 2fr;
}

.kinder-details-text h2 {
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

@media (max-width: 768px) {
  .facility-row,
  .facility-row--gallery-left,
  .facility-row--gallery-right {
    grid-template-columns: 1fr;
  }
}

/* ---------- Image gallery / carousel ---------- */

.gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gallery-viewport {
  position: relative;
  aspect-ratio: 2 / 1;
  border-radius: 28px;
  overflow: hidden;
}

.gallery-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

.gallery-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--maroon) 82%, transparent);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.gallery-arrow:hover {
  background: var(--maroon);
}

.gallery-prev {
  left: 0.75rem;
}

.gallery-next {
  right: 0.75rem;
}

.gallery-arrow-icon {
  width: 13px;
  height: 13px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
}

.gallery-prev .gallery-arrow-icon {
  transform: rotate(135deg) translate(-1px, -1px);
}

.gallery-next .gallery-arrow-icon {
  transform: rotate(-45deg) translate(-1px, -1px);
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--gray-mid);
  cursor: pointer;
  transition: background 0.2s ease;
}

.gallery-dot.is-active {
  background: var(--maroon);
}

/* ==========================================================
   Footer
   ========================================================== */

.site-footer {
  background: #f5f5f5;
  color: var(--text-dark);
  padding: clamp(2.5rem, 6vw, 4rem) var(--container-padding) clamp(1.5rem, 4vw, 2rem);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--gray-mid);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.footer-name {
  color: var(--maroon);
  font-weight: 700;
  font-size: 1.05rem;
  max-width: 20ch;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--text-dark) 75%, white);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-light);
  color: var(--maroon);
  transition: background 0.2s ease, color 0.2s ease;
}

.social-icon:hover {
  background: var(--maroon);
  color: var(--white);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-bottom {
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--text-dark) 55%, white);
  text-align: center;
}

@media (min-width: 768px) {
  .footer-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .footer-bottom {
    text-align: left;
  }
}

/* ==========================================================
   Institución — Pillars slider
   ========================================================== */

.ps-section {
  background: #fff;
  padding: 78px 0 48px;
}

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

.ps-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.ps-text {
  max-width: 760px;
}

.ps-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #a4666c;
  margin: 0;
}

.ps-heading {
  margin: 14px 0 0;
  font-size: clamp(22px, 4.5vw, 31px);
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #541518;
}

.ps-controls {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.ps-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #e4d6cc;
  background: #fff;
  color: #541518;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s, border-color .2s;
  padding: 0;
  font-family: inherit;
  line-height: 1;
}

.ps-btn:hover:not(:disabled) {
  background: #541518;
  color: #fff;
  border-color: #541518;
}

.ps-btn:disabled {
  opacity: .38;
  cursor: default;
}

.ps-viewport {
  overflow: hidden;
  margin-top: 40px;
}

.ps-track {
  display: flex;
  gap: 24px;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

.ps-card {
  flex: none;
  width: 352px;
  height: 460px;
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #ede8e2;
}

.ps-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c5b5ae;
}

.ps-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ps-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(84,21,24,0) 34%, rgba(84,21,24,.55) 64%, rgba(84,21,24,.92) 100%);
  pointer-events: none;
}

.ps-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 28px 30px;
  pointer-events: none;
}

.ps-card-icon {
  margin-bottom: 14px;
  width: 52px;
  height: 52px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-card-icon img {
  width: 45px;
  height: 45px;
}

.ps-card-title {
  margin: 0 0 9px;
  font-size: 25px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.ps-card-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #f4e6e7;
  font-weight: 400;
}

.ps-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 30px;
}

.ps-dot {
  height: 9px;
  width: 9px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0;
  background: #e0cdd0;
  transition: width .25s, background .25s;
}

.ps-dot--active {
  width: 26px;
  background: #541518;
}

/* Tablet: ~2 cards */
@media (max-width: 1023px) {
  .ps-card {
    width: calc(50vw - 32px);
  }
}

/* Mobile: vertical stack */
@media (max-width: 639px) {
  .ps-section {
    padding: 56px 0 64px;
  }

  .ps-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .ps-controls,
  .ps-dots {
    display: none;
  }

  .ps-viewport {
    overflow: visible;
  }

  .ps-track {
    flex-direction: column;
    transform: none !important;
    transition: none;
    gap: 20px;
  }

  .ps-card {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }
}

/* ==========================================================
   Institución — Bilingual Education program cards
   ========================================================== */

.bilingual-section {
  background: var(--maroon);
  margin-top: clamp(4rem, 10vw, 8rem);
  padding: clamp(3rem, 6vw, 5rem) var(--container-padding);
}

.bilingual-heading {
  max-width: 1200px;
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  color: var(--white);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
}

.bilingual-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  max-width: 1200px;
  margin: 0 auto;
}

.bilingual-card {
  flex: 1 1 280px;
  max-width: 360px;
  background: var(--white);
  border-radius: 20px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.bilingual-card-level {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  font-weight: 700;
  color: var(--maroon);
  margin: 0 0 0.35rem;
}

.bilingual-card-plan {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--text-dark) 55%, transparent);
  margin: 0 0 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-mid);
}

.bilingual-card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
}

.bilingual-card-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-dark);
}

.bilingual-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.15em;
  color: var(--maroon);
}

@media (max-width: 900px) {
  .bilingual-cards {
    flex-direction: column;
    align-items: center;
  }

  .bilingual-card {
    width: 100%;
    max-width: 420px;
  }
}

/* ==========================================================
   FAQ Section
   ========================================================== */

.faq-section {
  background: var(--gray-light);
  padding: 78px 0 96px;
}

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

.faq-header {
  text-align: center;
  margin-bottom: 48px;
}

.faq-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #a4666c;
}

.faq-h2 {
  margin: 14px 0 0;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--maroon);
}

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

.faq-item {
  border-bottom: 1px solid var(--gray-mid);
}

.faq-item:first-child {
  border-top: 1px solid var(--gray-mid);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  text-align: left;
  transition: color 0.2s;
}

.faq-question:hover,
.faq-item.open .faq-question {
  color: var(--maroon);
}

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding-bottom: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.75;
  color: #5a5a5a;
}

.faq-answer-inner p {
  margin: 0 0 0.4rem;
}

.faq-answer-inner p:last-child {
  margin-bottom: 0;
}

.faq-answer-inner ul {
  list-style: none;
  padding: 0.4rem 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.faq-answer-inner ul li::before {
  content: '•';
  color: var(--maroon);
  font-weight: 700;
  margin-right: 0.5rem;
}

/* ==========================================================
   Language toggle
   ========================================================== */

html[lang="es"] [data-lang="en"] { display: none; }
html[lang="en"] [data-lang="es"] { display: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  background: #efefef;
  border: none;
  border-radius: 6px;
  padding: 0.32rem 0.7rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.lang-toggle:hover {
  background: #e0e0e0;
  color: #333;
}

html[lang="es"] .lang-toggle .lt-es,
html[lang="en"] .lang-toggle .lt-en {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 1023px) {
  .nav-actions {
    margin-top: 1.5rem;
    align-items: flex-start;
  }

  .nav-actions .btn-admisiones {
    margin-top: 0;
    justify-content: flex-start;
  }
}

/* ==========================================================
   FAQ extracurricular activities table
   ========================================================== */

.faq-act-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  margin-top: 0.75rem;
}

.faq-act-table-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
}

.faq-act-table-wrap thead th {
  background: var(--maroon);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 11px;
  text-align: center;
  min-width: 88px;
}

.faq-act-table-wrap thead th:first-child {
  text-align: left;
  min-width: 150px;
  position: sticky;
  left: 0;
  z-index: 2;
}

.faq-act-table-wrap tbody td {
  border-top: 1px solid #e6e6e6;
  border-left: 1px solid #e6e6e6;
  padding: 8px 10px;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.4;
  color: #43383b;
  vertical-align: middle;
  background: #fff;
}

.faq-act-table-wrap tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  border-left: none;
  border-right: 1px solid #e6e6e6;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--maroon);
  text-align: left;
  line-height: 1.3;
}

.faq-act-table-wrap tbody tr:nth-child(even) td { background: #faf8f8; }

.faq-act-td-empty { color: #c0b0b2; }

/* ==========================================================
   SEARCH
   ========================================================== */

/* ── Toggle button ───────────────────────────────────────── */
.mob-search-toggle {
  display: none;
}

@media (max-width: 1023px) {
  .mob-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    margin-left: auto;
  }
}

.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #efefef;
  border: none;
  border-radius: 6px;
  color: #555;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}
.search-toggle:hover { background: #e0e0e0; color: #333; }

@media (max-width: 1023px) {
  .search-toggle { display: none; }
  .nav-actions .lang-toggle { display: none; }
}

.mob-lang-toggle { display: none; }
@media (max-width: 1023px) {
  .mob-lang-toggle { display: inline-flex; }
}

/* ── Overlay backdrop ────────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(30, 15, 15, 0.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.search-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
body.search-open { overflow: hidden; }

/* ── Modal card ──────────────────────────────────────────── */
.search-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  width: 100%;
  max-width: 620px;
  overflow: hidden;
  transform: translateY(-10px);
  transition: transform 0.18s ease;
}
.search-overlay.is-open .search-modal { transform: translateY(0); }

/* ── Input bar ───────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid #eee;
}
.search-bar-icon { flex-shrink: 0; color: #a87f84; }
.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  color: #2a2020;
  background: transparent;
}
.search-input::placeholder { color: #bbb; }
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration { display: none; }
.search-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #f3f3f3;
  border: none;
  border-radius: 6px;
  color: #777;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.search-close:hover { background: #e5e5e5; color: #333; }

/* ── Results list ────────────────────────────────────────── */
.search-results {
  display: flex;
  flex-direction: column;
  max-height: 420px;
  overflow-y: auto;
  padding: 6px 0;
}
.search-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 18px;
  text-decoration: none;
  transition: background 0.12s;
}
.search-result:hover { background: #faf5f5; }
.search-result + .search-result { border-top: 1px solid #f3eded; }
.search-result-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a87f84;
}
.search-result-title {
  font-size: 15px;
  font-weight: 600;
  color: #541518;
  line-height: 1.3;
}
.search-result-desc {
  font-size: 13px;
  color: #6e6266;
  line-height: 1.45;
}

/* ── Empty / hint state ──────────────────────────────────── */
.search-hint {
  margin: 0;
  padding: 18px 18px 20px;
  font-size: 14px;
  color: #b0a0a2;
  text-align: center;
}

/* ── Mobile tweaks ───────────────────────────────────────── */
@media (max-width: 600px) {
  .search-overlay { padding: 56px 10px 10px; }
  .search-modal { border-radius: 14px; }
  .search-input { font-size: 16px; }
}
