/* ==========================================================================
   Xpert kfzschulung GmbH – Stylesheet
   --------------------------------------------------------------------------
   MARKENFARBEN: Hier zentral anpassen.
   Die Werte unten sind die Farben aus dem Xpert-kfzschulung-Logo
   (Blau #0000c5, Grün #00ba0a). Änderungen hier wirken
   automatisch auf alle Seiten.
   ========================================================================== */
:root {
  --brand: #0000c5;        /* Blau aus dem Logo */
  --brand-dark: #07074d;   /* dunkles Logo-Blau für Header/Footer */
  --brand-light: #2b3cf0;  /* helleres Blau für Links/Hover */
  --accent: #009e09;       /* Grün aus dem Logo (etwas dunkler für lesbare Buttons/Texte) */
  --accent-dark: #007d07;  /* dunkles Grün für Hover */
  --accent-bright: #00ba0a;/* Original-Logo-Grün, auf dunklem Hintergrund */

  --ink: #14202b;
  --muted: #5a6875;
  --line: #e2e7ec;
  --bg: #ffffff;
  --bg-soft: #f4f7fa;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(7, 7, 77, .10);
  --max: 1200px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.65; font-size: 17px; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-light); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--brand-dark); color: #fff; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .8rem;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 760px; }
.section--dark .lead { color: rgba(255,255,255,.8); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: .85em 1.5em;
  border-radius: 999px; font-weight: 600; border: 2px solid transparent;
  transition: transform .15s, background .2s, color .2s; cursor: pointer; font-size: 1rem;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); }
.btn--ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--brand-dark); }
.btn--outline { border-color: var(--brand); color: var(--brand); }
.btn--outline:hover { background: var(--brand); color: #fff; }

/* ---------- Header ---------- */
.topbar { background: var(--brand-dark); color: rgba(255,255,255,.8); font-size: .85rem; }
.topbar .container { display: flex; justify-content: flex-end; gap: 24px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar a { color: #fff; }
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand img { height: 64px; width: auto; }
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name strong { font-size: 1.15rem; color: var(--brand); }
.brand-name small { font-size: .78rem; color: var(--muted); letter-spacing: .04em; }
.logo-fallback {
  height: 48px; padding: 0 12px; border-radius: 10px; display: flex; align-items: center;
  background: var(--brand); color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: .02em; white-space: nowrap;
}
.logo-fallback span { color: var(--accent); }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a {
  display: block; padding: .55em .9em; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: .96rem;
}
.nav a:hover { background: var(--bg-soft); text-decoration: none; color: var(--brand); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--bg-soft); box-shadow: inset 0 -3px 0 var(--accent); }
.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--brand);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 12px 20px 20px; }
  .nav a { padding: .9em 1em; }
  .topbar .container { justify-content: center; gap: 14px; }
  .topbar .container > span { display: none; }
}
@media (max-width: 420px) {
  .brand { gap: 10px; }
  .brand img { height: 48px; }
  .logo-fallback { font-size: .8rem; padding: 0 9px; }
  .brand-name strong { font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; min-height: min(78vh, 720px); display: flex; align-items: center;
  background: var(--brand-dark); overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--brand-dark) 15%, rgba(7,7,77,.55) 60%, rgba(7,7,77,.2));
}
.hero .container { position: relative; z-index: 1; padding-top: 60px; padding-bottom: 60px; }
.hero h1 { max-width: 780px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.2rem; max-width: 640px; color: rgba(255,255,255,.88); }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.page-hero { position: relative; color: #fff; background: var(--brand-dark); overflow: hidden; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--brand-dark), rgba(7,7,77,.4)); }
.page-hero .container { position: relative; z-index: 1; padding-top: clamp(60px, 9vw, 110px); padding-bottom: clamp(50px, 7vw, 80px); }
.page-hero p { color: rgba(255,255,255,.85); max-width: 700px; font-size: 1.1rem; margin: 0; }
.breadcrumb { font-size: .85rem; color: rgba(255,255,255,.7); margin-bottom: 10px; }
.breadcrumb a { color: rgba(255,255,255,.9); }

/* ---------- Feature strip ---------- */
.features { margin-top: -60px; position: relative; z-index: 2; }
.features .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  display: flex; gap: 18px; align-items: flex-start; color: var(--ink); border-top: 4px solid var(--accent);
}
.feature:hover { text-decoration: none; transform: translateY(-3px); transition: transform .2s; }
.feature .icon { flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--bg-soft); color: var(--brand); display: grid; place-items: center; }
.feature .icon svg { width: 28px; height: 28px; }
.feature h3 { margin-bottom: .25em; color: var(--brand); }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .features .grid { grid-template-columns: 1fr; } }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.split--rev > :first-child { order: 2; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 40px; }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; color: var(--ink); transition: transform .2s;
}
a.card:hover { text-decoration: none; transform: translateY(-4px); }
.card__img { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-soft); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card__img--contain img { object-fit: contain; padding: 18px; }
a.card:hover .card__img img { transform: scale(1.05); }
.card__body { padding: 22px 24px 26px; flex: 1; }
.card__body h3 { color: var(--brand); }
.card__body p { color: var(--muted); margin: 0; font-size: .96rem; }
.card__more { display: inline-block; margin-top: 12px; font-weight: 600; color: var(--accent-dark); }

/* ---------- Stats / USP ---------- */
.usp { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.usp div { border-left: 3px solid var(--accent); padding: 6px 0 6px 18px; }
.usp strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.usp span { color: rgba(255,255,255,.75); font-size: .95rem; }
@media (max-width: 860px) { .usp { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .usp { grid-template-columns: 1fr; } }

/* ---------- Trainer ---------- */
.trainers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; margin-top: 40px; max-width: 600px; }
.center .trainers { margin-left: auto; margin-right: auto; }
.trainer { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-align: center; }
.trainer img { width: 100%; aspect-ratio: 1/1; object-fit: cover; object-position: center; background: #fff; }
.trainer div { padding: 18px; }
.trainer h3 { margin: 0; color: var(--brand); }
.trainer p { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }

/* ---------- Trainings list ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 30px 0 10px; }
.search {
  flex: 1 1 280px; display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--line);
  border-radius: 999px; padding: 0 18px;
}
.search:focus-within { border-color: var(--brand-light); }
.search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search input { border: 0; outline: 0; font: inherit; padding: 12px 0; width: 100%; background: transparent; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: .45em 1em; font: inherit;
  font-size: .9rem; font-weight: 600; cursor: pointer; color: var(--ink);
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.t-group { margin-top: 44px; }
.t-group h2 { font-size: 1.5rem; display: flex; align-items: center; gap: 12px; }
.t-group h2 .count { font-size: .8rem; background: var(--bg-soft); color: var(--muted); padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.t-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.t-list li {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand-light); border-radius: 10px;
  padding: 14px 16px; font-size: .97rem; line-height: 1.45;
}
.t-list li:hover { border-left-color: var(--accent); box-shadow: var(--shadow); }
.t-empty { display: none; padding: 40px; text-align: center; color: var(--muted); }
@media (max-width: 400px) { .t-list { grid-template-columns: 1fr; } }

.cat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.cat-tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; color: #fff; }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-tile:hover img { transform: scale(1.06); }
.cat-tile span {
  position: absolute; inset: auto 0 0 0; padding: 40px 20px 18px; font-weight: 700; font-size: 1.2rem;
  background: linear-gradient(transparent, rgba(7,7,77,.9));
}
.cat-tile:hover { text-decoration: none; }
@media (max-width: 760px) { .cat-tiles { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 40px; }
.contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; border-top: 4px solid var(--brand); }
.contact-card h3 { color: var(--brand); }
.contact-card address { font-style: normal; color: var(--muted); margin-bottom: 14px; }
.contact-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .95rem; }
.contact-card dt { color: var(--muted); }
.contact-card dd { margin: 0; word-break: break-word; }
.form { display: grid; gap: 16px; max-width: 760px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form input, .form select, .form textarea {
  font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: #fff; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 0; border-color: var(--brand-light); }
.form small { color: var(--muted); font-weight: 400; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }

/* ---------- Downloads / Legal ---------- */
.dl-list { display: grid; gap: 14px; margin-top: 24px; }
.dl {
  display: flex; align-items: center; gap: 18px; padding: 18px 22px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink);
}
.dl:hover { text-decoration: none; box-shadow: var(--shadow); border-color: var(--brand-light); }
.dl .icon { flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.dl strong { display: block; color: var(--brand); }
.dl span { color: var(--muted); font-size: .9rem; }
.legal { max-width: 820px; }
.legal h2 { margin-top: 1.6em; }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(120deg, var(--brand), var(--brand-light)); color: #fff; border-radius: 20px;
  padding: clamp(32px, 5vw, 56px); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cta h2 { margin: 0 0 .3em; }
.cta p { margin: 0; color: rgba(255,255,255,.85); }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,.75); font-size: .95rem; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 64px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 1rem; }
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-logo { display: inline-flex; background: #fff; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; }
.footer-logo img { height: 64px; width: auto; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 18px; padding-bottom: 18px; grid-template-columns: none; font-size: .85rem; }
@media (max-width: 860px) { .site-footer .container { grid-template-columns: 1fr; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } * { scroll-behavior: auto !important; transition: none !important; } }

/* Grün auf dunklem Hintergrund heller darstellen (besser lesbar) */
.hero h1 em, .section--dark .eyebrow, .hero .eyebrow, .logo-fallback span { color: var(--accent-bright); }
.usp div { border-left-color: var(--accent-bright); }
