/* =========================================================
   ResQ Now EMT – Zentrales Stylesheet (clean + sticky header)
   ========================================================= */

/* ------------------------------ */
/* Variablen */
/* ------------------------------ */

:root {
  --primary: #e53935;
  --primary-dark: #b71c1c;
  --bg: #05070b;
  --text: #f5f5f5;
  --muted: #b0bec5;
  --accent: #ffd54f;
  --radius: 14px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 18px 40px rgba(0, 0, 0, 0.55);
  --shadow-pill: 0 14px 30px rgba(0, 0, 0, 0.4);
}

/* ------------------------------ */
/* Reset & Basis */
/* ------------------------------ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #2c3fa3 0, #111827 55%, #0a0d14 100%);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
  padding-top: 110px; /* genug Platz für den fixen Header */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

/* Bessere Fokus-Sichtbarkeit */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Fix: Dropdown darf nicht abgeschnitten werden */
header,
.site-header,
.hero {
    overflow: visible !important;
}

/* ------------------------------ */
/* Layout-Helfer */
/* ------------------------------ */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Abstand zwischen Sektionen */

.section {
  padding: 4.5rem 0;
}

.section-header {
  margin-bottom: 2rem;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.7rem;
}

.section-subtitle {
  color: var(--muted);
  max-width: 40rem;
}

/* =========================================================
   HEADER & NAVIGATION
   ========================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  padding: 0.3rem 0; /* etwas Luft oben/unten für das Logo */
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  gap: 1rem;
}

/* MOBILE HEADER FIX */
@media (max-width: 800px) {
  .nav {
    display: grid;
    grid-template-columns: auto 1fr auto; /* Logo | Platz | CTA + Burger */
    align-items: center;
  }

  .nav-cta {
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
    margin: 0;
    white-space: nowrap;
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

.logo img {
  height: 65px;
  width: auto;
  display: block;
}

/* Desktop-Navigation */

/* NEU */
.site-header nav > ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.site-header nav li {
  position: relative;
}

.site-header nav > ul > li > a,
.site-header nav > ul > li > button {
  font-size: 1.05rem;
  font-weight: 500;
  color: #111827;
  position: relative;
  padding-bottom: 0.2rem;
}

.site-header nav > ul > li > a::after,
.site-header nav > ul > li > button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.18s ease-out;
}

.site-header nav > ul > li > a:hover::after,
.site-header nav > ul > li > button:hover::after,
nav a.is-active::after {
  width: 100%;
}

nav a.is-active {
  position: relative;
}

nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* CTA rechts */

.nav-cta {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--primary);
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(229, 57, 53, 0.35);
  background: var(--primary-dark);
}

/* Burger-Button (Mobil) */

/* Basis-Style für das Burger-Icon */
.nav-toggle {
  background: none;
  border: none;
  padding: 0.35rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

/* Nur auf DESKTOP ausblenden */
@media (min-width: 801px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333333;
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Dropdown */

.dropdown {
  position: relative;
  padding-bottom: 0.2rem;
}

.dropdown-toggle {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.dropdown-toggle::after {
  content: "▾";
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0;
  background: #ffffff;
  color: #111827;
  border-radius: 14px;
  padding: 0.6rem 0.4rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity 0.18s ease-out,
    transform 0.18s ease-out,
    visibility 0.18s ease-out;
  z-index: 20;
  min-width: 260px;
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9ca3af;
  padding: 0.3rem 0.9rem;
}

/* Navigation droptown links */

.dropdown-menu a {
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-size: 0.94rem;
  color: #111827;
}

.dropdown-menu a:hover {
  background: rgba(229, 57, 53, 0.06);
  color: var(--primary) !important;
}

/* Desktop: Dropdown bei Hover */

@media (min-width: 801px) {
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Mobile-Navigation */

@media (max-width: 800px) {
  .site-header nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.16);
    transform-origin: top;
    transform: scaleY(0.7);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.18s ease-out,
      transform 0.18s ease-out,
      visibility 0.18s ease-out;
  }

  .site-header nav.nav-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scaleY(1);
  }

  .site-header nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.6rem 1.4rem 1rem;
    gap: 0.4rem;
  }

  .site-header nav > ul > li > a,
  .site-header nav > ul > li > button {
    font-size: 1rem;
    padding: 0.2rem 0;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    padding: 0.3rem 0 0.8rem;
    margin-top: 0.2rem;
    background: transparent;
    color: #111827;
  }

  .dropdown-menu a {
    padding-left: 1.1rem;
  }

  body {
    padding-top: 140px; /* genug Raum für Logo + Burger */
  }
}

/* --- Abstand Header → Text (Smartphones) kleiner machen --- */
@media (max-width: 600px) {
  body {
    padding-top: 90px;  /* vorher 140px */
  }
}

/* =========================================================
   TYPOGRAFIE
   ========================================================= */

h1,
h2,
h3,
h4 {
  font-weight: 700;
  color: #ffffff;
}

p {
  color: #e5e7eb;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  padding: 3.2rem 0 3.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.highlight {
  color: var(--accent);
}

.hero-subtitle {
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.55;
  margin-bottom: 1.7rem;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

/* kleine Info-Pills */

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.8);
  font-size: 0.8rem;
}

.hero-pill-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.hero-pill-value {
  color: #e5e7eb;
  font-weight: 600;
}

/* Hero-Karte rechts */

.hero-card {
  background: linear-gradient(135deg, #f44336, #c62828);
  border-radius: 28px;
  padding: 1.7rem 1.6rem 1.6rem;
  box-shadow: var(--shadow-card);
  color: #fff7ed;
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.hero-card-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1rem;
}

.hero-status {
  background: #ffd54f;
  color: #111827;
  border-radius: 999px;
  padding: 0.38rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.hero-footer-note {
  font-size: 0.82rem;
  color: #ffebee;
  margin-top: 1rem;
}

/* Hero-Grid in Karte */

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* Pill als Link */

.link-pill {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 18px;
  padding: 0.9rem 1.1rem;
  background: rgba(24, 24, 27, 0.8);
  border: 1px solid rgba(248, 250, 252, 0.06);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s ease-out,
    background-color 0.16s ease-out,
    border-color 0.16s ease-out;
}

.link-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.95);
  background: rgba(24, 24, 27, 0.96);
  border-color: rgba(248, 250, 252, 0.2);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 1.0rem 2.25rem;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background 0.15s ease-out,
    color 0.15s ease-out,
    border-color 0.15s ease-out;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  box-shadow: var(--shadow-pill);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(229, 57, 53, 0.55);
}

.btn-secondary {
  background: transparent;
  color: #fefefe;
  border-color: rgba(255, 213, 79, 0.7);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.7);
}

.btn-secondary:hover {
  background: rgba(17, 24, 39, 0.6);
}

/* Zwei-Spalten-Layout (Über uns, etc.) */

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.4rem;
  align-items: flex-start;
}

/* Karten / Grid-Layouts */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 26px;
  padding: 1.5rem 1.4rem 1.35rem;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.card-tag {
  display: inline-flex;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.7);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: #e5e7eb;
  font-size: 0.96rem;
  margin-bottom: 0.9rem;
}

.card-meta {
  font-size: 0.84rem;
  color: var(--muted);
}

/* Info-Box (Über uns) */

.info-box {
  background: rgba(15, 23, 42, 0.92);
  border-radius: 20px;
  padding: 1.5rem 1.4rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-card);
  font-size: 0.95rem;
}

/* Formulare */

.form-control {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 0.75rem 0.9rem;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.96rem;
}

/* Footer */

footer {
  padding: 2.5rem 0 2rem;
  background: #020617;
  margin-top: 3rem;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

@media (max-width: 900px) {
  .site-header nav ul {
    gap: 1.1rem;
    font-size: 0.92rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  .hero,
  .two-column {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.8rem 0 3rem;
  }

  .hero-card {
    margin-top: 1.2rem;
  }

  .grid-cards {
    grid-template-columns: 1fr;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  body {
    padding-top: 90px;
  }

  .container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 95%;
    margin-inline: auto;
  }

  .hero-card-title {
    font-size: 0.95rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .card {
    padding: 1.4rem 1.2rem;
  }

  .info-box {
    padding: 1.1rem;
  }

  .section-header {
    margin-bottom: 1.4rem;
  }

  .container {
    padding: 0 1rem;
  }
}

/* =========================================================
   KERNLEISTUNGEN (#leistungen)
   ========================================================= */

/* Rahmen für Kernleistungen, genau so breit wie die Seite */
#leistungen {
  border: 2px solid var(--accent);
  border-radius: 26px;
  padding: 3rem 2.5rem;  /* Innenabstand */
  margin-top: 2rem;
  margin-bottom: 3rem;
}

#leistungen .section-subtitle {
  max-width: 60rem;   /* breiter als vorher, aber nicht unendlich */
}

/* ============================================
   MOBILE-BREITE & ZENTRIERUNG FIX (2025-12-02)
   ============================================ */

/* Seite auf Smartphones etwas schmaler machen */
@media (max-width: 768px) {
  .container {
    max-width: 430px;
    margin-inline: auto;
  }
}

/* Buttons, Hero-Karte und Kernleistungen-Kasten zentrieren */
@media (max-width: 700px) {
  /* Hero-Grid untereinander und Inhalte mittig */
  .hero {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  /* Textspalte, Button-Gruppe und Hero-Karte bekommen eine Max-Breite
     und werden innerhalb der Seite zentriert */
  .hero > div,
  .hero-actions,
  .hero-card {
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Buttons untereinander in voller Breite innerhalb der Max-Breite */
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* Rahmen-Kasten mit den vier Kernbereichen ebenfalls zentriert & schmaler */
  #leistungen {
    width: 100%;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    padding-inline: 1.5rem;
  }
}

/* Fix: Pill bleibt immer einzeilig */
.hero-status {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 1rem;
    font-size: 0.85rem;
}

/* ============================================
   Hero-Pills: Label oben, Text unten (zweizeilig)
   ============================================ */

.hero-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

/* obere Zeile: Kategorie */
.hero-pill-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* untere Zeile: Beschreibung */
.hero-pill-value {
  display: block;
  font-size: 0.80rem;
  font-weight: 600;
  color: #f3f4f6;
}
