/* WW-24931 (12/2026) – new hero + Imagefilm pop-up.
 * Loaded after mega-menu.css (see plugin.php → enqueue_styles).
 * Values taken from the approved preview entwurf-startseite-v2.html. */

:root { --ww-red: #ed0024; --ww-red-dark: #b8001c; }

/* ---------- Hero: one image + dark gradient from the left, no slider ----------
 * The image URL comes in as --ww-hero-img (inline style from the template) and is
 * painted in ::before, the gradients in ::after.
 * Hero is a flex column so the button sits vertically centred between the end of
 * the text and the bottom of the hero (client feedback 01.12.2026). */
.bs-hero-section.bs-hero--v2 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #101216 !important;
  display: flex;
  flex-direction: column;
  min-height: clamp(640px, 37vw, 820px);
  padding: 140px 0 0 !important;              /* top padding keeps text below the fixed header */
  box-sizing: border-box;
}
.bs-hero--v2 .bs-hero-section-wrapper {
  flex: 1 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.bs-hero--v2 .hero-title,
.bs-hero--v2 .hero-copy { width: 100%; }         /* keep text inside the screen in the flex column */
.bs-hero--v2 .film-trigger { margin: auto 0; }   /* equal space above and below */

/* Image layer – phones/tablets: fills the hero */
.bs-hero--v2::before {
  content: '';
  position: absolute; inset: 0; z-index: -2;
  background-image: var(--ww-hero-img);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 60% 40%;
}
/* Gradient layer: dark from the left + light fade at the bottom */
.bs-hero--v2::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, #07080a79, transparent 30%),
    linear-gradient(90deg, rgba(9,12,15,.92) 0%, rgba(10,13,17,.80) 24%, rgba(10,13,17,.33) 58%, rgba(2,6,10,.08) 100%);
}

/* Large screens: the hero image is a wide version of the photo
 * (hero-bild-cnc-fraesen-wide.webp, 2936×1024: spindle-free edges mirrored outwards),
 * so it fills the full width and still shows the whole spindle (client feedback 01.12.2026).
 * The layer fills the whole hero (also behind the fixed header), so there is no gap
 * under the header – the header height differs for logged-in users (admin bar). */
@media (min-width: 1025px) {
  .bs-hero--v2::before {
    inset: 0;
    background-size: cover;
    background-position: 60% 20%;   /* spindle sits at ~60% of the image width */
  }
  .bs-hero--v2::after {
    background:
      linear-gradient(0deg, #07080a70, transparent 25%),
      linear-gradient(90deg, rgba(9,12,15,.92) 0%, rgba(10,13,17,.78) 25%, rgba(10,13,17,.30) 45%, rgba(2,6,10,0) 62%);
  }
}

@media (max-width: 1024px) {
  .bs-hero-section.bs-hero--v2 { padding: 110px 0 0 !important; min-height: 560px; }
}
@media (max-width: 580px) {
  .bs-hero-section.bs-hero--v2 { padding: 100px 0 0 !important; min-height: 540px; }
  .bs-hero--v2::before { background-position: 58% center; }   /* keeps the spindle on screen with the wide image */
  .bs-hero--v2::after { background: linear-gradient(90deg, #090d12e6, #090d129e 75%, #090d1280); }
}

/* ---------- Texts ---------- */
.bs-hero--v2,
.bs-hero--v2 .film-trigger { font-family: Arial, Helvetica, 'Segoe UI', sans-serif !important; }

.bs-hero-section.bs-hero--v2 h1.hero-title {
  font-family: Arial, Helvetica, 'Segoe UI', sans-serif !important;
  font-variation-settings: normal;
  font-size: clamp(54px, 5.1vw, 78px) !important;
  line-height: .99 !important;
  letter-spacing: -2.9px !important;
  margin: 0 0 24px !important;
  font-weight: 850 !important;
  color: #fff !important;
  text-transform: none;
}
.bs-hero--v2 .hero-title > span { display: block; }
.bs-hero--v2 .hero-title .dot { display: inline; color: #fff; }   /* white since client feedback 01.12.2026 (was red) */

.bs-hero-section.bs-hero--v2 p.hero-copy {
  font-size: 24px !important;
  line-height: 1.45 !important;
  max-width: 520px;
  text-wrap: balance;
  letter-spacing: -.2px;
  margin: 0 !important;                       /* button spacing is handled by the flex centring */
  color: #f4f4f4 !important;
}
@media (max-width: 1140px) { .bs-hero-section.bs-hero--v2 h1.hero-title { font-size: 68px !important; } }
@media (max-width: 830px) {
  .bs-hero-section.bs-hero--v2 h1.hero-title { font-size: clamp(50px, 8vw, 68px) !important; }
  .bs-hero-section.bs-hero--v2 p.hero-copy { font-size: 19px !important; max-width: 450px; }
}
@media (max-width: 580px) {
  .bs-hero-section.bs-hero--v2 h1.hero-title { font-size: clamp(44px, 12vw, 60px) !important; letter-spacing: -2px !important; }
  .bs-hero-section.bs-hero--v2 p.hero-copy { font-size: 17px !important; line-height: 1.5 !important; }
}

/* ---------- Button "Imagefilm ansehen" ---------- */
.film-trigger {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 10px 34px 10px 10px;
  border: 3px solid #fff; border-radius: 999px;
  background: linear-gradient(180deg, var(--ww-red), var(--ww-red-dark));
  color: #fff; cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  text-shadow: none;
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.film-trigger:hover,
.film-trigger:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0,0,0,.45);
  filter: brightness(1.08);
  color: #fff;
}
.film-trigger:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.film-ring {
  width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid #fff; background: var(--ww-red-dark);
  display: grid; place-items: center; flex: none;
}
.film-ring svg { width: 24px; height: 24px; fill: #fff; margin-left: 4px; }
.film-label { font-size: 26px; font-weight: 700; letter-spacing: -.3px; line-height: 1.1; white-space: nowrap; }
@media (max-width: 580px) {
  .film-trigger { gap: 14px; padding: 8px 24px 8px 8px; }
  .film-ring { width: 52px; height: 52px; }
  .film-ring svg { width: 20px; height: 20px; }
  .film-label { font-size: 20px; }
}

/* ---------- Pop-up ---------- */
html.ww-locked,
body.ww-locked { overflow: hidden; }

.ww-film-overlay {
  position: fixed; inset: 0; z-index: 100000;     /* above the fixed header (z-index 1000) */
  display: flex; align-items: flex-start; justify-content: center;
  padding: 7vh 20px 30px;
  background: rgba(6,8,11,.82);
  overflow-y: auto;
  font-family: "Open Sans", sans-serif;
}
.ww-film-overlay[hidden] { display: none !important; }
.ww-film-modal {
  width: min(100%, 920px);
  background: #111; color: #fff;
  box-shadow: 0 30px 90px #0005;
  border-radius: 5px; overflow: hidden;
}
.ww-film-head {
  padding: 25px 30px;
  border-bottom: 1px solid #323232; background: #1e1f21;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.ww-film-head h2 { font-size: 24px; margin: 0; letter-spacing: -.5px; color: #fff; }
.ww-film-close {
  border: 0; display: grid; place-items: center;
  background: #333; color: #fff; border-radius: 99px;
  width: 37px; height: 37px; flex: none; padding: 0; cursor: pointer;
}
.ww-film-close svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 2.2; }
.ww-film-stage { aspect-ratio: 16 / 9; position: relative; background: #030405; }
.ww-film-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #060606; }
@media (max-width: 580px) {
  .ww-film-overlay { padding: 4vh 12px; }
  .ww-film-head { padding: 18px 19px; }
  .ww-film-head h2 { font-size: 19px; }
}

/* ---------- "Unsere Produkte & Leistungen" no longer overlaps the hero ---------- */
/* mega-menu.css sets .services-grid { margin-top: -200px } above 1024px */
.services-grid { margin-top: 0 !important; }
