.single-special-case-hero-section {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--e-global-header-height));
}

/* Для WordPress admin bar */
body:has(#wpadminbar) .single-special-case-hero-section {
  min-height: calc(100vh - (var(--e-global-header-height) + 32px));
}

/* Fallback для старих браузерів */
@supports not (height: 100dvh) {
  .single-special-case-hero-section {
    min-height: calc(100vh - var(--e-global-header-height));
  }

  body:has(#wpadminbar) .single-special-case-hero-section {
    min-height: calc(100vh - (var(--e-global-header-height) + 32px));
  }
}

.single-special-case-hero-section .container {
  flex-shrink: 0;
}

.single-special-case-hero-section .section-title {
  max-width: 1150px;
  margin: 24px 0;
  font-family: Satoshi, sans-serif;
  font-size: 72px;
  font-weight: 700;
  line-height: 111%;
  color: var(--e-global-brand-white);
}

.single-special-case-hero-section .hero-content-image-wrapper {
  position: relative;
  display: grid;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 800px;
  aspect-ratio: 1440 / 800;
  overflow: hidden;
}

.single-special-case-hero-section .hero-content-media {
  width: 100%;
  height: 100%;
  max-height: 100%;
}

.single-special-case-hero-section .hero-content-media--desktop {
  display: block;
}

.single-special-case-hero-section .hero-content-media--mobile {
  display: none;
}

.single-special-case-hero-section .hero-content-video,
.single-special-case-hero-section .hero-content-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}


@media screen and (min-width:1700px) {
  .single-special-case-hero-section {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--e-global-header-height));
    min-height: 1040px;
  }

  /* Для WordPress admin bar */
  body:has(#wpadminbar) .single-special-case-hero-section {
    height: calc(100vh - (var(--e-global-header-height) + 32px));
    min-height: 1040px;
  }

  /* Fallback для старих браузерів */
  @supports not (height: 100dvh) {
    .single-special-case-hero-section {
      height: calc(100vh - var(--e-global-header-height));
      min-height: 1040px;
    }

    body:has(#wpadminbar) .single-special-case-hero-section {
      height: calc(100vh - (var(--e-global-header-height) + 32px));
      min-height: 1040px;
    }
  }
}

@media screen and (max-width: 1360px) {
  .single-special-case-hero-section .section-title {
    font-size: var(--fluid-44-72);
    line-height: 1.18;
  }

  .single-special-case-hero-section .case-tag {
    font-size: var(--fluid-14-16);
  }
}


/* Планшети в портретній орієнтації */
@media screen and (max-width: 1024px) {
  .single-special-case-hero-section {
    height: auto;
    min-height: initial;
  }

  /* Для WordPress admin bar */
  body:has(#wpadminbar) .single-special-case-hero-section {
    height: auto;
    min-height: initial;
  }

  /* Fallback для старих браузерів */
  @supports not (height: 100dvh) {
    .single-special-case-hero-section {
      height: auto;
      min-height: initial;
    }

    body:has(#wpadminbar) .single-special-case-hero-section {
      height: auto;
      min-height: initial;
    }
  }

  .single-special-case-hero-section .hero-content-image-wrapper {
    min-height: 350px;
  }
}

@media screen and (max-width: 767px) {
  .single-special-case-hero-section .hero-content-media--desktop {
    display: none;
  }

  .single-special-case-hero-section .hero-content-media--mobile {
    display: block;
  }

  .single-special-case-hero-section .hero-content-image-wrapper {
    min-height: 211px; /* Висота з дизайну для мобілки */
  }
}

/* Мобільні пристрої в ландшафтній орієнтації */
@media screen and (max-width: 767px) and (orientation: landscape) {
  .single-special-case-hero-section {
    min-height: auto; /* Дозволяємо природну висоту */
  }

  .single-special-case-hero-section .hero-content-image-wrapper {
    min-height: 250px;
    max-height: 60vh; /* Обмежуємо висоту в ландшафті */
  }
}

@media screen and (max-width: 560px) {
  .single-special-case-hero-section {
    height: auto;
    min-height: initial;
  }

  /* Для WordPress admin bar */
  body:has(#wpadminbar) .single-special-case-hero-section {
    height: auto;
    min-height: initial;
  }

  .single-special-case-hero-section .hero-content-image-wrapper {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 211px;
    aspect-ratio: 375 / 211;
  }

  .single-special-case-hero-section .section-title {
    font-size: 44px;
    line-height: 52px;
  }
}

/* Дуже малі екрани */
@media screen and (max-width: 375px) {
  .single-special-case-hero-section .hero-content-image-wrapper {
    min-height: 211px;
  }
}

/* Fixes для iOS Safari */
@supports (-webkit-touch-callout: none) {
  .single-special-case-hero-section {
    min-height: -webkit-fill-available;
  }
}

/* Додаткові фікси для Firefox */
@document url-prefix() {
  .single-special-case-hero-section .hero-content-image-wrapper {
    min-height: 400px;
  }
}
