/* ==========================================
   EVT-IT Service – gemeinsames Stylesheet
   Gilt für alle Seiten: Theme, Reset, Header/Nav,
   Footer, Buttons, WhatsApp-Button, Cookie-Consent.
   Seiten-spezifische Inhalte (Hero, Karten, Preise,
   Team, Rechtstexte) bleiben in der jeweiligen HTML-Datei.
========================================== */

:root {
  --primary: #0382ea;          /* Markenblau – Icons, Rahmen, Akzente */
  --primary-strong: #0272cf;   /* Flächen mit weißer Schrift (Buttons, Pills):
                                  #0382ea trägt weißen Text nur mit 3,9:1 und
                                  liegt damit unter der Lesbarkeitsschwelle 4,5:1 */
  --link: #0669be;             /* Fließtext-Links auf hellem Grund (5,6:1) */
  --primary-dark: #010f3b;
  --primary-soft: #a1d4fb;

  --bg-page: #eff3ff;
  --bg-card: #ffffff;

  --text-main: #010f3b;
  --text-muted: #5c6470;       /* etwas dunkler als zuvor (#6b7280): auf dem
                                  getönten Seitenhintergrund lag der alte Wert
                                  mit 4,36:1 unter der Lesbarkeitsschwelle */

  --radius-lg: 20px;
  --radius-md: 14px;

  --max-width: 1300px;

  --shadow-soft: 0 14px 35px rgba(15, 23, 42, 0.14);
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.08);

  /* Typografie-Skala (Apple-artige optische Größenstufen) */
  --fs-2xs: 0.8125rem;  /* 13px – Feinschrift, Fußnoten */
  --fs-xs: 0.875rem;    /* 14px – Meta, kompakte Labels */
  --fs-sm: 0.9375rem;   /* 15px – Sekundärtext, UI-Text */
  --fs-base: 1rem;      /* 16px – Fließtext */
  --fs-md: 1.125rem;    /* 18px – Karten-/Unterüberschriften */
  --fs-lg: 1.375rem;    /* 22px – Zwischenüberschriften */
  --fs-xl: 1.8rem;      /* 29px – Abschnittsüberschriften */
  --fs-2xl: 2rem;       /* 32px – große Kennzahlen */
  --fs-logo: 1.6rem;    /* Marken-Logo */
}

/* Auf dem Telefon ist 13px für Fußnoten, Labels und Hinweistexte zu klein –
   dort eine Stufe größer. Gilt für alle Seiten. */
@media (max-width: 560px) {
  :root {
    --fs-2xs: 0.875rem;
  }
}

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

/* Nutzer mit reduzierter Bewegung: alle Animationen/Übergänge auf minimal kürzen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
}

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

.icon {
  width: 1.1em;
  height: 1.1em;
  stroke-width: 2;
  vertical-align: -0.2em;
  flex-shrink: 0;
}

/* Verhindert, dass Überschriften von Anker-Zielsektionen hinter dem
   fixierten Header verschwinden (z.B. Klick auf "Leistungen anzeigen") */
[id] {
  scroll-margin-top: 88px;
}

/* Bug-Fix: Die Dropdown-Links zu einzelnen Leistungs-Karten (z.B. "Cloud &
   Microsoft 365" oder "WLAN & Heimnetzwerk") zielen auf die Karte selbst,
   nicht auf die Section – die 88px oben reichten nur für den Header, aber
   die Karte lag dann ganz oben im Viewport und die Abschnitts-Überschrift
   darüber ("Unsere Leistungen...") war nicht mehr zu sehen, man landete
   quasi nur auf der Box. Größerer Versatz holt die Überschrift mit ins
   Bild. */
.card[id] {
  scroll-margin-top: 230px;
}

/* ==========================================
   LOGO
========================================== */
.logo {
  display: flex;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.75;
}

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

/* ==========================================
   TOP BAR & HEADER
========================================== */
.top-bar {
  background: var(--primary-dark);
  color: #e5edff;
  font-size: var(--fs-xs);
}

.top-bar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 1.5rem;
  row-gap: 0.3rem;
  flex-wrap: wrap;
  text-align: center;
}

.top-bar-item {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  font-weight: 500;
  opacity: 0.85;
}

.top-bar-item a {
  color: inherit;
  text-decoration: none;
}

.top-bar-item a:hover {
  text-decoration: underline;
}

.top-bar-item:not(:first-child) {
  padding-left: 1.5rem;
  border-left: 1px solid rgba(229, 237, 255, 0.22);
}

header {
  background: #ffffff;
  border-bottom: 1px solid #dde3f0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

/* ==========================================
   NAVIGATION
========================================== */
nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  font-size: var(--fs-sm);
}

nav a {
  position: relative;
  font-weight: 600;
  padding-bottom: 0.1rem;
  transition: opacity 0.2s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a:hover {
  opacity: 0.75;
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  padding: 0.5rem 0.8rem;
  margin: -0.5rem -0.8rem;
  position: relative;
  border-radius: 8px;
}

.nav-dropdown-content {
  display: block;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: #ffffff;
  min-width: 260px;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
  padding: 0.5rem 0;
  z-index: 1000;
  border: 1px solid #e8f0ff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  transition: opacity 150ms ease-out, transform 150ms ease-out, visibility 150ms;
  pointer-events: none;
}

.nav-dropdown:hover .nav-dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.nav-dropdown-content a {
  display: block;
  padding: 0.75rem 1.3rem;
  color: var(--text-main);
  font-weight: 500;
  font-size: var(--fs-sm);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-content a::after {
  display: none;
}

.nav-dropdown-content a:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
  opacity: 1;
}

.nav-dropdown-content a.dropdown-main {
  font-weight: 700;
  border-bottom: 1px solid #e8f0ff;
  padding-bottom: 0.75rem;
  margin-bottom: 0.3rem;
}

.nav-dropdown-content a.dropdown-contact {
  border-top: 1px solid #e8f0ff;
  margin-top: 0.3rem;
  padding-top: 1rem;
}

.nav-support {
  background: var(--primary-strong);
  color: #ffffff;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(3, 130, 234, 0.5);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-support:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.nav-support:active {
  transform: scale(0.97);
}

.nav-toggle {
  display: none;
  border: none;
  background: none;
  font-size: var(--fs-xl);
  cursor: pointer;
}

/* Direkter Kontakt-Button im mobilen Header, nicht im Burger-Menü versteckt */
.header-contact-btn {
  display: none;
}

@media (max-width: 860px) {
  .header-inner { padding: 0.8rem 0.9rem; }
}

@media (max-width: 760px) {
  nav ul {
    display: none;
  }

  .header-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: 0.6rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: var(--primary-strong);
    color: #ffffff;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .header-contact-btn:hover {
    background: var(--primary-dark);
  }

  .header-contact-btn:active {
    transform: scale(0.96);
  }

  .nav-toggle {
    display: block;
  }

  .header-inner {
    padding: 0.6rem 0.9rem;
  }

  .top-bar {
    display: none;
  }

  /* "Kontakt" steht auf Mobil schon als eigener Button im Header,
     im Burger-Menü wäre er doppelt */
  .nav-kontakt-item {
    display: none;
  }

  nav ul.is-open {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: absolute;
    top: 100%;
    right: 1rem;
    background: #ffffff;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
    min-width: 220px;
  }

  nav ul.is-open li {
    display: block;
  }

  nav ul.is-open .nav-support {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .nav-dropdown-content {
    position: static;
    box-shadow: none;
    background: #f8faff;
    margin: 0.5rem 0 0 1rem;
    padding: 0.3rem 0;
    border-radius: 8px;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .nav-dropdown:hover .nav-dropdown-content {
    display: none;
  }

  .nav-dropdown.is-open .nav-dropdown-content {
    display: block;
  }

  .nav-dropdown-content a {
    padding: 0.5rem 1rem;
    font-size: var(--fs-xs);
  }
}

@media (max-width: 420px) {
  .top-bar {
    display: none;
  }

  .header-inner {
    padding: 0.5rem 0.8rem;
  }

  nav ul {
    gap: 1rem;
  }

  .nav-support {
    padding: 0.32rem 0.8rem;
    font-size: var(--fs-xs);
  }
}

/* ==========================================
   BUTTONS
========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--fs-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-strong);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(3, 130, 234, 0.5);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(3, 130, 234, 0.6);
}

.btn-outline {
  background: #ffffff;
  border-color: #d0dbff;
  color: var(--link);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: #edf2ff;
  transform: translateY(-1px);
}

.btn-primary:active,
.btn-outline:active {
  transform: scale(0.97);
}

/* ==========================================
   FOOTER
========================================== */
footer {
  margin-top: 3rem;
  padding: 2.75rem 1.25rem 2.25rem;
  background: var(--primary-dark);
  color: #e5edff;
  font-size: var(--fs-xs);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto auto auto auto;
  justify-content: space-between;
  column-gap: 2.5rem;
  row-gap: 2.5rem;
  align-items: start;
}

/* <address> ist semantisch korrekt für die Firmenanschrift, soll aber wie die
   übrigen Footer-Zeilen aussehen (kursiv-Default des Browsers abschalten). */
.footer-address {
  font-style: normal;
  display: inline;
}

.footer-links {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links::before {
  content: "Rechtliches";
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #90a3ce;
  margin-bottom: 0.15rem;
}

/* Seitenspalte im Footer: gleiche Optik wie "Rechtliches", eigene Überschrift.
   Muss nach .footer-links::before stehen, sonst gewinnt dessen Text. */
.footer-nav::before {
  content: "Seiten";
}

.footer-links a {
  opacity: 0.85;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-contact {
  order: 1;
  display: flex;
  flex-direction: column;
  font-size: var(--fs-sm);
  color: #f1f5ff;
  gap: 0.9rem;
}

.footer-brand {
  font-weight: 700;
  font-size: var(--fs-base);
  color: #ffffff;
  margin-bottom: 0.1rem;
}

.footer-contact > div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.footer-contact a {
  color: #f1f5ff;
  text-decoration: none;
}

.footer-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-icon-badge svg {
  width: 16px;
  height: 16px;
  stroke: #e5edff;
}

.social-links {
  order: 3;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.social-links::before {
  content: "Folgen Sie uns";
  font-size: var(--fs-2xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #90a3ce;
  margin-bottom: 0.15rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(226,232,240,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,0.3);
  color: #e5edff;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-links a svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.social-links a:hover {
  background: #ffffff;
  color: #010f3b;
  transform: translateY(-2px);
}

@media (max-width: 1080px) {
  .footer-inner {
    grid-template-columns: auto auto auto;
  }
}

@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: auto auto;
    row-gap: 2rem;
  }
  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer-inner {
    grid-template-columns: 1fr;
    justify-content: start;
    gap: 1.75rem;
  }
  .social-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .social-links::before {
    width: 100%;
  }
  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem 1.2rem;
  }
  .footer-links::before {
    width: 100%;
  }
}

/* ==========================================
   WHATSAPP FLOATING BUTTON
========================================== */
.whatsapp-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #25d366 0%, #20ba5c 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
  z-index: 2400;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-fab .icon,
.whatsapp-fab svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.whatsapp-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.55);
}

.whatsapp-fab:active {
  transform: scale(0.93);
}

@media (max-width: 480px) {
  .whatsapp-fab {
    right: 1rem;
    bottom: 1rem;
  }
}

/* ==========================================
   COOKIE-CONSENT PANEL (identisch auf allen Seiten)
========================================== */
.consent-panel {
  position: fixed;
  right: 1rem;
  left: auto;
  bottom: 1.25rem;
  z-index: 2600;
  display: none; /* wird per JS eingeblendet */
  width: auto;
  max-width: calc(100vw - 2rem);
}

.consent-card {
  background: #fff;
  color: var(--text-main);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 28px 60px rgba(11,30,70,0.18);
  width: 520px;
  max-width: calc(100vw - 2rem);
  border: 1px solid rgba(6, 30, 70, 0.06);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  font-size: var(--fs-sm);
}

.consent-left { flex: 1; }
.consent-title { font-weight: 800; color: var(--primary-dark); margin-bottom: 0.2rem; }
.consent-desc { color: var(--text-muted); margin-bottom: 0.6rem; }
.consent-toggles { background: var(--primary-soft); padding: 0.6rem; border-radius: 10px; display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.6rem; }
.consent-row { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; }
.consent-label { font-weight: 700; }
/* Die Erläuterungen stehen auf dem hellblauen Feld (--primary-soft), dort
   reicht das normale Grau nicht (3,8:1). Dunkler, aber weiter sekundär. */
.muted { font-size: var(--fs-2xs); color: #454c58; }

.consent-toggle { width: 46px; height: 26px; background: #fff; border-radius: 999px; position: relative; cursor: pointer; border: 2px solid rgba(3,130,234,0.12); flex-shrink: 0; }
.consent-toggle .knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); transition: left 0.12s ease; }
.consent-toggle.on .knob { left: 23px; }

.consent-actions { display: flex; gap: 0.6rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 0.4rem; }
.btn-consent { padding: 0.6rem 0.9rem; border-radius: 10px; font-weight: 700; cursor: pointer; border: 1px solid transparent; transition: transform 0.2s ease; font-size: var(--fs-sm); }
.btn-consent.primary { background: var(--primary-strong); color: #fff; }
.btn-consent.secondary { background: transparent; color: var(--primary-dark); border: 2px solid var(--primary-dark); }
.btn-consent.ghost { background: transparent; color: var(--primary-dark); border: 1px solid rgba(6,30,70,0.06); }
.btn-consent:active { transform: scale(0.97); }

@media (max-width: 420px) {
  .consent-card { width: 92vw; }
}
