/* Header + homepage hero — SoilnWater discover layout */

:root {
  --snw-green: #009640;
  --snw-green-dark: #007a35;
  --snw-blue: #0066ff;
  --snw-blue-dark: #0052cc;
  --snw-nav: #3d4654;
  --hero-headline-navy: #001a33;
  --hero-headline-green: #006400;
  --hero-action-blue: #007bff;
  --hero-text-muted: #5c6b7a;
  --hero-card-border: #e3e8ef;
  --hero-card-shadow: 0 8px 24px rgba(0, 26, 51, 0.1);
}

.header-sticky-shell .header {
  display: block;
  padding: 0;
  gap: 0;
  flex-wrap: nowrap;
  box-shadow: none;
  border-bottom: 1px solid #e5e9ef;
  background: #fff;
  position: relative;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 24px;
  gap: 12px;
  min-height: 62px;
}

.header--homepage .header-inner {
  gap: 10px;
}

.header-right-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
}

.header--homepage .header-actions,
.header-sticky-shell .header .header-actions {
  margin-left: 0;
  gap: 8px;
}

.logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 4px;
  text-decoration: none;
}

.logo-icon {
  width: auto;
  height: 44px;
  max-width: 118px;
  object-fit: contain;
  display: block;
}

/* Brand name in the middle of the header bar (the logo stays at the left; both are one home
   link): "Soil" in the leaf green, "Water" in the drop blue, a quiet "n" */
.logo-wordmark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: #64748b;
  white-space: nowrap;
}

.logo-wordmark__soil {
  color: #15803d;
}

.logo-wordmark__water {
  color: #0b63c5;
}

@media (max-width: 991.98px) {
  .logo {
    gap: 8px;
  }

  .logo-wordmark {
    font-size: 1.625rem;
  }
}

@media (max-width: 575px) {
  .logo-wordmark {
    font-size: 1.375rem;
  }
}

.header-main-nav {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
  gap: 2px;
  margin-left: 6px;
  overflow: visible;
}

.header-sticky-shell,
.header-sticky-shell .header,
.header-inner {
  overflow: visible;
}

.header-nav-dropdown {
  position: relative;
}

.header-nav-link {
  border: none;
  background: transparent;
  color: #2b3340;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 9px;
  border-radius: 6px;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.header-nav-link--plain {
  display: inline-flex;
  align-items: center;
}

.header-nav-link:hover,
.header-nav-link:focus {
  color: var(--snw-blue);
  background: transparent;
}

.header-nav-dropdown .dropdown-toggle::after {
  margin-left: 0.28em;
  vertical-align: 0.2em;
  border-top: 0.28em solid;
  border-right: 0.28em solid transparent;
  border-left: 0.28em solid transparent;
  border-top-color: #6b7280;
  opacity: 0.85;
}

.header-nav-dropdown .dropdown-menu {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  padding: 6px 0;
  font-size: 13px;
  z-index: 200;
  margin-top: 6px;
}

.header-nav-dropdown .dropdown-menu.show {
  display: block;
}

.header-nav-dropdown .dropdown-menu[data-bs-popper="static"] {
  position: absolute;
  top: 100%;
  left: 0;
  transform: none !important;
}

.header-utilities {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 0;
}

.header-sticky-shell .loc-wrap {
  min-width: 0;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  padding: 7px 12px 7px 10px;
  background: #fff;
  position: relative;
  cursor: pointer;
  gap: 6px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  box-shadow: none;
  font-weight: 500;
}

.loc-wrap--header-compact {
  min-width: 140px;
  max-width: 220px;
  flex: 0 1 auto;
  min-height: 36px;
}

.header-sticky-shell .loc-wrap--header-compact .loc-text-input {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
  max-width: none;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  text-overflow: ellipsis;
}

.header-sticky-shell .loc-wrap--header-compact .soilnwater-place-autocomplete-wrap {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: none;
}

.header-sticky-shell .loc-wrap--header-compact gmp-place-autocomplete {
  min-width: 0;
}

@media (min-width: 1200px) {
  .loc-wrap--header-compact {
    min-width: 168px;
    max-width: 260px;
  }
}

.loc-pin {
  color: var(--snw-blue);
  font-size: 16px;
}

.loc-caret {
  color: #64748b;
  font-size: 11px;
  margin-left: auto;
}

.loc-stack {
  display: none;
}

.location-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 120;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.location-dropdown-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #475569;
}

.location-dropdown-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}

.location-dropdown-note {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-size: 11px;
}

.header-search-jump {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #111827;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  padding: 0;
  margin: 0 2px;
}

.header-search-jump:hover {
  background: #f3f4f6;
}

.search-wrap {
  border-radius: 999px;
  border: 1.5px solid #dbe3ef;
  max-width: none;
  box-shadow: none;
}

.search-wrap:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.12);
}

.search-leading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 16px;
  color: var(--snw-blue);
  font-size: 15px;
}

/* Legacy hero search defaults — overridden inside .hero--discover */
.search-wrap--hero:not(.hero-search-card--query) {
  flex: 1 1 auto;
  min-width: 0;
}

.header-actions {
  gap: 8px;
}

.header-sticky-shell .btn-login--outline,
.header-sticky-shell .header-actions .btn-login.btn-login--outline {
  border: 1.5px solid var(--snw-blue);
  color: var(--snw-blue);
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 700;
  font-size: 13px;
  background: #fff;
  line-height: 1.2;
  box-shadow: none;
}

.header-sticky-shell .btn-login--outline:hover {
  background: rgba(0, 102, 255, 0.05);
}

.header-sticky-shell .btn-signup,
.header-sticky-shell .header-actions .btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--snw-green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.2;
  box-shadow: 0 3px 10px rgba(0, 150, 64, 0.22);
}

.header-sticky-shell .btn-signup:hover {
  background: var(--snw-green-dark);
  color: #fff;
}

.header-sticky-shell .header-actions .user-menu-toggle.btn-login {
  border-radius: 999px;
  border: 1.5px solid #d8dee8;
  padding: 8px 16px;
  font-size: 13px;
}

.header-mobile-menu .btn-signup {
  width: 100%;
  text-align: center;
  padding: 9px 10px;
}

/* Discover hero — match marketing banner spec */
.hero.hero--discover {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  min-height: 0;
  padding: 0;
  border-bottom: none;
  overflow: hidden;
  background: #eef2f7;
}

.hero--discover__bg {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: unset;
  object-position: center top;
  pointer-events: none;
  user-select: none;
  vertical-align: top;
}

.hero--discover__overlay {
  grid-column: 1;
  grid-row: 1;
  z-index: 1;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  min-height: 100%;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 38%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.hero--discover__container {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 2;
  align-self: start;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 40px 20px;
  box-sizing: border-box;
}

.hero--discover__inner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
}

.hero--discover__copy {
  max-width: none;
  padding-top: 0;
  text-align: center;
}

.hero--discover__title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--hero-headline-navy);
  margin: 0;
  white-space: nowrap;
}

.hero--discover__title-line {
  display: inline;
}

.hero--discover__title-line.hero--discover__accent,
.hero--discover__accent {
  color: var(--hero-headline-green);
}

.hero--discover__lead {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.0625rem, 1.45vw, 1.3125rem);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.015em;
  color: var(--hero-headline-navy);
  max-width: 560px;
  margin: 0;
}

.hero--discover__script {
  position: relative;
  text-align: right;
  padding-top: 18px;
  min-width: 210px;
  color: var(--hero-headline-navy);
  font-family: 'Caveat', cursive;
  font-size: clamp(1.625rem, 2.5vw, 2.125rem);
  font-weight: 700;
  line-height: 1.12;
  transform: rotate(3deg);
  transform-origin: right top;
}

.hero--discover__script p {
  margin: 0;
}

.hero--discover__script-swoosh {
  display: block;
  width: min(240px, 100%);
  height: 14px;
  margin: 8px 0 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 14' fill='none'%3E%3Cpath d='M4 10C40 4 80 2 120 4C160 6 200 8 236 6' stroke='%23006400' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hero--discover__search-block {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  z-index: 3;
  width: 100%;
  margin: 0;
  padding: 20px 40px 24px;
  background: linear-gradient(180deg, #e8f4fc 0%, #eef2f7 55%, #eef2f7 100%);
  box-sizing: border-box;
}

.hero--discover__search-block-inner {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.hero--discover__search-block .hero--discover__popular-label {
  color: var(--hero-headline-navy);
  text-shadow: none;
}

.hero--discover__search-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  background: none;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.hero-search-card {
  background: #fff;
  border: 1px solid var(--hero-card-border);
  border-radius: 12px;
  box-shadow: var(--hero-card-shadow);
}

.hero-search-card--location {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-width: 268px;
  max-width: 292px;
  flex-shrink: 0;
  cursor: pointer;
  text-align: left;
  font-family: 'Inter', sans-serif;
}

.hero-search-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--hero-action-blue);
  font-size: 1.25rem;
}

.hero-search-card__caret {
  margin-left: auto;
  color: var(--hero-headline-navy);
  font-size: 0.75rem;
  opacity: 0.75;
  flex-shrink: 0;
}

.hero-loc-trigger__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.hero-loc-trigger__text strong {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--hero-headline-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-loc-trigger__text span:last-child {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--hero-text-muted);
  line-height: 1.3;
}

.hero--discover .search-wrap--hero {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid var(--hero-card-border);
  box-shadow: var(--hero-card-shadow);
  padding: 6px 6px 6px 4px;
  background: #fff;
}

.hero--discover .search-wrap--hero:focus-within {
  border-color: #93c5fd;
  box-shadow: var(--hero-card-shadow), 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.hero--discover .search-wrap--hero .search-leading-icon {
  padding-left: 14px;
  padding-right: 4px;
  color: var(--hero-action-blue);
  font-size: 1.05rem;
}

.hero--discover .search-wrap--hero .search-query-input {
  flex: 1 1 auto;
  padding: 12px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--hero-headline-navy);
}

.hero--discover .search-wrap--hero .search-query-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.hero--discover .search-wrap--hero .search-submit-btn {
  align-self: stretch;
  min-width: 108px;
  margin: 0;
  padding: 0 22px;
  border-radius: 8px;
  background: var(--hero-action-blue);
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0;
}

.hero--discover .search-wrap--hero .search-submit-btn:hover {
  background: #0069d9;
}

.hero--discover__popular {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 16px;
}

.hero--discover__popular-label {
  font-family: 'Inter', sans-serif;
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  text-shadow: 0 1px 6px rgba(0, 26, 51, 0.45);
  margin-right: 2px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Single row; extra tags scroll sideways, "More..." stays pinned after the strip.
   Padding/negative margin keep chip shadows and hover lift from being clipped. */
.hero--discover__popular-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 6px 8px 10px;
  margin: -6px -8px -10px;
}

.hero--discover__popular-tags::-webkit-scrollbar {
  display: none;
}

.hero-popular-tag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 7px 13px;
  border-radius: 999px;
  background: #fff;
  color: var(--hero-headline-navy);
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid #dce3ef;
  box-shadow: 0 2px 8px rgba(0, 26, 51, 0.08);
  transition: background 0.15s ease, transform 0.12s ease, color 0.15s ease;
}

.hero-popular-tag:hover {
  background: #fff;
  transform: translateY(-1px);
  color: var(--hero-action-blue);
}

.hero-popular-tag--more {
  font-weight: 700;
}

/* Banner bottom hub cards */
.homepage-root .hero-hub-cards {
  background: #fff;
  padding: 22px 40px 36px;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid #eef2f6;
}

.homepage-root .hero-hub-cards__inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.homepage-root .hero-hub-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding: 28px 16px 22px;
  border-radius: 12px;
  border: none;
  text-decoration: none;
  color: #1e293b;
  min-height: 236px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.homepage-root .hero-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  color: #1e293b;
}

.homepage-root .hero-hub-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-size: 2.125rem;
  line-height: 1;
  margin-bottom: 14px;
}

.homepage-root .hero-hub-card__icon--wrench i {
  transform: rotate(-45deg);
  display: inline-block;
}

.homepage-root .hero-hub-card__title {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 10px;
  color: #1e293b;
  letter-spacing: -0.025em;
  width: 100%;
}

.homepage-root .hero-hub-card--education .hero-hub-card__title {
  font-size: 1.0625rem;
  line-height: 1.28;
  padding: 0 2px;
}

.homepage-root .hero-hub-card__desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: #475569;
  margin: 0 0 18px;
  width: 100%;
  max-width: 168px;
  align-self: start;
}

.homepage-root .hero-hub-card--businesses {
  background: #fff7ed;
}

.homepage-root .hero-hub-card--businesses .hero-hub-card__icon {
  color: #ea580c;
}

.homepage-root .hero-hub-card--services {
  background: #ecfdf5;
}

.homepage-root .hero-hub-card--services .hero-hub-card__icon {
  color: #22c55e;
}

.homepage-root .hero-hub-card--consultants {
  background: #f5f3ff;
}

.homepage-root .hero-hub-card--consultants .hero-hub-card__icon {
  color: #9333ea;
}

.homepage-root .hero-hub-card--education {
  background: #eff6ff;
}

.homepage-root .hero-hub-card--education .hero-hub-card__icon {
  color: #2563eb;
}

.homepage-root .hero-hub-card--offers-ads {
  background: #fff1f2;
}

.homepage-root .hero-hub-card--offers-ads .hero-hub-card__icon {
  position: relative;
  color: #ef4444;
}

.homepage-root .hero-hub-card__ad-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  padding: 3px 6px;
  border-radius: 6px;
  background: #ca8a04;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.5625rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  pointer-events: none;
}

.homepage-root .hero-hub-card--community {
  background: #f0fdf4;
}

.homepage-root .hero-hub-card--community .hero-hub-card__icon {
  color: #166534;
}

/* Tablet + desktop: compact hub row, 4 across full width */
@media (min-width: 768px) {
  .homepage-root .hero-hub-cards.hero-hub-cards--mobile-chips {
    padding: 8px 20px 10px;
    background: #fff;
    border-bottom: 1px solid #eef2f6;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-cards__mobile-kicker {
    display: none;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-cards__inner {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    flex-wrap: unset;
    scroll-snap-type: none;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card {
    flex: unset !important;
    width: auto !important;
    min-height: 0;
    padding: 10px 10px;
    border-radius: 12px;
    display: grid !important;
    grid-template-rows: auto auto 1fr;
    align-items: center;
    justify-items: center;
    text-align: center;
    box-shadow: none;
    gap: 0;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card--businesses {
    background: #fff7ed !important;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card--education {
    background: #eff6ff !important;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card--offers-ads {
    background: #fff1f2 !important;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card--community {
    background: #f0fdf4 !important;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__icon {
    width: 28px;
    height: 28px;
    max-width: none;
    aspect-ratio: unset;
    margin: 0 0 4px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    font-size: 1.25rem;
    background: transparent !important;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__title {
    font-size: 0.875rem;
    line-height: 1.2;
    margin: 0 0 2px;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    min-height: 0;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__title-full {
    display: inline;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__title-short {
    display: none;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__desc {
    display: -webkit-box !important;
    font-size: 0.6875rem;
    line-height: 1.3;
    margin: 0;
    max-width: none;
    width: 100%;
    align-self: start;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}

@media (min-width: 992px) {
  .homepage-root .hero-hub-cards {
    padding-left: 36px;
    padding-right: 36px;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card {
    min-height: 0;
    padding: 10px 12px;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__title {
    font-size: 0.9375rem;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__desc {
    font-size: 0.75rem;
  }
}

@media (min-width: 992px) {
  .homepage-mobile-toolbar {
    display: none !important;
  }

  /* Full-width header; side padding matches the hero and hub cards below it */
  .header-inner {
    padding-left: 36px;
    padding-right: 36px;
  }
}

@media (min-width: 1200px) and (max-width: 1310px) {
  .header-nav-link {
    font-size: 12.5px;
    padding: 6px 7px;
  }

  .header-inner {
    gap: 8px;
  }

  .logo-icon {
    height: 40px;
    max-width: 106px;
  }
}

@media (min-width: 1200px) {
  .homepage-loc-host {
    flex: 0 0 auto;
  }
}

@media (max-width: 1199px) {
  .header-main-nav {
    display: none !important;
  }

  .header--homepage .header-search-jump {
    display: inline-flex !important;
  }
}

@media (max-width: 992px) {
  .header:not(.header--homepage) .loc-wrap {
    display: none;
  }

  .hero.hero--discover {
    padding: 0;
  }

  .hero--discover__container {
    padding: 16px 18px 12px;
  }

  .hero--discover__inner {
    flex-direction: column;
  }

  .hero--discover__script {
    display: none;
  }

  .hero--discover__search-row {
    flex-direction: column;
    gap: 10px;
  }

  .hero-search-card--location {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .header-sticky-shell .header {
    padding: 0;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 8px 48px 8px 14px;
    min-height: 52px;
    gap: 8px;
  }

  .logo-icon {
    height: 38px;
    max-width: 102px;
    width: auto;
  }

  .header-right-cluster {
    margin-left: auto;
  }

  .header:not(.header--homepage) .header-utilities {
    flex: 1 1 100%;
    order: 4;
  }

  .header:not(.header--homepage) .header-utilities .search-wrap {
    width: 100%;
    max-width: none;
  }

  .header-menu-toggle {
    display: inline-flex;
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    z-index: 5;
  }

  .hero--discover__title {
    font-size: 2rem;
    letter-spacing: -0.03em;
    margin-bottom: 0.875rem;
  }

  .hero--discover__lead {
    font-size: 1rem;
    line-height: 1.5;
  }

  .hero--discover__search-block {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .header.header-mobile-open .header-inner,
  .header.header-mobile-open .header-menu-toggle {
    display: none;
  }

  .header.header-mobile-open .header-mobile-menu {
    display: grid;
    gap: 8px;
    margin: 10px 12px 12px;
    padding: 10px;
    border: 1px solid #dfe6f2;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  }
}

/* Homepage mobile feed (search + hub rail) — ≤991px */
@media (max-width: 991.98px) {
  .header--homepage .header-inner {
    flex-wrap: nowrap;
    align-items: center;
    padding: 8px 48px 8px 12px;
    gap: 8px;
    min-height: 52px;
  }

  .header--homepage .logo {
    flex: 0 0 auto;
  }

  .header--homepage .logo-icon {
    height: 36px;
    max-width: 96px;
  }

  .header--homepage .header-mobile-home-search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0 2px 0 0;
  }

  .header--homepage .header-menu-toggle {
    top: 50%;
    transform: translateY(-50%);
  }

  .header-mobile-home-search .search-wrap--mobile-home,
  .homepage-mobile-toolbar .search-wrap--mobile-home {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 auto !important;
    margin: 0;
    padding: 0 10px 0 8px;
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid #d1dbe8;
    background: #fff;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
    overflow: visible;
  }

  .header-mobile-home-search .search-wrap--mobile-home:focus-within,
  .homepage-mobile-toolbar .search-wrap--mobile-home:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
  }

  .header-mobile-home-search .search-leading-icon,
  .homepage-mobile-toolbar .search-leading-icon {
    color: #2563eb;
    font-size: 0.9rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
  }

  .header-mobile-home-search .search-query-input,
  .homepage-mobile-toolbar .search-query-input {
    flex: 1 1 auto;
    width: 100% !important;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #0f172a;
    text-overflow: ellipsis;
  }

  .header-mobile-home-search .search-query-input:focus,
  .homepage-mobile-toolbar .search-query-input:focus {
    outline: none;
    box-shadow: none;
  }

  .header-mobile-home-search .search-query-input::placeholder,
  .homepage-mobile-toolbar .search-query-input::placeholder {
    color: #64748b;
    font-weight: 400;
  }

  .header-mobile-home-search .search-submit-btn,
  .homepage-mobile-toolbar .search-submit-btn {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    min-width: 0;
    background: transparent;
  }

  .homepage-mobile-toolbar {
    background: transparent;
    padding: 0;
    border-bottom: none;
  }

  .homepage-mobile-loc-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 11px 16px 12px;
    border: none;
    border-top: 1px solid #dce8e0;
    border-bottom: 1px solid #dce8e0;
    background: linear-gradient(180deg, #e3f3ea 0%, #d9eddf 100%);
    color: #0f172a;
    font-family: 'Inter', sans-serif;
    text-align: left;
    cursor: pointer;
  }

  .homepage-mobile-loc-bar__main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
  }

  .homepage-mobile-loc-bar__main > .fa-location-dot {
    color: #15803d;
    font-size: 1.125rem;
    flex-shrink: 0;
  }

  .homepage-mobile-loc-bar__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
  }

  .homepage-mobile-loc-bar__prefix {
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    color: #475569;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .homepage-mobile-loc-bar__value {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .homepage-mobile-loc-bar__caret {
    color: #475569;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .header--homepage .header-right-cluster {
    display: block !important;
    position: static;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    pointer-events: none;
  }

  .header--homepage .header-right-cluster .header-utilities,
  .header--homepage .header-right-cluster .header-actions-desktop {
    display: none !important;
  }

  .header--homepage .homepage-loc-host {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 112px;
    z-index: 1045;
    max-width: none;
    width: auto;
    display: none;
    opacity: 0;
    pointer-events: none;
  }

  .header--homepage .homepage-loc-host.is-mobile-loc-open,
  .header--homepage .homepage-loc-host:focus-within {
    display: inline-flex !important;
    opacity: 1;
    pointer-events: auto;
  }
}

/* Phones: Explore SoilnWater shows small pastel cards (icon + short title), all four in one row */
@media (max-width: 767.98px) {
  .homepage-root .hero-hub-cards--mobile-chips {
    padding: 8px 16px 12px;
    background: #fff;
    border-bottom: 1px solid #e8eef4;
  }

  .homepage-root .hero-hub-cards__mobile-kicker {
    margin: 0 0 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-cards__inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card {
    min-height: 0;
    padding: 10px 4px 9px;
    border-radius: 10px;
    grid-template-rows: auto auto;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__icon {
    width: 24px;
    height: 24px;
    margin: 0 0 5px;
    font-size: 1.125rem;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__title {
    font-size: min(0.75rem, 3.3vw);
    line-height: 1.2;
    margin: 0;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__title-full {
    display: none;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__title-short {
    display: inline;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__desc {
    display: none;
  }

  .homepage-root .hero-hub-cards--mobile-chips .hero-hub-card__ad-badge {
    right: -6px;
    bottom: -3px;
    padding: 2px 4px;
    font-size: 0.4375rem;
    border-radius: 4px;
  }
}

@media (min-width: 992px) {
  .hero-hub-card__title-short {
    display: none;
  }

  .hero-hub-card__title-full {
    display: inline;
  }
}

/* ── Mobile / tablet: header, hero, hub cards ── */
@media (max-width: 991px) {
  .header-inner {
    flex-wrap: nowrap;
    min-height: 56px;
    padding: 8px 52px 8px 16px;
  }

  .header-right-cluster {
    gap: 6px;
  }

  .header-sticky-shell .btn-login--outline,
  .header-sticky-shell .btn-signup {
    padding: 7px 14px;
    font-size: 12px;
  }

  .hero--discover__overlay {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.35) 32%, rgba(255, 255, 255, 0) 58%);
  }

  .hero--discover__container {
    padding: 14px 16px 10px;
  }

  .hero--discover__search-block {
    padding: 16px 16px 20px;
  }

  .hero--discover .search-wrap--hero {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    padding: 10px 12px 12px;
    gap: 8px 6px;
    flex-wrap: unset;
  }

  .hero--discover .search-wrap--hero .search-leading-icon {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
  }

  .hero--discover .search-wrap--hero .search-query-input {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    flex: unset;
  }

  .hero--discover .search-wrap--hero .search-submit-btn {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 44px;
    border-radius: 8px;
  }

  .hero--discover__popular {
    gap: 10px;
    margin-top: 18px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(2px);
  }

  .hero--discover__popular-label {
    color: var(--hero-headline-navy);
    text-shadow: none;
  }
}

@media (max-width: 767px) {
  .header-menu-toggle {
    display: inline-flex !important;
  }

  .header:not(.header--homepage) .header-inner {
    flex-wrap: wrap;
    row-gap: 10px;
    padding-bottom: 12px;
  }

  .header:not(.header--homepage) .header-right-cluster {
    flex: 1 1 100%;
    order: 3;
    margin-left: 0;
    width: 100%;
  }

  .header:not(.header--homepage) .header-utilities {
    flex: 1 1 100%;
    width: 100%;
  }

  .header:not(.header--homepage) .header-utilities .search-wrap {
    width: 100%;
    max-width: none;
    order: unset !important;
  }

  .header:not(.header--homepage) .header-actions-desktop {
    display: none !important;
  }
}

@media (max-width: 575px) {
  .logo-icon {
    height: 36px;
    max-width: 96px;
  }

  .header-inner {
    padding: 8px 48px 8px 14px;
    min-height: 52px;
  }

  .hero--discover__title {
    font-size: min(1.75rem, 6.6vw);
    line-height: 1.1;
    margin-bottom: 0.75rem;
  }

  .hero--discover__lead {
    font-size: 0.9375rem;
    line-height: 1.45;
  }

  .hero--discover__search-row {
    gap: 10px;
  }

  .hero-search-card--location {
    padding: 12px 14px;
    min-width: 0;
    width: 100%;
  }

  .hero--discover .search-wrap--hero {
    order: unset !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    padding: 10px 12px 12px;
    gap: 8px 6px;
  }

  .hero--discover .search-wrap--hero .search-leading-icon {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
    align-self: center;
  }

  .hero--discover .search-wrap--hero .search-query-input {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    padding: 8px 4px;
    font-size: 0.875rem;
  }

  .hero--discover .search-wrap--hero .search-submit-btn {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-height: 44px;
    border-radius: 8px;
    margin-top: 0;
  }

  .hero--discover__overlay {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.42) 28%, rgba(255, 255, 255, 0) 52%);
  }

  .hero--discover__bg {
    object-position: 62% 18%;
  }

  .hero--discover__copy {
    max-width: none;
  }

  .hero--discover__lead {
    max-width: none;
  }

  /* Label on its own line; tags + "More..." share one scrolling row below it */
  .hero--discover__popular {
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.5);
  }

  .hero--discover__popular-label {
    flex-basis: 100%;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--hero-headline-navy);
    text-shadow: none;
  }

  .hero--discover__popular-tags {
    flex: 1 1 0;
  }

  .hero-popular-tag {
    justify-content: center;
    padding: 8px 10px;
    font-size: 0.75rem;
    text-align: center;
  }

  .header-mobile-menu.show,
  .header-mobile-menu.collapsing {
    width: calc(100% - 24px);
    margin: 8px 12px 12px;
  }

  .header-mobile-menu .btn-signup {
    background: var(--snw-green);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
  }

  .header-mobile-menu .header-mobile-search-jump {
    width: 100%;
    border: 1px solid #d8dee8;
    background: #fff;
    color: #1e293b;
    border-radius: 8px;
    font-weight: 600;
    font-family: inherit;
    padding: 9px 10px;
    cursor: pointer;
  }
}

@media (max-width: 399px) {
  .hero--discover__title {
    font-size: min(1.5rem, 6.6vw);
  }

  .hero-loc-trigger__text strong {
    font-size: 0.875rem;
  }

  .hero-loc-trigger__text span:last-child {
    font-size: 0.6875rem;
  }
}

/* ── Location picker (opened from the banner location box / mobile location bar) ── */
.location-picker {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(15, 23, 42, 0.55);
}

.location-picker[hidden] {
  display: none;
}

body.location-picker-open {
  overflow: hidden;
}

.location-picker__panel {
  width: min(100%, 460px);
  padding: 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3);
  font-family: 'Inter', sans-serif;
}

.location-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.location-picker__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.location-picker__close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
}

.location-picker__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
}

.location-picker__field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #64748b;
}

.location-picker__field:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.location-picker__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: none;
  background: transparent;
  color: #0f172a;
  font-size: 0.9375rem;
}

.location-picker__hint {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.location-picker__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.location-picker__divider::before,
.location-picker__divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid #e2e8f0;
}

.location-picker__gps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.location-picker__gps:disabled {
  opacity: 0.7;
}

.location-picker__error {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  color: #b91c1c;
}
