.nav-item.is-active {
  background-color: var(--color-primary);
  color: #fff;
}

.nav-item.is-active .nav-text {
  display: inline-block;
}

.nav-item.is-active .icon-container,
.nav-item.is-active svg {
  color: #fff;
  stroke: currentColor;
}

.nav-item.is-active:hover {
  background-color: var(--color-primary);
  color: #fff;
}

header {
  z-index: 60;
}

.header-scrolled {
  background: rgba(20, 28, 44, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(8, 12, 24, 0.28);
}

.header-scrolled .pseudo-border {
  opacity: 0.35;
}

.header-scrolled .logo img {
  filter: brightness(0) invert(1);
}

.header-scrolled .nav-link {
  color: rgba(235, 240, 255, 0.9);
}

.header-scrolled .nav-link:hover {
  color: #fff;
}

.header-scrolled .lang-switcher {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.header-scrolled .lang-option {
  color: rgba(235, 240, 255, 0.9);
}

.header-scrolled .lang-option:hover {
  background-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
}

.lang-option {
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: #111827;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-option:hover {
  background-color: rgba(17, 24, 39, 0.12);
}

.lang-option.is-active {
  background-color: var(--color-primary);
  color: #fff;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 100;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: currentColor;
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
}

/* Mobile Fixes */
@media (max-width: 768px) {

  /* Fix hero section text visibility */
  .rating {
    color: #1f2937 !important;
  }

  .trusted-text {
    color: #4b5563 !important;
  }

  /* Show logo on mobile */
  .logo {
    display: block !important;
    max-width: 120px !important;
  }

  .logo img {
    display: block !important;
    width: 100% !important;
  }

  /* Fix header layout and z-index */
  header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
  }

  /* Default light background for main pages */
  .root-container:not(:has(.text-white)) header {
    background: rgba(255, 255, 255, 0.98) !important;
  }

  /* Dark background for legal pages */
  .root-container:has(.text-white) header,
  .text-white header {
    background: rgba(20, 28, 44, 0.95) !important;
  }

  /* Make logo and burger WHITE only when scrolled (dark bg) */
  header.header-scrolled .logo img {
    filter: brightness(0) invert(1) !important;
  }

  header.header-scrolled #mobileMenuBtn span,
  header.header-scrolled .mobile-menu-toggle span {
    background-color: #fff !important;
  }

  header.header-scrolled #mobileMenuBtn,
  header.header-scrolled .mobile-menu-toggle {
    color: #fff !important;
  }

  /* Make logo and burger WHITE on legal pages (which have dark background) */
  .root-container:has(.legal-section) header .logo img,
  body:has(.legal-section) .logo img {
    filter: brightness(0) invert(1) !important;
  }

  .root-container:has(.legal-section) header #mobileMenuBtn span,
  body:has(.legal-section) #mobileMenuBtn span {
    background-color: #fff !important;
  }

  .root-container:has(.legal-section) header #mobileMenuBtn,
  body:has(.legal-section) #mobileMenuBtn {
    color: #fff !important;
  }

  /* Ensure burger lines are DARK on light background (default) */
  #mobileMenuBtn span,
  .mobile-menu-toggle span {
    background-color: #1f2937 !important;
  }

  /* Override: burger lines WHITE when scrolled */
  header.header-scrolled #mobileMenuBtn span {
    background-color: #fff !important;
  }

  /* Add background only when scrolled */
  header.header-scrolled {
    background: rgba(20, 28, 44, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  }

  /* Hide the pseudo-border on mobile */
  header .pseudo-border,
  header .relative>.pseudo-border,
  header div[class*="pseudo-border"],
  .pseudo-border.absolute.bottom-0 {
    display: none !important;
    opacity: 0 !important;
    height: 0 !important;
    visibility: hidden !important;
  }

  /* Remove any bottom borders from header elements */
  header,
  header>*,
  header .relative {
    border-bottom: none !important;
  }

  /* Stronger background when scrolled */
  header.header-scrolled {
    background: rgba(20, 28, 44, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  }

  header .container {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Add padding to body to account for fixed header */
  body {
    padding-top: 50px !important;
  }

  /* Compact navigation */
  header nav ul {
    gap: 0.25rem;
  }

  /* Reduce header height */
  header .container {
    padding: 0.5rem 1rem !important;
  }

  /* Hide nav text, keep only button */
  header nav li:not(:last-child) {
    display: none !important;
  }

  /* Adjust CTA button */
  header .button-styles {
    font-size: 0.75rem;
    padding: 0.625rem 1rem;
    white-space: nowrap;
  }

  /* Fix headline sizing */
  .headline {
    font-size: 2.25rem !important;
    line-height: 1.15;
  }

  /* Hero section layout */
  #hero {
    min-height: auto !important;
    padding-top: 2rem !important;
    position: relative !important;
    top: auto !important;
  }

  /* Remove extra spacing in hero content */
  #hero .grid.col-span-8 {
    margin-top: 0 !important;
    padding-top: 1.5rem !important;
  }

  /* Reduce gap in hero grid */
  #hero .grid.gap-10 {
    gap: 1.25rem !important;
  }

  /* Compact headline area */
  #hero .grid.gap-8 {
    gap: 1.25rem !important;
  }

  /* Fix negative margin that causes overlap */
  #hero+div[aria-hidden="true"],
  .mb-\[-100svh\] {
    margin-bottom: 0 !important;
  }

  /* Remove the spacer div on mobile */
  #hero~div[aria-hidden="true"] {
    display: none !important;
  }

  /* Fix parent container with negative margin */
  main>div.mb-\[-100svh\] {
    margin-bottom: 0 !important;
  }

  #hero>div {
    width: 100% !important;
    max-width: 100% !important;
  }

  #hero .grid {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Show hero portrait on mobile - override hidden class */
  #hero>div>div>div.hidden {
    display: block !important;
    position: relative !important;
    right: auto !important;
    left: auto !important;
    margin: 0.5rem auto 0 !important;
    text-align: center !important;
    width: 100% !important;
  }

  #hero-portrait {
    max-height: 50vh !important;
    height: auto !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    display: block !important;
  }

  /* Show "3 years of experience" on mobile */
  .xp.hidden {
    display: grid !important;
    position: absolute !important;
    bottom: 10% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    top: auto !important;
    z-index: 20 !important;
    text-align: center !important;
  }

  .xp.hidden span {
    font-size: 8rem !important;
    line-height: 0.9 !important;
    -webkit-text-stroke: 1.5px white !important;
    color: transparent !important;
  }

  .xp.hidden p {
    font-size: 1rem !important;
    letter-spacing: 0.2em !important;
    text-transform: lowercase !important;
  }

  /* Hide the duplicate shadow version on mobile */
  .xp.hidden[aria-hidden="true"] {
    display: none !important;
  }

  /* Improve spacing in hero */
  #hero .grid.gap-10 {
    gap: 1.25rem !important;
  }

  /* Compact headline area */
  #hero .grid.gap-8 {
    gap: 1.25rem !important;
  }

  /* Reduce top margin for hero content */
  #hero .mt-20,
  #hero .md\:mt-10,
  #hero .mdd\:mt-20,
  #hero .lg\:mt-32,
  #hero .\32xl\:mt-10 {
    margin-top: 0.5rem !important;
  }

  /* Prevent horizontal scroll */
  body,
  html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Fix container widths */
  .root-container {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Ensure images don't overflow */
  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Fix hero background images */
  #hero picture img {
    max-width: none !important;
    opacity: 0.3;
  }

  /* Fix awards section z-index */
  section {
    position: relative;
    z-index: 1;
  }

  /* Add top margin to sections after hero to prevent overlap */
  #benefits,
  section:not(#hero) {
    margin-top: 0 !important;
    padding-top: 3rem !important;
  }

  /* Ensure dark sections don't overlap header */
  .dark {
    position: relative;
    z-index: 1;
  }

  /* Fix laurel wreaths overlapping text on mobile */
  .flex.items-center.justify-center>.h-20 {
    height: 60px !important;
  }

  .flex.items-center.justify-center>.h-20 img {
    height: 60px !important;
    width: auto !important;
  }

  /* Add more spacing between wreaths and description text */
  .flex.flex-col.gap-6 {
    gap: 2rem !important;
  }

  /* Adjust Creator growth systems title */
  .text-\[32px\].max-sm\:text-\[24px\] {
    font-size: 20px !important;
    line-height: 1.3 !important;
  }
}

/* Global FAQ fix - close all by default */
/* Removed - will be handled by removing open attribute from HTML */

/* Comparison section styling */
/* Make Musa column stand out - ONLY in comparison section */
#comparison .grid.md\:grid-cols-2>div:first-child,
.glass-card .grid.md\:grid-cols-2>div:first-child {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%) !important;
  border: 2px solid var(--color-primary) !important;
  box-shadow: 0 10px 40px rgba(79, 70, 229, 0.15) !important;
  transform: scale(1.02);
  position: relative;
  z-index: 2;
}

/* Add subtle glow effect - ONLY in comparison section */
#comparison .grid.md\:grid-cols-2>div:first-child::before,
.glass-card .grid.md\:grid-cols-2>div:first-child::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--color-primary), #818cf8);
  opacity: 0.1;
  z-index: -1;
  filter: blur(20px);
}

/* Make Other Agencies more muted - ONLY in comparison section */
#comparison .grid.md\:grid-cols-2>div:last-child,
.glass-card .grid.md\:grid-cols-2>div:last-child {
  background: #f5f5f5 !important;
  border: 1px solid #e0e0e0 !important;
  opacity: 0.85;
}

#comparison .grid.md\:grid-cols-2>div:last-child h4,
.glass-card .grid.md\:grid-cols-2>div:last-child h4 {
  color: #6b7280 !important;
}

#comparison .grid.md\:grid-cols-2>div:last-child ul li,
.glass-card .grid.md\:grid-cols-2>div:last-child ul li {
  color: #9ca3af !important;
}

/* Make Musa title more prominent - ONLY in comparison section */
#comparison .grid.md\:grid-cols-2>div:first-child h4,
.glass-card .grid.md\:grid-cols-2>div:first-child h4 {
  color: var(--color-primary) !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
}

/* Enhance checkmarks - ONLY in comparison section */
#comparison .grid.md\:grid-cols-2>div:first-child ul li span,
.glass-card .grid.md\:grid-cols-2>div:first-child ul li span {
  font-size: 1.25rem !important;
  font-weight: bold !important;
}

@media (max-width: 480px) {

  /* Extra small screens */
  .headline {
    font-size: 1.875rem !important;
  }

  .logo {
    max-width: 100px !important;
  }

  header .button-styles {
    font-size: 0.7rem;
    padding: 0.5rem 0.875rem;
  }

  /* Reduce padding on very small screens */
  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Adjust hero text for readability */
  #headline-span {
    font-size: 0.625rem !important;
    letter-spacing: 0.2em !important;
  }

  /* Smaller hero portrait */
  #hero-portrait {
    max-height: 50vh !important;
  }
}

/* Mobile Menu Styles */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 70;
  position: relative;
  margin-left: auto;
  color: #1a1a1a;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a1a1a;
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* On pages with dark header (legal pages), button should be white */
.bg-dark .mobile-menu-btn,
header[class*="bg-dark"] .mobile-menu-btn {
  color: #fff;
}

.bg-dark .mobile-menu-btn span,
header[class*="bg-dark"] .mobile-menu-btn span {
  background: #fff;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 28, 44, 0.95);
  backdrop-filter: blur(10px);
  z-index: 65;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu-content {
  padding: 80px 20px 20px;
  max-width: 400px;
  margin: 0 auto;
}

.mobile-menu-nav {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.mobile-menu-nav li {
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-nav a {
  display: block;
  padding: 16px 0;
  color: rgba(235, 240, 255, 0.9);
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-menu-nav a:hover {
  color: var(--color-primary);
}

.mobile-lang-switcher {
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-lang-switcher a {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: rgba(235, 240, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mobile-lang-switcher a:hover,
.mobile-lang-switcher a.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

@media (max-width: 640px) {
  .mobile-menu-btn {
    display: block !important;
  }

  nav>ul>li.overflow-hidden {
    display: none !important;
  }

  nav>ul>li.hidden.sm\\:block {
    display: none !important;
  }
}


/* Fix white cards on legal pages - Global Override */
#legal-steps .step-card,
#legal-steps .step-card-holder .step-card {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Specific override for any stubborn last-child issues */
#legal-steps .step-card-holder:last-child .step-card,
#legal-steps .step-card:last-child {
  background: transparent !important;
  background-color: transparent !important;
}

/* Fix glass-card on legal pages */
.root-container:has(.text-white) .glass-card {
  background: rgba(30, 35, 50, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}