.homeMain {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 22px;
  padding-bottom: 28px;
}

.homeSection {
  position: relative;
}

.homeHero {
  position: relative;
  background: linear-gradient(135deg, #0d1b3e 0%, #102451 60%, #1237a0 100%);
  color: #ffffff;
  isolation: isolate;
  overflow: hidden;
  padding: 52px 0 44px;
}

/* Decorative depth circles — pointer-events:none so they never intercept clicks */
.homeHero::before,
.homeHero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.homeHero::before {
  width: 380px;
  height: 380px;
  top: -100px;
  right: -80px;
  background: rgba(255, 255, 255, 0.04);
}

.homeHero::after {
  width: 240px;
  height: 240px;
  bottom: -100px;
  right: 180px;
  background: rgba(21, 88, 239, 0.18);
}

.homeHero .homeHero__eyebrow {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
}

.homeHero .homeHero__eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}

.homeHero .homeLead {
  color: rgba(255, 255, 255, 0.82);
}

.homeHero .homeHero__browseHint {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  align-self: center;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.38);
}

/* Primary CTA button glowing shadow on dark hero */
.homeHero .btn--primary {
  box-shadow: 0 4px 20px rgba(21, 88, 239, 0.45);
}

.homeHero .btn--primary:hover {
  box-shadow: 0 6px 28px rgba(21, 88, 239, 0.55);
}

/* Search bar on dark background */
.homeHero .homeSearch {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* Secondary/outline button on dark background */
.homeHero .btn:not(.btn--primary) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
  box-shadow: none;
}

.homeHero .btn:not(.btn--primary):hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
}


.homeHero__content,
.homeSection,
.homePreviewGrid,
.homeCompanyPreviewCard,
.homeEventPreviewCard {
  min-width: 0;
}

.homeHero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}

.homeHero__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.homeHero__eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.homeHero__browseHint {
  margin: 0;
  font-size: 13px;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.homeProviderStrip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 32px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(135deg, #1558ef 0%, #1237a0 100%);
  box-shadow: 0 8px 32px rgba(21, 88, 239, 0.28);
  overflow: hidden;
  isolation: isolate;
}

/* Decorative highlight circle — pointer-events:none */
.homeProviderStrip::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -20px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
  z-index: 0;
}

.homeProviderStrip__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.homeProviderStrip__copy strong {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

.homeProviderStrip__copy span {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
}

/* CTA button within the gradient strip — white on accent */
.homeProviderStrip .btn {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border-color: transparent;
  color: #1558ef;
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  flex-shrink: 0;
}

.homeProviderStrip .btn:hover {
  background: #f0f4ff;
  border-color: transparent;
  color: #0e3db5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.homeSection__eyebrow {
  margin: 0;
  color: var(--color-primary);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.homeHero h1,
.homeSection h2,
.homeLead,
.homeSection__lead {
  margin: 0;
}

.homeHero h1 {
  max-width: min(100%, 28ch);
  font-size: clamp(2.3rem, 5vw, 3.65rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.homeLead,
.homeSection__lead {
  color: var(--color-text-secondary);
  line-height: 1.62;
}

.homeLead {
  max-width: min(100%, 92ch);
}

.homeSection__lead {
  max-width: min(100%, 92ch);
}

.homeSearch {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  max-width: none;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--color-shadow-card);
}

.homeSearch__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px 0 10px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.homeSearch__input {
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.homeSearch__input::placeholder {
  color: var(--color-text-muted);
}

.homeSearch__submit {
  min-width: 100px;
  min-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
}

.homeHero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.homeSection {
  padding: 0;
}

.homeSection__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  column-gap: 16px;
  row-gap: 4px;
}

.homeSection__eyebrow {
  flex: 0 0 100%;
}

.homeSection__heading h2 {
  flex: 1 1 auto;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

/* Carousel injects .homeSection__headingRow as direct child containing h2 */
.homeSection__headingRow {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.homeSection__viewAll {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  padding: 2px 0;
}

.homeSection__viewAll:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.homePreviewGrid {
  margin-top: 14px;
}

.homePreviewGrid .card,
.homePreviewGrid .eventCard {
  min-height: 100%;
}

.homeCompanyPreviewCard,
.homeEventPreviewCard {
  min-height: 0;
}

.homeSection__actions {
  display: flex;
  margin-top: 14px;
}

.homeSection__empty {
  margin-top: 14px;
  color: var(--color-text-secondary);
}

.homeSection__empty--rich {
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed var(--color-border-strong);
  background: var(--color-section-bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .homeMain {
    gap: 20px;
    padding-top: 18px;
  }

  .homeHero {
    padding: 32px 0 28px;
  }

  .homeSearch {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .homeSearch__submit {
    min-width: 0;
    width: 100%;
    grid-column: 1 / -1;
  }

  .homeHero__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .homeHero__actions .btn {
    width: 100%;
  }

  .homeHero__actions .homeHero__browseHint {
    align-self: auto;
  }
}

@media (max-width: 480px) {
  .homeProviderStrip {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 20px;
  }

  .homeProviderStrip .btn {
    width: 100%;
    text-align: center;
  }
}

@media (hover: none) {
  .homePreviewGrid .card:hover,
  .homePreviewGrid .eventCard:hover {
    transform: none;
  }

  .homePreviewGrid .card:active,
  .homePreviewGrid .eventCard:active {
    transform: scale(0.985);
    transition: transform 0.08s ease;
  }
}

/* ── Carousel ──────────────────────────────────────────────────────────────
   Applied only when JS activates carousel mode (.homeSection--carousel).
   The static grid path is completely unchanged.
────────────────────────────────────────────────────────────────────────── */

/* Arrow button group */
.homeCarouselArrows {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.homeCarouselArrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: var(--color-card-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  box-shadow: var(--color-shadow-soft);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.homeCarouselArrow:hover {
  background: #ffffff;
  border-color: rgba(21, 88, 239, 0.4);
  color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(21, 88, 239, 0.14);
}

.homeCarouselArrow:focus-visible {
  outline: 2px solid rgba(21, 88, 239, 0.7);
  outline-offset: 2px;
}

.homeCarouselArrow svg {
  width: 14px;
  height: 14px;
  display: block;
  pointer-events: none;
}

/* Clip container: override grid display so overflow:hidden clips the track */
.homeSection--carousel .homePreviewGrid {
  display: block;
  overflow: hidden;
}

/* Scrollable track */
.homeCarouselTrack {
  display: flex;
  gap: var(--carousel-gap, 18px);
  transition: transform 400ms ease;
}

.homeCarouselTrack--no-transition {
  transition: none;
}

/* Each card in the track gets its width from the JS-computed CSS variable */
.homeCarouselTrack > .card,
.homeCarouselTrack > .eventCard {
  flex: 0 0 var(--carousel-card-w, 0px);
  max-width: var(--carousel-card-w, 0px);
  min-width: 0;
}

/* Respect reduced motion: disable animated movement */
@media (prefers-reduced-motion: reduce) {
  .homeCarouselTrack {
    transition: none;
  }
}