/* ==========================================================================
   KOBIL — Industry Media Services — Sektion: Hero (Figma 16516:27964)
   Eigenstaendige helle Karte (1360x630): Eyebrow "MEDIA SEVICES" (Typo aus
   dem Design), H1, Subline, Kerben-CTA "Contact sales" links; rechts Foto
   (Mann mit Smartphone) mit dahinterliegender "Explore"-Karte.
   Desktop: fixe 1360x630-Buehne, proportional auf die Kartenbreite skaliert.
   ========================================================================== */

.sec-media-services-hero {
  position: relative;
  isolation: isolate;
  height: 630px;
  overflow: clip;
  border-radius: var(--radius-sm);
  background: var(--navy-20);
}

/* Feiner Verlaufs-Rand (Figma "stroke"-Layer) */
.sec-media-services-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: var(--radius-sm);
  padding: 1px;
  background: linear-gradient(200deg, #ffffff 0%, rgba(111, 151, 255, 0.66) 100%),
    linear-gradient(35deg, rgba(0, 71, 255, 0.4) 0%, rgba(255, 255, 255, 0) 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

/* ---- Fixe Design-Buehne 1360x630, per Transform auf die Breite skaliert ---- */

.ms-hero__canvas {
  position: relative;
  width: 1360px;
  height: 630px;
  transform-origin: top left;
}

.ms-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Text links ---- */

.ms-hero__content {
  position: absolute;
  top: 50%;
  left: 50px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 623px;
  transform: translateY(-50%);
}

.ms-hero__eyebrow {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 23px;
  color: var(--blue);
}

.ms-hero__lead {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.ms-hero__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ms-hero__title {
  font-family: var(--font-sans);
  font-size: 40px;
  font-weight: 700;
  line-height: 50px;
  letter-spacing: 0;
  color: var(--navy);
}

.ms-hero__subline {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 23px;
  color: var(--navy-80);
}

/* CTA: weisser Button mit gekerbter Ecke unten rechts (Figma-Shapes als Maske).
   Im Design sitzt zwischen Text und Button ein 100px-Spacer (Body-Gap 40 +
   100 + 40 = 180px Abstand) — hier als margin-top 140px + lead-gap 40px. */

.ms-hero__cta {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  height: 48px;
  margin-top: 140px;
  padding: 8px 32px 8px 24px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  color: var(--navy);
  white-space: nowrap;
}

.ms-hero__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--white);
  filter: drop-shadow(0 6px 14px rgba(17, 36, 74, 0.1));
  -webkit-mask-image: url("/assets/industries/media-services/hero/btn-body.svg"),
    url("/assets/industries/media-services/hero/btn-end.svg");
  -webkit-mask-position: left center, right center;
  -webkit-mask-size: calc(100% - 40px) 100%, 79.5px 100%;
  -webkit-mask-repeat: no-repeat, no-repeat;
  mask-image: url("/assets/industries/media-services/hero/btn-body.svg"),
    url("/assets/industries/media-services/hero/btn-end.svg");
  mask-position: left center, right center;
  mask-size: calc(100% - 40px) 100%, 79.5px 100%;
  mask-repeat: no-repeat, no-repeat;
  transition: background-color var(--dur) var(--ease);
}

.ms-hero__cta:hover::before {
  background: var(--navy-30);
}

.ms-hero__cta:active {
  transform: translateY(1px);
}

.ms-hero__cta-icon {
  flex: none;
  transition: transform var(--dur) var(--ease);
}

.ms-hero__cta:hover .ms-hero__cta-icon {
  transform: translateX(3px);
}

/* ---- Visual rechts: "Explore"-Karte hinter dem Foto ---- */

.ms-hero__visual {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Explore-Karte (UI-Mock) */

.ms-hero__card {
  position: absolute;
  top: 188px;
  left: 708.7px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  width: 252px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  filter: drop-shadow(0 5px 16px rgba(17, 36, 74, 0.12));
  font-family: "Barlow", var(--font-ui), sans-serif;
}

.ms-hero__card-title {
  width: 100%;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 12.223px;
  line-height: 20.481px;
  color: #232935;
}

.ms-hero__card-row {
  display: flex;
  align-items: center;
  gap: 11.95px;
  width: 100%;
}

.ms-hero__card-logo {
  flex: none;
  width: 52.91px;
  height: 52.91px;
}

.ms-hero__card-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  white-space: nowrap;
}

.ms-hero__card-name {
  font-weight: 500;
  font-size: 13.654px;
  line-height: 20.481px;
  color: #232935;
}

.ms-hero__card-desc {
  font-weight: 400;
  font-size: 11.947px;
  line-height: 17.068px;
  color: #747b86;
}

.ms-hero__card-line {
  width: 127.15px;
  height: 0;
  margin-top: -1px; /* Linie liegt wie im Design ohne Layout-Hoehe im 12px-Gap */
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Foto (Mann mit Smartphone) — freigestellt, steht auf der Unterkante */

.ms-hero__photo {
  position: absolute;
  top: 77.4px;
  left: 831.5px;
  z-index: 2;
  width: 463px;
  height: 552px;
  pointer-events: none;
}

.ms-hero__photo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Proportionale Skalierung der Buehne (Desktop/Tablet >1024) ---- */

@supports (transform: scale(tan(atan2(1px, 1px)))) {
  @media (min-width: 1025px) {
    .sec-media-services-hero {
      --ms-scale: min(1, tan(atan2(100vw - 80px, 1360px)));
      height: calc(630px * var(--ms-scale));
    }

    .ms-hero__canvas {
      transform: scale(var(--ms-scale));
    }
  }
}

/* ---- Responsive: gestapeltes Layout <=1024 ---- */

@media (max-width: 1024px) {
  .sec-media-services-hero {
    height: auto;
  }

  .ms-hero__canvas {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    height: auto;
    padding: 56px 40px 0;
    transform: none;
  }

  .ms-hero__content {
    position: static;
    width: 100%;
    max-width: 560px;
    transform: none;
  }

  .ms-hero__title {
    font-size: 36px;
    line-height: 46px;
  }

  .ms-hero__cta {
    margin-top: 8px;
  }

  .ms-hero__visual {
    position: relative;
    inset: auto;
    width: 100%;
    height: 440px;
  }

  .ms-hero__photo {
    top: auto;
    bottom: 0;
    left: 50%;
    width: 369px;
    height: 440px;
    transform: translateX(-26%);
  }

  .ms-hero__card {
    top: 96px;
    left: 0;
  }
}

@media (max-width: 768px) {
  .ms-hero__canvas {
    gap: 24px;
    padding: 44px 28px 0;
  }

  .ms-hero__content {
    gap: 16px;
  }

  .ms-hero__lead {
    gap: 32px;
  }

  .ms-hero__title {
    font-size: 32px;
    line-height: 42px;
  }

  .ms-hero__visual {
    height: 400px;
  }

  .ms-hero__photo {
    width: 336px;
    height: 400px;
    transform: translateX(-30%);
  }

  .ms-hero__card {
    top: 76px;
    left: -4px;
    transform: scale(0.92);
    transform-origin: top left;
  }
}

@media (max-width: 480px) {
  .ms-hero__canvas {
    padding: 36px 20px 0;
  }

  .ms-hero__title {
    font-size: 28px;
    line-height: 36px;
  }

  .ms-hero__visual {
    height: 348px;
  }

  .ms-hero__photo {
    width: 292px;
    height: 348px;
    transform: translateX(-22%);
  }

  .ms-hero__card {
    top: 52px;
    left: -8px;
    transform: scale(0.82);
  }
}
