:root {
  --rot: #c8102e;
  --rot-dunkel: #9c0c22;
  --dunkel: #1f2328;
  --grau: #5a6169;
  --hellgrau: #f4f5f6;
  --rand: #e2e4e7;
  --weiss: #ffffff;
  --radius: 8px;
  --schatten: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--dunkel);
  background: var(--weiss);
  line-height: 1.6;
}

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

.container-narrow {
  max-width: 720px;
}

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

h1, h2, h3 {
  line-height: 1.25;
  margin-top: 0;
}

/* ---------- Header / Navigation ---------- */

.site-header,
.admin-header {
  border-bottom: 1px solid var(--rand);
  background: var(--weiss);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--dunkel);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand:hover {
  text-decoration: none;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--rot);
  color: var(--weiss);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--dunkel);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--rot);
  border-bottom-color: var(--rot);
  text-decoration: none;
}

.logout-form {
  margin: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover {
  text-decoration: none;
}
.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn-primary {
  background: var(--rot);
  color: var(--weiss);
}
.btn-primary:hover {
  background: var(--rot-dunkel);
}

.btn-outline {
  background: transparent;
  color: var(--dunkel);
  border-color: var(--rand);
}
.btn-outline:hover {
  border-color: var(--grau);
}

.link-button {
  background: none;
  border: none;
  color: var(--rot);
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.link-button:hover {
  text-decoration: underline;
}
.link-danger {
  color: var(--rot-dunkel);
}

.inline-form {
  display: inline;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: linear-gradient(180deg, var(--hellgrau), var(--weiss));
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--rand);
}

/* Wird gesetzt, sobald im Admin-Bereich ein Hintergrundbild hinterlegt wurde:
   dunkler Schleier für Lesbarkeit + hellere Textfarben. */
.hero.hero--image {
  color: var(--weiss);
}
.hero.hero--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.6));
}
.hero.hero--image .container {
  position: relative;
  z-index: 1;
}
.hero.hero--image h1 {
  color: var(--weiss);
}
.hero.hero--image .hero-subtitle {
  color: #ffd7d7;
}
.hero.hero--image .hero-text {
  color: #f2f2f2;
}
.hero.hero--image .btn-outline {
  color: var(--weiss);
  border-color: rgba(255, 255, 255, 0.75);
}
.hero.hero--image .btn-outline:hover {
  border-color: var(--weiss);
  background: rgba(255, 255, 255, 0.12);
}
.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}
.hero-subtitle {
  color: var(--rot);
  font-weight: 600;
  margin: 0 0 1rem;
}
.hero-text {
  max-width: 640px;
  margin: 0 auto 1.75rem;
  color: var(--grau);
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Seiten-Banner (Kopfbereich auf Unterseiten: Menüpunkte, Termine, Kontakt) ---------- */

.page-banner {
  position: relative;
  background: linear-gradient(180deg, var(--hellgrau), var(--weiss));
  padding: 2.75rem 0;
  text-align: center;
  border-bottom: 1px solid var(--rand);
  margin-bottom: 0;
}
.page-banner h1 {
  margin: 0;
  font-size: 1.9rem;
}
.page-banner-subtitle {
  color: var(--rot);
  font-weight: 600;
  margin: 0.5rem 0 0;
}
.page-banner.page-banner--image {
  color: var(--weiss);
}
.page-banner.page-banner--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.6));
}
.page-banner.page-banner--image .container {
  position: relative;
  z-index: 1;
}
.page-banner.page-banner--image h1 {
  color: var(--weiss);
}
.page-banner.page-banner--image .page-banner-subtitle {
  color: #ffd7d7;
}

/* ---------- Sections ---------- */

.section {
  padding: 3rem 0;
}

.text-block p {
  white-space: pre-line;
}

/* ---------- Termine ---------- */

.termine-liste {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.termin-card {
  display: flex;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  align-items: flex-start;
}

.termin-datum {
  flex: 0 0 auto;
  background: var(--rot);
  color: var(--weiss);
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  white-space: nowrap;
}

.termin-info h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.termin-meta {
  color: var(--grau);
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

/* ---------- Kontakt ---------- */

.kontakt-liste dt {
  font-weight: 700;
  margin-top: 1rem;
}
.kontakt-liste dd {
  margin: 0.15rem 0 0;
}
.hinweis-notruf {
  margin-top: 2rem;
  padding: 0.9rem 1.1rem;
  background: #fdecec;
  border: 1px solid #f6c6c6;
  border-radius: var(--radius);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rand);
  padding: 1.5rem 0;
  margin-top: 2rem;
  color: var(--grau);
  font-size: 0.9rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Admin ---------- */

.admin-body {
  background: var(--hellgrau);
}
.admin-main {
  padding: 2rem 0 4rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.dashboard-card {
  display: block;
  background: var(--weiss);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--schatten);
  color: var(--dunkel);
}
.dashboard-card:hover {
  border-color: var(--rot);
  text-decoration: none;
}
.dashboard-card h2 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  color: var(--rot);
}
.dashboard-card p {
  margin: 0;
  color: var(--grau);
  font-size: 0.9rem;
}

.admin-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--weiss);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  overflow: hidden;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--rand);
  font-size: 0.92rem;
}
.admin-table th {
  background: var(--hellgrau);
  font-weight: 600;
}
.admin-table-actions {
  display: flex;
  gap: 0.85rem;
  white-space: nowrap;
}

.content-form {
  max-width: 640px;
  margin-top: 1.5rem;
  background: var(--weiss);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--schatten);
}
.content-form fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.content-form legend {
  font-weight: 700;
  color: var(--rot);
  padding: 0 0 0.5rem;
}
.content-form label,
.content-form .checkbox-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 1rem 0 0.35rem;
}
.content-form label:first-child {
  margin-top: 0;
}
.content-form input[type="text"],
.content-form input[type="email"],
.content-form input[type="date"],
.content-form input[type="number"],
.content-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  font: inherit;
  background: var(--weiss);
}
.content-form textarea {
  resize: vertical;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.field-hint {
  color: var(--grau);
  font-size: 0.85rem;
  margin: 0.3rem 0 0;
}
.bg-preview {
  display: block;
  max-width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--rand);
  margin: 0.4rem 0 0.75rem;
}
.content-form input[type="color"] {
  width: 70px;
  height: 40px;
  padding: 2px;
  cursor: pointer;
}
.content-form input[type="file"] {
  padding: 0.4rem 0;
  border: none;
}
.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---------- Login ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-box {
  width: 100%;
  max-width: 360px;
  background: var(--weiss);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--schatten);
}
.login-brand {
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
}
.login-box label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 1rem 0 0.35rem;
}
.login-box input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  font: inherit;
}
.login-box button {
  margin-top: 1.5rem;
}
.login-back {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.error-message {
  background: #fdecec;
  border: 1px solid #f6c6c6;
  color: var(--rot-dunkel);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.success-message {
  background: #eaf7ee;
  border: 1px solid #bfe6cb;
  color: #226a3b;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  display: inline-block;
  margin-bottom: 1rem;
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .termin-card {
    flex-direction: column;
  }
}
