/* Backup final: header floats over hero (absolute), pill bar — inner pages use body.page-inner main padding */

.site-header {
  position: sticky;
  top: 10px;
  left: 0;
  right: 0;
  z-index: 140;
  height: 0;
  overflow: visible;
  padding-top: 0;
  background: transparent;
  backdrop-filter: none;
}

.header-inner {
  width: min(1280px, calc(100% - 30px));
  margin: 0 auto;
  min-height: 66px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 8px 16px;
  border-radius: 18px;
  border: 1px solid #e6eaf1;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  width: 180px;
  max-width: 180px;
  height: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.main-nav__link {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1f1f1f;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.main-nav__link:hover {
  color: var(--brand-orange);
  background: rgba(255, 70, 0, 0.08);
}

.main-nav__link.is-active {
  color: var(--brand-orange);
  background: rgba(236, 103, 52, 0.12);
}

.nav-dropdown {
  position: relative;
}

/* Invisible bridge so moving pointer from trigger → menu does not break hover */
.nav-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}

.nav-dropdown__trigger {
  border: 0;
  background: transparent;
  color: #1f1f1f;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-dropdown__trigger span {
  display: inline-block;
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 40;
  min-width: min(280px, calc(100vw - 32px));
  max-height: min(70vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 12px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.12);
  padding: 8px;
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}

.nav-dropdown__menu a {
  display: block;
  text-decoration: none;
  color: #191919;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  padding: 9px 10px;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu,
.nav-dropdown.is-open .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown:hover .nav-dropdown__trigger,
.nav-dropdown:focus-within .nav-dropdown__trigger,
.nav-dropdown.is-open .nav-dropdown__trigger {
  color: var(--brand-orange);
  background: rgba(255, 70, 0, 0.08);
}

.nav-dropdown.is-open .nav-dropdown__trigger span {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .nav-dropdown__menu,
  .nav-dropdown__trigger span {
    transition: none;
  }

  .nav-dropdown__menu {
    transform: none;
  }
}

.nav-dropdown__menu a:hover {
  background: rgba(255, 70, 0, 0.1);
  color: #000;
}

.nav-dropdown__menu a.is-active {
  background: rgba(255, 70, 0, 0.08);
  color: var(--brand-orange);
}

.nav-dropdown__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 6px 4px;
  padding-top: 8px;
  border-top: 1px solid #eef0f6;
}

.nav-dropdown__divider span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a90a8;
  padding: 0 4px;
  background: linear-gradient(90deg, rgba(91, 61, 245, 0.08), rgba(255, 70, 0, 0.06));
  border-radius: 6px;
  line-height: 1.7;
}

.mobile-nav-divider {
  margin: 12px 0 6px;
  padding-top: 10px;
  border-top: 1px solid #eef0f6;
}

.mobile-nav-divider span {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a90a8;
  padding: 2px 6px;
  background: rgba(91, 61, 245, 0.08);
  border-radius: 6px;
}

.mobile-nav-group a.is-active {
  color: var(--brand-orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.header-apply-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  background: linear-gradient(135deg, #ff5c1f, #ec6734);
  box-shadow: 0 8px 18px rgba(255, 70, 0, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-apply-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid #ececec;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 99px;
  background: #111827;
}

.mobile-nav-overlay {
  display: none;
}

.mobile-nav-drawer {
  display: none;
}

@media (max-width: 900px) {
  .site-header {
    top: 6px;
  }

  .header-inner {
    width: min(1280px, calc(100% - 14px));
    min-height: 62px;
    border-radius: 12px;
  }

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

  .header-apply-btn {
    padding: 8px 11px;
    font-size: 0.78rem;
  }

  .main-nav {
    display: none;
  }

  .header-actions .header-apply-btn {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.42);
    z-index: 320;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .mobile-nav-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: min(360px, 88vw);
    height: 100dvh;
    background: #fff;
    z-index: 330;
    padding: 16px 14px 20px;
    overflow-y: auto;
    transform: translateX(-104%);
    transition: transform 0.26s ease;
    box-shadow: 20px 0 42px rgba(15, 23, 42, 0.18);
    gap: 16px;
  }

  .mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #eceff3;
    border-radius: 14px;
    padding: 10px 12px;
  }

  .mobile-nav-title {
    font-weight: 700;
    color: #0f172a;
  }

  .mobile-menu-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #0f172a;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    border: 1px solid #eceff3;
    border-radius: 14px;
    overflow: hidden;
  }

  .mobile-nav-links a {
    text-decoration: none;
    color: #111827;
    font-size: 1rem;
    font-weight: 500;
    padding: 14px;
    border-bottom: 1px solid #eef0f3;
  }

  .mobile-nav-links a:last-child {
    border-bottom: 0;
  }

  .mobile-nav-group {
    border-bottom: 1px solid #eef0f3;
  }

  .mobile-nav-group summary {
    list-style: none;
    cursor: pointer;
    color: #111827;
    font-size: 1rem;
    font-weight: 500;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-nav-group summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav-group summary::after {
    content: "▾";
    font-size: 0.85rem;
    color: #6b7280;
  }

  .mobile-nav-group[open] summary::after {
    transform: rotate(180deg);
  }

  .mobile-nav-group a {
    display: block;
    padding: 10px 14px 10px 28px;
    font-size: 0.94rem;
    border-top: 1px solid #f2f4f7;
    border-bottom: 0;
    background: #fafafa;
  }

  .mobile-nav-cta {
    margin-top: auto;
    text-decoration: none;
    border-radius: 999px;
    padding: 13px 16px;
    text-align: center;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff5c1f, #ec6734);
  }

  body.mobile-nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.mobile-nav-open .mobile-nav-drawer {
    transform: translateX(0);
  }
}

@media (max-width: 1100px) {
  .header-apply-btn {
    padding: 9px 14px;
    font-size: 0.84rem;
  }
}
