/* ============================================================
   The Master English Academy — single-page site
   Palette + type tokens
   ============================================================ */
:root {
  --navy: #0d1b4c;
  --navy-2: #12266b;
  --blue: #1a56db;
  --blue-2: #2f6fe8;
  --blue-soft: #eef3fb;
  --blue-tint: #dbe7fa;
  --gold: #f5b301;
  --gold-dark: #d99e00;
  --green: #25d366;
  --green-dark: #128c4b;
  --red: #ff0000;
  --ink: #23304d;
  --muted: #5d6b8a;
  --white: #ffffff;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 8px 28px rgba(13, 27, 76, 0.10);
  --shadow-sm: 0 3px 12px rgba(13, 27, 76, 0.08);
  --font-display: "Poppins", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

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

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

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.2; }

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

.section { padding: 72px 0; }

.section-title {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: var(--shadow); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-gold { background: var(--gold); color: var(--navy); }
.btn-whatsapp { background: var(--green); color: #fff; }
.btn-white { background: #fff; color: var(--navy); }

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 66px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd75e, var(--gold));
  color: var(--navy);
  display: grid; place-items: center;
  box-shadow: 0 0 0 3px rgba(245, 179, 1, 0.25);
}
.brand-icon svg { width: 24px; height: 24px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.02rem; color: #fff; }
.brand-text small { font-size: 0.72rem; color: var(--gold); font-weight: 600; letter-spacing: 0.04em; }

.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: #cfd8f2;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; border-bottom-color: var(--gold); }

.btn-nav { padding: 10px 20px; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.6px) 0 0 / 30px 30px,
    radial-gradient(700px 360px at 82% 12%, rgba(245, 179, 1, 0.16), transparent 62%),
    radial-gradient(800px 500px at 8% 95%, rgba(47, 111, 232, 0.28), transparent 60%),
    linear-gradient(160deg, #101f57 0%, #0d1b4c 45%, #081235 100%);
  overflow: hidden;
  padding: 70px 0 90px;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 18px;
}
.hero-copy h1 .accent { color: var(--gold); }

.hero-lead {
  max-width: 46ch;
  color: #c6d1ee;
  margin-bottom: 26px;
}
.hero-lead strong { color: var(--gold); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero visual */
.hero-visual { position: relative; display: flex; flex-direction: column; align-items: center; }

.photo-ring {
  position: relative;
  width: min(300px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(145deg, #ffd75e, var(--gold));
  box-shadow: 0 18px 45px rgba(9, 20, 60, 0.35);
}
.photo-ring .teacher-photo,
.photo-ring .photo-fallback {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #e7ebf4;
}
.photo-fallback { display: none; }
.no-photo .teacher-photo { display: none; }
.no-photo .photo-fallback { display: block; }

.hero-nameplate {
  margin-top: -34px;
  position: relative;
  z-index: 2;
  background: var(--navy-2);
  border: 1px solid rgba(245, 179, 1, 0.35);
  border-radius: 16px;
  padding: 18px 34px 16px;
  text-align: center;
  box-shadow: 0 14px 30px rgba(3, 8, 28, 0.6);
}
.hero-nameplate h3 { color: #fff; font-size: 1.15rem; font-weight: 700; }
.nameplate-role {
  display: inline-block;
  margin-top: 6px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  border-bottom: 2px solid rgba(245, 179, 1, 0.5);
  padding-bottom: 4px;
}

.hero-wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: 70px;
  display: block;
}

/* ============================================================
   About
   ============================================================ */
.about { padding-top: 40px; }
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  gap: 34px;
  align-items: start;
}
.about-heading h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 700; }
.about-card {
  position: relative;
  padding-left: 26px;
  border-left: 1px solid #e3e9f4;
}
.about-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 14px;
}
.about-icon svg { width: 22px; height: 22px; }
.about-card p { font-size: 0.92rem; color: #3b4763; }

/* ============================================================
   Teacher + Qualifications
   ============================================================ */
.teacher-quals { padding-top: 10px; }
.tq-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 28px;
  align-items: stretch;
}

.teacher-card {
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  border-radius: var(--radius-lg);
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: var(--shadow);
}
.teacher-avatar {
  position: relative;
  width: 110px; height: 110px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: #e7ebf4;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85);
}
.teacher-avatar .teacher-photo,
.teacher-avatar .photo-fallback { width: 100%; height: 100%; object-fit: cover; }
.teacher-info h3 { color: #fff; font-size: 1.15rem; margin-bottom: 4px; }
.teacher-role {
  display: block;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.teacher-loc {
  display: flex; align-items: center; gap: 6px;
  color: #c6d1ee;
  font-size: 0.82rem;
  margin-bottom: 12px;
}
.teacher-loc svg { width: 15px; height: 15px; color: var(--gold); }
.tag-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
}

.quals-panel {
  background: var(--blue-soft);
  border-radius: var(--radius-lg);
  padding: 30px;
}
.quals-title {
  display: inline-block;
  color: var(--blue);
  font-size: 1.2rem;
  border-bottom: 3px solid var(--blue);
  padding-bottom: 4px;
  margin-bottom: 22px;
}
.quals-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.qual-tile {
  background: #fff;
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.qual-icon {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--blue-tint);
  color: var(--blue);
  margin-bottom: 12px;
}
.qual-icon svg { width: 24px; height: 24px; }
.qual-tile p { font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; color: var(--navy); line-height: 1.35; }

/* ============================================================
   Learning areas
   ============================================================ */
.learning { padding-top: 30px; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.area-card {
  background: #fff;
  border: 1px solid #e6ecf6;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.area-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-tint); }
.area-icon {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 14px;
}
.area-icon svg { width: 26px; height: 26px; }
.area-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.area-card p { font-size: 0.8rem; color: var(--muted); }

/* ============================================================
   Why choose us
   ============================================================ */
.why { background: var(--blue-soft); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.why-tile {
  padding: 34px 28px;
  text-align: center;
  border-right: 1px solid #eaeff8;
  border-bottom: 1px solid #eaeff8;
}
.why-tile:nth-child(3n) { border-right: 0; }
.why-tile:nth-child(n+4) { border-bottom: 0; }
.why-icon {
  display: inline-grid; place-items: center;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 14px;
}
.why-icon svg { width: 24px; height: 24px; }
.why-tile h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 8px; }
.why-tile p { font-size: 0.82rem; color: var(--muted); }

/* ============================================================
   CTA banner
   ============================================================ */
.cta-section { padding-top: 20px; }
.cta-banner {
  position: relative;
  background: linear-gradient(120deg, var(--blue-2), var(--blue) 55%, #1747b8);
  border-radius: var(--radius-lg);
  padding: 54px 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(23, 71, 184, 0.35);
}
.cta-copy { flex: 1; text-align: center; }
.cta-copy h2 { color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; margin-bottom: 10px; }
.cta-copy p { color: #dfe8fb; font-size: 0.95rem; margin-bottom: 26px; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.cta-art { width: 120px; flex-shrink: 0; }

/* ============================================================
   Contact
   ============================================================ */
.contact { padding-top: 30px; }
.contact-title { font-size: 1.5rem; margin-bottom: 28px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 26px;
  align-items: stretch;
}
.contact-card {
  background: #fff;
  border: 1px solid #e6ecf6;
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.contact-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 26px;
}
.contact-list { list-style: none; }
.contact-list li { display: flex; gap: 12px; padding: 12px 0; }
.c-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.c-icon svg { width: 19px; height: 19px; }
.c-icon-green { background: #e3f8ec; color: var(--green-dark); }
.c-icon-red { background: #fdeaea; color: var(--red); }
.contact-list strong { display: block; font-family: var(--font-display); font-size: 0.82rem; color: var(--navy); }
.contact-list span, .contact-list a { font-size: 0.85rem; color: #47536f; word-break: break-word; }
.contact-list a:hover { color: var(--blue); }

.map-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 260px;
  border: 1px solid #e6ecf6;
  box-shadow: var(--shadow-sm);
}
.map-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-pin-card {
  position: absolute;
  top: 42%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border-radius: 12px;
  padding: 10px 18px;
  box-shadow: var(--shadow);
}
.map-pin {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #e23b3b;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.map-pin svg { width: 18px; height: 18px; }
.map-pin-card strong { display: block; font-family: var(--font-display); font-size: 0.9rem; color: var(--navy); line-height: 1.2; }
.map-pin-card small { color: var(--muted); font-size: 0.75rem; }
.map-label {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 10px;
  white-space: nowrap;
}

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--navy); color: #c6d1ee; margin-top: 30px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.8fr;
  gap: 40px;
  padding: 52px 20px 40px;
}
.footer-brand p { margin-top: 14px; font-size: 0.85rem; color: #9fb0d9; max-width: 30ch; }
.footer h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.footer-links-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.footer-links-cols a { color: #c6d1ee; font-size: 0.86rem; transition: color 0.15s ease; }
.footer-links-cols a:hover { color: var(--gold); }
.social-icons { display: flex; gap: 12px; }
.social {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.social:hover { transform: translateY(-3px); filter: brightness(1.1); }
.social svg { width: 20px; height: 20px; }
.social.whatsapp { background: var(--green); }
.social.youtube { background: var(--red); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 18px 20px;
  font-size: 0.8rem;
  color: #9fb0d9;
}
/* Plixo credit bar */
.plixo-bar { background: #081235; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.plixo-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  padding: 16px 20px;
  font-size: 0.82rem;
  color: #8ea0cf;
  text-align: center;
}
.plixo-credit { font-family: var(--font-display); }
.plixo-brand { color: var(--gold); font-weight: 700; letter-spacing: 0.04em; }
.plixo-brand:hover { text-decoration: underline; }
.plixo-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 179, 1, 0.12);
  border: 1px solid rgba(245, 179, 1, 0.45);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 7px 16px;
  border-radius: 999px;
  transition: background 0.15s ease;
}
.plixo-cta:hover { background: rgba(245, 179, 1, 0.22); }
.plixo-cta svg { width: 15px; height: 15px; }

/* ============================================================
   Floating WhatsApp
   ============================================================ */
.whatsapp-fab {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 60;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(18, 140, 75, 0.45);
  transition: transform 0.15s ease;
}
.whatsapp-fab:hover { transform: scale(1.08); }
.whatsapp-fab svg { width: 28px; height: 28px; }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .area-card, .social, .whatsapp-fab { transition: none; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .tq-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-cols { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .section { padding: 52px 0; }

  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy-2);
    padding: 10px 20px 18px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav-links a.active { border-bottom-color: var(--gold); }
  .btn-nav { display: none; }
  .nav-toggle { display: block; }

  .hero { padding: 48px 0 80px; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .about-grid { grid-template-columns: 1fr; gap: 26px; }
  .about-card { border-left: 0; padding-left: 0; border-top: 1px solid #e3e9f4; padding-top: 22px; }
  .about-heading { text-align: center; }

  .teacher-card { flex-direction: column; text-align: center; }
  .teacher-loc { justify-content: center; }
  .quals-tiles { grid-template-columns: 1fr; }

  .cards-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .why-tile { border-right: 0 !important; border-bottom: 1px solid #eaeff8 !important; }
  .why-tile:last-child { border-bottom: 0 !important; }

  .cta-banner { flex-direction: column; padding: 40px 24px; }
  .cta-art { display: none; }
  .cta-actions .btn { width: 100%; justify-content: center; }

  .contact-cols { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 42px 20px 32px; }
  .footer-bottom-inner { justify-content: center; text-align: center; }
  .plixo-inner { flex-direction: column; }
}

@media (max-width: 420px) {
  .cards-grid { grid-template-columns: 1fr; }
}
