/* Header styles */

/* Bootstrap 5 Sticky Header with Hide/Show Animation */
header#masthead.sticky-top {
  top: 0;
  transition: transform 0.3s ease-in-out;
  will-change: transform;
  z-index: 1030; /* Bootstrap's sticky z-index */
  background-color: rgba(
    255,
    240,
    226,
    1
  ); /* Ensure background color for sticky */
}

/* Hide/Show Animation States */
header#masthead.header-hidden {
  transform: translateY(-100%);
}

header#masthead.header-visible {
  transform: translateY(0);
  position: sticky;
}

/* Ensure smooth transitions for all header states */
header#masthead {
  transition: transform 0.3s ease-in-out;
}

/* Top header with logo and navigation */
.top-header {
  border-bottom: none;
  padding: 1rem 0;
  background-color: rgba(255, 240, 226, 1);
}

.top-header .site-logo {
  max-width: 220px;
}

.top-header .site-logo svg,
.top-header .site-logo img {
  height: auto;
  max-width: 100%;
}

/* Main navigation */
.top-header .main-navigation {
  margin-right: 1rem;
  font-family: var(--font-family-secondary); /* Georama font for menu */
}

/* Remove default dropdown arrow from mega menu links */
.top-header .main-navigation .nav-menu .nav-item.has-mega-menu .nav-link::after,
.top-header .main-navigation .nav-menu .nav-item.dropdown .nav-link::after {
  content: none !important;
}

/* Show dropdown menu on hover */
.top-header
  .main-navigation
  .nav-menu
  .nav-item.dropdown:hover
  > .dropdown-menu {
  display: block;
}

/* Show nested dropdown on hover */
.top-header .main-navigation .nav-menu .dropdown-submenu {
  position: relative;
}

.top-header
  .main-navigation
  .nav-menu
  .dropdown-submenu:hover
  > .dropdown-menu {
  display: block;
  left: 100%;
  top: 0;
  margin-top: 0;
}

/* Style for dropdown-toggle in submenu */
.top-header .main-navigation .nav-menu .dropdown-submenu .dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.top-header
  .main-navigation
  .nav-menu
  .dropdown-submenu
  .dropdown-toggle::after {
  display: inline-block;
  margin-left: 0.5em;
  vertical-align: 0.255em;
  content: "";
  border-top: 0.3em solid transparent;
  border-right: 0;
  border-bottom: 0.3em solid transparent;
  border-left: 0.3em solid;
}

/* Fix for nested dropdown positioning */
.top-header .main-navigation .nav-menu .dropdown-menu .dropdown-menu {
  margin-top: -1px;
  border-top-left-radius: 0;
}

/* Style dropdown menu */
.top-header .main-navigation .nav-menu .dropdown-menu {
  margin-top: 0;
  border-radius: 20px !important;
  border: 2px dashed #5a2c86 !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

.top-header .main-navigation .nav-menu .dropdown-item {
  color: var(--primary-color, #411a50);
  font-weight: 600;
  padding: 0.5rem 1rem;
}

.top-header .main-navigation .nav-menu .dropdown-item:hover,
.top-header .main-navigation .nav-menu .dropdown-item:focus {
  color: #ff7f00;
  background-color: rgba(90, 44, 134, 0.05);
}

.top-header .main-navigation .nav-menu {
  display: flex;
  align-items: center; /* Vertically center the nav items */
}

.top-header .main-navigation .nav-menu .nav-item {
  position: relative;
  margin: 0 0.25rem;
}

.top-header .main-navigation .nav-menu .nav-item .nav-link {
  color: var(--primary-color, #411a50); /* Use primary color variable */
  text-align: center;
  font-family: Georama, sans-serif;
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
  line-height: 105%; /* 17.85px */
  letter-spacing: -0.51px;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
  white-space: nowrap; /* Prevent text from breaking to a new line */
}

.top-header .main-navigation .nav-menu .nav-item .nav-link:hover,
.top-header .main-navigation .nav-menu .nav-item .nav-link:focus {
  color: #ff7f00; /* Orange color for hover state */
}

.top-header .main-navigation .nav-menu .nav-item.has-mega-menu .dropdown-arrow,
.top-header .main-navigation .nav-menu .nav-item.dropdown .dropdown-arrow {
  display: inline-block;
  margin-left: 0.25rem;
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%235a2c86' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.3s ease;
}

.top-header
  .main-navigation
  .nav-menu
  .nav-item.has-mega-menu:hover
  .dropdown-arrow,
.top-header
  .main-navigation
  .nav-menu
  .nav-item.dropdown:hover
  .dropdown-arrow {
  transform: rotate(180deg);
}

/* Login button */
.top-header .btn-login {
  color: #5a2c86; /* Purple color from Figma design */
  text-align: center;
  font-family: Georama, sans-serif;
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
  line-height: 105%;
  letter-spacing: -0.51px;
  border: none;
  background: transparent;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  white-space: nowrap; /* Prevent text from breaking to a new line */
}

.top-header .btn-login img {
  margin-right: 0.5rem;
}

.top-header .btn-login:hover,
.top-header .btn-login:focus {
  color: #ff7f00; /* Orange color for hover state */
}

/* Start Free Trial button */
.top-header .btn-trial {
  background-color: #8509b9; /* Brighter purple from Figma design */
  color: white;
  font-family: Georama, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 105%;
  letter-spacing: -0.51px;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  border: none;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap; /* Prevent text from breaking to a new line */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.top-header .btn-trial::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.top-header .btn-trial:hover::before {
  left: 100%;
}

.top-header .btn-trial:hover,
.top-header .btn-trial:focus {
  background-color: #ff7f00; /* Orange color for hover state */
  color: white;
}

.top-header .btn-trial:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 127, 0, 0.4);
}

/* Mobile menu toggle */
.top-header .navbar-toggler {
  border: 1px solid #ddd;
  padding: 0.25rem 0.5rem;
}

.top-header .navbar-toggler .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%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.top-header .navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

/* Mobile navigation menu */
#mobileNavMenu {
  background-color: white;
  border-top: 1px solid #eee;
  font-family: var(--font-family-secondary); /* Georama font for mobile menu */
}

#mobileNavMenu .nav-link {
  color: #5a2c86; /* Purple color from Figma design */
  border-bottom: 1px solid #eee;
  font-weight: 700;
  font-size: 16px;
}

#mobileNavMenu .nav-link:hover,
#mobileNavMenu .nav-link:focus {
  color: #ff7f00; /* Orange color for hover state */
}

#mobileNavMenu .dropdown-toggle-btn {
  background: transparent;
  border: none;
  color: #5a2c86;
  padding: 0.5rem;
}

#mobileNavMenu .dropdown-toggle-btn .mobile-dropdown-indicator {
  font-size: 10px;
  transition: transform 0.3s ease;
}

#mobileNavMenu
  .dropdown-toggle-btn[aria-expanded="true"]
  .mobile-dropdown-indicator {
  transform: rotate(180deg);
}

#mobileNavMenu .btn-login-mobile {
  color: #5a2c86;
  background-color: transparent;
  border: 2px solid #5a2c86;
  border-radius: 2rem;
  padding: 0.5rem 1.5rem;
  font-family: Georama, sans-serif;
  font-weight: 700;
  transition: all 0.3s ease;
}

#mobileNavMenu .btn-login-mobile:hover,
#mobileNavMenu .btn-login-mobile:focus {
  background-color: #5a2c86;
  color: white;
}

/* Responsive styles */
@media (max-width: 991.98px) {
  .top-header .site-logo {
    max-width: 180px;
  }
}

@media (max-width: 767.98px) {
  .top-header .site-logo {
    max-width: 160px;
  }

  .top-header .btn-login span {
    display: none;
  }

  .top-header .btn-trial {
    font-size: 1rem;
    padding: 0.75rem 0.75rem;
  }
}

/* Skip link */
.visually-hidden-focusable:focus {
  z-index: 1050;
}
