/* Viewport-filling first sections below the fixed site header. */
.site-content.sparte-template > .sparte-page-hero,
.site-content.foerderverein-page > .foerderverein-page-hero,
.site-content.mini-wm-template > .miniwm-page-hero {
  min-height: var(--svp-home-hero-height) !important;
  margin-top: var(--site-header-height) !important;
  padding-top: clamp(28px, 5svh, 68px) !important;
  padding-bottom: clamp(28px, 5svh, 60px) !important;
  overflow: visible !important;
  display: flex;
  align-items: center;
}

.site-content.sparte-template > .sparte-page-hero > .wrap,
.site-content.foerderverein-page > .foerderverein-page-hero > .wrap,
.site-content.mini-wm-template > .miniwm-page-hero > .wrap {
  width: 100%;
}

.sparte-template .sparte-page-hero .sparte-page-hero__grid,
.foerderverein-page .foerderverein-page-hero .special-hero__grid,
.mini-wm-template .miniwm-page-hero .special-hero__grid {
  min-height: 0 !important;
  align-items: center !important;
}

.foerderverein-page .foerderverein-page-hero .special-hero__grid {
  grid-template-columns: minmax(0, 1fr) minmax(440px, 680px);
}

.foerderverein-page .foerderverein-page-hero .fv-hero-logo-card {
  width: min(100%, 640px);
  max-width: 640px;
  padding: clamp(12px, 2vw, 24px);
  justify-self: end;
}

.foerderverein-page .foerderverein-page-hero .fv-hero-logo-card img {
  display: block;
  width: 600px !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: min(72svh, 640px) !important;
  object-fit: contain !important;
  object-position: center !important;
  aspect-ratio: auto !important;
}

@media (max-width: 1100px) {
  .foerderverein-page .foerderverein-page-hero .special-hero__grid {
    grid-template-columns: 1fr;
  }

  .foerderverein-page .foerderverein-page-hero .fv-hero-logo-card {
    width: min(100%, 520px);
    max-width: 520px;
    justify-self: start;
  }
}

@media (max-width: 700px) {
  .site-content.sparte-template > .sparte-page-hero,
  .site-content.foerderverein-page > .foerderverein-page-hero,
  .site-content.mini-wm-template > .miniwm-page-hero {
    min-height: var(--svp-home-hero-height) !important;
    margin-top: var(--site-header-height) !important;
    padding-top: clamp(26px, 5svh, 42px) !important;
    padding-bottom: clamp(30px, 6svh, 48px) !important;
  }

  .foerderverein-page .foerderverein-page-hero .fv-hero-logo-card {
    width: min(100%, 330px);
    max-width: 330px;
    justify-self: center;
  }

  .foerderverein-page .foerderverein-page-hero .fv-hero-logo-card img {
    max-height: 34svh !important;
  }
}

@media (max-height: 680px) and (min-width: 701px) {
  .site-content.sparte-template > .sparte-page-hero,
  .site-content.foerderverein-page > .foerderverein-page-hero,
  .site-content.mini-wm-template > .miniwm-page-hero {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  .foerderverein-page .foerderverein-page-hero .fv-hero-logo-card img {
    max-height: calc(var(--svp-home-hero-height) - 48px) !important;
  }
}

@media (max-width: 900px) {
  .foerderverein-page .foerderverein-page-hero .special-hero__grid {
    gap: 22px;
  }

  .foerderverein-page .foerderverein-page-hero .fv-hero-logo-card {
    order: -1;
    width: min(46vw, 280px);
    max-width: 280px;
    margin: 0 auto;
    padding: 0;
    justify-self: center;
  }

  .foerderverein-page .foerderverein-page-hero .fv-hero-logo-card img {
    width: 100% !important;
    max-height: 280px !important;
  }
}

@media (max-width: 700px) {
  .foerderverein-page .foerderverein-page-hero .special-hero__grid {
    gap: 18px;
  }

  .foerderverein-page .foerderverein-page-hero .fv-hero-logo-card {
    order: -1;
    width: min(56vw, 210px);
    max-width: 210px;
    margin: 0 auto;
    padding: 0;
    justify-self: center;
  }

  .foerderverein-page .foerderverein-page-hero .fv-hero-logo-card img {
    width: 100% !important;
    max-height: 210px !important;
  }
}

/* Keep first-page heroes within the visible mobile viewport whenever content fits. */
@media (max-width: 900px) {
  .site-content.sparte-template > .sparte-page-hero,
  .site-content.foerderverein-page > .foerderverein-page-hero,
  .site-content.mini-wm-template > .miniwm-page-hero {
    box-sizing: border-box;
    width: 100%;
    min-height: var(--svp-home-hero-height) !important;
    height: auto !important;
    margin-top: var(--site-header-height) !important;
    padding-top: clamp(20px, 3.5svh, 34px) !important;
    padding-bottom: clamp(22px, 4svh, 38px) !important;
  }

  .site-content.sparte-template > .sparte-page-hero > .wrap,
  .site-content.foerderverein-page > .foerderverein-page-hero > .wrap,
  .site-content.mini-wm-template > .miniwm-page-hero > .wrap {
    min-height: 0 !important;
  }

  .mini-wm-template .miniwm-page-hero .special-hero__grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: clamp(14px, 2.5svh, 22px) !important;
  }

  .mini-wm-template .miniwm-page-hero .miniwm-hero-media--stacked {
    order: -1;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: min(100%, 520px) !important;
    margin: 0 auto;
    justify-self: center !important;
  }

  .mini-wm-template .miniwm-page-hero .miniwm-hero-trophy-card--stack,
  .mini-wm-template .miniwm-page-hero .miniwm-hero-main-card {
    box-sizing: border-box;
    min-width: 0;
    min-height: 0 !important;
    height: clamp(105px, 18svh, 160px) !important;
    margin: 0;
    padding: 7px;
    border-radius: 14px;
  }

  .mini-wm-template .miniwm-page-hero .miniwm-hero-trophy-card--stack img,
  .mini-wm-template .miniwm-page-hero .miniwm-hero-main-card img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 9px;
  }

  .mini-wm-template .miniwm-page-hero .special-hero__content {
    width: 100%;
    max-width: none;
    text-align: center;
  }

  .mini-wm-template .miniwm-page-hero .hero-eye,
  .mini-wm-template .miniwm-page-hero .special-hero__actions {
    justify-content: center;
  }

  .mini-wm-template .miniwm-page-hero .special-hero__text {
    margin-right: auto;
    margin-left: auto;
  }

  .mini-wm-template .miniwm-page-hero .miniwm-hero-countdown-card--inline {
    max-width: 640px;
    margin-top: clamp(12px, 2svh, 20px);
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 700px) {
  .mini-wm-template .miniwm-page-hero .special-hero__title {
    margin-bottom: 12px;
    font-size: clamp(48px, 15vw, 70px);
  }

  .mini-wm-template .miniwm-page-hero .special-hero__text {
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.55;
  }

  .mini-wm-template .miniwm-page-hero .miniwm-hero-countdown-card--inline {
    padding: 12px;
  }

  .mini-wm-template .miniwm-page-hero .miniwm-hero-countdown-card--inline .miniwm-countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  .mini-wm-template .miniwm-page-hero .miniwm-hero-countdown-card--inline .miniwm-countdown > div {
    padding: 9px 3px 7px;
    border-radius: 10px;
  }

  .mini-wm-template .miniwm-page-hero .miniwm-hero-countdown-card--inline .miniwm-countdown span {
    font-size: clamp(27px, 8vw, 34px);
  }

  .mini-wm-template .miniwm-page-hero .miniwm-hero-countdown-card--inline .miniwm-countdown small {
    font-size: 8px;
    letter-spacing: .5px;
  }

  .mini-wm-template .miniwm-page-hero .special-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
  }

  .mini-wm-template .miniwm-page-hero .special-hero__actions .btn {
    width: 100%;
  }
}

@media (max-width: 380px), (max-height: 720px) and (max-width: 700px) {
  .mini-wm-template .miniwm-page-hero .miniwm-hero-trophy-card--stack,
  .mini-wm-template .miniwm-page-hero .miniwm-hero-main-card {
    height: clamp(88px, 15svh, 118px) !important;
  }

  .mini-wm-template .miniwm-page-hero .hero-eye {
    margin-bottom: 8px;
  }

  .mini-wm-template .miniwm-page-hero .special-hero__text {
    margin-bottom: 10px;
  }
}
