/* ═══════════════════════════════════════════
   NAVBAR — Royal International School
═══════════════════════════════════════════ */

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

body {
  font-family: 'Roboto', sans-serif;
  background: #f5f5f5;
  color: #222;
}

.auto-container {
  max-width: 1200px;
  padding: 0 15px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   MAIN HEADER
═══════════════════════════════════════════ */
.main-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
}

/* ── ROW 1: White brand bar ── */
.header-upper {
  background: #fff;
  padding: 12px 0;
}
.header-upper .auto-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* ── CENTERED PHONE ── */
.header-center-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.header-center-phone:hover .ph-number { color: #d9252d; }
.header-center-phone .ph-icon {
  background: #d9252d;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background .2s;
}
.header-center-phone:hover .ph-icon { background: #b71c1c; }
.header-center-phone .ph-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.header-center-phone .ph-label {
  font-size: .62rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.header-center-phone .ph-number {
  font-size: .98rem;
  font-weight: 700;
  color: #222;
  letter-spacing: .02em;
  transition: color .2s;
}

/* ── LOGO ── */
.logo-outer .logo a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-outer .logo img { height: 75px; width: auto; }
.logo-text-wrap { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text-wrap .logo-brand {
  font-weight: 900;
  font-size: 1.55rem;
  color: #d9252d;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.logo-text-wrap .logo-sub {
  font-weight: 400;
  font-size: .72rem;
  color: #444;
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* ── APPLY NOW button ── */
.top-right .logo.alumni-sec { display: flex; align-items: center; gap: 18px; }
.top-right .logo.alumni-sec a.btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  color: #fff;
  background: linear-gradient(45deg, #ff0000, #b71c1c);
  border: none;
  border-radius: 50px;
  padding: 11px 26px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s ease-in-out, box-shadow .2s;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.55);
}
.top-right .logo.alumni-sec a.btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 28px rgba(183, 28, 28, 0.9);
}
.top-right .logo.alumni-sec a.btn::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.35) 20%, transparent 60%);
  transform: rotate(25deg);
  animation: btnShine 3s infinite linear;
}
@keyframes btnShine {
  from { transform: translateX(-100%) rotate(25deg); }
  to   { transform: translateX(100%)  rotate(25deg); }
}

/* ═══════════════════════════════════════════
   ROW 2: NAV BAR
═══════════════════════════════════════════ */
.header-lower {
  background: transparent;
  position: relative;
  z-index: 99;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.header-lower .auto-container {
  display: flex;
  background: rgba(0,0,0,0.55);
  padding: 0 8px;
  margin: 0px auto;
}
.header-lower.scrolled {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: transparent;
  box-shadow: none;
}
.header-lower.scrolled .auto-container {
  background: #1a1a1a;
  box-shadow: 0 3px 16px rgba(0,0,0,.5);
  margin: 0 auto;
}

.nav-outer { width: 100%; }
.main-menu { width: 100%; }
.main-menu .navbar-collapse {
  display: flex !important;
  justify-content: center;
  width: 100%;
}
.main-menu ul.navigation {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  margin: 0; padding: 0;
  list-style: none;
}
.main-menu ul.navigation > li { position: relative; }

/* ── Nav item wrap (link + toggle button) ── */
.main-menu ul.navigation > li > .nav-item-wrap {
  display: flex;
  align-items: stretch;
}
.main-menu ul.navigation > li > .nav-item-wrap > a {
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: .88rem;
  color: rgba(255,255,255,.92);
  text-decoration: none;
  padding: 15px 14px 15px 18px;
  white-space: nowrap;
  transition: color .2s, background .2s;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* Non-dropdown items get full padding */
.main-menu ul.navigation > li > a {
  display: flex;
  align-items: center;
  font-weight: 500;
  font-size: .88rem;
  color: rgba(255,255,255,.92);
  text-decoration: none;
  padding: 15px 18px;
  white-space: nowrap;
  transition: color .2s, background .2s;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.main-menu ul.navigation > li > a:hover,
.main-menu ul.navigation > li.current-menu-item > a {
  color: #fff;
  background: rgba(217,37,45,.25);
}
.main-menu ul.navigation > li.current-menu-item > a { font-weight: 700; }

.main-menu ul.navigation > li > .nav-item-wrap > a:hover,
.main-menu ul.navigation > li.current-menu-item > .nav-item-wrap > a {
  color: #fff;
  background: rgba(217,37,45,.25);
}
.main-menu ul.navigation > li.current-menu-item > .nav-item-wrap > a { font-weight: 700; }

/* ── Dropdown toggle button ── */
.drop-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: transparent;
  border: none;
  border-left: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-size: .8rem;
  transition: background .2s, color .2s;
  min-width: 36px;
}
.drop-toggle:hover { background: rgba(217,37,45,.35); color: #fff; }
.drop-toggle .arrow { display: inline-block; transition: transform .25s; }
.main-menu ul.navigation > li.drop-open > .nav-item-wrap .drop-toggle .arrow,
.main-menu ul.navigation > li:hover > .nav-item-wrap .drop-toggle .arrow {
  transform: rotate(180deg);
}

/* ═══════════════════════════════════════════
   MEGA DROPDOWN
═══════════════════════════════════════════ */
.mega-drop {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: #fff;
  min-width: 520px;
  border-top: 3px solid #d9252d;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  z-index: 200;
  flex-direction: row;
}
.main-menu ul.navigation > li:hover .mega-drop,
.main-menu ul.navigation > li.drop-open .mega-drop { display: flex; }

/* Links panel — left */
.drop-links {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  order: 1;
}
.drop-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: .86rem;
  font-weight: 400;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  transition: background .15s, color .15s, padding-left .15s;
}
.drop-links a:last-child { border-bottom: none; }
.drop-links a:hover { background: #fef5f5; color: #d9252d; padding-left: 26px; }
.drop-links a i { font-size: 1rem; color: #d9252d; width: 18px; text-align: center; }

/* Image panel — right */
.drop-image {
  width: 180px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0 0 6px 0;
  position: relative;
  order: 2;
}
.drop-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.drop-image-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 16px 14px;
}
.drop-image-overlay .img-label {
  color: #fff; font-weight: 700; font-size: .9rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.drop-image-overlay .img-sub {
  color: rgba(255,255,255,.78); font-size: .72rem;
  margin-top: 4px; letter-spacing: .06em; text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   MOBILE TOGGLER
═══════════════════════════════════════════ */
.mobile-nav-toggler {
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  background: #d9252d;
}
.hamburger-icon { display: flex; flex-direction: column; gap: 5px; }
.hamburger-icon span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; }

/* ═══════════════════════════════════════════
   MOBILE BACKDROP
═══════════════════════════════════════════ */
.menu-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  
}
.menu-backdrop.open { display: block; }

/* ═══════════════════════════════════════════
   MOBILE MENU DRAWER
═══════════════════════════════════════════ */
.mobile-menu {
  position: fixed;
  top: 0; left: -105%;
  width: 300px; max-width: 88vw;
  height: 100vh;
  background: #fff;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: left .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 20px rgba(0,0,0,.25);
}
.mobile-menu.open { left: 0; }

.mobile-menu .nav-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 2px solid #f0f0f0;
  position: sticky; top: 0; z-index: 10;
  background: #fff;
}
.mobile-menu .nav-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.mobile-menu .nav-logo img {
  height: 52px;
  width: auto;
  border-radius: 0;
  border: none;
  object-fit: contain;
}
.mobile-menu .nav-logo .mob-logo-text .mob-brand {
  display: block;
  font-weight: 900;
  font-size: 1rem;
  color: #d9252d;
}
.mobile-menu .nav-logo .mob-logo-text .mob-sub {
  display: block;
  font-size: .64rem;
  color: #444;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.close-btn {
  background: #f0f0f0; border: none;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1rem; color: #333;
  transition: background .2s; flex-shrink: 0;
}
.close-btn:hover { background: #d9252d; color: #fff; }

.menu-outer { flex: 1; display: flex; flex-direction: column; }
.menu-outer > ul { list-style: none; padding: 0; margin: 0; flex: 1; }
.menu-outer > ul > li { border-bottom: 1px solid #f0f0f0; }

/* Mobile row: link + arrow separately clickable */
.menu-outer > ul > li > .mob-row {
  display: flex;
  align-items: stretch;
}
.menu-outer > ul > li > .mob-row > a {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 14px 20px;
  font-weight: 600;
  font-size: .92rem;
  color: #222;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.menu-outer > ul > li > .mob-row > a:hover,
.menu-outer > ul > li.current-menu-item > .mob-row > a { color: #d9252d; background: #fef5f5; }
.menu-outer > ul > li.current-menu-item > .mob-row > a { font-weight: 700; }

/* Mobile arrow toggle */
.mob-drop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  background: transparent;
  border: none;
  border-left: 1px solid #f0f0f0;
  color: #888;
  cursor: pointer;
  font-size: .8rem;
  transition: background .15s, color .15s;
}
.mob-drop-btn:hover { background: #fef5f5; color: #d9252d; }
.mob-drop-btn .mob-arrow { display: inline-block; transition: transform .25s; }
.menu-outer > ul > li.mob-open .mob-drop-btn .mob-arrow { transform: rotate(180deg); }
.menu-outer > ul > li.mob-open .mob-drop-btn { color: #d9252d; }

/* Single-link items */
.menu-outer > ul > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  font-weight: 600;
  font-size: .92rem;
  color: #222;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.menu-outer > ul > li > a:hover { color: #d9252d; background: #fef5f5; }

/* Mobile submenu */
.menu-outer .sub-menu {
  display: none;
  flex-direction: column;
  background: #fafafa;
  border-left: 3px solid #d9252d;
  margin-left: 20px;
  list-style: none;
  padding: 0;
}
.menu-outer > ul > li.mob-open .sub-menu { display: flex; }
.menu-outer .sub-menu li a {
  display: block;
  padding: 11px 16px;
  font-size: .86rem;
  font-weight: 400;
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid #efefef;
  transition: color .15s, padding-left .15s;
}
.menu-outer .sub-menu li a:hover { color: #d9252d; padding-left: 22px; }

/* ── Mobile Apply Now button ── */
.mob-contact-btn {
  position: relative;
  overflow: hidden;
  display: block;
  margin: 16px;
  color: #fff !important;
  background: linear-gradient(45deg, #ff0000, #b71c1c);
  border: none;
  border-radius: 50px;
  padding: 13px;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  transition: transform .2s ease-in-out, box-shadow .2s;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.55);
}
.mob-contact-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 28px rgba(183, 28, 28, 0.9);
}
.mob-contact-btn::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.35) 20%, transparent 60%);
  transform: rotate(25deg);
  animation: btnShine 3s infinite linear;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 991px) {
  .header-lower { display: none; }
  .main-menu .navbar-collapse { display: none !important; }
  .header-upper { padding: 10px 0; }
  .logo-outer .logo img { height: 44px; }
  .logo-text-wrap .logo-brand { font-size: 1.15rem; }
  .top-right .logo.alumni-sec a.btn { display: none; }
  .header-center-phone { display: none; }
  .mobile-nav-toggler {
    display: flex;
    position: absolute;
    top: 0; right: 0;
    height: 100%;
    padding: 0 20px;
  }
}
@media (max-width: 480px) {
  .logo-text-wrap .logo-brand { font-size: 1rem; }
  .logo-text-wrap .logo-sub { font-size: .6rem; }
}