/* Mobile-responsive site navigation */
.site-header .header-inner {
  position: relative;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #D9E4F8;
  border-radius: 12px;
  background: #FFFFFF;
  color: #0B1730;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  z-index: 2;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close {
  display: none;
}

.site-header.nav-open .header-inner > .nav-toggle .icon-menu {
  display: none;
}

.site-header.nav-open .header-inner > .nav-toggle .icon-close {
  display: block;
}

.desktop-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 48, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-nav-panel {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  width: min(360px, 92vw);
  height: 100vh;
  height: 100dvh;
  background: #FFFFFF;
  z-index: 9999;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  box-shadow: -8px 0 40px rgba(11, 23, 48, 0.18);
  padding: 20px 18px 28px;
  visibility: hidden;
}

body.nav-menu-open .mobile-nav-backdrop {
  display: block;
  opacity: 1;
}

body.nav-menu-open .mobile-nav-panel {
  transform: translateX(0);
  visibility: visible;
}

.mobile-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #E4EBF8;
}

.mobile-nav-head img {
  height: 28px;
  width: auto;
}

.mobile-nav-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #D9E4F8;
  border-radius: 10px;
  background: #FFFFFF;
  color: #0B1730;
  cursor: pointer;
  padding: 0;
}

.mobile-nav-close svg {
  width: 20px;
  height: 20px;
}

.mobile-nav-quote {
  display: block;
  text-align: center;
  background: #FF6A3D;
  color: #FFFFFF !important;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 800;
  margin-top: 16px;
}

.mobile-acc {
  border-bottom: 1px solid #E4EBF8;
}

.mobile-acc-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 4px;
  border: none;
  background: none;
  color: #0B1730;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.mobile-acc-btn span {
  font-size: 11px;
  color: #7A89A3;
  transition: transform 0.2s ease;
}

.mobile-acc.open .mobile-acc-btn span {
  transform: rotate(180deg);
}

.mobile-acc-body {
  display: none;
  padding: 0 0 12px 0;
}

.mobile-acc.open .mobile-acc-body {
  display: block;
}

.mobile-acc-body a {
  display: block;
  padding: 10px 8px;
  border-radius: 10px;
  color: #1B3E8F;
  font-size: 14px;
  font-weight: 600;
}

.mobile-acc-body a:hover {
  background: #EDF3FE;
  color: #0B1730;
}

.mobile-acc-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: #7A89A3;
  padding: 8px 8px 4px;
}

.header-cta {
  margin-left: auto;
}

@media (max-width: 900px) {
  .site-header nav,
  .site-header .desktop-nav {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }

  .site-header .header-cta {
    display: none !important;
  }

  .site-header .header-inner {
    flex-wrap: nowrap !important;
    min-height: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    gap: 12px !important;
  }

  .site-header .nav-toggle {
    display: inline-flex !important;
  }

  body.nav-menu-open {
    overflow: hidden;
  }
}

@media (min-width: 901px) {
  .mobile-nav-backdrop,
  .mobile-nav-panel {
    display: none !important;
  }
}

/* Form validation highlight */
input:invalid:not(:placeholder-shown),
select:invalid,
textarea:invalid:not(:placeholder-shown) {
  outline: 2px solid #FF6A3D;
  outline-offset: 1px;
}

/* Scroll to top */
.scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: 96px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #FF6A3D;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(255, 106, 61, 0.55), 0 0 0 4px rgba(255, 106, 61, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background 0.18s ease, box-shadow 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.scroll-top-btn:hover {
  background: #e85a2f;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 106, 61, 0.65), 0 0 0 4px rgba(255, 106, 61, 0.18);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn.visible:hover {
  transform: translateY(-2px);
}

.scroll-top-btn:active {
  transform: scale(0.94);
}

.scroll-top-btn svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

@media (min-width: 901px) {
  .scroll-top-btn {
    right: 24px;
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 900px) {
  .scroll-top-btn {
    right: 16px;
    width: 52px;
    height: 52px;
    z-index: 95;
    box-shadow: 0 8px 26px rgba(255, 106, 61, 0.6), 0 0 0 5px rgba(255, 106, 61, 0.14);
  }

  .scroll-top-btn svg {
    width: 24px;
    height: 24px;
  }

  .scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
  }
}

/* Hero quote form — mobile responsive */
@media (max-width: 900px) {
  .hero-quote-card {
    padding: 18px 16px !important;
    border-radius: 18px !important;
  }

  .hero-quote-header {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
  }

  .hero-quote-header > span:last-child {
    font-size: 14.5px !important;
    line-height: 1.35;
  }

  .hero-quote-fields {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .hero-quote-fields input,
  .hero-quote-fields select {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    font-size: 16px !important;
    min-height: 50px !important;
  }

  .hero-quote-submit {
    width: 100% !important;
    flex: 1 1 auto !important;
    min-height: 50px !important;
    white-space: normal !important;
    padding: 15px 20px !important;
  }

  .hero-quote-footer {
    font-size: 12px !important;
    line-height: 1.5;
    margin-top: 12px !important;
  }
}

@media (max-width: 380px) {
  .hero-quote-header {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}
