/* Flat Margaret: consistent hero proportions (HU/EN) + cache-safe backgrounds. */
.fm-body .fm-hero,
.fm-body.fm-page-home .fm-hero,
.fm-body .fm-subhero,
.fm-body .fm-page:not(.fm-page-home) .fm-subhero {
  box-sizing: border-box !important;
  min-height: 680px !important;
  height: auto !important;
  padding: 136px 0 72px !important;
  display: flex !important;
  align-items: flex-end !important;
}
.fm-body .fm-subhero::before {
  background-image: var(--fm-subhero-image) !important;
  background-size: cover !important;
  background-position: center center !important;
}
.fm-body .fm-hero .fm-hero-media {
  background-image: var(--fm-hero-desktop-image) !important;
  background-size: cover !important;
  background-position: center center !important;
}
/* Home teaser: two complete rows on desktop; three complete rows on tablet. */
.fm-body.fm-page-home .fm-gallery-preview .fm-gallery-item:nth-child(n+7) {
  display: none !important;
}
@media (max-width: 860px) {
  .fm-body .fm-hero,
  .fm-body.fm-page-home .fm-hero,
  .fm-body .fm-subhero,
  .fm-body .fm-page:not(.fm-page-home) .fm-subhero {
    min-height: 620px !important;
    padding: 120px 0 52px !important;
  }
}
@media (max-width: 620px) {
  .fm-body .fm-hero,
  .fm-body.fm-page-home .fm-hero,
  .fm-body .fm-subhero,
  .fm-body .fm-page:not(.fm-page-home) .fm-subhero {
    min-height: clamp(730px, 94svh, 820px) !important;
    height: auto !important;
    padding: 112px 0 42px !important;
    align-items: flex-end !important;
  }
  .fm-body.fm-page-home .fm-hero-copy {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  .fm-body .fm-hero .fm-hero-media {
    background-image: var(--fm-hero-mobile-image, var(--fm-hero-desktop-image)) !important;
    background-size: cover !important;
    background-position: center 22% !important;
    transform: none !important;
  }
  .fm-body .fm-subhero h1 {
    font-size: clamp(36px, 10vw, 50px) !important;
    line-height: 1.06 !important;
  }
}

/* Responsive image art-direction: all hero variants use versioned file URLs. */
@media (min-width: 621px) and (max-width: 860px) {
  .fm-body .fm-subhero::before {
    background-image: var(--fm-subhero-image-tablet, var(--fm-subhero-image)) !important;
    background-position: center 45% !important;
  }
  .fm-body .fm-hero .fm-hero-media {
    background-image: var(--fm-hero-tablet-image, var(--fm-hero-desktop-image)) !important;
    background-position: center center !important;
  }
}
@media (max-width: 620px) {
  .fm-body .fm-subhero::before {
    background-image: var(--fm-subhero-image-mobile, var(--fm-subhero-image)) !important;
    background-position: center 45% !important;
    background-size: cover !important;
  }
  .fm-body .fm-hero .fm-hero-media {
    background-image: var(--fm-hero-mobile-image, var(--fm-hero-desktop-image)) !important;
    background-position: center 40% !important;
    background-size: cover !important;
  }
}
