/* Homepage hero — full-width banner, 80vh with header */

.apm-home {
  --apm-topbar-h: 36px;
  --apm-hero-viewport: 80vh;
  --apm-hero-stage-h: calc(var(--apm-hero-viewport) - var(--apm-topbar-h) - var(--apm-header-h, 80px));
}

.apm-home-hero--full {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 0 28px;
  background: #f8fafc;
}

/* Stage: fixed height = 80vh minus header */
.apm-home-hero__stage {
  position: relative;
  width: 100%;
  max-width: 100vw;
  height: var(--apm-hero-stage-h);
  min-height: 280px;
  max-height: 620px;
  overflow: hidden;
  background: #072a5c;
}

.apm-home-hero__slider {
  position: absolute;
  inset: 0;
  height: 100%;
}

.apm-home-hero__slider .swiper-wrapper,
.apm-home-hero__slider .swiper-slide {
  height: 100%;
}

/* Search overlay on banner */
.apm-home-hero__search-wrap {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 20;
  pointer-events: none;
}

.apm-home-hero__search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  font-family: var(--apm-font, 'Inter', system-ui, sans-serif);
  --apm-hero-search-h: 52px;
}

.apm-home-hero__search--solo {
  margin: 28px 0;
  pointer-events: auto;
}

.apm-home-hero__search-field {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: stretch;
  height: var(--apm-hero-search-h);
}

.apm-home-hero__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
}

.apm-home-hero__search .apm-home-hero__input,
.apm-home-hero__search .apm-location-combobox__input {
  box-sizing: border-box;
  width: 100%;
  height: var(--apm-hero-search-h);
  min-height: var(--apm-hero-search-h);
  max-height: var(--apm-hero-search-h);
  margin: 0;
  padding: 0 36px 0 42px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.35;
  color: #0f172a;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.apm-home-hero__search .apm-home-hero__input::placeholder,
.apm-home-hero__search .apm-location-combobox__input::placeholder {
  color: #94a3b8;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  opacity: 1;
}

.apm-home-hero__search .apm-home-hero__input:focus,
.apm-home-hero__search .apm-location-combobox__input:focus {
  outline: none;
  border-color: var(--apm-primary, #0b5ed7);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.14);
  background: #fff;
}

.apm-home-hero__search .apm-location-combobox {
  position: relative;
  width: 100%;
  height: var(--apm-hero-search-h);
  min-height: var(--apm-hero-search-h);
  display: flex;
  align-items: center;
}

.apm-home-hero__search .apm-location-combobox__input {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.apm-home-hero__search .apm-location-combobox__input[readonly] {
  cursor: pointer;
}

.apm-home-hero__search .apm-location-combobox__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apm-home-hero__search-btn {
  align-self: stretch;
  height: var(--apm-hero-search-h);
  min-height: var(--apm-hero-search-h);
  padding: 0 22px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Slides fill stage */
.apm-home-hero__slide {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.apm-home-hero__slide-media {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #0f172a;
}

.apm-home-hero__slide-link {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.apm-home-hero__slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 7s ease-out;
}

.swiper-slide-active .apm-home-hero__slide-img {
  transform: scale(1.05);
}

.apm-home-hero__slide-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.08) 35%, rgba(15, 23, 42, 0.2) 65%, rgba(7, 42, 92, 0.88) 100%),
    linear-gradient(90deg, rgba(7, 42, 92, 0.4) 0%, transparent 50%);
  pointer-events: none;
  z-index: 2;
}

.apm-home-hero__slide-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 72px;
  z-index: 3;
  color: #fff;
  pointer-events: none;
}

.apm-home-hero__slide-content .apm-container {
  max-width: var(--apm-container);
}

.apm-home-hero__slide-content a {
  pointer-events: auto;
}

.apm-home-hero__slide-logo {
  max-height: 44px;
  width: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.apm-home-hero__slide-title {
  margin: 0;
  max-width: 560px;
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.apm-home-hero__slide-subtitle {
  margin: 10px 0 0;
  font-size: clamp(0.9375rem, 1.6vw, 1.125rem);
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.apm-home-hero__slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 20px;
  border-radius: 10px;
  background: #fff;
  color: #072a5c;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.apm-home-hero__slide-cta:hover {
  transform: translateY(-2px);
  color: #072a5c;
}

/* Footer bar */
.apm-home-hero__slide-foot {
  flex: 0 0 auto;
  background: linear-gradient(90deg, #072a5c 0%, #0b3d7a 100%);
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.apm-home-hero__slide-foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}

.apm-home-hero__slide-foot-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.apm-home-hero__slide-foot-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  flex: 0 0 auto;
}

.apm-home-hero__slide-foot-eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.apm-home-hero__slide-foot-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.apm-home-hero__slide-foot-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.apm-home-hero__slide-foot-cta:hover {
  background: #fff;
  color: #072a5c;
}

/* Navigation */
.apm-home-hero__nav {
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #072a5c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0;
}

.apm-home-hero__stage:hover .apm-home-hero__nav {
  opacity: 1;
}

.apm-home-hero__nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.apm-home-hero__nav--prev {
  left: 20px;
}

.apm-home-hero__nav--next {
  right: 20px;
}

.apm-home-hero__pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 64px;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.apm-home-hero__pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 0 !important;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  transition: width 0.25s ease, background 0.25s ease;
}

.apm-home-hero__pagination .swiper-pagination-bullet-active {
  width: 28px;
  border-radius: 999px;
  background: #fff;
}

.apm-home-hero__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 10;
}

.apm-home-hero__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #38bdf8, #fff);
  transition: width 0.1s linear;
}

/* Stats — below hero, no overlap */
.apm-home-hero__stats-wrap {
  position: relative;
  z-index: 2;
  margin-top: 20px;
}

.apm-home-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 20px 24px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
}

.apm-home-hero__stat {
  text-align: center;
  padding: 6px 10px;
  position: relative;
}

.apm-home-hero__stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: #e2e8f0;
}

.apm-home-hero__stat strong {
  display: block;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 800;
  color: var(--apm-primary, #0b5ed7);
  line-height: 1.15;
}

.apm-home-hero__stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
}

/* Partners spacing after hero */
.apm-home .apm-partners-section--mockup {
  padding-top: 48px;
}

@media (max-width: 1100px) {
  .apm-home-hero__search {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .apm-home-hero__search-field:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .apm-home {
    --apm-hero-stage-h: calc(var(--apm-hero-viewport) - var(--apm-topbar-h) - var(--apm-header-h, 72px));
  }

  .apm-home-hero__search {
    grid-template-columns: 1fr;
  }

  .apm-home-hero__search-wrap {
    top: 16px;
    padding: 0 12px;
  }

  .apm-home-hero__search-btn {
    width: 100%;
    justify-content: center;
  }

  .apm-home-hero__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apm-home-hero__stat:nth-child(2)::after {
    display: none;
  }

  .apm-home-hero__nav {
    opacity: 1;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 640px) {
  .apm-home-hero--full {
    padding-bottom: 20px;
  }

  .apm-home-hero__stage {
    min-height: 260px;
  }

  .apm-home-hero__slide-content {
    bottom: 64px;
  }

  .apm-home-hero__slide-foot-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 16px;
  }

  .apm-home-hero__slide-foot-cta {
    width: 100%;
  }

  .apm-home-hero__pagination {
    bottom: 58px;
  }

  .apm-home-hero__nav {
    display: none;
  }

  .apm-home-hero__stats {
    grid-template-columns: 1fr 1fr;
    padding: 14px;
  }

  .apm-home-hero__stat::after {
    display: none;
  }

  .apm-home-hero__stats-wrap {
    margin-top: 16px;
  }
}
