/* =========================================================
   Colegio Bilingüe Carl Rogers — Estilos
   ========================================================= */

:root {
  --navy: #16305b;
  --navy-dark: #0e2144;
  --gold: #f2b434;
  --gold-dark: #d99a1c;
  --red: #c8102e;
  --cream: #fff9f0;
  --ink: #1c2430;
  --muted: #5b6675;
  --line: #e6eaf1;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(16, 33, 68, .10);
  --shadow-sm: 0 4px 14px rgba(16, 33, 68, .08);
  --max: 1160px;
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

figure, blockquote { margin: 0; }

a { color: var(--navy); text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; color: var(--navy); font-weight: 700; }

h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.container { width: min(var(--max), 92%); margin-inline: auto; }

.section { padding: 76px 0; }
.section--cream { background: var(--cream); }
.section--navy { background: var(--navy); color: #e9eefb; }
.section--navy h2, .section--navy h3 { color: var(--white); }

.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.02rem; }
.section--navy .section-head p { color: #c6d1ea; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-dark);
  background: rgba(242, 180, 52, .16);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--gold); color: var(--navy-dark); box-shadow: 0 8px 20px rgba(242, 180, 52, .35); }
.btn--gold:hover { background: var(--gold-dark); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-dark); }
.btn--ghost { border-color: rgba(255, 255, 255, .6); color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand__logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border: 0;
  background: transparent;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { color: var(--navy); font-size: 1rem; letter-spacing: .01em; }
.brand__text span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }

.nav__links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: .93rem;
  font-weight: 500;
  color: var(--ink);
  transition: background .18s ease, color .18s ease;
}
.nav__links a:hover { background: #eef2f9; color: var(--navy); }
.nav__links a.is-active { background: var(--navy); color: var(--white); }

.nav__cta { display: flex; gap: 10px; align-items: center; }
.nav__cta .btn { padding: 10px 20px; font-size: .88rem; }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  cursor: pointer;
  padding: 10px;
}
.nav__toggle span { display: block; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background: var(--navy-dark);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(14, 33, 68, .92) 12%, rgba(14, 33, 68, .72) 48%, rgba(14, 33, 68, .35) 100%);
}
.hero__inner { position: relative; padding: 110px 0 96px; max-width: 660px; }
.hero h1 { color: var(--white); margin-bottom: .35em; }
.hero__tag { color: var(--gold); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .8rem; }
.hero p { color: #dbe4f6; font-size: 1.08rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.hero--page .hero__inner { padding: 84px 0 74px; max-width: 760px; }

.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -58px;
  z-index: 5;
}
.stat {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}
.stat strong { display: block; font-size: 1.9rem; color: var(--navy); font-weight: 700; }
.stat span { color: var(--muted); font-size: .87rem; }

/* ---------- Tarjetas ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: rgba(242, 180, 52, .18);
  margin-bottom: 16px;
}
.card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Niveles ---------- */
.level {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.level::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--gold);
}
.level:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.level h3 { margin-bottom: .3em; font-size: 1.08rem; }
.level p { color: var(--muted); font-size: .9rem; margin: 0 0 .7em; }
.level__code {
  font-size: .74rem;
  color: var(--navy);
  background: #eef2f9;
  border-radius: 6px;
  padding: 3px 9px;
  display: inline-block;
  font-weight: 600;
  letter-spacing: .04em;
}

/* ---------- Noticias / actividades ---------- */
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.news-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.news-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: #eef2f9; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-card__media img { transform: scale(1.05); }
.news-card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card__date { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-dark); font-weight: 600; }
.news-card__body h3 { font-size: 1.02rem; margin: 0; }
.news-card__body p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---------- Listas de verificación ---------- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; color: var(--muted); font-size: .95rem; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: .72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- Bloque destacado ---------- */
.feature {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
}
.feature__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.feature--reverse .feature__media { order: 2; }

.quote {
  border-left: 4px solid var(--gold);
  padding: 6px 0 6px 22px;
  margin: 26px 0;
  font-size: 1.06rem;
  font-style: italic;
  color: var(--navy);
}
.quote cite { display: block; font-style: normal; font-size: .85rem; color: var(--muted); margin-top: 8px; }

/* ---------- CTA ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  border-radius: 22px;
  padding: 48px 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: var(--white); margin-bottom: .3em; }
.cta-band p { color: #c9d4ee; margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Galería ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 34px; }
.filter-btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  padding: 9px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: .18s ease;
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.gallery__item {
  position: relative;
  border: 0;
  padding: 0;
  background: #eef2f9;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 14px 12px;
  background: linear-gradient(transparent, rgba(14, 33, 68, .88));
  color: var(--white);
  font-size: .8rem;
  text-align: left;
  opacity: 0;
  transform: translateY(8px);
  transition: .25s ease;
}
.gallery__item:hover figcaption { opacity: 1; transform: none; }
.gallery__item.is-hidden { display: none; }

.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.video-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.video-card video { width: 100%; display: block; background: #000; aspect-ratio: 16 / 9; }
.video-card__body { padding: 18px 20px 20px; }
.video-card__body h3 { font-size: 1rem; margin-bottom: .3em; }
.video-card__body p { color: var(--muted); font-size: .88rem; margin: 0; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(9, 17, 34, .93);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(1000px, 92vw); max-height: 82vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox__caption { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #dbe4f6; font-size: .92rem; padding: 0 60px; }
.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .16);
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .3); }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }
.lightbox__close { top: 20px; right: 20px; transform: none; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-dark); color: #c6d1ea; padding: 62px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.site-footer p, .site-footer li { font-size: .92rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer a { color: #c6d1ea; }
.site-footer a:hover { color: var(--gold); }
.footer-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.footer-brand img { width: 60px; height: 60px; object-fit: contain; border: 0; }
.footer-brand strong { color: var(--white); display: block; }
.footer-bottom {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: .82rem;
  color: #8fa1c4;
}

/* ---------- Animaciones ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .feature { grid-template-columns: 1fr; gap: 30px; }
  .feature--reverse .feature__media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .videos { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 5% 22px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 13px 16px; }
  .nav__cta .btn--outline { display: none; }
  .hero__inner { padding: 76px 0 66px; }
  .cta-band { padding: 34px 26px; }
}

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat strong { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav__cta .btn--gold { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .brand__text strong { font-size: .86rem; }
  .brand__text span { font-size: .62rem; }
  .brand__logo { width: 44px; height: 44px; }
  .hero__inner { padding: 62px 0 56px; }
}
