/* ============================================================
   GravelCalc — Dropdown Navigation
   nav-dropdown.css
   ============================================================ */

/* Reset layout.css plain "nav a" border rules for the new structure */
nav[aria-label="Primary navigation"] {
  display: flex;
  gap: 0;
  align-self: stretch;
}

/* ── Top-level item wrapper ──────────────────────────────── */
.nav-item {
  display: flex;
  align-items: stretch;
  position: relative;
}

/* Direct link (no dropdown) */
.nav-item > a {
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-left: 1px solid #edf0f5;
  border-right: none;
  color: #313a4c;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.nav-item:last-child > a {
  border-right: 1px solid #edf0f5;
}

/* Hover on direct link */
.nav-item > a:hover {
  background: #f5f7fb;
  color: #7657e8;
}

/* ── Trigger button ──────────────────────────────────────── */
.nav-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  border: none;
  border-left: 1px solid #edf0f5;
  background: transparent;
  color: #313a4c;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  height: 100%;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.nav-item:last-child .nav-trigger {
  border-right: 1px solid #edf0f5;
}

.nav-item:hover .nav-trigger,
.nav-item.open .nav-trigger {
  background: #f5f7fb;
  color: #7657e8;
}

/* Caret icon */
.nav-caret {
  font-size: 9px;
  opacity: 0.45;
  transition: transform 0.15s;
  line-height: 1;
}

.nav-item.open .nav-caret {
  transform: rotate(180deg);
}

/* ── Dropdown panel ──────────────────────────────────────── */
.nav-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid #e2e6ee;
  border-top: 2px solid #7657e8;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 32px rgba(22, 32, 50, 0.09);
  z-index: 200;
  padding: 6px 0 8px;
}

/* Open on hover (desktop) or .open class (JS toggle) */
.nav-item:hover .nav-dropdown-panel,
.nav-item.open .nav-dropdown-panel {
  display: block;
}

/* ── Dropdown links ──────────────────────────────────────── */
/* !important needed to beat layout.css "nav a" border rules */
.nav-dropdown-panel a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 9px 16px !important;
  border-left: none !important;
  border-right: none !important;
  color: #313a4c !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
}

.nav-dropdown-panel a:hover {
  background: #f5f2ff;
  color: #7657e8 !important;
}

/* Divider */
.nav-dropdown-panel hr {
  border: none;
  border-top: 1px solid #f0f1ec;
  margin: 5px 0;
}

/* ── "Soon" badge ────────────────────────────────────────── */
.cs-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #9da39f;
  background: #f0f1ec;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 8px;
  flex-shrink: 0;
}

/* ── Mobile hamburger button ─────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid #e2e6ee;
  border-radius: 7px;
  cursor: pointer;
  padding: 9px 10px;
  margin-left: 8px;
}

.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #313a4c;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ── Mobile overrides (≤ 900 px) ─────────────────────────── */
@media (max-width: 900px) {
  .nav-hamburger {
    display: flex;
  }

  nav[aria-label="Primary navigation"] {
    /* Override the styles.css display:none */
    display: none;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 2px solid #e2e6ee;
    flex-direction: column;
    z-index: 150;
    align-self: auto;
    box-shadow: 0 10px 24px rgba(22, 32, 50, 0.07);
  }

  nav[aria-label="Primary navigation"].mobile-open {
    display: flex;
  }

  .nav-item {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-item > a,
  .nav-trigger {
    padding: 13px 20px !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #edf0f5;
    height: auto;
    justify-content: space-between;
  }

  /* No hover highlight on mobile triggers */
  .nav-item:hover .nav-trigger,
  .nav-item:hover > a {
    background: transparent;
    color: #313a4c;
  }

  .nav-item.open .nav-trigger {
    color: #7657e8;
    background: #f5f2ff;
  }

  /* Dropdown panel — inline on mobile */
  .nav-dropdown-panel {
    position: static !important;
    border: none !important;
    border-top: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #f8f9fb;
    padding: 0;
    min-width: 0;
  }

  .nav-item:hover .nav-dropdown-panel {
    /* Don't open on hover for mobile */
    display: none;
  }

  .nav-item.open .nav-dropdown-panel {
    display: block;
  }

  .nav-dropdown-panel a {
    padding: 11px 32px !important;
    border-bottom: 1px solid #edf0f5 !important;
    font-size: 12px !important;
    white-space: normal;
  }
}

/* ── Breadcrumbs ─────────────────────────────────────────── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 1160px;
  margin: 16px auto 0;
  padding: 0 24px;
  font-size: 11px;
  color: #7c8899;
}

.breadcrumbs a {
  color: #7c8899;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #7657e8;
}

/* ── Coming-soon page ────────────────────────────────────── */
.coming-soon-wrap {
  max-width: 580px;
  margin: 64px auto 120px;
  padding: 0 24px;
  text-align: center;
}

.coming-soon-wrap .cs-icon {
  font-size: 60px;
  margin: 0 0 20px;
  line-height: 1;
}

.coming-soon-wrap h1 {
  font: 800 clamp(26px, 4vw, 42px)/1.1 Manrope, sans-serif;
  color: #0d1321;
  letter-spacing: -1.5px;
  margin: 0 0 14px;
}

.coming-soon-wrap .cs-desc {
  color: #596477;
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 32px;
}

.cs-main-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #7657e8;
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  transition: background 0.15s;
}

.cs-main-cta:hover {
  background: #6547d7;
}

.cs-back-link {
  display: block;
  margin-top: 18px;
  color: #7c8899;
  font-size: 13px;
  text-decoration: none;
}

.cs-back-link:hover {
  color: #7657e8;
}

/* Footer links helper */
.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 10px;
  color: #799088;
  text-decoration: none;
}
