@import url("codex-global-mega-menu.css?v=20260906-pan-y");

/* Keep the five-character course label on one line within its existing tile. */
body.sf-e-page .sf-e-mega-course-grid a[href$="/course/advance/"] > span {
  font-size: .62rem;
  letter-spacing: -.02em;
  white-space: nowrap;
}

/* Header text must not inherit white text from dark page bodies (e.g. FAQ). */
.sf-e-page .sf-e-site-header { color: #202020; }

/*
 * Shared Sleepfreaks header — matches the approved homepage header.
 * Loaded last on the homepage and every Codex fixed-page template so page CSS
 * cannot change the header geometry.
 */

body.sf-e-page .sf-e-test-note {
  padding: 7px;
  background: #0c5686;
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.75;
  text-align: center;
}

/* Lock the viewport, not a new body scroll container: preserve sticky header. */
html:has(body.sf-e-mega-menu-open) { overflow: hidden; }
body.sf-e-page.sf-e-mega-menu-open { overflow: clip !important; }

body.sf-e-page .sf-e-site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 2px solid #202020;
  background: #fff;
}

body.sf-e-page .sf-e-header {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-right: auto;
  margin-left: auto;
}

body.sf-e-page .sf-e-brand {
  display: flex;
  width: 225px;
  min-width: 225px;
  flex: 0 0 225px;
  flex-direction: column;
  gap: 5px;
}

body.sf-e-page .sf-e-brand .sf-e-logo-image {
  display: block;
  width: 225px;
  line-height: 0;
}

body.sf-e-page .sf-e-brand .sf-e-logo-image img {
  display: block;
  width: 100%;
  height: auto;
}

body.sf-e-page .sf-e-phone-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  white-space: nowrap;
}

body.sf-e-page .sf-e-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #10213f;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .015em;
  line-height: 1;
  white-space: nowrap;
  transition: color .2s ease, transform .2s ease;
}

body.sf-e-page .sf-e-phone-link span {
  display: inline-block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #168bc5;
  font-size: 1.06rem;
  line-height: 1;
  transform: translateY(-1px);
  transition: color .2s ease, text-shadow .2s ease, transform .2s ease;
}

body.sf-e-page .sf-e-phone-link:hover,
body.sf-e-page .sf-e-phone-link:focus-visible {
  color: #0878b2;
  outline: none;
  transform: translateY(-1px);
}

body.sf-e-page .sf-e-phone-link:hover span,
body.sf-e-page .sf-e-phone-link:focus-visible span {
  color: #0c6f9f;
  text-shadow: 0 0 10px rgba(89, 183, 232, .75);
  transform: translateY(-2px);
}

body.sf-e-page .sf-e-phone-hours {
  display: inline;
  color: #666;
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
  white-space: nowrap;
}

body.sf-e-page .sf-e-nav {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
  font-size: .95rem;
  font-weight: 900;
}

body.sf-e-page .sf-e-nav a {
  position: relative;
  white-space: nowrap;
}

body.sf-e-page .sf-e-nav > a:not(.sf-e-nav-cta):not(.sf-e-nav-sub) + a:not(.sf-e-nav-cta):not(.sf-e-nav-sub)::before {
  position: absolute;
  top: 50%;
  left: -8px;
  width: 1px;
  height: 19px;
  background: rgba(32, 32, 32, .22);
  content: "";
  transform: translateY(-50%);
}

body.sf-e-page .sf-e-nav a:not(.sf-e-nav-cta):not(.sf-e-nav-sub) {
  transition: color .2s ease, transform .2s ease, text-shadow .2s ease;
}

body.sf-e-page .sf-e-nav a:not(.sf-e-nav-cta):not(.sf-e-nav-sub)::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #55b7e8, #f6a63b);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

body.sf-e-page .sf-e-nav a:not(.sf-e-nav-cta):not(.sf-e-nav-sub):hover,
body.sf-e-page .sf-e-nav a:not(.sf-e-nav-cta):not(.sf-e-nav-sub):focus-visible {
  color: #0878b2;
  outline: none;
  text-shadow: 0 0 14px rgba(89, 183, 232, .42);
  transform: translateY(-2px);
}

body.sf-e-page .sf-e-nav a:not(.sf-e-nav-cta):not(.sf-e-nav-sub):hover::after,
body.sf-e-page .sf-e-nav a:not(.sf-e-nav-cta):not(.sf-e-nav-sub):focus-visible::after {
  transform: scaleX(1);
}

body.sf-e-page .sf-e-nav-sub,
body.sf-e-page .sf-e-nav-cta {
  border: 2px solid #202020;
  border-radius: 999px;
  text-align: center;
}

body.sf-e-page .sf-e-nav-sub {
  padding: 10px 17px;
  transition: color .22s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

body.sf-e-page .sf-e-nav-sub:hover,
body.sf-e-page .sf-e-nav-sub:focus-visible {
  border-color: #0878b2;
  background: #0878b2;
  color: #fff !important;
  outline: none;
  box-shadow: 0 4px 0 #202020, 0 0 0 4px rgba(89, 183, 232, .24), 0 0 20px rgba(89, 183, 232, .35);
  transform: translateY(-2px);
}

body.sf-e-page .sf-e-nav-cta,
body.sf-e-page .sf-e-nav-cta:active {
  min-width: 190px;
  padding: 16px 27px;
  background: #0878b2 !important;
  color: #fff !important;
  box-shadow: 0 4px 0 #202020 !important;
  font-size: .95rem;
  line-height: 1.2;
  transition: background-color .5s ease, border-color .5s ease, box-shadow .5s ease, transform .2s ease;
}

body.sf-e-page .sf-e-nav-cta:hover,
body.sf-e-page .sf-e-nav-cta:focus-visible {
  border-color: #202020 !important;
  background: #ffe600 !important;
  color: #202020 !important;
  outline: none;
  box-shadow: 0 5px 0 #202020, 0 0 0 4px rgba(255, 230, 0, .28), 0 0 26px rgba(255, 230, 0, .62) !important;
  transform: translateY(-3px);
}

@media (max-width: 1140px) {
  body.sf-e-page .sf-e-nav a:not(.sf-e-nav-cta):not(.sf-e-nav-sub) {
    display: none;
  }
}

@media (max-width: 760px) {
  body.sf-e-page .sf-e-test-note { font-size: .58rem; }

  body.sf-e-page .sf-e-header {
    width: min(1180px, calc(100% - 28px));
    height: 72px;
    gap: 20px;
  }

  body.sf-e-page .sf-e-brand {
    width: 145px !important;
    min-width: 145px !important;
    flex-basis: 145px !important;
    gap: 3px;
  }

  body.sf-e-page .sf-e-brand .sf-e-logo-image {
    width: 145px !important;
  }

  body.sf-e-page .sf-e-phone-link {
    font-size: .72rem;
  }

  body.sf-e-page .sf-e-phone-link span {
    font-size: .94rem;
  }

  body.sf-e-page .sf-e-phone-hours {
    display: none;
  }

  body.sf-e-page .sf-e-nav {
    width: auto !important;
    gap: 7px !important;
    margin-left: auto !important;
  }

  body.sf-e-page .sf-e-nav-sub {
    display: none !important;
  }

  body.sf-e-page .sf-e-nav-cta,
  body.sf-e-page .sf-e-nav-cta:active {
    width: 112px !important;
    min-width: 112px !important;
    padding: 10px 8px !important;
    font-size: .72rem !important;
    white-space: nowrap !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sf-e-page .sf-e-nav a,
  body.sf-e-page .sf-e-phone-link,
  body.sf-e-page .sf-e-phone-link span {
    transition: none !important;
  }
}
