/* === Reset und Grundlagen === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent: #B00027;
  --accent-dark: #8a001e;
  --dark: #1a1a1a;
  --gray-900: #222;
  --gray-700: #555;
  --gray-400: #8a8a8a;
  --gray-200: #e5e5e5;
  --gray-100: #f5f5f5;
  --white: #fff;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --ok-bg: #d1fae5;
  --ok-fg: #065f46;
  --warn-bg: #fef3c7;
  --warn-fg: #92400e;
  --err-bg: #fef2f2;
  --err-fg: #b91c1c;
  --err-border: #fca5a5;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  color: var(--gray-900);
  line-height: 1.6;
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-weight: 500; line-height: 1.3; }
h1 { font-size: 1.9rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.35rem; margin-bottom: 0.75rem; margin-top: 2.25rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.5rem; margin-top: 1.5rem; }
p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.25rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }
hr { border: none; border-top: 1px solid var(--gray-200); margin: 2.5rem 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* === Kopfbereich === */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}
.logo:hover { text-decoration: none; }
.logo span { color: var(--accent); }

.header-meta {
  font-size: 0.85rem;
  color: var(--gray-700);
}

/* === Abschnitte === */
.section {
  padding: 2.5rem 0 3.5rem;
  flex: 1;
}

.text-center { text-align: center; }

.intro .lead {
  font-size: 1.05rem;
  color: var(--gray-700);
}

.org-logo {
  height: 100px;
  width: auto;
  display: block;
  margin-bottom: 1.25rem;
}

.venue-image {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin-top: 1rem;
}

.image-credit {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-top: 0.35rem;
}

.prose h2 { margin-top: 2rem; }

/* === Preise === */
.pricing-table-wrapper { overflow-x: auto; }

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.pricing-table th,
.pricing-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}
.pricing-table thead th {
  background: var(--dark);
  color: var(--white);
  font-weight: 500;
}

.notes-list {
  margin-top: 1rem;
  color: var(--gray-700);
  font-size: 0.95rem;
}

/* === Formular === */
.form-legend-note {
  font-size: 0.9rem;
  color: var(--gray-700);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

/* Titel schmaler als die beiden Namensfelder, sonst wirkt die Zeile schief. */
.name-grid {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1fr;
  gap: 0 1rem;
}

/* Die Regel form-group:last-child setzt den Abstand auf null. In einem Raster
   ist das letzte Feld nebenan und der Abstand faellt nicht auf, sobald das
   Raster auf dem Telefon aber einspaltig umbricht, klebt es am naechsten Feld. */
.name-grid .form-group:last-child,
.form-grid .form-group:last-child {
  margin-bottom: 1.25rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group:last-child { margin-bottom: 0; }

.form-group label,
.form-group legend,
.form-sublabel {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-400);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--white);
  color: var(--gray-900);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(176, 0, 39, 0.15);
}

fieldset {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
fieldset legend {
  padding: 0 0.5rem;
  font-weight: 700;
  font-size: 1rem;
}

.fieldset-note {
  font-size: 0.9rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.form-hint {
  display: block;
  font-size: 0.83rem;
  color: var(--gray-700);
  margin-top: 0.3rem;
}

.payment-hint { margin-top: 0.75rem; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
  width: auto;
  flex-shrink: 0;
}

.checkbox-block {
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  line-height: 1.5;
}
.checkbox-block input { margin-top: 0.3rem; }
.checkbox-block:last-child { margin-bottom: 0; }

.radio-inline {
  display: flex;
  gap: 2rem;
}

.required { color: var(--accent); }

/* === Zusammenfassung und Meldungen === */
.price-summary {
  background: var(--gray-100);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-size: 1.1rem;
  border-left: 4px solid var(--accent);
}

.form-error {
  background: var(--err-bg);
  color: var(--err-fg);
  border: 1px solid var(--err-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.notice {
  background: var(--gray-100);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.notice p:last-child { margin-bottom: 0; }
.notice-closed h2 { margin-top: 0; }

/* === Schaltflaechen === */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1.05rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button-row { margin-top: 2rem; }

/* === Statusseiten === */
.status-icon {
  font-size: 3rem;
  width: 80px;
  height: 80px;
  line-height: 80px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  font-weight: 700;
}
.status-cancel {
  background: var(--err-bg);
  color: var(--err-fg);
}

.loading-box {
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;
  padding: 3rem 2rem;
  color: var(--gray-700);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .loading-spinner { animation-duration: 3s; }
  html { scroll-behavior: auto; }
}

.confirmation-card {
  max-width: 620px;
  margin: 2rem auto 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
  overflow: hidden;
}

.confirmation-header {
  background: var(--ok-fg);
  color: var(--white);
  padding: 2rem;
  text-align: center;
}
.confirmation-header h1 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  color: var(--white);
}
.confirmation-header p {
  opacity: 0.92;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.check-circle {
  width: 60px;
  height: 60px;
  line-height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 1rem;
  font-size: 1.8rem;
}

.ref-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.3rem 1rem;
  border-radius: 100px;
  font-family: monospace;
  font-size: 0.8rem;
  margin-top: 0.75rem;
  word-break: break-all;
}

.confirmation-body { padding: 1.5rem 2rem 2rem; }

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.detail-label {
  color: var(--gray-700);
  font-size: 0.9rem;
}
.detail-value {
  font-weight: 500;
  font-size: 0.9rem;
  text-align: right;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.9rem 0 0;
  margin-top: 0.5rem;
  border-top: 2px solid var(--gray-900);
}
.total-label { font-weight: 700; }
.total-value { font-weight: 700; font-size: 1.15rem; }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
}
.status-paid { background: var(--ok-bg); color: var(--ok-fg); }
.status-processing { background: var(--warn-bg); color: var(--warn-fg); }

.center-note {
  max-width: 620px;
  margin: 1rem auto 0;
  text-align: center;
  color: var(--gray-700);
  font-size: 0.9rem;
}

/* === Fusszeile === */
.site-footer {
  background: var(--dark);
  color: var(--gray-200);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.85rem;
  margin-top: auto;
}
.site-footer p { margin-bottom: 0.35rem; }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer a { color: var(--white); text-decoration: underline; }
.footer-title { font-weight: 500; color: var(--white); }
.footer-links { margin-top: 0.75rem; }

/* === Mobil === */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  .form-grid,
  .name-grid { grid-template-columns: 1fr; }
  .radio-inline { gap: 1.25rem; }
  .confirmation-body { padding: 1.25rem 1.25rem 1.5rem; }
  .detail-row { flex-direction: column; gap: 0.15rem; }
  .detail-value { text-align: left; }
  .header-meta { font-size: 0.78rem; }
}
