/* ============================================
   AAAS ACADEMY — style.css (Shared Styles)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --deep:    #0B1120;
  --navy:    #112240;
  --blue:    #1A3A6E;
  --accent:  #E8A838;
  --accent2: #F5C76A;
  --light:   #F7F4EE;
  --white:   #FFFFFF;
  --gray:    #8892A4;
  --border:  rgba(232,168,56,0.18);

  --head:    'Cormorant Garamond', serif;
  --body:    'Plus Jakarta Sans', sans-serif;

  --radius:  12px;
  --shadow:  0 20px 60px rgba(11,17,32,0.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--light);
  color: var(--deep);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 999;
  background: rgba(11,17,32,0.96);
  backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 6%;
  height: 70px;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--head);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent2);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.logo span { color: var(--white); }

.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0; height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s;
}
.nav-links a:hover { color: var(--accent2); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--accent2); }

.nav-btn {
  background: var(--accent) !important;
  color: var(--deep) !important;
  padding: 9px 22px;
  border-radius: 8px;
  font-weight: 700 !important;
  transition: background 0.2s !important;
}
.nav-btn:hover { background: var(--accent2) !important; }
.nav-btn::after { display: none !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent2);
  border-radius: 2px;
  transition: all 0.3s;
}
.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 nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: rgba(11,17,32,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 24px 6%;
  z-index: 998;
  flex-direction: column;
  gap: 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover, .mobile-nav a.active { color: var(--accent2); }
.mobile-nav .nav-btn {
  margin-top: 14px;
  text-align: center;
  padding: 12px 22px !important;
  border-radius: 8px;
  border-bottom: none !important;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--deep) 0%, var(--navy) 55%, #0e2044 100%);
  display: flex; align-items: center;
  padding: 100px 6% 70px;
  position: relative;
  overflow: hidden;
}

.hero-deco {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  pointer-events: none;
}
.hero-deco.d1 { width: 500px; height: 500px; top: -120px; right: -100px; }
.hero-deco.d2 { width: 300px; height: 300px; bottom: 40px; right: 18%; opacity: 0.5; }
.hero-deco.d3 { width: 180px; height: 180px; top: 30%; left: -50px; opacity: 0.3; }

.hero-inner { max-width: 680px; position: relative; z-index: 2; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,168,56,0.12);
  border: 1px solid rgba(232,168,56,0.35);
  color: var(--accent2);
  font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 7px 18px; border-radius: 30px;
  margin-bottom: 28px;
  animation: fadeDown 0.7s ease both;
}

.hero h1 {
  font-family: var(--head);
  font-size: clamp(44px, 7vw, 82px);
  color: var(--white);
  line-height: 1.08;
  font-weight: 700;
  margin-bottom: 24px;
  animation: fadeDown 0.8s 0.1s ease both;
}
.hero h1 em { color: var(--accent); font-style: normal; }

.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.65);
  line-height: 1.85;
  margin-bottom: 44px;
  animation: fadeDown 0.8s 0.2s ease both;
}

.hero-btns {
  display: flex; gap: 16px; flex-wrap: wrap;
  animation: fadeDown 0.8s 0.3s ease both;
}

.btn-gold {
  background: var(--accent);
  color: var(--deep);
  padding: 14px 34px; border-radius: 8px;
  font-weight: 700; font-size: 15px;
  text-decoration: none; display: inline-block;
  transition: all 0.2s;
}
.btn-gold:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(232,168,56,0.35); }

.btn-ghost {
  border: 1.5px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 14px 34px; border-radius: 8px;
  font-weight: 500; font-size: 15px;
  text-decoration: none; display: inline-block;
  transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent2); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: fadeDown 0.8s 0.4s ease both;
}
.stat-n {
  font-family: var(--head);
  font-size: 38px; font-weight: 700;
  color: var(--accent); display: block;
}
.stat-l { font-size: 13px; color: rgba(255,255,255,0.5); }

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  background: linear-gradient(150deg, var(--deep) 0%, var(--navy) 100%);
  padding: 130px 6% 70px;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; right: -80px; top: -80px;
  width: 400px; height: 400px; border-radius: 50%;
  border: 1px solid var(--border);
}
.page-tag {
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.page-hero h1 {
  font-family: var(--head);
  font-size: clamp(36px, 5vw, 64px);
  color: var(--white); font-weight: 700; line-height: 1.1;
  margin-bottom: 16px;
}
.page-hero p { font-size: 17px; color: rgba(255,255,255,0.6); max-width: 550px; line-height: 1.8; }

/* ── SECTION BASICS ── */
section { padding: 88px 6%; }

.sec-tag {
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.sec-title {
  font-family: var(--head);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 700; color: var(--navy);
  line-height: 1.15; margin-bottom: 14px;
}
.sec-sub {
  font-size: 16px; color: var(--gray);
  max-width: 520px; line-height: 1.85;
  margin-bottom: 52px;
}

/* on dark backgrounds */
.on-dark .sec-title { color: var(--white); }
.on-dark .sec-sub   { color: rgba(255,255,255,0.55); }

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(17,34,64,0.08);
  padding: 32px 28px;
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.card-icon {
  font-size: 34px; margin-bottom: 18px; display: block;
}
.card h3 {
  font-family: var(--head);
  font-size: 22px; font-weight: 700;
  color: var(--navy); margin-bottom: 10px;
}
.card p { font-size: 14px; color: var(--gray); line-height: 1.75; }

/* ── GRID HELPERS ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

/* ── FOOTER ── */
.footer {
  background: var(--deep);
  padding: 52px 6% 32px;
  border-top: 1px solid rgba(232,168,56,0.15);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; margin-bottom: 40px;
}
.footer-brand .logo { font-size: 22px; margin-bottom: 14px; display: block; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.8; max-width: 280px; }
.footer-col h4 {
  font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  font-size: 14px; color: rgba(255,255,255,0.55);
  text-decoration: none; transition: color 0.2s;
  word-break: break-word;
}
.footer-col ul li a:hover { color: var(--accent2); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,0.3); }
.footer-bottom strong { color: var(--accent2); }

/* ── FORM ── */
.form-wrap {
  background: var(--white); border-radius: 18px;
  padding: 50px 52px;
  border: 1px solid rgba(232,168,56,0.15);
  box-shadow: 0 24px 70px rgba(11,17,32,0.08);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 22px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--navy); margin-bottom: 8px;
}
.form-group label span { color: #e53e3e; margin-left: 2px; }

/* ── TEXT INPUTS & TEXTAREA (no appearance:none) ── */
.form-group input:not([type="checkbox"]),
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e4e7ee;
  border-radius: 8px;
  font-family: var(--body); font-size: 14px;
  color: var(--deep); background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

/* ── SELECT (appearance:none only here) ── */
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e4e7ee;
  border-radius: 8px;
  font-family: var(--body); font-size: 14px;
  color: var(--deep); background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}

/* ── CHECKBOX (never touch appearance) ── */
.form-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}

.form-group input:not([type="checkbox"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,168,56,0.13);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-group.err input:not([type="checkbox"]),
.form-group.err select { border-color: #e53e3e; }
.err-msg { display: none; font-size: 12px; color: #e53e3e; margin-top: 5px; }
.form-group.err .err-msg { display: block; }

.form-divider {
  height: 1px; background: rgba(232,168,56,0.15);
  margin: 4px 0 24px;
}
.form-sec-label {
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 20px;
}
.submit-btn {
  width: 100%; padding: 15px;
  background: var(--navy); color: var(--accent2);
  border: none; border-radius: 10px;
  font-family: var(--body); font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; margin-top: 6px;
  letter-spacing: 0.4px;
}
.submit-btn:hover { background: var(--blue); transform: translateY(-2px); }

.success-box {
  display: none; text-align: center; padding: 48px 20px;
}
.success-box .tick {
  width: 76px; height: 76px;
  background: #dcfce7; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; margin: 0 auto 22px;
}
.success-box h3 {
  font-family: var(--head); font-size: 28px; color: var(--navy); margin-bottom: 10px;
}
.success-box p { color: var(--gray); font-size: 15px; }

/* ── ANIMATIONS ── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   MOBILE RESPONSIVE — Single clean block
   ══════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Navbar ── */
  .navbar {
    padding: 0 5%;
    height: 64px;
  }
  .nav-links { display: none; }
  .hamburger { display: flex; }

  /* ── Hero ── */
  .hero {
    padding: 90px 5% 56px;
    min-height: auto;
  }
  .hero h1 { font-size: 36px; }
  .hero p  { font-size: 15px; }
  .hero-badge { font-size: 10px; padding: 6px 14px; }
  .hero-btns { gap: 12px; }
  .btn-gold  { padding: 11px 22px; font-size: 13px; }
  .btn-ghost { padding: 11px 22px; font-size: 13px; }

  /* Hero stats — 2×2 grid */
  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
    padding-top: 28px;
  }
  .stat-n { font-size: 28px; }
  .stat-l { font-size: 11px; }

  /* ── Page Hero ── */
  .page-hero {
    padding: 100px 5% 50px;
  }
  .page-hero h1 { font-size: 30px; }
  .page-hero p  { font-size: 14px; }

  /* ── Sections ── */
  section { padding: 52px 5%; }

  /* ── Typography ── */
  .sec-title { font-size: clamp(22px, 6vw, 32px); }
  .sec-sub   { font-size: 14px; margin-bottom: 32px; }

  /* ── Cards ── */
  .card { padding: 22px 18px; }
  .card-icon { font-size: 26px; margin-bottom: 12px; }
  .card h3   { font-size: 18px; }

  /* ── Grids — collapse to 1 column ── */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Scholar cards — 2 per row on mobile */
  .scholars-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Inline grid overrides */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr !important;
  }

  /* Auto-fill grids — reduce minmax */
  [style*="minmax(200px"],
  [style*="minmax(240px"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* ── Form ── */
  .form-wrap { padding: 28px 18px; }
  .form-row  { grid-template-columns: 1fr; gap: 0; }
  .form-group input:not([type="checkbox"]),
  .form-group select,
  .form-group textarea { font-size: 15px; padding: 11px 13px; }

  /* ── Checkbox grid ── */
  .checkbox-grid { grid-template-columns: 1fr 1fr; }

  /* ── Footer ── */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-brand p { max-width: 100%; }
  .footer-bottom {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  /* ── Director / flex card ── */
  .director-flex {
    flex-direction: column !important;
    text-align: center !important;
    gap: 24px !important;
    padding: 28px 20px !important;
  }

  /* ── About stats grid — keep 2 col ── */
  .stats-2col {
    grid-template-columns: 1fr 1fr !important;
  }

  /* ── Map placeholder ── */
  .map-placeholder { height: 220px !important; }

  /* ── word-break for addresses / long text ── */
  .footer-col ul li a,
  .card p { word-break: break-word; }

  /* ── Batch timing cards ── */
  .batch-time { font-size: 17px !important; }

  /* ── CTA banner ── */
  .cta-banner { padding: 48px 5% !important; }
  .cta-banner h2 { font-size: 26px !important; }

  /* ── Terms box ── */
  .terms-box li { font-size: 13px; }

}

/* Extra small screens */
@media (max-width: 480px) {
  .hero h1  { font-size: 28px; }
  .sec-title { font-size: 22px; }

  /* Scholar / auto-fill cards → 1 col on tiny screens */
  [style*="minmax(200px"],
  [style*="minmax(240px"] {
    grid-template-columns: 1fr !important;
  }
  .checkbox-grid { grid-template-columns: 1fr; }

  .hero-stats { grid-template-columns: 1fr 1fr; }
}