/**
 * Hero — Startseiten-Hero, Page-Header (Unterseiten), Breadcrumb
 */

/* Hero — Vollbild */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh; /* dynamische Viewport-Hoehe: verhindert Sprung/Clipping durch die Adressleiste auf iOS/Android */
  display: flex;
  align-items: stretch;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h)); /* gleitet unter den sticky Header */
  background-image: url('../images/background.webp');
  background-size: cover;
  background-position: center 65%;
  background-repeat: no-repeat;
}

/* Navy-Gradient-Overlay */
.hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(
    to bottom,
    #0D1B2A            0%,
    #0D1B2A            18%,
    rgba(13,27,42,.90) 35%,
    rgba(13,27,42,.45) 55%,
    rgba(13,27,42,.60) 72%,
    rgba(13,27,42,.75) 88%,
    rgba(13,27,42,.85) 100%
  );
}

/* Glow-Effekte */
.hero-glow {
  position: absolute; border-radius: 50%;
  pointer-events: none; will-change: transform, opacity; z-index: 2;
}
.hero-glow--1 {
  width: 700px; height: 700px; top: -200px; right: -100px;
  background: radial-gradient(circle, rgba(6,182,212,0.20) 0%, transparent 65%);
  animation: glowPulse 8s ease-in-out infinite; filter: blur(2px);
}
.hero-glow--2 {
  width: 500px; height: 500px; bottom: -50px; left: 10%;
  background: radial-gradient(circle, rgba(34,211,238,0.15) 0%, transparent 65%);
  animation: glowPulse 11s ease-in-out infinite 2s reverse; filter: blur(2px);
}
.hero-glow--3 {
  width: 300px; height: 300px; top: 40%; right: 25%;
  background: radial-gradient(circle, rgba(6,182,212,0.10) 0%, transparent 65%);
  animation: glowPulse 7s ease-in-out infinite 4s;
}

/* Organischer Blob */
.hero-blob {
  position: absolute; width: 600px; height: 550px; z-index: 2;
  top: 50%; right: 5%; transform: translateY(-50%);
  background: linear-gradient(135deg, rgba(30,58,95,0.5), rgba(13,27,42,0.3));
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  animation: blobMorph 14s ease-in-out infinite;
  filter: blur(50px); pointer-events: none;
}

/* Partikel */
.hero-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.particle {
  position: absolute; bottom: -20px;
  width: var(--size, 6px); height: var(--size, 6px);
  background: rgba(34, 211, 238, var(--opacity, 0.65));
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.5);
  animation: particleRise var(--dur, 12s) ease-in var(--delay, 0s) infinite;
  will-change: transform, opacity;
}

/* Hero-Inhalt */
.hero-content {
  position: relative; z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* schiebt den gesamten Inhalt als Block nach unten — funktioniert
    auch wenn Joomlas Modul-Rendering ihn in ein zusaetzliches Wrapper-Element packt, weil dann
    genau dieser eine Wrapper das Flex-Kind ist, das verschoben wird */
  min-width: 0;
  padding-top: calc(var(--header-h) + var(--space-xl));
  padding-bottom: var(--space-2xl);
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--nwa-cyan-400);
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.22);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-lg);
}
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--nwa-cyan-400);
  border-radius: 50%;
  animation: dotPulse 2s ease-in-out infinite;
}

.hero-headline {
  font-size: var(--fs-5xl); font-weight: 800;
  color: #fff; line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: var(--space-lg); max-width: 700px;
}
.hero-headline em { font-style: normal; color: var(--nwa-cyan-400); }

.hero-sub {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.72);
  max-width: 560px; line-height: 1.7;
  margin-bottom: var(--space-2xl);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; margin-bottom: var(--space-xl); }

.hero-stats {
  position: relative; z-index: 4;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.20);
  display: flex; flex-wrap: nowrap; gap: var(--space-2xl);
  overflow-x: auto; scrollbar-width: none; /* nie mehrzeilig, sonst waechst die Hoehe nach oben unkontrolliert */
}
.hero-stats::-webkit-scrollbar { display: none; }
.hero-stat     { display: flex; flex-direction: column; gap: 0.25rem; flex: none; }
.hero-stat-value {
  font-size: var(--fs-3xl); font-weight: 800;
  color: #fff; letter-spacing: -0.02em; line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  font-variant-numeric: tabular-nums;
}
.hero-stat-label {
  font-size: var(--fs-xs); font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.06em; text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* Page-Header (Unterseiten) */
.page-header {
  padding: calc(var(--header-h) + var(--space-2xl)) 0 var(--space-2xl);
  background:
    linear-gradient(135deg, rgba(13, 27, 42, 0.78) 0%, rgba(13, 27, 42, 0.68) 100%),
    url('../images/background.webp') center 45% / cover no-repeat;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 80% 50%, rgba(6, 182, 212, 0.14), transparent);
  pointer-events: none;
}
.page-header__content { position: relative; }
.page-header__title {
  font-size: var(--fs-3xl); font-weight: 800;
  color: #fff; letter-spacing: -0.02em; margin-bottom: var(--space-sm);
}

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: var(--space-xs);
  font-size: var(--fs-xs); color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-md); list-style: none;
}
.breadcrumb a { color: rgba(255, 255, 255, 0.65); transition: color var(--dur-fast); }
.breadcrumb a:hover { color: var(--nwa-cyan-400); }
.breadcrumb-sep    { opacity: 0.4; }
.breadcrumb-active { color: rgba(255, 255, 255, 0.9); font-weight: 600; }

/* Animations */
@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.2); }
}
@keyframes blobMorph {
  0%, 100% { border-radius: 60% 40% 70% 30%/50% 60% 40% 50%; transform: translateY(-50%) rotate(0deg); }
  33%       { border-radius: 40% 60% 30% 70%/60% 40% 60% 40%; transform: translateY(-52%) rotate(4deg); }
  66%       { border-radius: 70% 30% 50% 50%/40% 70% 30% 60%; transform: translateY(-48%) rotate(-3deg); }
}
@keyframes particleRise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: var(--opacity, 0.4); }
  80%  { opacity: calc(var(--opacity, 0.4) * 0.5); }
  100% { transform: translateY(-110vh) translateX(var(--drift, 30px)); opacity: 0; }
}
@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.7; }
}

@media (max-width: 768px) {
  /* Zentrierte statt linksbuendige Anordnung: wirkt auf schmalen Screens
     ausgewogener als am linken Rand ausgerichteter Content */
  .hero-content { text-align: center; justify-content: center; }
  .hero-badge     { align-self: center; }
  .hero-headline, .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-headline  { font-size: var(--fs-4xl); }
  .hero-stats     { gap: var(--space-xl); justify-content: center; }
  .hero-stat-value { font-size: var(--fs-2xl); }
  .hero-actions   { flex-direction: column; align-items: center; }
}

@media (max-width: 600px) {
  /* Eine Reihe mit 4 Werten wird bei dieser Breite zu eng (Labels werden
     abgeschnitten) — stattdessen ein 2x2-Kachelraster mit eigener Karten-Optik */
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    overflow-x: visible;
  }
  .hero-stat {
    align-items: center;
    gap: 0.15rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-xs);
  }
  .hero-stat-label { white-space: normal; }
}

@media (max-height: 800px) {
  .hero-content {
    padding-top: calc(var(--header-h) + var(--space-md));
    padding-bottom: var(--space-lg);
  }
  .hero-badge    { margin-bottom: var(--space-sm); }
  .hero-headline { margin-bottom: var(--space-sm); }
  .hero-sub      { margin-bottom: var(--space-lg); }
  .hero-stats    { padding-top: var(--space-md); gap: var(--space-lg); }
}

@media (max-height: 620px) {
  .hero-sub { display: none; }
  .hero-content {
    padding-top: calc(var(--header-h) + var(--space-sm));
    padding-bottom: var(--space-sm);
  }
}
