/* Frieda Werbeseite — Basis-Stylesheet
   WICHTIG: Diese Werte sind bewusst 1:1 aus der echten Software übernommen,
   nicht frei gestaltet — Quelle:
   - frontend/src/components/Layout.jsx (Tailwind-Klassen: gray-Skala für
     Flächen/Rahmen/Text, emerald als einzige Akzentfarbe für aktive Tabs
     und Haupt-Buttons, rounded-xl/rounded-lg statt Pillenform)
   - frontend/src/pages/Dashboard.jsx (Kachel-Stil: weiß/gray-800, Rahmen
     statt Schatten, hover:border-emerald-300)
   - frontend/src/assets/icon.png (App-Icon: Petrol #114B4B, Creme-Ordner
     #F7F3EE, Terracotta-Punkt #D96C4A)
   - frontend/src/services/theme.js (Hell/Dunkel/System, localStorage,
     Klasse "dark" auf <html> — hier mit demselben Muster nachgebaut)
   Siehe MARKENKONZEPT.md für die Begründung der Korrektur gegenüber der
   ersten (frei erfundenen) Fassung dieser Datei. */

:root {
  /* Flächen & Text — exakt Tailwind gray-Skala wie im Dashboard/Layout */
  --frieda-bg: #f9fafb;         /* gray-50, Seitenhintergrund hell */
  --frieda-surface: #ffffff;    /* Kacheln/Karten hell */
  --frieda-surface-alt: #f9fafb;/* abgesetzte Abschnitte hell */
  --frieda-border: #e5e7eb;     /* gray-200 */
  --frieda-text: #111827;       /* gray-900 */
  --frieda-text-muted: #4b5563; /* gray-600 */
  --frieda-text-faint: #6b7280; /* gray-500 */
  --frieda-text-faint-2: #9ca3af; /* gray-400 */

  /* Einzige Akzentfarbe der echten Oberfläche: emerald */
  --frieda-akzent: #059669;        /* emerald-600 — Buttons */
  --frieda-akzent-hover: #047857;  /* emerald-700 — Button-Hover */
  --frieda-akzent-text: #059669;   /* emerald-600 — aktiver Tab (hell) */
  --frieda-akzent-soft: #6ee7b7;   /* emerald-300 — Hover-Rahmen auf Karten */
  --frieda-akzent-bg-soft: #ecfdf5;/* emerald-50 — dezente Flächen */

  /* Markenfarben aus dem echten App-Icon — bewusst sparsam eingesetzt
     (Logo, Hero-Band), NICHT als Haupt-UI-Farbe (die ist emerald, s.o.) */
  --frieda-petrol: #114b4b;
  --frieda-terracotta: #d96c4a;
  --frieda-creme: #f7f3ee;

  --frieda-radius-karte: 12px;  /* rounded-xl, wie Dashboard-Kacheln */
  --frieda-radius-button: 8px;  /* rounded-lg, wie der "Scan starten"-Button */
}

:root[data-theme="dunkel"] {
  --frieda-bg: #111827;          /* gray-900 */
  --frieda-surface: #1f2937;     /* gray-800 */
  --frieda-surface-alt: #1a2332; /* etwas dunkler als gray-800, für Abschnittswechsel */
  --frieda-border: #374151;      /* gray-700 */
  --frieda-text: #f3f4f6;        /* gray-100 */
  --frieda-text-muted: #9ca3af;  /* gray-400 */
  --frieda-text-faint: #9ca3af;  /* gray-400 */
  --frieda-text-faint-2: #6b7280;/* gray-500 */

  --frieda-akzent: #059669;        /* Button bleibt wie im Hell-Modus (Layout.jsx setzt hier kein dark:-Override) */
  --frieda-akzent-hover: #047857;
  --frieda-akzent-text: #34d399;   /* emerald-400 — dark:text-emerald-400 bei aktiven Tabs */
  --frieda-akzent-soft: #065f46;   /* emerald-800, dezenter Rahmen im Dunkeln */
  --frieda-akzent-bg-soft: #052e23;

  --frieda-creme: #e7e2d6; /* leicht abgedunkelt, damit Creme-Flächen im Dark Mode nicht blenden */
}

/* Ohne expliziten Schalter (vor dem Laden des kleinen Inline-Skripts im
   <head>, siehe includes/header.php) nach Systemeinstellung richten —
   exakt das Verhalten von theme.js' "system"-Modus. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) {
    --frieda-bg: #111827;
    --frieda-surface: #1f2937;
    --frieda-surface-alt: #1a2332;
    --frieda-border: #374151;
    --frieda-text: #f3f4f6;
    --frieda-text-muted: #9ca3af;
    --frieda-text-faint: #9ca3af;
    --frieda-text-faint-2: #6b7280;
    --frieda-akzent-text: #34d399;
    --frieda-akzent-soft: #065f46;
    --frieda-akzent-bg-soft: #052e23;
    --frieda-creme: #e7e2d6;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--frieda-text);
  background: var(--frieda-bg);
  line-height: 1.6;
  transition: background-color 0.15s ease, color 0.15s ease;
}

h1, h2, h3 {
  font-family: inherit;
  font-weight: 700;
  color: var(--frieda-text);
  line-height: 1.25;
}

h1 { font-size: 2.3rem; }
h2 { font-size: 1.6rem; margin-top: 0; }
h3 { font-size: 1.05rem; font-weight: 600; }

a { color: var(--frieda-akzent-text); }
a:hover { color: var(--frieda-akzent-hover); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Kopfbereich / Navigation (spiegelt die Topbar aus Layout.jsx) --- */
.frieda-header {
  background: var(--frieda-surface);
  border-bottom: 1px solid var(--frieda-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.frieda-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.frieda-header a.logo-link { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.frieda-header img.logo { height: 30px; width: 30px; border-radius: 8px; }
.frieda-header .logo-text { font-size: 0.95rem; font-weight: 600; color: var(--frieda-text); }

nav.frieda-nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav.frieda-nav a {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--frieda-text-faint);
  font-weight: 500;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
}

nav.frieda-nav a:hover { color: var(--frieda-text); }
nav.frieda-nav a.aktiv { color: var(--frieda-akzent-text); border-bottom-color: var(--frieda-akzent-text); font-weight: 600; }

/* Theme-Umschalter: dasselbe Hell/Dunkel/System-Prinzip wie services/theme.js */
.theme-switch {
  display: inline-flex;
  border: 1px solid var(--frieda-border);
  border-radius: var(--frieda-radius-button);
  overflow: hidden;
}

.theme-switch button {
  background: transparent;
  border: none;
  color: var(--frieda-text-faint);
  padding: 6px 9px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.theme-switch button.aktiv { background: var(--frieda-akzent-bg-soft); color: var(--frieda-akzent-text); }
.theme-switch button:not(:last-child) { border-right: 1px solid var(--frieda-border); }

.cta-button {
  display: inline-block;
  background: var(--frieda-akzent);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: var(--frieda-radius-button);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
}

.cta-button:hover { background: var(--frieda-akzent-hover); color: #fff !important; }

.cta-button.sekundaer {
  background: transparent;
  color: var(--frieda-text) !important;
  border: 1px solid var(--frieda-border);
}

.cta-button.sekundaer:hover { border-color: var(--frieda-akzent-soft); color: var(--frieda-akzent-text) !important; }

/* --- Hero: einziger Ort, an dem die Marken-Petrolfarbe großflächig auftaucht,
   als Band analog zum App-Icon-Hintergrund — der Rest der Seite bleibt
   neutral wie die eigentliche Software-Oberfläche. --- */
.hero {
  padding: 64px 0 48px;
  text-align: center;
  background: var(--frieda-petrol);
  color: #f7f3ee;
}

.hero h1 { color: #ffffff; }

.hero p.claim {
  font-size: 1.15rem;
  color: #d7e5e2;
  max-width: 620px;
  margin: 0 auto 28px;
}

.hero-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }

.hero .cta-button.sekundaer { color: #f7f3ee !important; border-color: rgba(247,243,238,0.35); }
.hero .cta-button.sekundaer:hover { border-color: var(--frieda-terracotta); color: #fff !important; }

.vertrauensbadges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.badge {
  background: rgba(247,243,238,0.1);
  border: 1px solid rgba(247,243,238,0.25);
  border-radius: var(--frieda-radius-button);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #eef6f3;
}

/* --- Abschnitte / Karten (1:1 der Dashboard-Kachel-Stil) --- */
section { padding: 52px 0; }
section.alt { background: var(--frieda-surface-alt); }

.karten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.karte {
  background: var(--frieda-surface);
  border: 1px solid var(--frieda-border);
  border-radius: var(--frieda-radius-karte);
  padding: 20px;
  transition: border-color 0.15s ease;
}

.karte:hover { border-color: var(--frieda-akzent-soft); }

.karte .icon { font-size: 1.6rem; margin-bottom: 8px; display: block; }

.karte p { color: var(--frieda-text-faint); font-size: 0.92rem; }

.modul-badge {
  display: inline-block;
  background: var(--frieda-akzent-bg-soft);
  color: var(--frieda-akzent-text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* --- Anleitung / How-To --- */
.schritt-liste { counter-reset: schritt; list-style: none; margin: 28px 0 0; padding: 0; }

.schritt {
  position: relative;
  padding: 0 0 28px 48px;
  border-left: 2px solid var(--frieda-border);
  margin-left: 18px;
}

.schritt:last-child { border-left-color: transparent; padding-bottom: 0; }

.schritt::before {
  counter-increment: schritt;
  content: counter(schritt);
  position: absolute;
  left: -19px;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--frieda-akzent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schritt h3 { margin-bottom: 6px; }
.schritt p { color: var(--frieda-text-faint); }

/* --- Tabellen (Preise / Vergleich) --- */
table.frieda-tabelle {
  width: 100%;
  border-collapse: collapse;
  background: var(--frieda-surface);
  border: 1px solid var(--frieda-border);
  border-radius: var(--frieda-radius-karte);
  overflow: hidden;
  margin-top: 24px;
}

table.frieda-tabelle th, table.frieda-tabelle td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--frieda-border);
  font-size: 0.92rem;
}

table.frieda-tabelle th { background: var(--frieda-surface-alt); color: var(--frieda-text); font-weight: 600; }
table.frieda-tabelle tr:last-child td { border-bottom: none; }

.preis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.preis-karte {
  background: var(--frieda-surface);
  border: 1px solid var(--frieda-border);
  border-radius: var(--frieda-radius-karte);
  padding: 24px 18px;
  text-align: center;
}

.preis-karte.empfohlen { border: 2px solid var(--frieda-akzent); position: relative; }

.preis-karte.empfohlen::before {
  content: "Alles inklusive";
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--frieda-akzent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.preis-karte .betrag { font-size: 2rem; font-weight: 700; color: var(--frieda-text); }
.preis-karte .betrag span { font-size: 0.95rem; font-weight: 400; color: var(--frieda-text-faint); }

/* --- Formular (Kontakt) --- */
form.frieda-formular {
  background: var(--frieda-surface);
  border: 1px solid var(--frieda-border);
  border-radius: var(--frieda-radius-karte);
  padding: 24px;
  max-width: 620px;
}

form.frieda-formular label { display: block; font-weight: 600; font-size: 0.9rem; margin: 16px 0 6px; }
form.frieda-formular label:first-child { margin-top: 0; }

form.frieda-formular input,
form.frieda-formular select,
form.frieda-formular textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--frieda-border);
  border-radius: var(--frieda-radius-button);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--frieda-bg);
  color: var(--frieda-text);
}

form.frieda-formular input:focus,
form.frieda-formular select:focus,
form.frieda-formular textarea:focus {
  outline: none;
  border-color: var(--frieda-akzent);
}

form.frieda-formular textarea { min-height: 140px; resize: vertical; }

.hinweisbox {
  background: var(--frieda-akzent-bg-soft);
  border-left: 3px solid var(--frieda-akzent);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 22px 0;
  font-size: 0.92rem;
}

/* --- Footer --- */
footer.frieda-footer {
  background: var(--frieda-petrol);
  color: #d7e5e2;
  padding: 36px 0 20px;
  margin-top: 36px;
  font-size: 0.88rem;
}

footer.frieda-footer a { color: #f7f3ee; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;
  margin-bottom: 22px;
}

.footer-grid h4 { color: #fff; margin: 0 0 8px; font-size: 0.95rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 5px; }

.footer-copy {
  border-top: 1px solid rgba(247,243,238,0.15);
  padding-top: 14px;
  text-align: center;
  color: #a9c4bd;
}

.text-faint { color: var(--frieda-text-faint-2); }

@media (max-width: 680px) {
  .hero { padding: 44px 0 32px; }
  h1 { font-size: 1.8rem; }
  nav.frieda-nav ul { justify-content: center; }
}
