/* ==========================================================
   Repair Café Reichraming – Öffentlicher Bereich
   Farbpalette direkt vom Vereinslogo abgeleitet (Zahnrad-Anthrazit,
   Werkzeug-Grün, Schraubenzieher-Orange, Tassen-Creme).
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&display=swap');

:root {
  --dunkel: #2d3236;
  --gruen-dunkel: #3d5726;
  --gruen: #5c7e3b;
  --gruen-hell: #eef2e6;
  --amber: #e8721f;
  --amber-dunkel: #b85814;
  --creme: #faeed8;
  --text: #262b25;
  --text-hell: #5c6459;
  --hintergrund: #fbfaf6;
  --weiss: #ffffff;
  --rand: #e2e3dc;
  --fehler: #b3261e;
  --fehler-hell: #fdecea;
  --erfolg: #3d5726;
  --erfolg-hell: #eef2e6;
  --info-hell: #eef4fb;
  --info: #2a5b8a;
  --radius: 14px;
  --schatten: 0 2px 14px rgba(45, 50, 54, 0.08);
  --schatten-stark: 0 14px 40px rgba(45, 50, 54, 0.16);
  --font-display: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --max-width: 1100px;
  font-size: 17px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% -10%, rgba(92, 126, 59, 0.07), transparent 42%),
    radial-gradient(circle at 100% 4%, rgba(232, 114, 31, 0.06), transparent 38%),
    var(--hintergrund);
  background-attachment: fixed;
  line-height: 1.6;
}

h1, h2, h3 { color: var(--gruen-dunkel); line-height: 1.25; font-family: var(--font-display); }
h1 { font-size: 2.1rem; font-weight: 800; margin: 0 0 .5em; }
h2 { font-size: 1.45rem; font-weight: 700; margin: 1.4em 0 .6em; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 1em 0 .4em; }

a { color: var(--gruen); text-decoration: underline; }
a:hover { color: var(--gruen-dunkel); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--gruen-dunkel);
  color: #fff;
  padding: .75rem 1rem;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ---------- Header / Navigation ---------- */
.site-header {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(6px);
  border-bottom: 1px solid var(--rand);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .65rem;
  padding-bottom: .65rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--gruen-dunkel);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.logo-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.logo-text small { display: block; font-weight: 500; color: var(--text-hell); font-size: .72em; letter-spacing: .02em; }

.main-nav { display: flex; align-items: center; }
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
}
.nav-list a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: .4rem 0;
  border-bottom: 3px solid transparent;
}
.nav-list a.active,
.nav-list a:hover {
  color: var(--gruen-dunkel);
  border-bottom-color: var(--gruen);
}
.nav-list a.btn-nav {
  background: var(--gruen);
  color: #fff;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  border-bottom: none;
}
.nav-list a.btn-nav:hover,
.nav-list a.btn-nav.active {
  background: var(--gruen-dunkel);
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--gruen-dunkel);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .75rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-display);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 6px 16px rgba(232, 114, 31, .28);
}
.btn-primary:hover { background: var(--amber-dunkel); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(232, 114, 31, .34); }
.btn-secondary {
  background: transparent;
  color: var(--gruen-dunkel);
  border-color: var(--gruen);
}
.btn-secondary:hover { background: var(--gruen-hell); transform: translateY(-2px); }
.btn-large { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-small { padding: .4rem .8rem; font-size: .85rem; border-radius: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  background: linear-gradient(155deg, var(--dunkel) 0%, var(--gruen-dunkel) 48%, var(--gruen) 100%);
  color: #fff;
  padding: 4rem 0 3.5rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("/img/logo-mark.png");
  background-repeat: no-repeat;
  background-position: right -80px top -80px;
  background-size: 480px;
  opacity: .16;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.55) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  opacity: .07;
}
.hero-inner { text-align: center; position: relative; }
.hero h1 { color: #fff; font-size: 2.5rem; text-shadow: 0 2px 18px rgba(0,0,0,.15); }
.hero-lead { font-size: 1.2rem; max-width: 640px; margin: 0 auto 1.75rem; opacity: .95; }

.hero-termin-box {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: var(--radius);
  display: inline-block;
  padding: 1.5rem 2rem;
  backdrop-filter: blur(3px);
  box-shadow: 0 20px 45px rgba(0,0,0,.18);
}
.hero-termin-box--leer { background: rgba(255,255,255,.08); }
.hero-termin-label {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
  margin: 0 0 .25rem;
  color: var(--amber);
  font-weight: 700;
}
.hero-termin-datum { font-size: 1.6rem; font-weight: 800; margin: 0; font-family: var(--font-display); }
.hero-termin-meta { margin: .25rem 0 1.1rem; opacity: .9; }

/* ---------- Allgemeine Sections ---------- */
.section { padding: 2.5rem 0; }
.section--alt {
  background: var(--gruen-hell);
  background-image: radial-gradient(circle at 92% 12%, rgba(232, 114, 31, .08), transparent 40%);
}
.page-header { padding: 2.5rem 0 0.5rem; }
.section-cta { text-align: center; margin-top: 1.5rem; }
.section-cta .btn { margin: .3rem; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.kontakt-section { text-align: center; }

/* ---------- Regeln (erlaubt / nicht erlaubt) ---------- */
.regel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
}
.regel-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--schatten);
  transition: transform .18s ease, box-shadow .18s ease;
}
.regel-card:hover { transform: translateY(-3px); box-shadow: var(--schatten-stark); }
.regel-card--ok { border-left: 6px solid var(--gruen); }
.regel-card--nein { border-left: 6px solid var(--fehler); }
.regel-card h3 { margin-top: 0; }

/* ---------- Terminübersicht ---------- */
.termine-liste { display: grid; gap: 1.5rem; }
.termin-card {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  position: relative;
  box-shadow: var(--schatten);
  transition: transform .18s ease, box-shadow .18s ease;
}
.termin-card:hover { transform: translateY(-3px); box-shadow: var(--schatten-stark); }
.termin-card--highlight { border-color: var(--amber); border-width: 2px; }
.termin-card--vergangen { opacity: .65; }
.termin-badge {
  position: absolute;
  top: -12px; left: 1.5rem;
  background: var(--amber);
  color: #fff;
  padding: .25rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}
.termin-badge--vergangen { background: var(--text-hell); }

.termin-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem 1.5rem;
  margin: 1rem 0;
}
.termin-details dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-hell); }
.termin-details dd { margin: 0; font-weight: 600; }
.termin-beschreibung { white-space: pre-line; }
.termin-hinweis { color: var(--text-hell); font-style: italic; }

/* ---------- Formulare ---------- */
.hinweis-box {
  background: var(--info-hell);
  border-left: 5px solid var(--info);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.hinweis-box h2 { margin-top: 0; color: var(--info); font-size: 1.1rem; }
.hinweis-box p { margin: .3rem 0; }

.formular fieldset {
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1.5rem;
  margin: 0 0 1.5rem;
}
.formular legend {
  font-weight: 700;
  color: var(--gruen-dunkel);
  padding: 0 .5rem;
}
.form-row { margin-bottom: 1.1rem; }
.form-row-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.5rem;
}
.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: .35rem;
}
.form-row input[type=text],
.form-row input[type=email],
.form-row input[type=tel],
.form-row input[type=password],
.form-row input[type=date],
.form-row input[type=time],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: .65rem .75rem;
  border: 1px solid var(--rand);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 3px solid var(--gruen-hell);
  border-color: var(--gruen);
}
.form-row--checkbox label {
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.form-row--checkbox input { margin-top: .3rem; width: 18px; height: 18px; flex-shrink: 0; }
.form-row--submit { margin-top: 1.5rem; }
.feld-fehler { color: var(--fehler); font-size: .9rem; margin: .35rem 0 0; font-weight: 600; }

.agb-box {
  background: var(--hintergrund);
  border: 1px solid var(--rand);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.agb-box ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.agb-box li { margin-bottom: .4rem; }

/* ---------- Unterschriften-Zeichenfeld ---------- */
.signatur-feld label { display: block; font-weight: 600; margin-bottom: .35rem; }
.signatur-rahmen {
  background: #fff;
  border: 1.5px dashed var(--gruen);
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
}
.signatur-canvas {
  display: block;
  width: 100%;
  height: 200px;
  touch-action: none;
  cursor: crosshair;
  background: #fff;
}
.signatur-aktionen { margin-top: .6rem; }
.signatur-hinweis { color: var(--text-hell); font-size: .85rem; margin: .5rem 0 0; }

/* ---------- Alerts ---------- */
.alert {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}
.alert h1 { color: inherit; font-size: 1.5rem; margin-top: 0; }
.alert-error { background: var(--fehler-hell); color: var(--fehler); border-color: #f3c9c6; }
.alert-success { background: var(--erfolg-hell); color: var(--erfolg); border-color: #bfe0cd; }
.alert-info { background: var(--info-hell); color: var(--info); border-color: #c7dcef; }

.erfolg-section { max-width: 720px; }
.erfolg-details, .info-box {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(155deg, var(--dunkel), var(--gruen-dunkel));
  color: #eef5f0;
  margin-top: 3rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 2.5rem 1.25rem;
}
.footer-block h2 { color: #fff; font-size: 1.05rem; margin-top: 0; font-family: var(--font-display); }
.footer-block a { color: #d6ecdd; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 1rem 0;
  font-size: .85rem;
  opacity: .85;
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .info-grid, .regel-grid { grid-template-columns: 1fr; }
  .hero { padding: 3rem 0 2.5rem; }
}

@media (max-width: 700px) {
  .nav-toggle { display: flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
  .nav-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--rand);
    box-shadow: 0 12px 24px rgba(45, 50, 54, .12);
    display: none;
    padding: .5rem 1.25rem 1rem;
  }
  .nav-list.open { display: flex; }
  .nav-list li { width: 100%; }
  .nav-list a { display: block; padding: .85rem 0; }
  .nav-list a.btn-nav { display: inline-block; margin-top: .5rem; }
  .hero h1 { font-size: 1.9rem; }
  h1 { font-size: 1.6rem; }
  .hero-termin-box { padding: 1.25rem 1.5rem; width: 100%; }
  .hero::before { background-size: 320px; background-position: right -60px top -40px; }
  .btn-large { width: 100%; }
  .section-cta .btn { display: block; width: 100%; margin: .4rem 0; }
}

@media (max-width: 480px) {
  :root { font-size: 16px; }
  .logo-text small { display: none; }
  .hero { padding: 2.5rem 0 2rem; }
  .hero-lead { font-size: 1.05rem; }
  .regel-card, .termin-card, .admin-panel, .stat-card { padding: 1.1rem 1.25rem; }
}
