/* ============================================================
   Kontaktformular – Freiwillige Feuerwehr der Stadt Baesweiler
   Gemeinsames Stylesheet für index.html und danke.html
   ============================================================ */

:root {
  --red: #c1121f;
  --red-dark: #9d0e18;
  --gray: #f4f4f5;
  --text: #1f2937;
  --border: #d1d5db;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--gray);
  color: var(--text);
  margin: 0;
  padding: 20px;
  line-height: 1.5;
}

/* ---------- Card / Container ---------- */
.card {
  max-width: 620px;
  margin: 30px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* ---------- Header with logo ---------- */
.header {
  background: var(--red);
  color: #fff;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.header .logo {
  height: 120px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.header h1 { margin: 0 0 6px; font-size: 1.5rem; }
.header p { margin: 0; opacity: 0.95; font-size: 0.95rem; }

/* ---------- Form ---------- */
form { padding: 28px 32px 32px; }
.field { margin-bottom: 18px; }
.row { display: flex; gap: 16px; }
.row .field { flex: 1; }

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
label .required { color: var(--red); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s;
}

select { appearance: none; cursor: pointer; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.12);
}

textarea { resize: vertical; min-height: 90px; }

/* ---------- Privacy / consent notice ---------- */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--gray);
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 22px;
}
.consent input { margin-top: 3px; flex-shrink: 0; }
.consent a { color: var(--red); }

/* ---------- Button ---------- */
button {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}
button:hover { background: var(--red-dark); }
button:disabled {
  background: #cbb3b5;
  cursor: not-allowed;
}

/* ---------- Error display ---------- */
.field input.invalid,
.field select.invalid,
.consent input.invalid {
  border-color: var(--red);
}

.field-error {
  display: block;
  color: var(--red);
  font-size: 0.8rem;
  margin-top: 5px;
}

.form-error {
  background: #fde8e8;
  color: var(--red-dark);
  border: 1px solid #f3b6b6;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.note {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 14px;
  text-align: center;
}

/* ---------- Privacy note + link button ---------- */
.privacy-note {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 20px;
  line-height: 1.5;
}

.link-button {
  display: inline;
  width: auto;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  color: var(--red);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover { background: none; color: var(--red-dark); }

/* ---------- Footer ---------- */
.site-footer {
  max-width: 620px;
  margin: 0 auto 30px;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}
.site-footer .link-button {
  color: #6b7280;
  text-decoration: none;
}
.site-footer .link-button:hover {
  color: var(--red);
  text-decoration: underline;
}
.footer-sep { margin: 0 8px; color: #cbd5e1; }

/* Honeypot – für Menschen unsichtbar, fängt Spam-Bots */
.honeypot { position: absolute; left: -9999px; top: -9999px; }

/* ============================================================
   Thank-you page
   ============================================================ */
body.thanks {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.thanks-card {
  background: #fff;
  max-width: 520px;
  text-align: center;
  padding: 48px 36px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.thanks-card .logo {
  height: 90px;
  width: auto;
  margin: 0 auto 20px;
  display: block;
}

.checkmark {
  width: 72px;
  height: 72px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: #fff;
  font-size: 2.2rem;
}

.thanks-card h1 { margin: 0 0 12px; font-size: 1.5rem; }
.thanks-card p { color: #4b5563; }

.thanks-card a.button-link {
  display: inline-block;
  margin-top: 22px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
}

/* ============================================================
   Modal / Popup (Datenschutzerklärung)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.modal-box {
  position: relative;
  background: #fff;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 12px;
  padding: 32px 36px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: auto;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.8rem;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}
.modal-close:hover { background: none; color: var(--red); }

.modal-box h2 {
  margin: 0 0 18px;
  font-size: 1.4rem;
  color: var(--red);
  padding-right: 30px;
}

.modal-content h3 {
  font-size: 1rem;
  margin: 20px 0 6px;
}
.modal-content p {
  font-size: 0.9rem;
  color: #374151;
  margin: 0 0 6px;
  line-height: 1.55;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  .row { flex-direction: column; gap: 0; }
  .header { flex-direction: column; text-align: center; gap: 14px; }
  .modal-box { padding: 24px 20px; }
}
