/* CAS global: tokens, sticky header, mobile menu, final CTA, footer.
   Shared by every interior page (homepage uses main.css which embeds the same rules). */
/* ==========================================================================
   Comprehensive Assessment Services (CAS) • Federal Blue Design System
   Matches original Donald Ghrist, LEP WordPress design faithfully in pure HTML5
   ========================================================================== */


:root {
  /* Federal Blue Corporate Palette */
  --fed-dark: #1A4480;
  --fed-med: #205493;
  --fed-accent: #2E74B5;
  --fed-light: #F0F4F8;
  --fed-night: #112F4E;

  /* Header & Navigation Variables */
  --navy: #1A4480;
  --blue: #2E74B5;
  --blue-dark: #205493;
  --ink: #112F4E;
  --muted: #475569;
  --border: #DDE5EE;
  --bg: #ffffff;

  /* Global Content Tokens */
  --cas-bg-color: #ffffff;
  --cas-text-color: #111111;
  --cas-card-bg: #ffffff;

  /* Typography Stacks */
  --font-serif: 'Merriweather', Georgia, serif;
  --font-condensed: 'Roboto Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   Base Resets & Global Styles
   ========================================================================== */
html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

/* Offset in-page jump targets for sticky header + sticky subnav */
section[id], div[id], [id] {
  scroll-margin-top: 110px;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  background: var(--cas-bg-color);
  color: var(--cas-text-color);
  font-family: var(--font-serif);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--fed-accent);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--fed-med);
}

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

/* ==========================================================================
   ⭐ STICKY SHRINK HEADER (Federal Blue + Text Logo)
   ========================================================================== */
.cas-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  transition: padding 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cas-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: padding 0.25s ease;
}

/* Two-Line Federal Text Logo */
.cas-brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cas-brand img.cas-header-seal {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
}

.cas-logo-text {
  display: flex;
  flex-direction: column;
}

.cas-logo-line1 {
  font-family: var(--font-condensed);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--navy);
  text-transform: uppercase;
  line-height: 1;
}

.cas-logo-line2 {
  font-family: var(--font-condensed);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--blue);
  text-transform: uppercase;
  line-height: 1;
  margin-top: 3px;
}

/* Header Shrink on Scroll */
.cas-header.shrink .cas-wrap {
  padding: 8px 20px;
}
.cas-header.shrink .cas-logo-line1 {
  font-size: 21px;
}
.cas-header.shrink .cas-logo-line2 {
  font-size: 15px;
}

/* Desktop Navigation */
.cas-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.cas-link,
.cas-menubtn {
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  font-weight: 600;
  font-size: 15px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.cas-link:hover,
.cas-menubtn:hover {
  color: var(--blue-dark);
}

.cas-phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cas-phone-pill:hover {
  background: #e2e8f0;
  color: var(--blue-dark);
  transform: translateY(-1px);
}

/* Dropdown Menus */
.cas-menu {
  position: relative;
}

.cas-dd {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
  margin-top: 8px;
  overflow: hidden;
  z-index: 1001;
}

.cas-dd a {
  display: block;
  padding: 10px 16px;
  font-size: 14.5px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-sans);
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease, color 0.15s ease;
}

.cas-dd a:last-child {
  border-bottom: none;
}

.cas-dd a:hover {
  background: #F4F7FB;
  color: var(--fed-accent);
}

/* CTA Pill Button */
.cas-btn {
  background: var(--navy);
  color: #ffffff !important;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  font-family: var(--font-condensed);
  font-size: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 3px 8px rgba(26, 68, 128, 0.25);
  white-space: nowrap;
}

.cas-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(26, 68, 128, 0.35);
}

.cas-btn-secondary {
  background: #ffffff;
  color: var(--navy) !important;
  border: 2px solid var(--navy);
  padding: 9px 20px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  font-family: var(--font-condensed);
  font-size: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.cas-btn-secondary:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

/* Hamburger & Mobile Menu */
.cas-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.cas-hamburger span {
  width: 26px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.cas-mobile {
  display: none;
  flex-direction: column;
  padding: 16px 20px;
  background: #ffffff;
  border-top: 1px solid var(--border);
}

.cas-mobile.active {
  display: flex;
}

.cas-mobile a {
  padding: 11px 12px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid #f1f5f9;
}

.cas-mobile a:hover {
  background: #F4F7FB;
  color: var(--fed-accent);
}

.cas-mobile details {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 6px 0;
}

.cas-mobile summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-sans);
  color: var(--navy);
  list-style: none;
}

.cas-mobile summary::-webkit-details-marker {
  display: none;
}

.cas-mobile details a {
  padding-left: 24px;
  font-size: 14px;
  font-weight: 500;
}

/* ==========================================================================
   ⭐ SECTION 8: FINAL PHOTOGRAPHIC CALL TO ACTION
   ========================================================================== */
#cas-final-cta {
  position: relative;
  background: #112F4E url('/images/CAS-IEE-Helping-chidren-with-dis.webp') center/cover no-repeat;
  padding: 95px 20px;
  text-align: center;
  color: #ffffff;
  overflow: hidden;
}

#cas-final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(26, 68, 128, 0.82);
  backdrop-filter: brightness(0.85);
  -webkit-backdrop-filter: brightness(0.85);
  z-index: 1;
}

#cas-final-cta > * {
  position: relative;
  z-index: 2;
}

#cas-final-cta h2 {
  color: #ffffff !important;
  font-size: 44px;
  font-weight: 900;
  margin: 0 0 20px 0;
  font-family: var(--font-condensed);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

#cas-final-cta p {
  color: #e9f1ff !important;
  font-size: 19.5px;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 35px auto;
  font-family: var(--font-serif);
}

#cas-final-cta .cas-btn {
  background: var(--fed-accent);
  color: #ffffff !important;
  padding: 15px 36px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

#cas-final-cta .cas-btn:hover {
  background: var(--fed-med);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   CAS GLOBAL FOOTER (Federal Blue)
   ========================================================================== */
.cas-footer {
  background: #f4f7fb;
  color: var(--ink);
  font-family: var(--font-serif);
  border-top: 1px solid #d9e2ec;
}

.footer-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 60px 20px;
  display: grid;
  gap: 36px;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
}

.footer-col h3 {
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 16px;
  color: var(--fed-accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.footer-col p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
  margin: 0;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin: 9px 0;
}

.footer-col a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--muted);
  transition: color 0.2s ease;
  font-family: var(--font-sans);
}

.footer-col a:hover {
  color: var(--fed-dark);
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding: 20px 20px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid #d9e2ec;
  background: #eef3f8;
  font-family: var(--font-sans);
}


/* Responsive — shared header/footer */
@media (max-width: 1024px) {
  .cas-nav { display: none; }
  .cas-hamburger { display: flex; }
  .footer-wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  #cas-final-cta h2 { font-size: 32px; }
  #cas-final-cta p { font-size: 17px; }
}
@media (max-width: 640px) {
  .footer-wrap { grid-template-columns: 1fr; }
  .cas-logo-line1 { font-size: 22px; }
  .cas-logo-line2 { font-size: 15px; }
}

/* ==========================================================================
   In-Page Section Navigation (Desktop & Mobile Swipeable Pill Bar)
   ========================================================================== */
#casNav, #casIEENav, #otNav, #psyNav, #slpNav {
  position: sticky;
  top: 60px;
  z-index: 990;
  background: var(--fed-dark);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 0;
  list-style: none;
}

#casNav a, #casIEENav a, #otNav a, #psyNav a, #slpNav a {
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-condensed);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.4px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  transition: all 0.2s ease;
}

#casNav a:hover, #casIEENav a:hover, #otNav a:hover, #psyNav a:hover, #slpNav a:hover {
  background: var(--fed-accent);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Permanently hide legacy mobile toggles & vertical drawers */
#casMobileNavToggle, #casMobileDrawer,
#casIEEToggle, #casIEEDrawer,
#otMobileNavToggle, #otMobileDrawer,
#psyMobileNavToggle, #psyMobileDrawer,
#slpMobileNavToggle, #slpMobileDrawer {
  display: none !important;
}

/* Mobile: Horizontal Swipeable Pill Bar */
@media (max-width: 980px) {
  #casNav, #casIEENav, #otNav, #psyNav, #slpNav {
    display: flex !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 8px !important;
    padding: 10px 14px !important;
    top: 56px;
    scrollbar-width: none;
  }

  #casNav::-webkit-scrollbar,
  #casIEENav::-webkit-scrollbar,
  #otNav::-webkit-scrollbar,
  #psyNav::-webkit-scrollbar,
  #slpNav::-webkit-scrollbar {
    display: none;
  }

  #casNav a, #casIEENav a, #otNav a, #psyNav a, #slpNav a {
    flex-shrink: 0;
    scroll-snap-align: start;
    font-size: 13px;
    padding: 6px 12px;
  }
}
