/* =========================================
   WIR.SCHLADMING – FULLWIDTH IMAGE
========================================= */

.fullwidth-image {
  --fullwidth-image-height: 70vh;
  --fullwidth-image-overlay-opacity: 0.55;

  position: relative;
  display: flex;
  align-items: center;

  width: 100%;
  min-height: var(--fullwidth-image-height);

  padding: clamp(70px, 8vw, 130px) 0;

  background: var(--dark-deep);
  color: var(--cream-soft);
  isolation: isolate;
  overflow: hidden;
}

/* =========================================
   HÖHEN
========================================= */

.fullwidth-image--height-40 {
  --fullwidth-image-height: 40vh;
}

.fullwidth-image--height-50 {
  --fullwidth-image-height: 50vh;
}

.fullwidth-image--height-60 {
  --fullwidth-image-height: 60vh;
}

.fullwidth-image--height-70 {
  --fullwidth-image-height: 70vh;
}

.fullwidth-image--height-80 {
  --fullwidth-image-height: 80vh;
}

.fullwidth-image--height-90 {
  --fullwidth-image-height: 90vh;
}

.fullwidth-image--height-100 {
  --fullwidth-image-height: 100vh;
}

/* Mobile Browser mit dynamischer Adressleiste */

@supports (height: 100svh) {
  .fullwidth-image--height-40 {
    --fullwidth-image-height: 40svh;
  }

  .fullwidth-image--height-50 {
    --fullwidth-image-height: 50svh;
  }

  .fullwidth-image--height-60 {
    --fullwidth-image-height: 60svh;
  }

  .fullwidth-image--height-70 {
    --fullwidth-image-height: 70svh;
  }

  .fullwidth-image--height-80 {
    --fullwidth-image-height: 80svh;
  }

  .fullwidth-image--height-90 {
    --fullwidth-image-height: 90svh;
  }

  .fullwidth-image--height-100 {
    --fullwidth-image-height: 100svh;
  }
}

/* =========================================
   BILD
========================================= */

.fullwidth-image .fullwidth-image-media {
  position: absolute;
  inset: 0;
  z-index: -2;

  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;

  overflow: hidden;
}

.fullwidth-image .fullwidth-image-picture {
  display: block;

  width: 100%;
  height: 100%;
  max-width: none;

  object-fit: cover;
  object-position: center;

  transform: translateZ(0);
}

/* =========================================
   OVERLAY
========================================= */

.fullwidth-image .fullwidth-image-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;

  width: 100%;
  height: 100%;

  pointer-events: none;
  opacity: var(--fullwidth-image-overlay-opacity);
}

/* Kein Overlay */

.fullwidth-image--overlay-none .fullwidth-image-overlay {
  display: none;
}

/* Dunkles Overlay */

.fullwidth-image--overlay-solid .fullwidth-image-overlay {
  background: var(--dark-deep);
}

/* =========================================
   GRADIENT
========================================= */

/* Standard: Mittig */

.fullwidth-image--overlay-gradient .fullwidth-image-overlay {
  background: linear-gradient(
    90deg,
    rgba(3, 27, 26, 0.2) 0%,
    rgba(3, 27, 26, 0.95) 50%,
    rgba(3, 27, 26, 0.2) 100%
  );
}

/* Text links */

.fullwidth-image--overlay-gradient.fullwidth-image--align-left
  .fullwidth-image-overlay {
  background: linear-gradient(
    90deg,
    rgba(3, 27, 26, 1) 0%,
    rgba(3, 27, 26, 0.85) 35%,
    rgba(3, 27, 26, 0.05) 100%
  );
}

/* Text rechts */

.fullwidth-image--overlay-gradient.fullwidth-image--align-right
  .fullwidth-image-overlay {
  background: linear-gradient(
    270deg,
    rgba(3, 27, 26, 1) 0%,
    rgba(3, 27, 26, 0.85) 35%,
    rgba(3, 27, 26, 0.05) 100%
  );
}

/* =========================================
   CONTAINER
========================================= */

.fullwidth-image .fullwidth-image-container {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: var(--max, 1240px);
}

/* =========================================
   CONTENT
========================================= */

.fullwidth-image .fullwidth-image-content {
  min-width: 0;
}

.fullwidth-image .fullwidth-image-subheadline {
  display: block;
  margin: 0 0 22px;

  color: var(--cream-soft);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

/* Headline verwendet die globale Typografie */

.fullwidth-image .fullwidth-image-headline {
  margin: 0 0 28px;
  color: var(--cream-soft);
  overflow-wrap: break-word;

  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.22);
}

/* WYSIWYG */

.fullwidth-image .fullwidth-image-text {
  max-width: 680px;
  margin-bottom: 32px;

  color: var(--cream-soft);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
}

.fullwidth-image .fullwidth-image-text > :last-child {
  margin-bottom: 0;
}

.fullwidth-image .fullwidth-image-text a {
  color: inherit !important;
  text-underline-offset: 4px;
}

/* =========================================
   ALIGNMENT
========================================= */

/* Links */

.fullwidth-image--align-left .fullwidth-image-content {
  text-align: left;
}

.fullwidth-image--align-left .fullwidth-image-text {
  margin-left: 0;
  margin-right: auto;
}

.fullwidth-image--align-left .fullwidth-image-action {
  justify-content: flex-start;
}

/* Mitte */

.fullwidth-image--align-center .fullwidth-image-content {
  text-align: center;
}

.fullwidth-image--align-center .fullwidth-image-text {
  margin-left: auto;
  margin-right: auto;
}

.fullwidth-image--align-center .fullwidth-image-action {
  justify-content: center;
}

/* Rechts */

.fullwidth-image--align-right .fullwidth-image-content {
  text-align: right;
}

.fullwidth-image--align-right .fullwidth-image-text {
  margin-left: auto;
  margin-right: 0;
}

.fullwidth-image--align-right .fullwidth-image-action {
  justify-content: flex-end;
}

/* =========================================
   BUTTON
========================================= */

.fullwidth-image .fullwidth-image-action {
  display: flex;
  align-items: center;
}

.fullwidth-image .fullwidth-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;

  min-height: 52px;
  max-width: 100%;

  padding: 13px 26px;

  border: 1px solid var(--lime);
  border-radius: 2px;

  background-color: var(--lime);
  background-image: linear-gradient(var(--dark), var(--dark));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0 100%;

  color: var(--dark) !important;
  text-transform: uppercase;
  text-decoration: none;

  transition:
    background-size 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease;
}

.fullwidth-image .fullwidth-image-button svg {
  display: block;
  flex: 0 0 21px;

  transition: transform 0.3s ease;
}

.fullwidth-image .fullwidth-image-button:hover {
  background-size: 100% 100%;
  border-color: var(--dark);
  color: var(--cream-soft) !important;
  text-decoration: none;
}

.fullwidth-image .fullwidth-image-button:hover svg {
  transform: translateX(5px);
}

.fullwidth-image .fullwidth-image-button:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 5px;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 991.98px) {
  .fullwidth-image {
    padding: 85px 0;
  }

  .fullwidth-image .fullwidth-image-container {
    padding-left: 30px;
    padding-right: 30px;
  }

  .fullwidth-image .fullwidth-image-text {
    max-width: 620px;
  }

  .fullwidth-image .fullwidth-image-headline {
    margin-bottom: 22px;
  }

  /* Rechte Textausrichtung auf kleineren
       Geräten zugunsten der Lesbarkeit links */

  .fullwidth-image--align-right .fullwidth-image-content {
    text-align: left;
  }

  .fullwidth-image--align-right .fullwidth-image-text {
    margin-left: 0;
    margin-right: auto;
  }

  .fullwidth-image--align-right .fullwidth-image-action {
    justify-content: flex-start;
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 767.98px) {
  .fullwidth-image {
    padding: 75px 0;
  }

  .fullwidth-image .fullwidth-image-container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .fullwidth-image .fullwidth-image-subheadline {
    margin-bottom: 17px;
  }

  .fullwidth-image .fullwidth-image-headline {
    margin-bottom: 20px;
  }

  .fullwidth-image .fullwidth-image-text {
    margin-bottom: 27px;
  }

  .fullwidth-image .fullwidth-image-button {
    min-height: 49px;
    padding: 12px 20px;
    gap: 16px;
  }

  /* Bei rechtsbündigem Desktop-Layout
       auf Mobile links ausrichten. */

  .fullwidth-image--align-right .fullwidth-image-content {
    text-align: left;
  }

  /* Auf Mobile ein etwas stärkerer Verlauf,
       damit Text über Fotos lesbar bleibt. */

  .fullwidth-image--overlay-gradient .fullwidth-image-overlay {
    background: linear-gradient(
      180deg,
      rgba(3, 27, 26, 0.35) 0%,
      rgba(3, 27, 26, 0.95) 50%,
      rgba(3, 27, 26, 0.35) 100%
    );
  }
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
  .fullwidth-image .fullwidth-image-button,
  .fullwidth-image .fullwidth-image-button svg {
    transition: none;
  }
}
