/* components.css — header, footer, cards, forms, breadcrumb, sort bar */

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER / NAVBAR
   Matches Figma: white bg · logo left · nav centre · CTA pill right
   ═══════════════════════════════════════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: #ffffff;
  border-bottom: 1px solid #E5E7EB;
  /* Subtle lift shadow that appears on scroll (class added by ui.js) */
  transition: box-shadow var(--transition-normal);
}
.site-header.is-scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}

/* ── Inner container ─────────────────────────────────────────────────────── */
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto; /* logo | nav | actions | hamburger */
  align-items: center;
  gap: var(--space-6);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
  height: 68px;
}

/* ── Logo ────────────────────────────────────────────────────────────────── */
.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  flex-shrink: 0;
}
.header-logo-text {
  font-size: 1.0625rem;        /* 17px */
  font-weight: 700;
  color: #0F172A;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ── Desktop nav ─────────────────────────────────────────────────────────── */
.header-nav {
  display: flex;
  justify-content: center;     /* centred between logo and CTA */
}
.header-nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.header-nav-item {
  position: relative;
}

/* Shared style for both <a> and <button> nav items */
.header-nav-link,
.header-nav-trigger {
  display: inline-flex;
  font-family: var(--font-sans);
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;         /* 14px */
  font-weight: 500;
  color: rgba(106, 114, 130, 1);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease;
  line-height: 1;
}
.header-nav-link:hover,
.header-nav-trigger:hover {
  color: #0F172A;
  background: #F3F4F6;
}
.header-nav-link.is-active {
  color: #1B4FD8;
}

/* Chevron icon */
.nav-chevron {
  transition: transform 200ms ease;
  flex-shrink: 0;
  color: #9CA3AF;
}
.header-nav-trigger[aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
  color: #374151;
}
.header-nav-trigger[aria-expanded="true"] {
  color: #0F172A;
  background: #F3F4F6;
}

/* ── Dropdown panel ──────────────────────────────────────────────────────── */
.header-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 6px;
  list-style: none;

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-4px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0ms linear 180ms;
}

/* Arrow tip pointing up */
.header-dropdown::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-top: 1px solid #E5E7EB;
  border-left: 1px solid #E5E7EB;
}

/* Open state — triggered by JS */
.header-nav-item.is-open .header-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0ms linear 0ms;
}

.header-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-dropdown-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 150ms ease;
}
.header-dropdown-link:hover {
  background: #F9FAFB;
}
.header-dropdown-link.is-active .dropdown-link-label {
  color: #1B4FD8;
}
.dropdown-link-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  line-height: 1.2;
}
.dropdown-link-desc {
  font-size: 0.75rem;
  color: #9CA3AF;
  line-height: 1.3;
}

/* ── CTA button ─────────────────────────────────────────────────────────── */
.header-actions {
  flex-shrink: 0;
}
.header-cta {
    display: inline-flex;
    font-family: var(--font-sans);
    align-items: center;
    padding: 10px 20px 10px 20px;
    background: #0F172A;
    color: rgba(255, 255, 255, 1);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
    border: 1.5px solid transparent;
    transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.header-cta:hover {
  background: #1E293B;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}
.header-cta:active {
  transform: translateY(0);
}

/* ── Mobile hamburger ───────────────────────────────────────────────────── */
.header-hamburger {
  display: none;                 /* hidden on desktop */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 150ms ease;
}
.header-hamburger:hover { background: #F3F4F6; }

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: #374151;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
  transform-origin: center;
}

/* X state when menu open */
.site-header.nav-open .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(0, 7px); }
.site-header.nav-open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.site-header.nav-open .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(0, -7px); }

/* ── Mobile menu ────────────────────────────────────────────────────────── */
.mobile-menu {
  display: none;                 /* shown on mobile only */
  background: #ffffff;
  border-top: 1px solid #E5E7EB;

  /* Slide animation */
  max-height: 0;
  overflow: hidden;
  transition: max-height 280ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.is-open {
  max-height: calc(100dvh - 68px);
  overflow-y: auto;
}

.mobile-nav-list {
  list-style: none;
  padding: var(--space-3) var(--space-4) var(--space-5);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: background 150ms ease;
}
.mobile-nav-link:hover { background: #F3F4F6; }

/* Mobile accordion trigger */
.mobile-nav-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #374151;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease;
}
.mobile-nav-trigger:hover { background: #F3F4F6; }
.mobile-nav-trigger[aria-expanded="true"] { background: #F3F4F6; }
.mobile-nav-trigger[aria-expanded="true"] .nav-chevron { transform: rotate(180deg); }

.mobile-submenu {
  list-style: none;
  padding: var(--space-1) 0 var(--space-2) var(--space-6);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-submenu-link {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #6B7280;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}
.mobile-submenu-link:hover { background: #F9FAFB; color: #111827; }

.mobile-cta-item {
  padding-top: var(--space-3);
  border-top: 1px solid #F3F4F6;
  margin-top: var(--space-2);
}
.mobile-cta { width: 100%; justify-content: center; border-radius: 9999px; }

/* ── Responsive breakpoints ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner {
    grid-template-columns: auto 1fr auto; /* logo | space | hamburger */
  }
  .header-nav     { display: none; }
  .header-actions { display: none; }
  .header-hamburger {
    display: flex;
    grid-column: 3; /* pin to the rightmost column regardless of hidden siblings */
  }
  .mobile-menu    { display: block; }
}

/* Tighten gap and padding on small phones */
@media (max-width: 480px) {
  .header-inner {
    gap: var(--space-3);
    padding-inline: var(--space-4);
  }
}

@media (max-width: 360px) {
  .header-logo img { width: 110px; }
}

/* Prevent page scroll while mobile menu is open */
body.menu-open { overflow: hidden; }

/* ── Mobile nav touch targets (min 44 px) ───────────────────────────────── */
.mobile-nav-link,
.mobile-nav-trigger {
  min-height: 44px;
}

/* Active page highlight in mobile menu */
.mobile-nav-link.is-active {
  color: #E8681A;
  background: #FEF9F5;
  font-weight: 600;
}
.mobile-nav-link.is-active:hover { background: #FEF0E7; }

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   Matches Figma: light off-white bg · 3 cols · orange underline headings ·
   decorative illustration · dark circular social icons · dot grid corners
   ═══════════════════════════════════════════════════════════════════════════ */

.site-footer {
  position: relative;
  background: #F7F7F5;            /* off-white matching Figma */
  color: #374151;
  overflow: hidden;
  padding-top: var(--space-16);
}

/* ── Dot grid decorations (top-left and bottom-right corners) ───────────── */
.footer-dot-tl,
.footer-dot-br {
  position: absolute;
  width: 180px;
  height: 180px;
  background-image: radial-gradient(circle, #C9C9C9 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
  opacity: 0.5;
}
.footer-dot-tl { top: 0;    left: 0; }
.footer-dot-br { bottom: 40px; right: 0; }

/* ── Main grid ──────────────────────────────────────────────────────────── */
.footer-inner {
  position: relative;             /* above dot divs */
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: var(--space-16);
  padding-bottom: var(--space-12);
  align-items: start;
}

/* ── Brand column ────────────────────────────────────────────────────────── */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.footer-desc {
  font-size: 0.875rem;            /* 14px */
  color: #6B7280;
  line-height: 1.65;
  max-width: 280px;
  margin: 0;
}

/* ── Decorative illustration ─────────────────────────────────────────────── */
.footer-illustration {
  position: relative;
  height: 80px;
  margin-top: var(--space-2);
  display: flex;
  align-items: flex-end;
  gap: 0;
}

.fi-shield {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.fi-card {
  position: relative;
  z-index: 1;
  margin-left: -8px;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 8px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 90px;
}

.fi-stars { line-height: 1; }

.fi-bar {
  height: 4px;
  background: #E5E7EB;
  border-radius: 2px;
  width: 100%;
}
.fi-bar--short { width: 60%; }

.fi-search {
  position: relative;
  z-index: 3;
  margin-left: -10px;
  margin-bottom: -6px;
  color: #374151;
}

/* ── Link columns ────────────────────────────────────────────────────────── */
.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Column heading with orange underline accent — matches Figma exactly */
.footer-col-title {
  font-size: 0.9375rem;           /* 15px */
  font-weight: 700;
  color: #111827;
  margin: 0;
  padding-bottom: 10px;
  position: relative;
  display: inline-block;
}
.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 46%;
  height: 2.5px;
  background: #E8681A;            /* orange accent from Figma */
  border-radius: 2px;
}

.footer-col-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col-links a {
  font-size: 0.875rem;
  color: #6B7280;
  text-decoration: none;
  transition: color 150ms ease;
  line-height: 1;
}
.footer-col-links a:hover { color: #111827; }

/* ── Social icons (right column, bottom) ────────────────────────────────── */
.footer-col--right {
  justify-content: space-between;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #374151;            /* dark charcoal matching Figma */
  color: #ffffff;
  border-radius: 50%;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease;
  flex-shrink: 0;
}
.footer-social-btn:hover {
  background: #111827;
  transform: translateY(-2px);
}

/* ── Bottom bar ─────────────────────────────────────────────────────────── */
.footer-bottom {
  position: relative;
  border-top: 1px solid #E5E7EB;
  padding-block: var(--space-5);
  text-align: center;
}
.footer-bottom p {
  font-size: 0.8125rem;           /* 13px */
  color: #9CA3AF;
  margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-desc  { max-width: 100%; }
}

@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-col--right { margin-top: 0; }
}

/* ── Company card ────────────────────────────────────────────────────────── */
.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}
.company-card { border-radius: var(--radius-lg); overflow: hidden; }
.company-card-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  height: 100%;
}
.company-card-inner:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--color-primary);
}
.company-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.company-logo {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  object-fit: contain;
  background: var(--color-gray-50);
  padding: var(--space-2);
}
.company-name {
  font-size: var(--text-base);
  font-weight: var(--font-semi);
  color: var(--color-text);
}
.company-location {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}
.company-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.stars { color: var(--color-accent); letter-spacing: 1px; }
.rating-number {
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
}
.review-count { font-size: var(--text-sm); color: var(--color-text-muted); }
.company-description {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.company-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}
.company-footer {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

/* ── CTA Banner ─────────────────────────────────────────────────────────── */
/* Matches Figma: warm-to-cool mesh gradient · centred · 2 pill buttons */

.cta-banner {
  position: relative;
  overflow: hidden;
  padding-block: 72px;
  text-align: center;

  /* Mesh gradient: orange-coral left → magenta centre → blue-purple right */
  background:
    radial-gradient(ellipse at 0% 50%,   #FF8C42 0%,  transparent 55%),
    radial-gradient(ellipse at 40% 0%,   #FF6B6B 0%,  transparent 50%),
    radial-gradient(ellipse at 100% 50%, #4C63D2 0%,  transparent 55%),
    radial-gradient(ellipse at 60% 100%, #9B59B6 0%,  transparent 50%),
    linear-gradient(135deg, #FF6B35 0%, #E8468C 40%, #6B5CE7 80%, #4C63D2 100%);
}

/* Subtle noise texture overlay for mesh feel */
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.cta-banner-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

/* Heading */
.cta-banner-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--font-bold);
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
}

/* "Next Partner?" — bright yellow matching Figma */
.cta-banner-highlight {
  color: #FFC328;
}

/* Subtitle */
.cta-banner-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
  margin: 0;
  max-width: 480px;
}

/* Button row */
.cta-banner-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-2);
}

/* Shared button base */
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 28px;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
  cursor: pointer;
  border: none;
}

.cta-btn:hover { transform: translateY(-2px); }
.cta-btn:active { transform: translateY(0); }

/* Primary — white fill, dark text */
.cta-btn--primary {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.cta-btn--primary:hover {
  background: #F9FAFB;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Outline — transparent, white border + text */
.cta-btn--outline {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255,255,255,0.6);
}
.cta-btn--outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.9);
}

@media (max-width: 480px) {
  .cta-banner { padding-block: var(--space-12); }
  .cta-btn { width: 100%; justify-content: center; }
  .cta-banner-actions { flex-direction: column; width: 100%; max-width: 280px; }
}



/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb { padding-block: var(--space-4); }
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.breadcrumb-link { color: var(--color-primary); }
.breadcrumb-link:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--color-gray-300); margin-inline: var(--space-1); }
.breadcrumb-current { color: var(--color-text-muted); }

/* ── Sort bar ────────────────────────────────────────────────────────────── */
.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-block: var(--space-4);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.result-count { font-size: var(--text-sm); color: var(--color-text-muted); }
.result-count strong { color: var(--color-text); }
.sort-controls { display: flex; gap: var(--space-3); }
.sort-select, .rating-filter {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  background: var(--color-white);
  cursor: pointer;
}
.sort-select:focus, .rating-filter:focus {
  outline: 2px solid var(--color-primary);
  border-color: var(--color-primary);
}

/* ── Sub-filter bar ──────────────────────────────────────────────────────── */
.sub-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-5);
}
.sub-filter-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-right: var(--space-1);
}
.sub-filter-link {
  padding: var(--space-1) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-gray-700);
  transition: all var(--transition-fast);
}
.sub-filter-link:hover, .sub-filter-link.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.contact-form, .get-listed-form-wrap form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-group label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  background: var(--color-white);
  transition: border-color var(--transition-fast);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.form-group input.is-error,
.form-group textarea.is-error {
  border-color: var(--color-error);
}
.field-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  min-height: 1em;
}
.form-success {
  padding: var(--space-4);
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  border-radius: var(--radius-md);
  color: var(--color-success);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--space-16);
  color: var(--color-text-muted);
}
.empty-state .btn { margin-top: var(--space-4); }

/* ═══════════════════════════════════════════════════════════════════════════
   MEGA MENU — "Find Firms" full-width dropdown
   Matches Figma: sidebar categories + 5-column chip grid
   ═══════════════════════════════════════════════════════════════════════════ */


/* Trigger item — relative so mega menu anchors to it */
.has-mega { position: relative; }

/* The mega menu — positioned below the trigger, centered under it */
.mega-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  z-index: 200;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  min-width: 220px;                 /* sidebar width only — expands when panel opens */
  width: max-content;
  max-width: 90vw;

  /* Hidden by default */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0ms linear 180ms;
}

/* Open state */
.has-mega.is-open .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 180ms ease, transform 180ms ease, visibility 0ms linear 0ms;
}

/* Inner: sidebar | right panel */
.mega-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 360px;
  max-height: 520px;
  overflow: hidden;
  border-radius: 12px;
}

/* When no panel active — only sidebar column, right side hidden */
.mega-panels:not(:has(.mega-panel.is-active)) {
  display: none;
}

/* Fallback for browsers without :has() — JS adds .has-active */
.mega-panels.has-active { display: block; }

/* Collapsed — single column, just the sidebar */
.mega-inner:not(:has(.mega-panel.is-active)) {
  grid-template-columns: 220px;
  min-height: auto;
}

/* ── Left sidebar ────────────────────────────────────────────────────────── */
.mega-sidebar {
  border-right: 1px solid #E5E7EB;
  background: #FAFAFA;
  border-radius: 12px 0 0 12px;
  overflow-y: auto;
  padding: 16px 0;
}

.mega-sidebar-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 16px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #E5E7EB;
  margin-bottom: 6px;
}

.mega-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-cat-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 16px;
  font-size: 0.875rem;
  font-weight: 400;
  color: #374151;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  line-height: 1.4;
}
.mega-cat-btn:hover {
  background: #FEF9F5;
  color: #111827;
}
.mega-cat-btn.is-active {
  background: #FEF0E7;
  color: #E8681A;
  font-weight: 600;
  border-left-color: #E8681A;
}

/* ── Right panels ────────────────────────────────────────────────────────── */
.mega-panels {
  width: 820px;                     /* fixed width for the right panel area */
  overflow-y: auto;
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
}

.mega-panel { display: none; }
.mega-panel.is-active { display: block; }

/* 5 columns */
.mega-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  align-items: start;
}

/* Column header */
.mega-col-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F3F4F6;
}

/* Column items list */
.mega-col-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Chip style — rectangular, matching Figma */
.mega-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #374151;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  text-decoration: none;
  width: 100%;
  text-align: center;
  transition: all 130ms ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mega-chip:hover {
  background: #FEF0E7;
  color: #E8681A;
  border-color: #FDDCBF;
}

/* First chip = black filled (like "Blackberry" in Figma) */
.mega-chip--active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}
.mega-chip--active:hover {
  background: #374151;
  border-color: #374151;
  color: #ffffff;
}

/* If fewer than 5 sections, span remaining columns */
.mega-cols:has(.mega-col:only-child) { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1024px) {
  .mega-cols { grid-template-columns: repeat(3, 1fr); }
}


/* ════════════════════════════════════════════════════════════════════════════
   PHASE 1 NAV — hover-activated dropdown (Resources)
   When site.navPhase = 1, the Resources menu opens on hover instead of click.
   In phase 2 this can be removed and the original click-based JS used again.
   ════════════════════════════════════════════════════════════════════════════ */

.has-hover-dropdown {
  position: relative;
}

/* Open on hover or keyboard focus within the nav item */
.has-hover-dropdown:hover .header-dropdown,
.has-hover-dropdown:focus-within .header-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    visibility 0ms linear 0ms;
}

/* Flip chevron on hover */
.has-hover-dropdown:hover .nav-chevron,
.has-hover-dropdown:focus-within .nav-chevron {
  transform: rotate(180deg);
  transition: transform 180ms ease;
}

/* Visual bridge: prevents the dropdown from closing when the cursor
   crosses the gap between the trigger and the panel */
.has-hover-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}

/* ════════════════════════════════════════════════════════════════════════════
   NAV ACTIVE STATE — orange instead of blue
   Matches brand accent used in hero highlight and tag pills (#E8681A).
   ════════════════════════════════════════════════════════════════════════════ */

.header-nav-link.is-active,
.header-dropdown-link.is-active .dropdown-link-label {
  color: #E8681A;
}