/* Header Background Color */
.navbar.bg-light {
  background-color: #e6edfe !important;
}

/* Sticky Footer */
.min-vh-100 {
  min-height: 100vh;
}

html,
body {
  height: 100%;
}

body.d-flex {
  display: flex !important;
  flex-direction: column !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

/* Mega Menu Styles */
.mega-dropdown .dropdown-menu {
  position: static;
  float: none;
  width: auto;
  margin-top: 0;
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  padding: 1.5rem 0;
  min-width: 600px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
}

.mega-dropdown .dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  max-height: 500px;
  padding: 1.5rem 0;
}

.mega-menu {
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100vw;
  max-width: 800px;
  margin-top: 0.5rem;
  position: absolute !important;
}

.mega-menu .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.mega-menu .dropdown-header {
  color: var(--bs-primary);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.5rem 0 1rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--bs-primary);
  text-transform: none;
  opacity: 0;
  transform: translateY(-5px);
  animation: slideInDown 0.3s ease-out 0.1s forwards;
}

@keyframes slideInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mega-menu .dropdown-item {
  padding: 0.75rem 0;
  color: #495057;
  font-size: 0.95rem;
  line-height: 1.4;
  border: none;
  background: none;
  transition: all 0.2s ease-in-out;
  white-space: normal;
  word-wrap: break-word;
  opacity: 0;
  transform: translateX(-10px);
  animation: slideInLeft 0.3s ease-out forwards;
}

.mega-menu.show .dropdown-item {
  animation-delay: calc(var(--item-index, 0) * 0.05s);
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mega-menu .dropdown-item:hover,
.mega-menu .dropdown-item:focus {
  background-color: rgba(59, 77, 102, 0.1);
  color: var(--bs-primary);
  padding-left: 0.5rem;
  border-left: 3px solid var(--bs-primary);
  transform: translateX(3px);
}

/* Mobile Mega Menu Adjustments */
@media (max-width: 992px) {
  .mega-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    left: 0 !important;
    margin-top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
  }

  .mega-menu .container {
    padding: 0;
  }

  .mega-menu .row {
    margin: 0;
  }

  .mega-menu .col-md-6 {
    padding: 0 1rem;
    margin-bottom: 1rem;
  }

  .mega-menu .dropdown-header {
    font-size: 1rem;
    padding: 1rem 0 0.5rem 0;
  }

  .mega-menu .dropdown-item {
    padding: 0.5rem 0;
    font-size: 0.9rem;
  }
}

/* Accessibility improvements for mega menu */
.mega-dropdown .dropdown-toggle:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.mega-menu .dropdown-item:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
}

/* High contrast mode support for mega menu */
@media (prefers-contrast: more) {
  .mega-menu {
    border: 2px solid currentColor;
  }

  .mega-menu .dropdown-header {
    border-bottom: 2px solid currentColor;
  }

  .mega-menu .dropdown-item:hover,
  .mega-menu .dropdown-item:focus {
    border-left: 4px solid currentColor;
  }
}

/* Reduced motion support for mega menu */
@media (prefers-reduced-motion: reduce) {
  .mega-menu .dropdown-item {
    transition: none;
  }
}

/* Updated styles for search button */
.btn-outline-secondary {
  --bs-btn-color: #6c757d;
  --bs-btn-border-color: #6c757d;
  --bs-btn-hover-bg: #6c757d;
  --bs-btn-hover-border-color: #6c757d;
  --bs-btn-active-bg: #6c757d;
  --bs-btn-active-border-color: #6c757d;
}

/* Backdrop animation */
.mega-dropdown::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.mega-dropdown.show::before {
  opacity: 1;
  visibility: visible;
}

/* Ensure proper z-index for dropdown */
.mega-dropdown .dropdown-menu {
  z-index: 1001;
}


/* Additional styles for content pages */
.breadcrumb {
  background: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: #6c757d;
}

.partner-logo {
  max-height: 40px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.2s ease-in-out;
}

.partner-logo:hover {
  opacity: 1;
}

/* Sidebar navigation enhancements */
.card .btn-link {
  border: none !important;
  box-shadow: none !important;
}

.card .btn-link:focus {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

/* Content cards hover effects */
.card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness for content pages */
@media (max-width: 767.98px) {
  .display-5 {
    font-size: 2rem;
  }

  .card-body {
    padding: 1rem;
  }

  .btn {
    font-size: 0.9rem;
  }
}

