:root {
  --brand: #2C4263;
  --brand-700: #22344d;
  --brand-600: #273b59;
  --text: #1e2a3a;
  --muted: #6b7a90;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --transition: all .25s ease;
}

/* Topbar (slim contact/social row) */
.topbar {
  background: var(--brand-700);
  color: #e8eef9;
  font-size: 13px;
  line-height: 1;
}
.topbar .container { max-width: 1240px; margin: 0 auto; padding: 8px 20px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tb-left { display: inline-flex; align-items: center; gap: 18px; }
.tb-right { display: inline-flex; align-items: center; gap: 12px; }
.tb-link { color: #e8eef9; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; opacity: .95; transition: var(--transition); }
.tb-link:hover { opacity: 1; color: #fff; }
.tb-link i { color: #c9d6ea; }
.tb-icon { color: #e8eef9; opacity: .9; text-decoration: none; display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; transition: var(--transition); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.tb-icon:hover { background: rgba(255,255,255,.12); color: #fff; opacity: 1; transform: translateY(-1px); }

@media (max-width: 768px) {
  .tb-left span { display: none; }
  .tb-link i { margin-right: 0; }
  .topbar .container { padding: 8px 14px; }
}

/* Header shell */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid rgba(44,66,99,.08);
  position: sticky;
  will-change: transform;
  transition: transform .32s ease, box-shadow .25s ease, background-color .25s ease;
  overflow: visible;
}

/* Premium metallic glow sweep */
.site-header {
  position: sticky;
}

.site-header::before {
  content: "";
  position: absolute;
  left: -30%;
  top: 0;
  height: 3px;
  width: 60%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(230, 230, 235, 0.3) 20%,
    rgba(255, 255, 255, 0.85) 45%,
    rgba(230, 230, 235, 0.3) 70%,
    rgba(255,255,255,0) 100%
  );
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.5),
    0 0 18px rgba(180, 200, 240, 0.7),
    0 0 28px rgba(17, 24, 39, 0.9);
  opacity: 0.95;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: headerGlowSweep 3s linear infinite;
}

@keyframes headerGlowSweep {
  0%   { transform: translateX(-20%); opacity: 0.0; }
  10%  { opacity: 1; }
  40%  { transform: translateX(120%); opacity: 1; }
  50%  { opacity: 0.0; }
  60%  { transform: translateX(120%); opacity: 0.0; }
  70%  { opacity: 1; }
  100% { transform: translateX(-20%); opacity: 0.0; }
}

/* Hide on scroll down */
.site-header.hidden {
  transform: translateY(-120%);
}

/* Reveal on scroll up */
.site-header.reveal {
  box-shadow: 0 10px 25px rgba(44,66,99,.12);
}

.site-header .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 57.8px;
  position: relative;
  width: 100%;
}

.logo {
  flex: 0 0 auto;
  margin-right: auto;
}

.logo-img {
  height: 72px; /* Increased by ~25% for better prominence */
  width: auto;
}

/* Toggle buttons */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--brand);
  font-size: 22px;
  padding: 8px;
  cursor: pointer;
}

/* Nav block */
.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  position: relative;
}

.main-menu {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin: 0;
  padding: 0;
  width: auto;
  white-space: nowrap;
}

.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8rem;
  font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.3px;
  border-radius: 6px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-link:hover {
  color: var(--brand);
  background: rgba(44,66,99,.08);
  border-bottom-color: #8b6b32; /* subtle brown-gold accent on hover */
}

/* Header bubble reveal animation */
.site-header { position: sticky; }
.hbubble {
  position: absolute;
  bottom: -6px;
  display: block;
  background: radial-gradient(circle at 30% 30%, rgba(14,123,249,.9), rgba(44,66,99,.85));
  border-radius: 50%;
  opacity: .9;
  filter: blur(.2px);
  animation: hbubble-rise 1.2s ease-out forwards;
  pointer-events: none;
}

@keyframes hbubble-rise {
  0% { transform: translateY(12px) scale(.6); opacity: 0; }
  35% { opacity: .9; }
  100% { transform: translateY(-10px) scale(1); opacity: 0; }
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
  border-radius: 6px;
  padding: 8px 14px;
  box-shadow: 0 4px 12px rgba(44,66,99,.2);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  background: var(--brand-600);
  transform: translateY(-1px);
}

/* Dropdowns */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 260px;
  background: #ffffff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.98);
  transition: var(--transition);
  border: 1px solid rgba(44,66,99,.12);
  max-height: 70vh;
  overflow-y: auto;
  z-index: 1000;
}

.dropdown:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-menu li { list-style: none; }
.dropdown-menu li + li { border-top: 1px solid rgba(44,66,99,.06); }
.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: #1d4f91;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}
.dropdown-menu a:hover {
  background: rgba(44,66,99,.08);
  color: #143a6d;
  padding-left: 20px;
}

/* Icons inside dropdown items */
.dropdown-menu a i {
  margin-right: 10px;
  width: 18px;
  text-align: center;
  color: var(--brand-600);
}

/* Section headers inside dropdowns */
.dropdown-section {
  padding: 8px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  opacity: .85;
}
.dropdown-section span {
  display: inline-block;
}
.dropdown-section + li a { margin-top: 4px; }

/* Nested submenu */
.has-submenu { position: relative; }
.has-submenu > .submenu {
  position: absolute;
  top: -10px;
  left: 100%;
  margin-left: 8px;
  min-width: 240px;
  background: #ffffff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.98);
  transition: var(--transition);
  border: 1px solid rgba(44,66,99,.12);
}
.has-submenu:hover > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.submenu-toggle { display: flex; justify-content: space-between; width: 100%; }

/* Entrance animations (desktop only) */
@media (min-width: 993px) {
  @keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .dropdown:hover > .dropdown-menu li {
    animation: fadeSlideUp .28s ease both;
  }
  /* Staggered delays for nicer cascade */
  .dropdown:hover > .dropdown-menu li:nth-child(1) { animation-delay: .02s; }
  .dropdown:hover > .dropdown-menu li:nth-child(2) { animation-delay: .04s; }
  .dropdown:hover > .dropdown-menu li:nth-child(3) { animation-delay: .06s; }
  .dropdown:hover > .dropdown-menu li:nth-child(4) { animation-delay: .08s; }
  .dropdown:hover > .dropdown-menu li:nth-child(5) { animation-delay: .10s; }
  .dropdown:hover > .dropdown-menu li:nth-child(6) { animation-delay: .12s; }
  .dropdown:hover > .dropdown-menu li:nth-child(7) { animation-delay: .14s; }
  .dropdown:hover > .dropdown-menu li:nth-child(8) { animation-delay: .16s; }
  .dropdown:hover > .dropdown-menu li:nth-child(9) { animation-delay: .18s; }
  .dropdown:hover > .dropdown-menu li:nth-child(10){ animation-delay: .20s; }
  .dropdown:hover > .dropdown-menu li:nth-child(11){ animation-delay: .22s; }
  .dropdown:hover > .dropdown-menu li:nth-child(12){ animation-delay: .24s; }

  /* Apply same effect to nested submenu */
  .has-submenu:hover > .submenu li { animation: fadeSlideUp .26s ease both; }
  .has-submenu:hover > .submenu li:nth-child(1) { animation-delay: .02s; }
  .has-submenu:hover > .submenu li:nth-child(2) { animation-delay: .04s; }
  .has-submenu:hover > .submenu li:nth-child(3) { animation-delay: .06s; }
  .has-submenu:hover > .submenu li:nth-child(4) { animation-delay: .08s; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dropdown-menu, .submenu { transition: none !important; }
  .dropdown:hover > .dropdown-menu li,
  .has-submenu:hover > .submenu li { animation: none !important; }
}

/* Mobile */
@media (max-width: 992px) {
  .nav-toggle { display: inline-flex; }
  .nav-open { order: 3; }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: min(92vw, 360px);
    height: 100vh;
    background: var(--brand);
    color: var(--white);
    padding: 18px;
    box-shadow: -20px 0 60px rgba(0,0,0,.18);
    transition: right .35s ease;
  }
  .nav-links.active { right: 0; }

  .main-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 48px;
  }
  .menu-link { color: var(--white); padding: 12px 14px; }
  .menu-link:hover { background: rgba(255,255,255,.08); color: #fff; }

  .dropdown-menu,
  .has-submenu > .submenu {
    position: static;
    max-height: 0;
    overflow: hidden;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 0 10px;
    opacity: 1; visibility: visible; transform: none;
  }
  .dropdown.active > .dropdown-menu { max-height: 1000px; }
  .has-submenu.active > .submenu { max-height: 800px; }
  .dropdown-menu a { color: rgba(255,255,255,.9); }
  .dropdown-menu a:hover { background: transparent; padding-left: 16px; color: #fff; }
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body.has-site-header {
    padding-top: 100px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: var(--box-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Navbar */
.header .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    position: relative;
}

/* Logo */
.header .logo {
    flex: 0 0 auto;
}

.header .logo-img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

/* Navigation Links */
.header .nav-links {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.header .main-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
}

.header .main-menu > li {
    position: relative;
    margin: 0 12px;
}

.header .main-menu > li > a {
    font-weight: 500;
    color: var(--dark-color);
    position: relative;
    text-decoration: none;
    transition: var(--transition);
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.header .main-menu > li > a i {
    margin-left: 5px;
    font-size: 0.8em;
    transition: var(--transition);
}

/* Dropdown Menu (scoped to site header) */
.site-header .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    max-height: 70vh;
    overflow-y: auto;
}

/* COURSES dropdown as a true grid (desktop only) */
@media (min-width: 993px) {
  /* Full-width container for COURSES only */
  .courses-dropdown { position: static; }

  .dropdown-menu.courses-menu {
    left: 0;
    right: 0;
    width: 100vw;
    max-width: none;
    min-width: 0;
    border-radius: 0 0 0 0;
    box-shadow: var(--shadow);
    max-height: none;
    overflow: visible;
    padding: 20px 40px 24px;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    column-gap: 40px;
    row-gap: 12px;
    background: #ffffff !important;
    border: 1px solid rgba(44,66,99,.12) !important;
    position: fixed;
    margin-left: -20px;
  }

  /* One grid cell per item; headings span all columns */
  .dropdown-menu.courses-menu > li {
    border-top: none !important;
    margin: 0 !important;
  }

  .dropdown-menu.courses-menu > .dropdown-section {
    grid-column: 1 / -1;
    padding-left: 0;
    padding-right: 0;
    margin-top: 8px;
    margin-bottom: 12px;
  }

  .dropdown-menu.courses-menu > .dropdown-section:first-child {
    margin-top: 0;
  }

  .dropdown-menu.courses-menu a {
    display: block;
    padding: 12px 16px !important;
    color: #1d4f91 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: var(--transition) !important;
    border-radius: 6px !important;
    margin: 2px 0 !important;
    line-height: 1.4 !important;
  }

  .dropdown-menu.courses-menu a:hover {
    background: rgba(44,66,99,.08) !important;
    color: #143a6d !important;
    padding-left: 20px !important;
    transform: translateX(2px) !important;
  }
}


.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #1d4f91;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #143a6d;
    padding-left: 25px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Toggle */
.nav-icon {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    z-index: 1002;
}

/* Mobile Styles */
@media (max-width: 1200px) {
    .header .container {
        padding: 0 20px;
    }
    
    .header .main-menu > li {
        margin: 0 8px;
    }
}

@media (max-width: 992px) {
    body.has-site-header {
        padding-top: 80px;
    }
    
    .nav-icon {
        display: block;
    }
    
    .header .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        height: 100vh;
        width: 300px;
        background: var(--primary-color);
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 0 30px;
        transition: right 0.4s ease-in-out;
        z-index: 1001;
        overflow-y: auto;
    }
    
    .header .nav-links.active {
        right: 0;
    }
    
    .header .main-menu {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }
    
    .header .main-menu > li {
        width: 100%;
        margin: 5px 0;
    }
    
    .header .main-menu > li > a {
        color: white;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dropdown-menu {
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0 0 0 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }
    
    .dropdown-menu a {
        color: rgba(255, 255, 255, 0.8);
        padding: 8px 0;
    }
    
    .dropdown-menu a:hover {
        color: white;
        padding-left: 10px;
    }
    
    .dropdown-toggle {
        pointer-events: auto;
    }
    
    .dropdown-toggle::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        margin-left: 5px;
        transition: transform 0.3s ease;
    }
    
    .dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

@media (max-width: 480px) {
    .header .logo-img {
        height: 40px;
    }
    
    .header .container {
        padding: 0 15px;
    }
    
    .header .nav-links {
        width: 100%;
        right: -100%;
    }
    
    .header .nav-links.active {
        right: 0;
    }
}

/* FORCE DROPDOWN STYLES - Override all conflicts */
.dropdown-menu,
.site-header .dropdown-menu,
header .dropdown-menu,
.nav-links .dropdown-menu {
  background: #ffffff !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.dropdown-menu a,
.site-header .dropdown-menu a,
header .dropdown-menu a,
.nav-links .dropdown-menu a {
  color: #1d4f91 !important;
  background: transparent !important;
}

.dropdown-menu a:hover,
.site-header .dropdown-menu a:hover,
header .dropdown-menu a:hover,
.nav-links .dropdown-menu a:hover {
  color: #143a6d !important;
  background: #f8f9fa !important;
}

/* Hero section fix for services page */
.services-hero {
  padding: 180px 0 120px !important;
  min-height: 600px !important;
  display: flex !important;
  align-items: center !important;
}

.hero-content {
  position: relative !important;
  z-index: 2 !important;
}

/* Header positioning styles */
.site-header-fixed {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
}

/* Course menu item styles */
.course-menu-item {
  color: #28A745 !important;
  font-weight: 600 !important;
  font-size: 0.95em !important;
  display: block !important;
  text-align: center !important;
  margin-bottom: 10px !important;
  border-bottom: 1px solid rgba(40, 167, 69, 0.3) !important;
  padding-bottom: 5px !important;
  font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important;
}

/* Modal styles */
.venue-modal {
  display: none !important;
  position: fixed !important;
  z-index: 10000 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(0,0,0,0.7) !important;
  align-items: center !important;
  justify-content: center !important;
}

.venue-modal-content {
  background-color: white !important;
  margin: 20px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  width: 90% !important;
  max-width: 800px !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  position: relative !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
}

.venue-modal-header {
  background: linear-gradient(135deg, #1d4f91, #143a6d) !important;
  color: white !important;
  padding: 2rem !important;
  border-radius: 8px 8px 0 0 !important;
  position: relative !important;
}

.venue-modal-title {
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.5rem !important;
}

.venue-modal-subtitle {
  font-size: 1.1rem !important;
  opacity: 0.9 !important;
}

.venue-modal-close {
  position: absolute !important;
  top: 1.5rem !important;
  right: 1.5rem !important;
  background: rgba(255,255,255,0.2) !important;
  border: none !important;
  color: white !important;
  font-size: 1.5rem !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.venue-modal-body {
  padding: 2rem !important;
}

.venue-modal-footer {
  background: #f8f9fa !important;
  padding: 1.5rem 2rem !important;
  border-radius: 0 0 8px 8px !important;
  display: flex !important;
  justify-content: center !important;
}

.btn-modal-register {
  background: #f7941d !important;
  color: white !important;
  padding: 0.8rem 2rem !important;
  border: none !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}
