/* ==========================================================
   school-header.css  — 3-layer school header (reference image)
   Shared by primary & secondary. Colours injected via --sc-*
   variables set in each school's own style.css
   ========================================================== */

/* ── Colour defaults (overridden per school) ── */
:root {
  --sc-color:     #e65100;   /* navbar bg & accents */
  --sc-dark:      #bf360c;   /* darker shade */
  --sc-light:     #fff3e0;   /* light tint */
  --sc-text:      #ffffff;   /* text on colored bg */
  --sc-topbar-bg: #1a1f36;   /* very dark topbar */
  --sc-mid-bg:    #ffffff;   /* white info bar */
}

/* ======================================================
   LAYER 1 — DARK TOPBAR
   Opening Hours left | Login, Register, Help, Support right
   ====================================================== */
.sc-topbar {
  background: var(--sc-topbar-bg);
  height: 36px;
  display: flex;
  align-items: center;
  z-index: 1200;
  position: relative;
}
.sc-topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Opening hours pill */
.sc-topbar-hours {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.72);
}
.sc-topbar-hours i {
  color: var(--sc-color);
  font-size: 0.82rem;
}

/* Right links — Login, Register, Help, Support */
.sc-topbar-links {
  display: flex;
  align-items: center;
  gap: 0;
}
.sc-topbar-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,0.68);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0 10px;
  height: 36px;
  border-left: 1px solid rgba(255,255,255,0.08);
  transition: all 0.22s ease;
  white-space: nowrap;
}
.sc-topbar-links a:first-child { border-left: none; }
.sc-topbar-links a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.sc-topbar-links a i { font-size: 0.72rem; }
.sc-topbar-links .sc-login-link {
  color: var(--sc-color);
  font-weight: 700;
}
.sc-topbar-links .sc-login-link:hover { color: #fff; background: var(--sc-color); }

/* ======================================================
   LAYER 2 — WHITE INFO BAR
   Logo+Name | Email+Phone | GET STARTED button
   ====================================================== */
.sc-header-mid {
  background: var(--sc-mid-bg);
  border-bottom: 1px solid #e0e6ed;
  z-index: 1100;
  position: relative;
}
.sc-header-mid-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 90px;
}

/* Logo block */
.sc-logo-block {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}
.sc-logo-img {
  height: 64px;
  width: auto;
  max-width: 180px;
  border-radius: 0px !important;
  object-fit: contain;
  border: none !important;
  box-shadow: none !important;
  flex-shrink: 0;
  display: block;
}
.sc-logo-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}
.sc-logo-name {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.15;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
}
.sc-logo-tag {
  display: block;
  font-size: 0.78rem;
  color: var(--sc-color);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
}

/* Contact info pills — center */
.sc-header-contacts {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.sc-contact-pill {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sc-contact-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--sc-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sc-color);
  font-size: 1rem;
  flex-shrink: 0;
}
.sc-contact-pill-text small {
  display: block;
  font-size: 0.7rem;
  color: #9e9e9e;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sc-contact-pill-text strong {
  display: block;
  font-size: 0.88rem;
  color: #1a1a2e;
  font-weight: 700;
}
.sc-contact-pill-text a {
  color: #1a1a2e;
  text-decoration: none;
  transition: color 0.2s;
}
.sc-contact-pill-text a:hover { color: var(--sc-color); }

/* GET STARTED button — right */
.sc-get-started {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sc-color);
  color: #fff;
  font-weight: 500;
  font-size: 0.86rem;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.25s ease;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  position: relative;
}
.sc-get-started::after {
  content: '▶';
  font-size: 0.7rem;
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--sc-dark);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  padding-left: 2px;
}
.sc-get-started:hover {
  background: var(--sc-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.22);
}

/* ======================================================
   LAYER 3 — COLORED NAVBAR
   Full-width colored bar | Nav links | Search box
   ====================================================== */
.sc-navbar {
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0;
  margin: 0;
}
.sc-navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  background: var(--sc-color);
  border-radius: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

/* Nav links — Centered across Primary & Secondary */
.sc-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  margin: 0 auto;
  gap: 0;
}
.sc-nav-link,
.sc-nav-dropdown > .sc-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,0.88);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 0 16px;
  height: 50px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}
.sc-nav-link:hover,
.sc-nav-dropdown:hover > .sc-nav-btn {
  color: #fff;
  background: rgba(0,0,0,0.15);
}
/* Active link — bottom white line indicator (NOT full box fill) */
.sc-nav-active,
.sc-nav-link.sc-nav-active,
.sc-nav-dropdown .sc-nav-btn.sc-nav-active {
  background: transparent !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-bottom: 4px solid #ffffff !important;
  box-shadow: none !important;
}

/* Dropdown */
.sc-nav-dropdown {
  position: relative;
  display: flex;
  align-items: stretch;
}
.sc-nav-btn .fa-chevron-down { font-size: 0.6rem; opacity: 0.75; transition: transform 0.2s; }
.sc-nav-dropdown:hover .fa-chevron-down { transform: rotate(180deg); }

.sc-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 210px;
  border-top: 3px solid var(--sc-color);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.14);
  padding: 6px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 300;
}
.sc-nav-dropdown:hover .sc-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.sc-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  font-size: 0.83rem;
  font-weight: 600;
  color: #1a1a2e;
  transition: all 0.2s;
}
.sc-dropdown-menu a i { color: var(--sc-color); font-size: 0.78rem; width: 14px; }
.sc-dropdown-menu a:hover { background: var(--sc-light); color: var(--sc-color); padding-left: 20px; }

/* Search box — right side of navbar */
.sc-search {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 8px 0;
}
.sc-search-input {
  height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 4px 0 0 4px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  width: 160px;
  background: rgba(255,255,255,0.92);
  color: #1a1a2e;
  outline: none;
  transition: width 0.3s ease;
}
.sc-search-input:focus { width: 200px; background: #fff; }
.sc-search-input::placeholder { color: #9e9e9e; font-size: 0.78rem; }
.sc-search-btn {
  height: 34px;
  width: 38px;
  background: var(--sc-dark);
  border: none;
  border-radius: 0 4px 4px 0;
  color: #fff;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sc-search-btn:hover { background: #1a1a2e; }

/* Mobile hamburger */
.sc-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1300;
}
.sc-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.28s ease;
}
.sc-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sc-hamburger.open span:nth-child(2) { opacity: 0; }
.sc-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Sticky Header Wrapper (Logo Bar + Navbar sticky together) ── */
@media (max-width: 992px) {
  .sc-mobile-sticky-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
  }
  .sc-header-mid {
    position: relative !important;
    top: auto !important;
  }
  .sc-navbar {
    position: relative !important;
    top: auto !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
  }
  body.school-page,
  body.primary-page,
  body.secondary-page {
    padding-top: 116px !important;
  }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .sc-header-contacts { display: none; }
  .sc-header-mid-inner { justify-content: space-between; }
}
@media (max-width: 768px) {
  /* Hide Login / Webmail / Main Site topbar on mobile */
  .sc-topbar { display: none; }

  .sc-hamburger { display: flex; }

  /* Left-sliding drawer menu (75% width) with a clean look */
  .sc-nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 75%;
    max-width: 340px;
    background: #ffffff;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    height: 100vh;
    padding: 44px 16px 30px;
    overflow-y: auto;
    z-index: 1050;
    box-shadow: 4px 0 24px rgba(0,0,0,0.28);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.32s;
  }
  .sc-nav.open { transform: translateX(0); visibility: visible; }
  .sc-nav-link,
  .sc-nav-dropdown > .sc-nav-btn {
    width: 100%;
    height: auto;
    padding: 14px 12px;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-align: center;
    justify-content: center;
    color: #1a1a2e;
    background: transparent;
    border-radius: 0;
    border-bottom: 1px solid #eef1f5;
  }
  .sc-nav-dropdown > .sc-nav-btn { font-weight: 700; }
  .sc-nav-link:hover,
  .sc-nav-dropdown > .sc-nav-btn:hover { color: var(--sc-color); background: var(--sc-light); }
  .sc-nav-link.sc-nav-active,
  .sc-nav-dropdown > .sc-nav-btn.sc-nav-active {
    color: var(--sc-color) !important;
    background: transparent !important;
    border-bottom: 2px solid var(--sc-color) !important;
  }
  .sc-search { display: none; }
  .sc-navbar-inner { justify-content: flex-end; padding-right: 12px; }

  /* White info bar keeps ONLY logo + school name */
  .sc-header-mid-inner { height: 68px; padding: 0 16px; }
  .sc-get-started { display: none; }
  .sc-header-contacts { display: none; }
  .sc-logo-block { gap: 10px; }
  .sc-logo-img { height: 46px; max-width: 150px; }
  .sc-logo-name { font-size: 0.95rem; }
  .sc-logo-tag { font-size: 0.7rem; }

  /* CLASSES mega menu becomes a vertical list inside the drawer */
  .sc-mega-dropdown-wrap { display: flex; flex-direction: column; align-items: stretch; }
  .sc-mega-dropdown-wrap > .sc-nav-btn { width: 100%; }
  .sc-mega-menu {
    position: static;
    width: 100%;
    background: #f7f9fc;
    border-top: none;
    border-left: 3px solid var(--sc-color);
    box-shadow: none;
    margin: 0 0 6px;
    display: none;
  }
  .sc-mega-dropdown-wrap.open .sc-mega-menu { display: block; }
  .sc-mega-menu-grid { grid-template-columns: 1fr; width: 100%; background: transparent; }
  .sc-mega-col { padding: 10px 14px; border-right: none; border-bottom: 1px solid #eef1f5; }
  .sc-mega-title { color: #1a1a2e; font-size: 0.84rem; }
  .sc-mega-links a { color: #45536b; font-size: 0.85rem; }
  .sc-mega-links a i { color: var(--sc-color); }
  .sc-mega-promo { display: none; }
}

/* Lock page scroll while the mobile menu is open */
body.sc-menu-open { overflow: hidden; }

/* Dim overlay behind the mobile drawer menu */
body.sc-menu-open::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1040;
  pointer-events: auto;
}
@media (max-width: 480px) {
  .sc-topbar-links { gap: 0; }
  .sc-topbar-links a { padding: 0 7px; font-size: 0.68rem; }
  .sc-logo-name { font-size: 0.9rem; }
  .sc-logo-img { width: 52px; height: 52px; }
  .sc-get-started { padding: 10px 16px; font-size: 0.78rem; }
  .sc-get-started::after { display: none; }
}

/* ── Rich Mega Menu Dropdown (CLASSES) ── */
.sc-mega-dropdown-wrap {
  position: static !important;
}
.sc-navbar-inner {
  position: relative !important;
}
.sc-mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  border-top: 3px solid var(--sc-color);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 500;
}
.sc-mega-dropdown-wrap:hover .sc-mega-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.sc-mega-menu-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.1fr 1.2fr;
  max-width: 1280px;
  margin: 0 auto;
  background: #ffffff;
  text-align: left;
}
.sc-mega-col {
  padding: 26px 24px;
  border-right: 1px solid #ebf0f5;
}
.sc-mega-col:last-child {
  border-right: none;
}
.sc-mega-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
}
.sc-mega-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sc-mega-links li {
  margin-bottom: 10px;
}
.sc-mega-links a {
  color: #526071;
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  line-height: 1.3;
}
.sc-mega-links a i {
  font-size: 0.78rem;
  color: var(--sc-color);
  width: 14px;
}
.sc-mega-links a:hover {
  color: var(--sc-color);
  padding-left: 5px;
}

/* Mega Promo Card Box */
.sc-mega-promo {
  background: #f8f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sc-mega-promo-box {
  text-align: center;
  padding: 20px 16px;
}
.sc-mega-promo-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--sc-color);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(230,81,0,0.25);
}
.sc-mega-promo-box h5 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 6px;
  font-family: 'Poppins', sans-serif;
}
.sc-mega-promo-box p {
  font-size: 0.8rem;
  color: #607d8b;
  line-height: 1.5;
  margin-bottom: 14px;
}
.sc-mega-promo-btn {
  background: var(--sc-color);
  color: #ffffff !important;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 0 !important;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}
.sc-mega-promo-btn:hover {
  background: var(--sc-dark);
}

@media (max-width: 1024px) {
  .sc-mega-menu-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sc-mega-promo {
    grid-column: span 2;
  }
}
@media (max-width: 768px) {
  .sc-mega-menu {
    position: static;
    box-shadow: none;
    display: none;
  }
}
