:root {
  --cream: #faf6ef;
  --cream-dark: #f2ebdf;
  --sage: #7c8c5f;
  --sage-light: #97a578;
  --sage-dark: #4a5240;
  --ink: #2f2e29;
  --muted: #6f6b60;
  --border: #e7ded0;
  --white: #ffffff;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--sage-dark);
  color: var(--cream);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--sage-dark);
  border: 1px solid var(--sage-dark);
}

/* --- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(6px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 140, 95, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage-dark);
}

.logo-text {
  font-family: var(--font-serif);
  line-height: 1.1;
}

.logo-text .brand {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
}

.logo-text .by {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.main-nav {
  display: none;
  gap: 2rem;
  font-size: 0.9rem;
}

.main-nav a {
  text-decoration: none;
  color: rgba(47, 46, 41, 0.8);
}

.main-nav a:hover {
  color: var(--sage-dark);
}

@media (min-width: 64rem) {
  .main-nav {
    display: flex;
  }
}

.header-cta {
  display: none;
}

@media (min-width: 40rem) {
  .header-cta {
    display: inline-flex;
  }
}

/* --- Hero --- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  gap: 3rem;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 64rem) {
  .hero .container {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.15;
  margin: 0;
}

@media (min-width: 40rem) {
  .hero h1 {
    font-size: 3rem;
  }
}

.hero h1 em {
  font-style: italic;
  color: var(--sage-dark);
}

.hero p {
  max-width: 28rem;
  color: var(--muted);
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}

.hero-image {
  aspect-ratio: 4 / 3;
  border-radius: 4rem 1rem 1rem 4rem;
  width: 100%;
  object-fit: cover;
}

/* --- Sections --- */

section {
  padding: 5rem 0;
}

.section-white {
  background: var(--white);
}

.section-title {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: 0 0 3rem;
}

.cards {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  background: var(--white);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-circle {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--sage-dark);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-circle.outline {
  background: transparent;
  border: 1px solid rgba(124, 140, 95, 0.4);
  color: var(--sage-dark);
}

.card h3 {
  font-family: var(--font-serif);
  margin: 1.5rem 0 0.5rem;
}

.card p {
  color: var(--muted);
  flex: 1;
  margin: 0 0 1rem;
}

.card a {
  color: var(--sage-dark);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

/* --- About --- */

.about {
  background: var(--cream-dark);
}

.about .container {
  display: grid;
  gap: 3rem;
}

@media (min-width: 64rem) {
  .about .container {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.about-media {
  position: relative;
}

.about-media .placeholder,
.about-media img {
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  width: 100%;
  object-fit: cover;
}

.quote-card {
  position: absolute;
  bottom: -1.5rem;
  right: 0;
  max-width: 20rem;
  background: var(--sage-dark);
  color: var(--cream);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.quote-card .mark {
  font-size: 1.75rem;
  color: var(--sage-light);
  line-height: 1;
}

.quote-card p {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0.25rem 0 0;
}

.about h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: 0 0 1rem;
}

.about p {
  color: var(--muted);
}

.signature {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.75rem;
  color: var(--sage-dark);
}

/* --- Vorteile --- */

.benefits-grid {
  display: grid;
  gap: 2.5rem;
  text-align: center;
}

@media (min-width: 40rem) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.benefit h3 {
  font-family: var(--font-serif);
  margin: 1rem 0 0.5rem;
}

.benefit p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* --- CTA --- */

.cta-card {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (min-width: 40rem) {
  .cta-card {
    flex-direction: row;
  }
}

.cta-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cta-left h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0;
}

.cta-left p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 28rem;
  margin: 0.25rem 0 0;
}

.avatar-placeholder {
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* --- Footer --- */

.site-footer {
  margin-top: auto;
  background: var(--sage-dark);
  color: var(--cream);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding: 4rem 0;
}

@media (min-width: 40rem) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-grid h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-grid a {
  text-decoration: none;
  color: rgba(250, 246, 239, 0.75);
}

.footer-grid a:hover {
  color: var(--cream);
}

.footer-bottom {
  border-top: 1px solid rgba(250, 246, 239, 0.1);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(250, 246, 239, 0.6);
  padding: 1rem 0;
}

/* --- Formulare (Kontakt/Login/Portal/Admin) --- */

.form-page {
  padding: 4rem 0;
}

.form-card {
  max-width: 32rem;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
}

.form-card h1 {
  font-family: var(--font-serif);
  margin-top: 0;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--cream);
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.form-actions {
  margin-top: 1.5rem;
}

.alert {
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.alert-success {
  background: #eef3e6;
  color: var(--sage-dark);
  border: 1px solid rgba(124, 140, 95, 0.3);
}

.alert-error {
  background: #fbeceb;
  color: #8a3226;
  border: 1px solid rgba(138, 50, 38, 0.25);
}

/* --- Admin/Portal Tabellen --- */

.dashboard {
  padding: 3rem 0;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-header h1 {
  font-family: var(--font-serif);
  margin: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.data-table th {
  background: var(--cream-dark);
  font-weight: 600;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--cream-dark);
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 2.5rem;
}

.stat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.stat-card .value {
  font-family: var(--font-serif);
  font-size: 1.75rem;
}

.stat-card .label {
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.admin-nav a {
  text-decoration: none;
  color: var(--muted);
}

.admin-nav a.active,
.admin-nav a:hover {
  color: var(--sage-dark);
  font-weight: 600;
}

.site-footer .brand {
  font-size: 1rem;
}

.footer-lead {
  color: rgba(250, 246, 239, 0.7);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

/* --- Utility-Klassen ---
   Bewusst statt inline style="" verwendet: unsere Content-Security-Policy
   (style-src 'self', kein unsafe-inline) blockiert inline style-Attribute
   im Browser. */

.text-muted {
  color: var(--muted);
}

.lead {
  color: var(--muted);
  margin-top: -0.5rem;
}

.card-heading {
  margin-top: 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.dashboard-subtitle {
  text-align: left;
  font-size: 1.35rem;
}

.inline-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.form-inline {
  display: flex;
  gap: 0.75rem;
  align-items: end;
}

.cell-wrap {
  max-width: 18rem;
  white-space: pre-wrap;
}

.thumb-placeholder {
  width: 6rem;
  height: 4rem;
  border-radius: 0.5rem;
  font-size: 0.6rem;
  object-fit: cover;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 1.5rem;
}

.mb-3 {
  margin-bottom: 2rem;
}

.mb-4 {
  margin-bottom: 2.5rem;
}

.max-w-sm {
  max-width: 28rem;
}

.max-w-md {
  max-width: 36rem;
}

/* --- Start-Quiz (Multi-Step-Formular auf start.php) --- */

.quiz-question {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin: 0 0 1.25rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 26rem) {
  .choice-grid {
    grid-template-columns: 1fr;
  }
}

.choice-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 5.5rem;
  padding: 1.1rem 1.5rem 1.1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(47, 46, 41, 0.06);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.choice-button:hover {
  border-color: var(--sage-dark);
  box-shadow: 0 4px 10px rgba(47, 46, 41, 0.1);
}

.choice-button input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.choice-button.is-selected {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
  color: var(--cream);
  box-shadow: 0 4px 12px rgba(74, 82, 64, 0.3);
}

.choice-button.is-selected::after {
  content: "✓";
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  font-size: 0.85rem;
}

.choice-button:has(input:focus-visible) {
  outline: 2px solid var(--sage-dark);
  outline-offset: 2px;
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.quiz-actions .btn:only-child {
  margin-left: auto;
}

.form-inline > select {
  flex: 0 0 5.5rem;
  width: auto;
}

.form-inline > input {
  flex: 1;
}

.max-w-lg {
  max-width: 42rem;
}

/* --- Content-Pflege (WYSIWYG, Bild-Upload) --- */

.content-section {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  background: var(--white);
  margin-bottom: 1.5rem;
}

.richtext-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.4rem;
}

.richtext-toolbar button {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 0.35rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
}

.richtext-toolbar button:hover {
  background: var(--cream-dark);
}

.richtext-editable {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  min-height: 6rem;
  background: var(--cream);
  font-size: 0.95rem;
}

.richtext-editable:focus {
  outline: 2px solid var(--sage);
  outline-offset: 1px;
}

.image-field-preview {
  width: 9rem;
  height: 6.5rem;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  display: block;
}

.image-field-empty {
  width: 9rem;
  height: 6.5rem;
  margin-bottom: 0.5rem;
}

/* --- Einfache Inhaltsseiten (Über Andrea, Angebote, Rechtliches, Blog) --- */

.page-hero {
  padding-top: 4rem;
  padding-bottom: 1rem;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  margin: 0 0 1rem;
}

.page-hero .lead {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
}

.prose {
  max-width: 42rem;
  margin: 0 auto;
}

.prose h3 {
  font-family: var(--font-serif);
  margin: 1.75rem 0 0.5rem;
}

.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--ink);
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.step-grid {
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}

@media (min-width: 48rem) {
  .step-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  background: var(--white);
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--sage-dark);
  color: var(--cream);
  font-family: var(--font-serif);
  margin-bottom: 1rem;
}

.step-card h3 {
  font-family: var(--font-serif);
  margin: 0 0 0.5rem;
}

.step-card p {
  color: var(--muted);
  margin: 0;
}

.blog-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--white);
}

.blog-card img,
.blog-card .placeholder {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.blog-card p {
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}

.blog-meta {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.blog-post-header {
  text-align: center;
  padding: 3rem 0 2rem;
}

.blog-post-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin: 0.5rem 0;
}

.blog-cover {
  width: 100%;
  max-width: 48rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1rem;
  margin: 0 auto 2rem;
}

/* --- Verlaufs-Grafiken im Kunden-Portal (portal/index.php) --- */

.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.trend-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
}

.trend-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
}

.trend-chart {
  width: 100%;
  height: auto;
  display: block;
}

.trend-line {
  fill: none;
  stroke: var(--sage-dark);
  stroke-width: 2;
}

.trend-point {
  fill: var(--sage-dark);
}

.trend-label {
  font-size: 10px;
  font-family: var(--font-sans);
  fill: var(--ink);
}

.trend-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
