/* ===================================================
   COLEGIO TONATIUH — GLOBAL DESIGN SYSTEM v2
   Inspirado en sitios de colegios premium reales
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── Variables ────────────────────────────────────── */
:root {
  --blue:         #000bae;
  --blue-dark:    #00088a;
  --blue-mid:     #0a18c8;
  --blue-light:   #e8ebff;
  --blue-xlight:  #f2f4ff;

  --gold:         #d4900a;
  --gold-light:   #f5aa20;
  --gold-bg:      #fdf6e3;

  --white:        #ffffff;
  --off-white:    #f8f8f8;
  --gray-50:      #f5f5f5;
  --gray-100:     #ebebeb;
  --gray-200:     #d6d6d6;
  --gray-400:     #9a9a9a;
  --gray-600:     #555555;
  --gray-800:     #2a2a2a;
  --black:        #111111;

  --text-body:    #2c2c3a;
  --text-muted:   #6b6b7a;
  --text-light:   #9090a0;

  --radius-sm:    4px;
  --radius-md:    8px;
  --radius-lg:    12px;
  --radius-xl:    18px;
  --radius-full:  9999px;

  --border:       1px solid #e0e0e0;
  --border-blue:  1px solid rgba(0,11,174,0.18);

  --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.12);
  --shadow-blue:  0 6px 24px rgba(0,11,174,0.18);

  --transition:   0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--white);
  color: var(--text-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { border: none; cursor: pointer; background: none; font-family: inherit; }

/* ── Typography ───────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: 'Merriweather', serif;
  line-height: 1.2;
  color: var(--black);
}

.label {
  display: inline-block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 8px;
  margin-bottom: 1px;
}

.section-heading {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--black);
  margin-bottom: 14px;
  line-height: 1.2;
}

.section-heading em {
  font-style: italic;
  color: var(--blue);
}

.section-subtext {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 580px;
}

/* ── Layout ───────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 56px);
}

.section {
  padding: clamp(60px, 8vw, 96px) 0;
}

.section-alt {
  background: var(--off-white);
  padding: clamp(60px, 8vw, 96px) 0;
}

.section-blue {
  background: var(--blue);
  padding: clamp(60px, 8vw, 96px) 0;
  color: white;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

/* ── Navbar ───────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 56px);
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--gray-100);
  box-shadow: var(--shadow-sm);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

/* Filter logo to match blue brand on white bg */
.nav-logo img.logo-transparent {
  filter: none;
}

.nav-logo-name {
  font-family: 'Merriweather', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 auto;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-600);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  letter-spacing: 0.01em;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: var(--transition);
  border-radius: 1px;
}

.nav-links a:hover { color: var(--blue); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--blue); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-cta-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-blue {
  background: var(--blue);
  color: white;
  border: 2px solid var(--blue);
}
.btn-blue:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-blue);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: white;
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: white;
  border: 2px solid var(--gold);
}
.btn-gold:hover {
  background: #b87e00;
  border-color: #b87e00;
  transform: translateY(-1px);
}

.btn-white {
  background: white;
  color: var(--blue);
  border: 2px solid white;
}
.btn-white:hover {
  background: var(--blue-light);
  transform: translateY(-1px);
}

.btn-ghost-white {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.55);
}
.btn-ghost-white:hover {
  border-color: white;
  background: rgba(255,255,255,0.1);
}

.btn-lg { padding: 14px 30px; font-size: 0.95rem; }
.btn-sm { padding: 8px 18px; font-size: 0.9rem; }

/* ── Cards ────────────────────────────────────────── */
.card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.card-body { padding: 24px; }

/* Accent card with blue top border */
.card-accent {
  border-top: 3px solid var(--blue);
}

.card-accent-gold {
  border-top: 3px solid var(--gold);
}

/* ── Hamburger ────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: white;
  border-bottom: var(--border);
  box-shadow: var(--shadow-md);
  padding: 16px clamp(18px, 4vw, 56px) 24px;
  flex-direction: column;
  gap: 2px;
  z-index: 999;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

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

.nav-drawer a {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-600);
  padding: 11px 14px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.nav-drawer a:hover, .nav-drawer a.active {
  color: var(--blue);
  background: var(--blue-xlight);
}

.drawer-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 10px 0;
}

/* ── Page Header ─────────────────────────────────── */
.page-header {
  padding: 120px 0 56px;
  background: var(--blue);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

.page-header::after {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  pointer-events: none;
}

.page-header .label { color: rgba(255,255,255,0.65); }
.page-header .label::before { background: var(--gold-light); }
.page-header .section-heading { color: white; font-size: clamp(2rem, 4vw, 3rem); }
.page-header .section-heading em { color: var(--gold-light); }
.page-header .section-subtext { color: rgba(255,255,255,0.75); max-width: 600px; }

/* ── Stat strip ──────────────────────────────────── */
.stat-strip {
  background: var(--blue-dark);
  color: white;
  padding: 24px 0;
}

.stat-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-strip-item {
  text-align: center;
  padding: 8px 16px;
  border-right: 1px solid rgba(255,255,255,0.12);
}

.stat-strip-item:last-child { border-right: none; }

.stat-strip-number {
  font-family: 'Merriweather', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}

.stat-strip-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  font-weight: 500;
}

/* ── Footer ───────────────────────────────────────── */
.footer {
  background: #0a0c1a;
  color: white;
}

.footer-top {
  padding: 56px 0 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand img {
  height: 44px;
  margin-bottom: 14px;
  /* Make white/transparent logo visible on dark bg */
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h5 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 10px;
  transition: var(--transition);
}

.footer-col a:hover { color: white; }

.footer-bottom {
  padding: 18px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── WhatsApp FAB ────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 900;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25d366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: var(--transition);
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(37,211,102,0.55);
}

.whatsapp-fab svg { width: 26px; height: 26px; }

/* ── Divider with text ───────────────────────────── */
.divider-line {
  height: 1px;
  background: var(--gray-100);
  margin: 0;
}

/* ── Reveal animations ───────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left { opacity: 0; transform: translateX(-24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0; transform: translateX(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.stagger.visible > *:nth-child(1) { opacity:1; transform:translateY(0); transition-delay: 0s; }
.stagger.visible > *:nth-child(2) { opacity:1; transform:translateY(0); transition-delay: 0.1s; }
.stagger.visible > *:nth-child(3) { opacity:1; transform:translateY(0); transition-delay: 0.2s; }
.stagger.visible > *:nth-child(4) { opacity:1; transform:translateY(0); transition-delay: 0.3s; }
.stagger.visible > *:nth-child(5) { opacity:1; transform:translateY(0); transition-delay: 0.4s; }
.stagger.visible > *:nth-child(6) { opacity:1; transform:translateY(0); transition-delay: 0.5s; }

/* ── Toast ───────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 90px; right: 26px;
  background: white;
  border: var(--border);
  border-left: 3px solid #22c55e;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.175,0.885,0.32,1.275);
  z-index: 1100;
}
.toast.show { transform: translateX(0); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stat-strip-inner { grid-template-columns: 1fr 1fr; }
  .stat-strip-item:nth-child(2) { border-right: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .nav-links, .nav-cta-area .btn { display: none; }
  .hamburger { display: flex; }
  .nav-drawer { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
  .stat-strip-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .stat-strip-inner { grid-template-columns: 1fr 1fr; }
}
