/* ═══════════════════════════════════════════════════════
   NSLA — Shared Styles
   Reset, fonts, variables, nav, footer
   ═══════════════════════════════════════════════════════ */

/* ─── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── GOOGLE FONTS ───────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

/* ─── CUSTOM PROPERTIES ───────────────────────────────── */
:root {
  --cream:    #F6F5F0;
  --orange:   #F15A22;
  --lavender: #C4ADCC;
  --yellow:   #E2DE8D;
  --dark:     #3D4152;
  --sand:     #EDDBB0;
  --grey:     #6D6E6B;
  --teal:     #8FADA8;
  --font-display: 'Source Sans 3', sans-serif;
  --font-body:    'Source Sans 3', sans-serif;
  --ned-blue:     #3E76B4;
  --section-anchor-offset: 4.5rem;
  --shell-h-pad: 4rem;
}

/* ─── BASE ────────────────────────────────────────────── */
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--cream);
  color: var(--dark);
  overflow-x: hidden;
}

/* ─── LAYOUT SHELL ────────────────────────────────────── */
.site-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--shell-h-pad);
}
@media (max-width: 1280px) { :root { --shell-h-pad: 3rem; } }
@media (max-width: 1100px) { :root { --shell-h-pad: 2.5rem; } }
@media (max-width: 768px)  { :root { --shell-h-pad: 1.5rem; } }
@media (max-width: 640px)  { :root { --shell-h-pad: 1.25rem; } }

/* ─── NAV ─────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--cream);
  transition: background 0.45s, box-shadow 0.45s;
  border-bottom: 6px solid white;
}
nav.measuring, nav.measuring *, nav.measuring *::before, nav.measuring *::after {
  transition: none !important;
}
nav.scrolled {
  background: rgba(246,245,240,0.98);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 40px rgba(0,0,0,0.08);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px var(--shell-h-pad);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
@media (min-width: 769px) {
  nav.scrolled .nav-links a {
    color: rgba(61,65,82,0.75);
  }
  nav.scrolled .nav-links a:hover { color: var(--orange); }
}
.nav-logo {
  height: 100px;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: height 0.45s cubic-bezier(0.4,0,0.2,1);
}
.nav-logo img {
  height: 96px;
  width: auto;
  display: block;
  transition: height 0.45s cubic-bezier(0.4,0,0.2,1), opacity 0.45s cubic-bezier(0.4,0,0.2,1), transform 0.45s cubic-bezier(0.4,0,0.2,1);
}
nav.scrolled .nav-logo {
  height: 65px;
}
nav.scrolled .nav-logo img {
  height: 65px;
  opacity: 0.92;
  transform: translateY(4px) scale(0.98);
}
@media (min-width: 769px) {
  .nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: flex-end;
    height: 100%;
    padding-bottom: 1.25rem;
  }
  nav.scrolled .nav-links {
    padding-bottom: 0.4rem;
  }
}
.nav-links a {
  color: rgba(61,65,82,0.75);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--orange); }

/* ── 920px: Pre-hamburger nav tidy-up ── */
@media (max-width: 920px) and (min-width: 769px) {
  .nav-logo { height: 82px; }
  .nav-logo img { height: 76px; }
  nav.scrolled .nav-logo { height: 60px; }
  nav.scrolled .nav-logo img { height: 58px; }
  .nav-links { gap: 1rem; }
  .nav-links a {
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
}

/* ── 768px: Hamburger + mobile overlay ── */
@media (max-width: 768px) {
  .nav-logo { height: 82px; }
  .nav-logo img { height: 76px; }
  nav.scrolled .nav-logo { height: 82px; }
  nav.scrolled .nav-logo img { height: 76px; transform: none; opacity: 1; }
  nav, nav.scrolled {
    background: rgba(246,245,240,0.98);
    backdrop-filter: blur(14px);
  }

  /* ── Hamburger button ── */
  .nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 210;
    background: none;
    border: none;
    padding: 6px;
  }
  .nav-hamburger img {
    width: 26px;
    height: 26px;
    transition: opacity 0.2s ease;
  }
  .nav-hamburger .nav-icon-open  { display: block; }
  .nav-hamburger .nav-icon-close { display: none; }
  .nav-hamburger.open .nav-icon-open  { display: none; }
  .nav-hamburger.open .nav-icon-close { display: block; }

  /* ── Mobile nav overlay — drops below nav bar ── */
  .nav-links {
    display: flex;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    bottom: auto;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    pointer-events: none;
    background: #4d4d4f;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 0 var(--shell-h-pad);
    border-bottom: 6px solid transparent;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 190;
    transition: max-height 0.42s cubic-bezier(0.4,0,0.2,1), opacity 0.28s ease, transform 0.42s cubic-bezier(0.4,0,0.2,1), padding 0.32s ease, border-bottom-color 0.25s ease, visibility 0s linear 0.42s;
  }
  .nav-links.open {
    max-height: 22rem;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    padding: 0.35rem var(--shell-h-pad);
    border-bottom-color: white;
    transition-delay: 0s;
  }
  .nav-links li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 1rem 0;
    text-align: left;
    font-size: 1.05rem;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.88);
  }
  .nav-links a:hover { color: var(--orange); }
}

/* ── Hamburger hidden on desktop ── */
@media (min-width: 769px) {
  .nav-hamburger { display: none; }
}

html.is-resizing .nav-links {
  transition: none !important;
}

/* ─── DROPDOWN NAV ───────────────────────────────────── */
.has-dropdown { position: relative; }
.dropdown { list-style: none; display: none; }

@media (min-width: 769px) {
  .has-dropdown > a::after {
    content: '';
    display: inline-block;
    margin-left: 0.35em;
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: middle;
    opacity: 0.55;
  }
  .has-dropdown:hover .dropdown {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--cream);
    border: 1px solid rgba(61,65,82,0.12);
    border-radius: 6px;
    min-width: 210px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    z-index: 210;
    padding: 0.4rem 0;
  }
  .has-dropdown:hover > a { color: var(--orange); }
  .dropdown li a {
    display: block;
    padding: 0.5rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(61,65,82,0.75);
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
  }
  .dropdown li a:hover { color: var(--orange); background: rgba(61,65,82,0.04); }
}

@media (max-width: 768px) {
  .nav-links.open { max-height: 40rem; }
  /* Accordion: show chevron on parent links */
  .has-dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .has-dropdown > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid rgba(255,255,255,0.6);
    flex-shrink: 0;
    transition: transform 0.25s ease;
  }
  .has-dropdown.submenu-open > a::after {
    transform: rotate(90deg);
  }
  /* Show dropdown only when accordion is open */
  .has-dropdown.submenu-open .dropdown {
    display: block;
  }
  .nav-links .dropdown li {
    width: 100%;
    border-bottom: none;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .dropdown li a {
    display: block;
    width: 100%;
    padding: 0.65rem 0 0.65rem 1.5rem;
    text-align: left;
    font-size: 0.88rem;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.55);
  }
  .dropdown li a:hover { color: var(--orange); }
}

/* ─── ACTIVE NAV UNDERLINE ──────────────────────────── */
@media (min-width: 769px) {
  .nav-links > li.nav-section-active > a {
    display: inline-block;
    position: relative;
  }
  .nav-links > li.nav-section-active > a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--orange);
    border-radius: 1px;
  }
  .nav-links > li.has-dropdown.nav-section-active > a::before {
    width: calc(100% - 14px);
  }
}

/* ─── PROGRAM CARD LOGO ──────────────────────────────── */
.program-card-logo {
  width: calc(100% - 2rem);
  height: auto;
  display: block;
  margin: 0.5rem 1rem 1.25rem;
}

/* ─── FOOTER ACKNOWLEDGEMENT ─────────────────────────── */
.footer-acknowledgement {
  background: var(--sand);
  border-top: 6px solid white;
  padding: 1.25rem 0;
  text-align: center;
}
.footer-acknowledgement p {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--shell-h-pad);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--dark);
}
.footer-acknowledgement a {
  color: var(--dark);
  font-weight: 600;
  text-decoration: none;
}
.footer-acknowledgement a:hover { color: var(--orange); }

/* ─── FOOTER ──────────────────────────────────────────── */
footer { background:#4d4d4f; border-top: 6px solid white; padding-bottom: 1.5rem; }
.footer-inner { max-width:1280px; margin:0 auto; padding:1.25rem var(--shell-h-pad) 0; }
.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-rows: auto auto auto;
  gap: 0 3rem;
  padding-bottom: 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.footer-col-1 {
  grid-row: 1 / 4;
  display: grid;
  grid-template-rows: subgrid;
  min-width: 220px;
  max-width: 320px;
}
.footer-col-2 {
  grid-row: 1 / 4;
  display: grid;
  grid-template-rows: subgrid;
  align-items: end;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}
.footer-col-2-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: flex-end;
  align-self: center;
}
.footer-col-2-links a {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col-2-links a:hover { color: var(--sand); }
.footer-col-2-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
  align-self: start;
}
.footer-brand { display:flex; align-items:flex-start; gap:1rem; }
.footer-logo-png {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80px;
  flex-shrink: 0;
  opacity: 0.9;
  display: block;
}
.footer-logo-text { font-size:0.82rem; font-weight:600; color:rgba(255,255,255,0.85); line-height:1.4; }
.footer-address { font-size:0.78rem; color:rgba(255,255,255,0.4); line-height:1.8; margin-top:1.25rem; }
.footer-address a { color:var(--orange); text-decoration:none; }
.footer-nav { display:flex; flex-wrap:wrap; gap:0.5rem 2rem; list-style:none; align-content:flex-start; padding-top:0.25rem; }
.footer-nav a { font-size:0.8rem; color:rgba(255,255,255,0.5); text-decoration:none; transition:color 0.2s; }
.footer-nav a:hover { color:white; }
.footer-bottom { display:flex; align-items:center; justify-content:space-between; padding:1.5rem 0 2rem; }
.footer-social { display:flex; gap:0.75rem; }
.social-btn { width:38px; height:38px; border-radius:50%; background:var(--orange); color:white; display:flex; align-items:center; justify-content:center; text-decoration:none; font-size:0.75rem; font-weight:700; transition:background 0.2s,transform 0.2s; }
.social-btn:hover { background:#d94e1c; transform:translateY(-2px); }
.newsletter-btn { font-size:0.82rem; font-weight:600; color:rgba(255,255,255,0.6); text-decoration:none; border:1px solid rgba(255,255,255,0.2); padding:0.6rem 1.25rem; border-radius:3px; transition:color 0.2s,border-color 0.2s; display:inline-block; }
.newsletter-btn:hover { color:white; border-color:rgba(255,255,255,0.5); }
.footer-credit { font-size:0.85rem; color:rgba(255,255,255,0.2); text-align:right; padding:0; align-self: start; }
.footer-ai-link { color:inherit; text-decoration:none; transition:color 0.2s; }
.footer-ai-link:hover { color:var(--sand); }

/* ─── SECOND BANNER ───────────────────────────────────── */
.second-banner-breadcrumb a,
.second-banner-breadcrumb .bc-current {
  color: rgba(61,65,82,0.6);
  text-decoration: none;
}
.second-banner-breadcrumb a:hover {
  color: var(--orange);
}
.second-banner-breadcrumb .bc-sep {
  margin: 0 0.3em;
  color: rgba(61,65,82,0.4);
}

.second-banner-breadcrumb {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0 calc(max(0px, (100vw - 1280px) / 2) + var(--shell-h-pad));
  min-height: 3rem;
  display: flex;
  align-items: center;
  border-bottom: 6px solid white;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(61,65,82,0.6);
  text-align: left;
}
.second-banner-heading {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0 calc(max(0px, (100vw - 1280px) / 2) + var(--shell-h-pad));
  min-height: 3rem;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--dark);
  text-align: left;
  border-bottom: 6px solid white;
  margin-bottom: 3rem;
}

/* ─── FOOTER RESPONSIVE ───────────────────────────────── */
@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .footer-col-1 {
    grid-row: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
    align-items: center;
    text-align: center;
  }
  .footer-col-2 {
    grid-row: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
  }
  .footer-col-2-links {
    justify-content: center;
    align-self: auto;
    text-align: center;
  }
  .footer-col-2-links > div {
    justify-content: center;
  }
  .footer-col-2-social {
    justify-content: center;
    align-self: auto;
  }
  .footer-credit {
    text-align: center;
    align-self: auto;
  }
}
