/* =========================================================================
   Solarpark Flächencheck — globales Stylesheet
   ========================================================================= */
:root {
  --green: #087b31;
  --green-dark: #066126;
  --green-darker: #054d1f;
  --green-light: #e8f4ec;
  --ink: #1c2321;
  --ink-soft: #47524d;
  --paper: #ffffff;
  --paper-soft: #f6f8f6;
  --line: #e2e8e3;
  --red: #d64541;
  --gold: #e5a935;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(18, 43, 26, 0.10);
  --shadow-soft: 0 2px 10px rgba(18, 43, 26, 0.07);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--green); }

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.55rem, 4.2vw, 2.4rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.9rem); font-weight: 800; }
h3 { font-size: clamp(1.1rem, 2.6vw, 1.35rem); font-weight: 700; }
.center { text-align: center; }
.u { text-decoration: underline; }
.small { font-size: 0.85rem; }

/* --- Ticker / Topbar ------------------------------------------------- */
.ticker {
  background: var(--green);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 9px 14px;
  letter-spacing: 0.02em;
}

/* --- Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  background: #274632 url("../img/hero-bg.jpeg") center/cover no-repeat;
  padding: 34px 0 54px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.55) 45%, rgba(20,40,26,0.25) 100%);
}
.hero > .container { position: relative; }
.hero__intro { text-align: center; max-width: 800px; margin: 0 auto 26px; }
.hero__kicker { font-size: 1.05rem; margin-bottom: 6px; }
.hero__sub {
  display: inline-block;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

/* --- Quiz-Card ----------------------------------------------------------- */
.quiz-wrap { max-width: 760px; margin: 0 auto; }
.progress {
  height: 14px;
  background: #eef1ee;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}
.progress__bar {
  height: 100%;
  width: 9%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.45s ease;
}
.quiz-card {
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4.5vw, 42px);
  min-height: 300px;
}
.quiz-card .step-badge {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 3px 14px;
  font-weight: 700;
}
.quiz-question { text-align: center; margin: 0.4em 0 0.9em; }
.quiz-hint { text-align: center; color: var(--ink-soft); font-style: italic; margin-bottom: 1em; }

.answers { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-top: 18px; }
.answers--3 { grid-template-columns: repeat(3, 1fr); }
.answers--4 { grid-template-columns: repeat(4, 1fr); }
.answers--1 { grid-template-columns: 1fr; }
@media (max-width: 720px) {
  .answers, .answers--3, .answers--4 { grid-template-columns: 1fr; }
}
.btn-answer {
  appearance: none;
  border: none;
  background: var(--green);
  color: #fff;
  font-family: var(--font);
  font-size: 1.02rem;
  font-weight: 600;
  padding: 16px 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--green-darker), var(--shadow-soft);
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn-answer:hover { background: var(--green-dark); }
.btn-answer:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--green-darker); }

.btn-primary {
  appearance: none;
  border: none;
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 16px 34px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--green-darker), var(--shadow-soft);
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:active { transform: translateY(2px); }
.btn-primary[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-primary .btn-sub { display: block; font-size: 0.8rem; font-weight: 500; }

.btn-back {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 16px;
  text-decoration: underline;
}

/* --- Formulare -------------------------------------------------------- */
.field { margin-bottom: 14px; text-align: left; }
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  font-family: var(--font);
  font-size: 1.05rem;
  padding: 15px 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus { border-color: var(--green); }
.field input.invalid { border-color: var(--red); }
.field-error { color: var(--red); font-size: 0.85rem; margin: 6px 2px 0; display: none; }
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.85rem; color: var(--ink-soft); text-align: left;
  margin: 14px 0 18px;
}
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--green); flex: none; }

.form-actions { text-align: center; margin-top: 20px; }

/* --- Transition / Loader ---------------------------------------------- */
.loader-box { text-align: center; padding: 40px 10px; }
.spinner {
  width: 52px; height: 52px;
  border: 5px solid var(--green-light);
  border-top-color: var(--green);
  border-radius: 50%;
  margin: 22px auto 0;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Content-Sections -------------------------------------------------- */
.section { padding: 54px 0; }
.section--soft { background: var(--paper-soft); }
.section--dark { background: #14231a; color: #fff; }
.section h2 { text-align: center; margin-bottom: 1.1em; }
.section .lead { text-align: center; max-width: 720px; margin: 0 auto 1.4em; }
.media { border-radius: var(--radius); box-shadow: var(--shadow-soft); display: block; margin: 26px auto; }

.checklist { list-style: none; padding: 0; margin: 0 auto; max-width: 680px; }
.checklist li { padding: 9px 0; font-size: 1.02rem; }

.steps { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.step-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.step-card .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 800; font-size: 1.2rem;
  margin-bottom: 12px;
}

.testimonials { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
@media (max-width: 720px) { .testimonials { grid-template-columns: 1fr; } }
.t-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-soft);
}
.t-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.t-card .t-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.t-card .t-name { font-weight: 700; }
.t-card .t-stars { color: var(--gold); letter-spacing: 2px; }
.t-card p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }

.press { text-align: center; padding: 26px 0 8px; }
.press .press-label { color: var(--ink-soft); margin-bottom: 12px; }
.press img { max-height: 56px; width: auto; }

.trust-bullets { text-align: center; font-weight: 700; margin: 26px 0 6px; }
.trust-bullets div { margin: 4px 0; }

/* --- CTA-Riegel --------------------------------------------------------- */
.cta-band { text-align: center; padding: 46px 0; }
.cta-note { margin-top: 12px; color: var(--ink-soft); font-size: 0.9rem; }

.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: rgba(23, 32, 26, 0.96);
  padding: 10px 16px;
  text-align: center;
  z-index: 50;
  transform: translateY(110%);
  transition: transform 0.3s ease;
}
.sticky-cta.visible { transform: translateY(0); }

/* --- Footer -------------------------------------------------------------- */
.footer {
  background: #191f1b;
  color: #cfd7d1;
  text-align: center;
  padding: 36px 20px 110px;
  font-size: 0.85rem;
}
.footer a { color: #fff; }
.footer .footer-legal { max-width: 820px; margin: 18px auto 0; color: #8d968f; font-size: 0.75rem; }

/* --- Karten-Overlay (Luftbild einzeichnen) ------------------------------ */
.map-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  background: #e5e3df;
  display: none;
}
.map-overlay.open { display: block; }
#map { position: absolute; inset: 0; }

.map-ui { position: absolute; z-index: 5; }
#pac-input {
  top: 12px; left: 12px;
  width: min(340px, 62vw);
  padding: 11px 14px;
  font-family: var(--font);
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  box-shadow: var(--shadow-soft);
  outline: none;
}
#map-exit {
  top: 12px; right: 12px;
  background: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
#map-delete {
  top: 72px; left: 12px;
  background: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: center;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  display: none;
}
#map-delete svg { fill: #ef5353; width: 30px; height: 30px; display: block; margin: 0 auto 2px; }
#map-help {
  top: 72px; right: 12px;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 42px; height: 42px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink-soft);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.map-modal {
  position: absolute; z-index: 10;
  top: 124px; right: 12px;
  width: min(420px, calc(100vw - 24px));
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 16px 20px;
  display: none;
}
.map-modal ol { margin: 8px 0 4px; padding-left: 20px; }
.map-modal li { margin: 6px 0; font-size: 0.92rem; }
.map-modal .close {
  float: right; border: none; background: none;
  font-size: 1.5rem; cursor: pointer; color: #aaa; line-height: 1;
}

.center-box {
  position: absolute;
  z-index: 4;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 250px; height: 250px;
  pointer-events: none;
  display: none;
  background:
    linear-gradient(90deg, #fff 5px, transparent 0) 0 0,
    linear-gradient(90deg, #fff 5px, transparent 0) 0 100%,
    linear-gradient(270deg, #fff 5px, transparent 0) 100% 0,
    linear-gradient(270deg, #fff 5px, transparent 0) 100% 100%,
    linear-gradient(180deg, #fff 5px, transparent 0) 0 0,
    linear-gradient(180deg, #fff 5px, transparent 0) 100% 0,
    linear-gradient(0deg, #fff 5px, transparent 0) 0 100%,
    linear-gradient(0deg, #fff 5px, transparent 0) 100% 100%;
  background-repeat: no-repeat;
  background-size: 30px 30px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.plus-button {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: #fff;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  font-weight: 600;
  color: #1a1b22;
  cursor: pointer;
  pointer-events: all;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.zoom-message {
  position: absolute;
  z-index: 5;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}
/* Hinweis-Variante: darf umbrechen (längerer Text) statt einzeiliger Status */
.zoom-message.is-hint {
  white-space: normal;
  max-width: min(88vw, 420px);
  text-align: center;
  line-height: 1.35;
}
#map-submit {
  position: absolute;
  z-index: 6;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  border: none;
  background: var(--green);
  color: #fff;
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 15px 40px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--green-darker), var(--shadow);
  display: none;
}
.ha-label {
  background: rgba(8, 123, 49, 0.92);
  color: #fff;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  position: absolute;
  box-shadow: var(--shadow-soft);
}

/* --- Kontaktseite / Danke-Seite ---------------------------------------- */
.page-hero {
  position: relative;
  min-height: 100vh;
  background: #274632 url("../img/hero-bg.jpeg") center/cover no-repeat;
  padding: 40px 0 60px;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.82);
}
.page-hero > .container { position: relative; }
.page-logo { display: block; margin: 0 auto 28px; max-width: 300px; }
.contact-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 640px;
  margin: 30px auto;
  padding: clamp(24px, 4.5vw, 40px);
  text-align: center;
}
