/* ============================================================
   NAV.CSS — Header with search bar (sortlist.com reference)
   Scroll shadow · Mega menu · Search bar · Mobile menu
   ============================================================ */

.site-header *,
.mobile-menu * {
  box-sizing: border-box;
}

/* ── Header shell ────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #E8E8E8;
  transition: box-shadow 200ms ease;
  overflow: visible;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

/* ── Header inner ────────────────────────────────────────── */
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: stretch; /* children stretch vertically so hover bridges the mega-menu gap */
  gap: 16px;
}

/* ── Logo ────────────────────────────────────────────────── */
.header-logo {
  display: inline-flex;
  align-items: center;
  font-size: 21px;
  font-weight: 800;
  color: #1A1F36;
  text-decoration: none;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  margin-right: 8px;
  transition: opacity 150ms;
}
.header-logo:hover { opacity: 0.8; }
.header-logo .logo-accent { color: var(--color-accent); }

/* ── Primary nav (compact, left of search bar) ───────────── */
.header-nav {
  display: none;
  flex-shrink: 0;
}
@media (min-width: 1024px) {
  .header-nav { display: flex; align-items: stretch; }
}

.header-nav-list {
  display: flex;
  align-items: stretch; /* full header-height targets for stable hover */
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  position: relative; /* anchors mega menu hover state */
}
/* Transparent hover-bridge — covers the 17px gap between trigger bottom and fixed mega-menu,
   so moving the cursor down does not cancel hover intent. */
.nav-item.has-dropdown::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 100%;
  height: 17px;
  pointer-events: none;
  background: transparent;
}
.nav-item.has-dropdown.is-open::after {
  pointer-events: auto;
}

.nav-trigger,
.nav-plain-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  font-weight: 500;
  color: #697386;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease;
  line-height: 1;
}
.nav-trigger:hover,
.nav-plain-link:hover {
  color: #1A1F36;
  background-color: #F7F7FC;
}
.nav-item.is-open > .nav-trigger {
  color: #1A1F36;
  background-color: #F7F7FC;
}

.nav-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 200ms ease;
  color: #9CA3AF;
}
.nav-item.is-open > .nav-trigger .nav-chevron {
  transform: rotate(180deg);
  color: #1A1F36;
}

/* ── Central search bar ──────────────────────────────────── */
.header-search {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 520px;
  height: 42px;
  display: none;
  align-items: center;
  align-self: center;
  margin: 0 8px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
@media (min-width: 1024px) {
  .header-search { display: flex; }
}
.header-search:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.12);
  background: #fff;
}

/* Left pill: service category selector */
.search-category-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 12px 0 14px;
  border: none;
  border-right: 1.5px solid #E2E8F0;
  background: transparent;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: #1A1F36;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.search-category-btn:hover { background-color: var(--color-accent-light); }
.search-category-btn .search-icon {
  width: 15px;
  height: 15px;
  color: #697386;
  flex-shrink: 0;
}
.search-category-btn .nav-chevron {
  width: 14px;
  height: 14px;
}

/* Text input */
.search-text-input {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0 12px;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  color: #1A1F36;
  outline: none;
  min-width: 0;
  -webkit-appearance: none;
}
.search-text-input::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}
/* Hide browser default search clear button */
.search-text-input::-webkit-search-cancel-button { display: none; }

/* Submit button */
.search-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 18px;
  border: none;
  background: #1A1F36;
  color: #fff;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 120ms ease;
  border-radius: 0 8px 8px 0;
}
.search-submit-btn:hover { background-color: #2D3555; }

/* ── Right-side actions ──────────────────────────────────── */
.header-actions {
  display: none;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto; /* hugs the right edge when search is narrower */
}
@media (min-width: 1024px) {
  .header-actions { display: flex; }
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  font-weight: 500;
  color: #697386;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}
.lang-btn:hover { color: #1A1F36; background-color: #F7F7FC; }
.lang-flag { font-size: 16px; line-height: 1; }

.header-divider {
  width: 1px;
  height: 18px;
  background: #E8E8E8;
  margin: 0 6px;
  flex-shrink: 0;
}

.login-link {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  font-weight: 500;
  color: #697386;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease;
}
.login-link:hover { color: #1A1F36; background-color: #F7F7FC; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  margin-left: 8px;
  background: #1A1F36;
  color: #fff;
  border-radius: 8px;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background-color 150ms ease, transform 80ms ease;
}
.header-cta:hover { background-color: #2D3555; }
.header-cta:active { transform: scale(0.97); }
.header-cta svg { flex-shrink: 0; }

/* ── Mega menu ───────────────────────────────────────────── */
.mega-menu {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 3px solid var(--color-accent);
  box-shadow: 0 12px 48px rgba(15, 23, 42, 0.15);
  z-index: 99;
  min-height: 360px;
  max-height: calc(100vh - 68px);
  overflow-y: auto;

  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
}
.nav-item.is-open .mega-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.mega-menu-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px 32px;
  display: grid;
  grid-template-columns: 220px 280px 1fr;
  gap: 40px;
  align-items: stretch;
  min-height: 440px;
}
@media (min-width: 1280px) {
  .mega-menu-container { padding: 32px 40px 36px; gap: 48px; grid-template-columns: 240px 300px 1fr; }
}

/* ── LEFT: Context selector (tab list) ─────────────────── */
.mega-context {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.mega-ctx-item {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 36px 16px 16px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
  color: #1A1F36;
  transition: background-color 180ms ease;
  -webkit-tap-highlight-color: transparent;
}
.mega-ctx-item:hover { background-color: #F5F3FF; }
.mega-ctx-item.is-active {
  background-color: var(--color-accent-light);
}

.mega-ctx-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #1A1F36;
  margin-bottom: 4px;
  transition: color 180ms ease;
}
.mega-ctx-item.is-active .mega-ctx-title { color: var(--color-accent); }

.mega-ctx-desc {
  display: block;
  font-size: 12.5px;
  color: #697386;
  line-height: 1.45;
}
.mega-ctx-item.is-active .mega-ctx-desc { color: #4B5563; }

.mega-ctx-arrow {
  position: absolute;
  top: 18px;
  right: 14px;
  width: 14px;
  height: 14px;
  color: var(--color-accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.mega-ctx-item.is-active .mega-ctx-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── MIDDLE: Primary panel (dynamic) ───────────────────── */
.mega-primary {
  min-width: 0;
  padding-left: 4px;
  border-left: 1px solid #EEF0F4;
  padding-left: 28px;
}
.mega-panel { display: none; }
.mega-panel.is-active { display: block; }

.mega-panel-title {
  font-size: 18px;
  font-weight: 700;
  color: #1A1F36;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.mega-panel-lead {
  font-size: 13.5px;
  color: #697386;
  line-height: 1.55;
  margin: 0 0 20px;
}

/* Category list (vertical, text-only with arrow on active/hover) */
.mega-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mega-cat-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 36px 12px 14px;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #1A1F36;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.mega-cat-btn:hover { color: var(--color-accent); }
.mega-cat-btn.is-active {
  background-color: var(--color-accent-light);
  color: var(--color-accent);
}
.mega-cat-btn svg {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity 150ms ease, transform 150ms ease;
}
.mega-cat-btn:hover svg,
.mega-cat-btn.is-active svg {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Panel bullets + CTA (used by "Post a project") */
.mega-panel-bullets {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mega-panel-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  color: #4B5563;
  line-height: 1.5;
}
.mega-panel-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9CA3AF;
}
.mega-panel-more {
  display: inline-block;
  margin-bottom: 22px;
  font-size: 13px;
  font-weight: 600;
  color: #1A1F36;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 150ms ease;
}
.mega-panel-more:hover { color: var(--color-accent); }
.mega-panel-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, transform 80ms ease;
}
.mega-panel-cta:hover { background: #4338CA; }
.mega-panel-cta:active { transform: scale(0.98); }

/* ── RIGHT: Secondary sub-panel (dynamic) ──────────────── */
.mega-secondary {
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid #EEF0F4;
  display: flex;
  flex-direction: column;
}
.mega-sub { display: none; flex: 1; min-height: 0; }
.mega-sub.is-active { display: flex; flex-direction: column; }

.mega-sub-title {
  font-size: 18px;
  font-weight: 700;
  color: #1A1F36;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.mega-sub-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  flex: 1;
}
.mega-sub-list li { margin: 0; min-width: 0; }
.mega-sub-list a {
  display: block;
  padding: 6px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: #4B5563;
  text-decoration: none;
  line-height: 1.4;
  transition: color 150ms ease;
  white-space: normal;
  overflow-wrap: anywhere;
}
.mega-sub-list a:hover { color: var(--color-accent); }

.mega-sub-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #EEF0F4;
  font-size: 13px;
  color: #697386;
  line-height: 1.5;
}
.mega-sub-footer span { display: block; margin-bottom: 2px; color: #697386; }
.mega-sub-footer a {
  color: #1A1F36;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 150ms ease;
}
.mega-sub-footer a:hover { color: var(--color-accent); }

/* ══════════════════════════════════════════════════════════
   SOLUCIONES VARIANT — 3-zone mega menu (Nova Centrax)
   Zone 1: featured entry cards (left, compact)
   Zone 2: solution titles + intro text (middle)
   Zone 3: services panel inside visual box (right)
   ══════════════════════════════════════════════════════════ */

/* Override base mega-menu chrome for Soluciones */
#menu-soluciones {
  border-top: 1px solid #EAECF0;   /* thin grey instead of 3px indigo */
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08); /* much lighter shadow */
  min-height: 0;
}

/* Container */
.mega-menu-container.is-sol {
  grid-template-columns: 40fr 31fr 29fr;
  gap: 0;
  height: auto;
  min-height: 0;
  padding: 14px 28px 16px;
  align-items: start;
}
@media (min-width: 1280px) {
  .mega-menu-container.is-sol {
    padding: 18px 36px 20px;
  }
}

/* ── ZONE 1: Featured cards ──────────────────────────────── */
.mega-sol-featured {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding-right: 28px;
  max-height: none;
}

.mega-feature-card {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 32px 12px 14px;
  background: transparent;
  border: 1px solid #EEF0F4;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.mega-feature-card:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
  box-shadow: none;
}

/* Accent card — neutral default, dark fill on hover */
.mega-feature-card--accent {
  background: transparent;
  border: 1px solid #E8EAEF;
  color: #1A1F36;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.mega-feature-card--accent:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: none;
}

.mega-feature-eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 2px;
}
.mega-feature-card--accent .mega-feature-eyebrow {
  color: var(--color-accent);
}
.mega-feature-card--accent:hover .mega-feature-eyebrow {
  color: rgba(255,255,255,0.55);
}

.mega-feature-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #1A1F36;
}
.mega-feature-card--accent .mega-feature-title { color: #1A1F36; }
.mega-feature-card--accent:hover .mega-feature-title { color: #fff; }

.mega-feature-desc {
  display: block;
  font-size: 12px;
  line-height: 1.55;
  color: #8C95A4;
}
.mega-feature-card--accent .mega-feature-desc { color: #8C95A4; }
.mega-feature-card--accent:hover .mega-feature-desc { color: rgba(255,255,255,0.55); }

.mega-feature-arrow {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 13px;
  height: 13px;
  color: #B0B7C3;
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    color 160ms ease;
}
.mega-feature-card:hover .mega-feature-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--color-accent);
}
.mega-feature-card--accent .mega-feature-arrow {
  color: #B0B7C3;
  opacity: 0;
  transform: translateX(-4px);
}
.mega-feature-card--accent:hover .mega-feature-arrow {
  color: rgba(255,255,255,0.85);
  opacity: 1;
  transform: translateX(0);
}

/* ── ZONE 2: Intro text + solution titles ─────────────────── */
.mega-sol-titles {
  min-width: 0;
  padding: 0 24px;
  border-left: 1px solid #EAECF0;
  border-right: none;              /* reference: only left separator */
  display: flex;
  flex-direction: column;
}
.mega-sol-titles .mega-section-label {
  margin: 0 0 6px;
  color: #374151;        /* stronger than base #9CA3AF */
  letter-spacing: 0.12em;
}

.mega-sol-intro {
  font-size: 12.5px;
  line-height: 1.6;
  color: #697386;        /* was #B0B8C8 — now clearly readable */
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #F0F2F4;
}

.mega-sol-titles .mega-cat-list {
  gap: 2px;
}

/* Buttons — neutral default, minimal active */
.mega-sol-titles .mega-cat-btn {
  padding: 9px 28px 9px 10px;
  font-size: 13px;
  font-weight: 400;
  color: #6B7280;
  line-height: 1.45;
  border-radius: 6px;
}
/* Active: clean neutral highlight, no colored bar */
.mega-sol-titles .mega-cat-btn.is-active {
  background-color: #F3F4F6;
  color: #111827;
  font-weight: 500;
  border-radius: 6px;
  box-shadow: none;
}
/* Arrow for active: muted, not colored */
.mega-sol-titles .mega-cat-btn.is-active svg {
  opacity: 0.35;
  color: #6B7280;
}
.mega-sol-titles .mega-cat-btn:hover:not(.is-active) {
  background-color: #F9FAFB;
  color: #374151;
}

/* ── ZONE 3: Services panel ──────────────────────────────── */
.mega-menu-container.is-sol .mega-secondary {
  padding: 14px 16px 14px 18px;
  border-left: none;
  margin-left: 12px;
  background: #F9FAFB;
  border-radius: 10px;
  border-top: none;
  border-right: none;
  border-bottom: none;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  overflow: hidden;      /* clips to fixed container height — no shift between panels */
}
.mega-menu-container.is-sol .mega-secondary .mega-section-label {
  margin: 0 0 6px;
  color: #9CA3AF;        /* was #D1D5DB — now has presence */
  font-size: 10.5px;
}
.mega-menu-container.is-sol .mega-sub.is-active {
  display: flex;
  flex-direction: column;
  flex: unset;
}
.mega-menu-container.is-sol .mega-sub-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ECEFF3;
}
.mega-menu-container.is-sol .mega-sub-list {
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 0;
}
.mega-menu-container.is-sol .mega-sub-list li {
  border-bottom: none;
}
.mega-menu-container.is-sol .mega-sub-list li:last-child {
  border-bottom: none;
}
.mega-menu-container.is-sol .mega-sub-list a {
  display: block;
  padding: 6px 4px;
  font-size: 12.5px;
  font-weight: 400;
  color: #9CA3AF;
  text-decoration: none;
  line-height: 1.45;
  transition: color 150ms ease;
}
.mega-menu-container.is-sol .mega-sub-list a:hover {
  color: var(--color-accent);
}

/* ── Legacy classes: retire hard (neutralize any stale HTML) ── */
.mega-item,
.mega-menu-grid,
.mega-menu-footer,
.mega-footer-link,
.mega-footer-meta,
.mega-feature,
.mega-categories,
.mega-categories-grid,
.mega-cat-item,
.mega-cat-icon,
.mega-cat-name,
.mega-cat-desc,
.mega-cat-text,
.mega-links,
.mega-links-list,
.mega-links-more {
  /* neutralize old structure */
}
.mega-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9CA3AF;
  margin: 0 0 12px;
}

/* ── Backdrop overlay ────────────────────────────────────── */
#nav-backdrop {
  position: fixed;
  inset: 0;
  top: 70px;
  background: rgba(15, 23, 42, 0.32);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
#nav-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Mobile toggle ───────────────────────────────────────── */
.mobile-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
  padding: 0;
  gap: 5px;
  /* Vertical centering — belt-and-suspenders for iOS Safari */
  align-self: center;
  margin-top: auto;
  margin-bottom: auto;
  -webkit-appearance: none;  /* prevent iOS implicit button offset */
  transition: background-color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.mobile-toggle:hover { background-color: #F7F7FC; }

@media (min-width: 1024px) {
  .mobile-toggle { display: none; }
}

.hb-line {
  display: block;
  width: 22px;
  height: 2px;
  background: #1A1F36;
  border-radius: 2px;
  transition:
    transform 260ms cubic-bezier(0.23, 1, 0.32, 1),
    opacity   200ms ease,
    width     200ms ease;
  transform-origin: center;
}
.mobile-toggle.is-open .hb-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.is-open .hb-line:nth-child(2) {
  opacity: 0;
  width: 0;
}
.mobile-toggle.is-open .hb-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile menu panel ───────────────────────────────────── */
.mobile-menu {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #E8E8E8;
  z-index: 99;
  max-height: 0;
  overflow: hidden;
  transition: max-height 380ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.mobile-menu.is-open {
  max-height: calc(100dvh - 68px);
  overflow-y: auto;
}
.mobile-menu-scroll {
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* Mobile search bar */
.mobile-search-bar {
  display: flex;
  align-items: center;
  margin: 12px 20px 4px;
  height: 44px;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  background: #F8FAFC;
  overflow: hidden;
}
.mobile-search-input {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  padding: 0 14px;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  color: #1A1F36;
  outline: none;
  -webkit-appearance: none;
}
.mobile-search-input::placeholder { color: #9CA3AF; }
.mobile-search-input::-webkit-search-cancel-button { display: none; }
.mobile-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 16px;
  border: none;
  background: #1A1F36;
  color: #fff;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  transition: background-color 120ms;
}
.mobile-search-btn:hover { background-color: #2D3555; }

/* ── Mobile nav items ────────────────────────────────────── */
.mobile-nav-row {
  border-bottom: 1px solid #F1F5F9;
}

.mobile-nav-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 20px;
  background: transparent;
  border: none;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 15px;
  font-weight: 600;
  color: #1A1F36;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease;
}
.mobile-nav-trigger:hover { background-color: #F7F7FC; }

.mobile-nav-link {
  display: block;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #1A1F36;
  text-decoration: none;
  transition: background-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-link:hover { background-color: #F7F7FC; }

.mobile-chevron {
  width: 20px;
  height: 20px;
  color: #9CA3AF;
  flex-shrink: 0;
  transition: transform 250ms ease, color 150ms ease;
}
.mobile-nav-row.is-open .mobile-chevron {
  transform: rotate(180deg);
  color: var(--color-accent);
}
.mobile-nav-row.is-open .mobile-nav-trigger { color: var(--color-accent); }

/* Accordion panel */
.mobile-accordion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms cubic-bezier(0.4, 0, 0.2, 1);
  background: #F8FAFC;
}
.mobile-nav-row.is-open .mobile-accordion { max-height: 700px; }

.mobile-acc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  font-size: 14px;
  color: #1A1F36;
  text-decoration: none;
  border-bottom: 1px solid #EEF0F4;
  transition: background-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.mobile-acc-item:last-child { border-bottom: none; }
.mobile-acc-item:hover { background-color: #EEF0F4; }
.mobile-acc-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mobile-acc-icon svg { width: 16px; height: 16px; }
.mobile-acc-name {
  font-size: 14px;
  font-weight: 600;
  color: #1A1F36;
  display: block;
}
.mobile-acc-desc {
  font-size: 12px;
  color: #9CA3AF;
  display: block;
  margin-top: 1px;
}

/* Mobile CTA area */
.mobile-actions {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mobile-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: #1A1F36;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.mobile-login-btn:hover { background-color: #F7F7FC; border-color: #CBD5E1; }
.mobile-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  background: #1A1F36;
  border-radius: 8px;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: background-color 150ms ease;
}
.mobile-cta-btn:hover { background-color: #2D3555; }

/* ── Resize: swap desktop ↔ mobile ───────────────────────── */
@media (min-width: 1024px) {
  .mobile-toggle { display: none; }
}

/* ── Mobile lang button (header bar, visible only on mobile) ─ */
.mobile-lang-btn {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin-left: auto; /* pushes itself + hamburger to the right edge */
  flex-shrink: 0;
}
@media (min-width: 1024px) {
  .mobile-lang-btn { display: none; }
}

/* ── Language switch button ──────────────────────────────── */
.lang-switch-btn {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  line-height: 1;
  white-space: nowrap;
}
.lang-switch-btn:hover {
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
  background: var(--color-bg-subtle);
}
