/* Global mobile / overflow fixes */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

main {
  overflow-x: clip;
}

/* Navbar inset on small screens */
@media (max-width: 767px) {
  nav .pl-8,
  nav .lg\:pl-12 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  footer .pl-8,
  footer .lg\:pl-12 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Hero split-text: prevent overlap on mobile */
@media (max-width: 767px) {
  .split-text-container {
    display: block !important;
    overflow: visible !important;
    width: 100%;
    text-align: center;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .text-part,
  .text-part.left,
  .text-part.right {
    transform: none !important;
    animation: none !important;
    display: inline !important;
  }

  .hero-section h1,
  .hero-section h2 {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .hero-section {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .payment-rail-svg {
    opacity: 0.5;
  }
}

/* Footer columns on small screens */
@media (max-width: 639px) {
  footer .grid.lg\:grid-cols-6 {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
  }

  footer .col-span-2.sm\:col-span-3.lg\:col-span-2 {
    grid-column: 1 / -1;
  }
}

/* Prevent wide content from breaking layout */
img,
svg,
video {
  max-width: 100%;
  height: auto;
}

.max-w-screen-2xl,
.max-w-screen-xl {
  max-width: 100%;
}

/* Mobile menu: active section + child page */
#mobile-menu [data-nav-mobile-group]:not(.mobile-nav-group--open) .mobile-nav-children {
  display: none;
}

#mobile-menu [data-nav-mobile-group].mobile-nav-group--open > [data-nav-mobile] .material-symbols-outlined {
  transform: rotate(180deg);
}

#mobile-menu [data-nav-mobile-group].mobile-nav-group--open .mobile-nav-children {
  border-left: 2px solid rgba(180, 197, 255, 0.35);
  margin-left: 0.5rem;
  padding-left: 1.25rem;
}

#mobile-menu a.mobile-nav-child--active {
  color: #b4c5ff !important;
  font-weight: 700 !important;
  background: rgba(180, 197, 255, 0.16) !important;
  border-radius: 0.5rem;
  padding-left: 0.75rem !important;
  padding-right: 0.75rem !important;
  box-shadow: inset 3px 0 0 #b4c5ff;
}

/* Desktop dropdown: highlight current sub-page */
nav.fixed a.nav-dropdown-child--active {
  background: rgba(180, 197, 255, 0.2) !important;
  box-shadow: inset 3px 0 0 #b4c5ff;
}

nav.fixed a.nav-dropdown-child--active span {
  color: #b4c5ff !important;
}

nav.fixed a.nav-dropdown-child--active .material-symbols-outlined {
  opacity: 1 !important;
  transform: translateX(0) !important;
  color: #b4c5ff !important;
}
