/* style.css (global) */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&display=swap');

/* ==========================================================================
   0. Global Resets / Stability
   ========================================================================== */
html { scrollbar-gutter: stable both-edges; }
*, *::before, *::after { box-sizing: border-box; }
img, video { max-width: 100%; height: auto; display: block; }

/* ==========================================================================
   1. Variables & Global Container
   ========================================================================== */
:root {
  --primary:        #003f63;
  --primary-hover:  #004A6E;
  --accent:         #003f63;
  --light-bg:       #f4f4f4;
  --white:          #fff;
  --max-width:      1200px;
  --gutter:         20px;         /* matches index spacing */
}

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  background-color: #f9f9f9;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Optional: shared section title (use on pages to avoid heading jumps) */
.section-title {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 1.75rem;
  line-height: 1.2;
  text-align: center;
}

/* ==========================================================================
   2. Top Banner & Navigation
   ========================================================================== */
.top-banner {
  background-color: var(--primary);
  color: var(--white);
  position: relative;
  padding: 1.25rem 0;
}
.top-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

.top-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--gutter);
}
.top-menu li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
}
.top-menu li a:hover { background-color: rgba(255,255,255,0.2); }
.top-phone { font-weight: 600; }

/* ==========================================================================
   3. Logo Header & Hero Pitch
   ========================================================================== */
.logo-header {
  display: flex;
  align-items: center;
  background-color: var(--light-bg);          /* use token for consistency */
}
.logo-header .container {
  display: flex;
  align-items: center;
  padding: 1.25rem var(--gutter);
}
.logo-header .logo { flex: 0 0 auto; margin-right: var(--gutter); }
.logo-header .logo img {
  max-height: 100px;
  width: auto;
  object-fit: contain;
}
.logo-header .elevator-pitch {
  flex: 1;
  margin: 0 0 0 var(--gutter);
  color: #000;
  font-size: 1rem;
  line-height: 1.4;
}

/* “Est. 2018” lockup */
.logo-header .established {
  display: inline-block;
  vertical-align: text-bottom;
  margin-left: .5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #555;
  text-transform: uppercase;
}

/* Hero pitch */
.hero-pitch {
  margin: 0;
  flex: 1;
  text-align: left;
}
.hero-pitch h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 .5rem;
  color: var(--primary);
}
/* Single definition for hero body text — remove duplicate + Lato */
.hero-pitch p {
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: #333;
  margin: 0 0 1rem;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1rem 0;
  background: var(--light-bg);
}
.site-footer p { margin: 0; font-size: 0.875rem; color: #666; }

/* Zero-JS Schools dropdown */
.schools-nav {
  position: relative;
  margin-left: 8px;                 /* small spacing from main menu */
}

.schools-trigger {
  list-style: none;                 /* hides the native triangle in most browsers */
  display: inline-block;
  cursor: pointer;
  color: var(--white);
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.35);
  user-select: none;
}
.schools-trigger:hover { background: rgba(255,255,255,.2); }

/* Hide the default marker reliably */
.schools-trigger::-webkit-details-marker { display: none; }

/* Panel */
.schools-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;                         /* align with right side of the banner */
  width: min(380px, 92vw);
  background: #fff;
  color: #0b1f2e;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  border: 1px solid rgba(0,63,99,.12);
  padding: 12px;
  z-index: 2000;

  /* hide by default; shown when details is open */
  display: none;
}
.schools-nav[open] .schools-panel { display: block; }

/* List */
.schools-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow: auto;
}
.schools-list li { border-radius: 6px; }
.schools-list a {
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  color: #123;
}
.schools-list a:hover { background: #f1f6fa; color: var(--primary); }
.schools-list .all-schools a {
  font-weight: 700;
  border-top: 1px solid #e6edf3;
  margin-top: 6px;
}

/* Mobile: drop panel left so it doesn't overflow */
@media (max-width: 768px) {
  .schools-panel {
    right: auto;
    left: 0;
    width: calc(100vw - 2*var(--gutter));
  }
}


/* ==========================================================================
   4. Mobile
   ========================================================================== */
@media (max-width: 768px) {
  .top-banner .container {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }
  .menu-toggle { display: block; margin-right: auto; }
  .top-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    margin: 0.5rem 0;
    gap: 1rem;
    align-self: stretch;
  }
  .top-menu.open { display: flex !important; }

  .top-phone { align-self: center; margin: 1rem 0 0; }

  .logo-header .container { flex-direction: column; text-align: center; }
  .logo-header .logo img { max-width: 100%; height: auto; }

  .elevator-pitch {
    width: 100%;
    box-sizing: border-box;
    padding: 0 var(--gutter);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

