.navbar {
  overflow: hidden;
}

.navbar-transparent {
  background-color: transparent !important;
  transition: background-color 0.3s ease-in-out;
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: none;
}

.navbar-transparent.scrolled {
  background-color: rgba(255, 255, 255, 0.98) !important;
  position: fixed;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-transparent .navbar-brand {
  color: #fff !important;
  font-size: 1.5rem;
}

.navbar-transparent.scrolled .navbar-brand {
  color: #000 !important;
}

.navbar-transparent .nav-link {
  color: #fff !important;
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0 10px;
  transition: 0.3s ease-in-out;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 6px rgba(0, 0, 0, 0.4);
}

.navbar-transparent.scrolled .nav-link {
  color: #000 !important;
  text-shadow: none;
}

.navbar-transparent .nav-link:hover {
  color: #bc2823 !important;
  text-shadow: 0 1px 2px rgba(188, 40, 35, 0.6), 0 0 6px rgba(188, 40, 35, 0.4);
}

.site-logo {
  width: clamp(120px, 18vw, 180px);
  height: auto;
}

.logo-wrap {
  display: flex;
  align-items: center;
}

.navbar-transparent .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.navbar-transparent.scrolled .navbar-toggler {
  border-color: rgba(0, 0, 0, 0.5);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-transparent.scrolled .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-item.dropdown {
  position: relative;
}

.hover-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90vw;
  max-width: 95%;
  height: 85vh;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 1100;
  display: flex;
  flex-direction: column;
}

.nav-item.dropdown:hover .hover-card {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.hover-card-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, #bc2823 0%, #1e264a 100%);
  color: #fff;
  font-weight: 600;
  border-radius: 6px 6px 0 0;
}

.hover-card-body {
  padding: 0;
  overflow: hidden;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-radius: 0 0 6px 6px;
}

.program-categories {
  background: #f8f9fa;
  border-right: 2px solid #e9ecef;
  overflow-y: auto;
}

.program-category {
  padding: 8px 15px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  cursor: pointer;
  font-weight: 500;
}

.program-category:hover,
.program-category.active {
  background-color: #F5F6FA;
  color: #bc2823;
  border-left-color: #bc2823;
  padding-left: 20px;
}

.program-category.active {
  background-color: #bc2823;
  color: #fff;
}

.program-items {
  padding: 10px 20px;
  overflow-y: auto;
  grid-column: 2 / 4;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

.program-item {
  padding: 8px 15px;
  background: #f8f9fa;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: none;
}

.program-item.active {
  display: block;
}

.program-item a {
  text-decoration: none;
  color: inherit;
}

.program-item:hover {
  background: #fff;
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.program-item-title {
  font-weight: 500;
  font-size: 0.85rem;
  color: #1e264a;
}

@media (max-width: 992px) {
  .desktop-nav {
    display: none !important;
  }

  .site-logo {
    max-height: 50px;
  }
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1100;
}

.scrolled .mobile-nav-toggle {
  color: #000;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 350px;
  height: 100vh;
  background: #fff;
  z-index: 1200;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  text-align: left;
  /* Ensure default alignment is left */
}

.mobile-drawer.active {
  right: 0;
}

.mobile-drawer-header {
  padding: 20px;
  background: #bc2823;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  text-align: left;
  /* Strict left alignment for body */
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.mobile-nav-item {
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 5px;
}

.mobile-nav-item a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  /* Keeps the text left and arrow right */
  width: 100%;
  text-align: left;
}

/* Level Accordion Styling */
.mobile-level-header {
  background: #F5F6FA;
  margin-top: 10px;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  /* Level Name Left, Plus/Minus Right */
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #bc2823;
  text-align: left;
}

.mobile-program-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: #fff;
  text-align: left;
  /* Forces programs to the left */
}

.mobile-program-list.open {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #eee;
  margin-bottom: 10px;
}

.mobile-program-link {
  display: block !important;
  padding: 12px 15px;
  font-size: 0.8rem;
  color: #555 !important;
  border-bottom: 1px solid #f9f9f9;
  text-decoration: none;
  text-align: left !important;
  /* Forces the specific link text to the left */
}

@media (max-width: 992px) {
  .mobile-nav-toggle {
    display: block;
  }

  .desktop-nav {
    display: none !important;
  }
}

/* GLOBAL OVERRIDES FOR BRAND CONSISTENCY */
.text-danger {
  color: #bc2823 !important;
}

.border-danger {
  border-color: #bc2823 !important;
}

.btn-danger {
  background-color: #bc2823 !important;
  border-color: #bc2823 !important;
}

.btn-danger:hover {
  background-color: #ffffff !important;
  color: #bc2823 !important;
  border-color: #bc2823 !important;
}

.btn-outline-danger {
  color: #bc2823 !important;
  border-color: #bc2823 !important;
}

.btn-outline-danger:hover {
  background-color: #bc2823 !important;
  color: #ffffff !important;
}
