/* ============================================================
   Danfield International School — Global Site Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=DM+Sans:wght@400;500;600&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css');

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: #1a1a1a;
  line-height: 1.7;
  background: #fff;
  padding-top: 104px; /* topbar 38px + header 66px */
}

h1, h2, h3, h4 { font-family: 'Merriweather', serif; line-height: 1.3; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---------- TOKENS ---------- */
:root {
  --navy:       #1a3a6b;
  --navy-dark:  #0d2145;
  --navy-mid:   #14306080;
  --gold:       #C3B480;/*#f5c518;*/
  --gold-hover: #e6b800;
  --white:      #ffffff;
  --gray-bg:    #f4f6f9;
  --gray-text:  #5a6272;
  --border:     #dce2ee;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --shadow-sm:  0 2px 8px rgba(26,58,107,0.08);
  --shadow-md:  0 6px 24px rgba(26,58,107,0.14);
  --header-h:   66px;
  --topbar-h:   38px;
  --max-w:      1140px;
  --transition: 0.22s ease;
}

/* ---------- SHARED UTILITIES ---------- */
.dis-container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.dis-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.dis-btn--gold    { background: var(--gold); color: var(--navy-dark); border-color: var(--gold); }
.dis-btn--gold:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.dis-btn--navy    { background: var(--navy); color: #fff; border-color: var(--navy); }
.dis-btn--navy:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.dis-btn--outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.dis-btn--outline:hover { background: rgba(255,255,255,0.1); }

/* ---------- SKIP LINK ---------- */
.dis-skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--gold);
  color: var(--navy-dark);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
}
.dis-skip-link:focus { left: 8px; }

/* ============================================================
   LOGO (shared between header & footer)
   ============================================================ */
.dis-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.dis-logo__img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.2);
}
.dis-logo__fallback {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--gold);
}
.dis-logo__fallback--sm { width: 40px; height: 40px; font-size: 12px; }
.dis-logo__text { display: flex; flex-direction: column; gap: 1px; }
.dis-logo__name {
  font-family: 'Merriweather', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.2;
}
.dis-logo__tagline {
  font-size: 10px;
  color: var(--gray-text);
  letter-spacing: 0.05em;
  font-family: 'DM Sans', sans-serif;
}
.dis-logo__tagline--light { color: rgba(255,255,255,0.55); }

/* ============================================================
   TOP BAR
   ============================================================ */
.dis-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navy-dark);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
}
.dis-topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dis-topbar__left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.dis-topbar__left a,
.dis-topbar__right > a {
  color: rgba(255,255,255,0.7);
  font-size: 12.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--transition);
}
.dis-topbar__left a:hover,
.dis-topbar__right > a:hover { color: var(--gold); }
.dis-topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dis-topbar__right > a i { font-size: 16px; }
.dis-topbar__cta {
  background: var(--gold) !important;
  color: var(--navy-dark) !important;
  padding: 4px 12px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 11.5px;
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
}
.dis-topbar__cta:hover { background: var(--gold-hover) !important; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.dis-header {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  z-index: 999;
  background: #fff;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition);
}
.dis-header.is-scrolled {
  box-shadow: var(--shadow-md);
}
.dis-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

/* Ensure logo name is navy in header context */
.dis-header .dis-logo__name { color: var(--navy-dark); }
.dis-header .dis-logo__fallback { background: var(--navy); color: var(--gold); }

/* ---------- DESKTOP NAV MENU ---------- */
.dis-nav { margin-left: auto; }

.dis-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Top-level items */
.dis-nav__list > li {
  position: relative;
}
.dis-nav__list > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: #2a2a2a;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.dis-nav__list > li > a:hover,
.dis-nav__list > li.current-menu-item > a,
.dis-nav__list > li.current-menu-ancestor > a {
  color: var(--navy);
  background: rgba(26,58,107,0.06);
}
.dis-nav__list > li.current-menu-item > a {
  font-weight: 600;
}

/* Dropdown caret — added by walker */
.dis-nav__list > li.menu-item-has-children > a::after {
  content: '\ea61'; /* ti-chevron-down */
  font-family: 'tabler-icons';
  font-size: 14px;
  transition: transform var(--transition);
  line-height: 1;
}
.dis-nav__list > li.menu-item-has-children:hover > a::after {
  transform: rotate(180deg);
}

/* Dropdown panel */
.dis-nav__list > li > ul {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 200;
}
.dis-nav__list > li:hover > ul,
.dis-nav__list > li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dis-nav__list > li > ul > li > a {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--gray-text);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.dis-nav__list > li > ul > li > a:hover {
  background: var(--gray-bg);
  color: var(--navy);
}
.dis-nav__list > li > ul > li.current-menu-item > a {
  color: var(--navy);
  font-weight: 600;
}

/* Apply button in header */
.dis-header__apply { margin-left: 8px; font-size: 13px; padding: 8px 18px; }

/* Hamburger — hidden on desktop */
.dis-hamburger { display: none; }

/* ============================================================
   MOBILE MENU DRAWER
   ============================================================ */
.dis-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 88vw);
  background: #fff;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}
.dis-mobile-menu.is-open {
  transform: translateX(0);
}
.dis-mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--navy-dark);
}
.dis-mobile-menu__header .dis-logo__name { color: #fff; }
.dis-mobile-menu__header .dis-logo__fallback { background: #fff; color: var(--navy); }
.dis-mobile-menu__close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background var(--transition);
}
.dis-mobile-menu__close:hover { background: rgba(255,255,255,0.2); }

/* Mobile nav list */
.dis-mobile-nav { flex: 1; padding: 12px 0; }
.dis-mobile-nav__list { list-style: none; padding: 0; margin: 0; }
.dis-mobile-nav__list > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.dis-mobile-nav__list > li > a:hover,
.dis-mobile-nav__list > li.current-menu-item > a {
  background: var(--gray-bg);
  color: var(--navy);
}
/* Sub-items on mobile */
.dis-mobile-nav__list ul {
  list-style: none;
  background: var(--gray-bg);
  padding: 0;
}
.dis-mobile-nav__list ul li a {
  display: block;
  padding: 11px 32px;
  font-size: 14px;
  color: var(--gray-text);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.dis-mobile-nav__list ul li a:hover { color: var(--navy); }

.dis-mobile-menu__footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dis-mobile-menu__contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dis-mobile-menu__contact a {
  font-size: 13px;
  color: var(--gray-text);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}
.dis-mobile-menu__contact a:hover { color: var(--navy); }

/* Hamburger button */
.dis-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.dis-hamburger__line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s;
}
.dis-hamburger.is-active .dis-hamburger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.dis-hamburger.is-active .dis-hamburger__line:nth-child(2) { opacity: 0; }
.dis-hamburger.is-active .dis-hamburger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Backdrop overlay */
.dis-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,33,69,0.55);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.dis-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   FOOTER
   ============================================================ */
.dis-footer {
  background: #0c1e3d;
  color: rgba(255,255,255,0.65);
}

/* Footer brand logo overrides */
.dis-footer .dis-logo__name { color: #fff; }
.dis-footer .dis-logo__fallback { background: rgba(255,255,255,0.08); color: var(--gold); border-color: rgba(255,255,255,0.2); }

.dis-footer__main { padding: 60px 0 40px; }

.dis-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 40px;
}

/* Brand column */
.dis-footer__logo { margin-bottom: 16px; }
.dis-footer__about {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  margin-bottom: 20px;
  max-width: 260px;
}

/* Social icons */
.dis-footer__social {
  display: flex;
  gap: 10px;
}
.dis-footer__social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.dis-footer__social a:hover {
  background: var(--gold);
  color: var(--navy-dark);
  border-color: var(--gold);
}

/* Footer headings */
.dis-footer__heading {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Footer nav links */
.dis-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dis-footer__links li a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color var(--transition), gap var(--transition);
}
.dis-footer__links li a i { font-size: 13px; color: var(--gold); }
.dis-footer__links li a:hover { color: #fff; gap: 10px; }
.dis-footer__links li:last-child a { border-bottom: none; }

/* Contact list */
.dis-footer__contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dis-footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}
.dis-footer__contact li i {
  font-size: 16px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 2px;
}
.dis-footer__contact li a {
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.dis-footer__contact li a:hover { color: var(--gold); }

/* Footer bottom bar */
.dis-footer__bottom {
  background: rgba(0,0,0,0.25);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 16px 0;
}
.dis-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.dis-footer__copy {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}
.dis-footer__copy a { color: rgba(255,255,255,0.5); transition: color var(--transition); }
.dis-footer__copy a:hover { color: var(--gold); }

/* Legal nav */
.dis-footer__legal-list {
  display: flex;
  gap: 16px;
  list-style: none;
}
.dis-footer__legal-list a {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  transition: color var(--transition);
}
.dis-footer__legal-list a:hover { color: var(--gold); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.dis-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  border: 2px solid var(--gold);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background var(--transition);
  box-shadow: var(--shadow-sm);
}
.dis-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dis-back-to-top:hover {
  background: var(--gold);
  color: var(--navy-dark);
}

/* ============================================================
   INNER PAGE — HERO BANNER
   (used on About, Departments, Facilities, etc.)
   ============================================================ */
.dis-page-banner {
  background: var(--navy);
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}
.dis-page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 90% 50%, rgba(245,197,24,0.08) 0%, transparent 60%);
}
.dis-page-banner__inner { position: relative; z-index: 1; }
.dis-page-banner__breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
}
.dis-page-banner__breadcrumb a { color: var(--gold); }
.dis-page-banner__breadcrumb a:hover { text-decoration: underline; }
.dis-page-banner h1 {
  font-size: clamp(22px, 3vw, 36px);
  color: #fff;
  font-weight: 700;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .dis-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .dis-header__apply { display: none; }
}

@media (max-width: 860px) {
  /* Show hamburger, hide desktop nav */
  .dis-hamburger { display: flex; }
  .dis-nav { display: none; }

  body { padding-top: 96px; }
  :root { --header-h: 58px; --topbar-h: 38px; }
}

@media (max-width: 640px) {
  .dis-topbar__left { display: none; }
  .dis-topbar__right { gap: 10px; }
  .dis-topbar__cta { display: none; }
  .dis-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .dis-footer__about { max-width: 100%; }
  .dis-footer__bottom-inner { flex-direction: column; text-align: center; }
  .dis-back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 16px; }
}
