/* style.css — firmenguide.grieskamp.digital
   Mobile-first. Fonts: Lora (headlines) + DM Sans (body).
   CI-Farben aus grieskamp.digital Styleguide. */

/* ============================================================
   0. GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,600;1,400&family=DM+Sans:wght@400;500&display=swap');

/* ============================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --deep-forest:  #2D4A35;
  --sage-green:   #7A9E7E;
  --sage-light:   #A8C4AC;
  --off-white:    #F5F2EC;
  --charcoal:     #1E1E1E;
  --warm-grey:    #E8E4DC;
  --parchment:    #EDEBE5;
  --mid-grey:     #6B6B6B;
  --white:        #ffffff;

  --font-serif:   'Lora', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, sans-serif;

  --radius:       8px;
  --shadow:       0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md:    0 4px 16px rgba(0, 0, 0, 0.12);

  --max-width:    1100px;
  --gap:          1rem;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--off-white);
  color: var(--charcoal);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--deep-forest);
  text-decoration: underline;
}

a:hover {
  color: var(--sage-green);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-sans);
}

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

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

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-link img {
  height: 28px;
  width: auto;
}

.logo-fallback {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--deep-forest);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.lang-toggle {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--mid-grey);
  border: 1px solid var(--warm-grey);
  border-radius: var(--radius);
  padding: 0.3rem 0.7rem;
  background: var(--white);
  transition: color 0.15s, border-color 0.15s;
}

.lang-toggle:hover {
  color: var(--deep-forest);
  border-color: var(--sage-green);
}

/* ============================================================
   4. HERO
   ============================================================ */
.hero {
  background: var(--deep-forest);
  color: var(--white);
  padding: 2rem 1rem 1.5rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.4rem;
}

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--sage-light);
  margin-bottom: 1.25rem;
  max-width: 560px;
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.mode-btn {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  border: 2px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.75);
  background: transparent;
  transition: all 0.2s;
}

.mode-btn:hover {
  border-color: var(--sage-light);
  color: var(--white);
}

.mode-btn.active {
  background: var(--sage-green);
  border-color: var(--sage-green);
  color: var(--white);
}

/* Search */
.search-wrap {
  position: relative;
  max-width: 480px;
}

.search-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.65rem 2.5rem 0.65rem 2.5rem;
  border-radius: var(--radius);
  border: none;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  outline: none;
  transition: background 0.2s;
}

.search-clear {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem;
  cursor: pointer;
  transition: color 0.15s;
}

.search-clear:hover {
  color: var(--white);
}

.search-input::placeholder {
  color: rgba(255,255,255,0.5);
}

.search-input:focus {
  background: rgba(255,255,255,0.2);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  pointer-events: none;
  font-size: 1rem;
}

/* ============================================================
   5. MAIN CONTENT WRAPPER
   ============================================================ */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* ============================================================
   6. KATEGORIE-FILTER
   ============================================================ */
.category-section {
  position: sticky;
  top: 53px; /* header height */
  z-index: 90;
  background: var(--off-white);
  padding: 0.6rem 0 0.5rem;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.category-scroll {
  display: contents; /* Kinder fließen in filter-bar's flex mit */
}

.cat-btn {
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  border-radius: 2rem;
  border: 1.5px solid var(--warm-grey);
  color: var(--mid-grey);
  background: var(--white);
  transition: all 0.15s;
  white-space: nowrap;
}

@media (max-width: 899px) {
  .category-section {
    padding: 0.55rem 0 0.35rem;
  }

  .filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.15rem 1rem 0.15rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  .category-scroll {
    display: inline-flex;
    gap: 0.4rem;
  }

  .cat-btn,
  .only-open-btn {
    flex: 0 0 auto;
  }

  /* Mobil: Button am Anfang, Separator danach */
  .only-open-btn {
    order: -1; /* Stellt sicher dass Button zuerst kommt */
  }

  .only-open-btn::before {
    right: -0.4rem; /* Separator nach dem Button */
  }
}

.cat-btn:hover {
  border-color: var(--sage-green);
  color: var(--deep-forest);
}

.cat-btn.active {
  background: var(--sage-green);
  border-color: var(--sage-green);
  color: var(--white);
}

/* ============================================================
   6b. NUR-GEÖFFNETE TOGGLE
   ============================================================ */
.only-open-btn {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 2rem;
  border: 1.5px solid var(--warm-grey);
  color: var(--mid-grey);
  background: var(--white);
  transition: all 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

/* Separator nach dem Button (statt davor) */
.only-open-btn::before {
  content: '';
  position: absolute;
  right: -0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 60%;
  background: var(--warm-grey);
}

/* Uhr-Icon statt Kreis */
.only-open-btn::after {
  content: '🕐';
  font-size: 0.9em;
  flex-shrink: 0;
  transition: all 0.15s;
}

.only-open-btn:hover {
  border-color: var(--sage-green);
  color: var(--deep-forest);
}

.only-open-btn:hover::after {
  transform: scale(1.1);
}

/* On-State: deep-forest — klar anders als die sage-grünen Kategorie-Buttons */
.only-open-btn.active {
  background: var(--deep-forest);
  border-color: var(--deep-forest);
  color: var(--white);
  font-weight: 600;
}

.only-open-btn.active::after {
  content: '🟢'; /* Grüner Punkt für "aktiv/geöffnet" */
  transform: scale(1.1);
}


/* ============================================================
   6c. ERGEBNIS-ZÄHLER
   ============================================================ */
.result-count {
  font-size: 0.75rem;
  color: var(--mid-grey);
  margin-bottom: 0.5rem;
  display: block;
  min-height: 1em;
}

/* ============================================================
   7. HAUPT-LAYOUT (Karten + Nützliches Sidebar)
   ============================================================ */
.main-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

@media (min-width: 900px) {
  .main-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .businesses-section {
    flex: 1;
    min-width: 0;
  }

  .useful-section {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 100px; /* header + category filter (single row) */
    max-height: calc(100vh - 112px);
    overflow-y: auto;
  }
}

/* ============================================================
   7b. NÜTZLICHES (Sidebar)
   ============================================================ */
.useful-section {
  background: var(--parchment);
  border: 1px solid var(--warm-grey);
  border-radius: var(--radius);
  padding: 1rem;
}

.useful-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--deep-forest);
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--sage-green);
  padding-left: 0.6rem;
}

/* Mobile: 2-spaltig */
.useful-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (min-width: 540px) and (max-width: 899px) {
  .useful-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Desktop-Sidebar: 1-spaltig */
@media (min-width: 900px) {
  .useful-grid {
    grid-template-columns: 1fr;
  }
}

.useful-tile {
  background: var(--white);
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: flex-start;
}

.useful-tile-icon {
  font-size: 1rem;
  line-height: 1.5;
  flex-shrink: 0;
}

.useful-tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.useful-tile-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--charcoal);
  line-height: 1.3;
}

.useful-tile-info {
  font-size: 0.7rem;
  color: var(--mid-grey);
  line-height: 1.35;
}

.useful-tile-link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--white);
  background: var(--sage-green);
  border-radius: 2rem;
  padding: 0.2rem 0.65rem;
  text-decoration: none;
  transition: background 0.15s;
}

.useful-tile-link:hover {
  background: var(--deep-forest);
  color: var(--white);
}

/* ============================================================
   8. UNTERNEHMENS-KARTEN
   ============================================================ */
.businesses-section {
  margin: 0;
}

.businesses-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 540px) {
  .businesses-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .businesses-grid {
    grid-template-columns: 1fr 1fr; /* 2 Spalten neben Sidebar */
  }
}

@media (min-width: 1200px) {
  .businesses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.business-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.2s;
  animation: cardFadeIn 0.18s ease-out both;
  min-width: 0; /* verhindert Overflow durch lange Inhalte */
  position: relative;
  overflow: hidden; /* für diagonalen Banner */
}

/* ============================================================
   Closure-Banner — diagonale SOLD-Style Bande
   ============================================================ */
.business-card--closed > *:not(.closure-banner) {
  opacity: 0.5;
  filter: grayscale(0.4);
}

.closure-banner {
  position: absolute;
  top: 50%;
  left: -25%;
  right: -25%;
  transform: translateY(-50%) rotate(-22deg);
  background: var(--danger-banner, #c64b3a);
  color: var(--white);
  text-align: center;
  padding: 0.7rem 0 0.6rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 10;
  font-family: var(--font-sans);
  letter-spacing: 0.08em;
}

.closure-banner-main {
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  line-height: 1.2;
}

.closure-banner-sub {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.92;
  margin-top: 0.15rem;
  letter-spacing: 0.04em;
}

.closure-banner-sub a {
  pointer-events: auto;
}

/* Farbvarianten je Grund */
:root {
  --danger-banner: #c64b3a;
}
.closure-banner--urlaub         { background: #c64b3a; }  /* warm-rot */
.closure-banner--winterpause    { background: #3a6f8f; }  /* kühl-blau */
.closure-banner--umbau          { background: #b8860b; }  /* bernstein */
.closure-banner--krankheit      { background: #8b4a7c; }  /* gedämpft */
.closure-banner--betriebsferien { background: #2D4A35; }  /* deep-forest */
.closure-banner--feiertag       { background: #6b4c8c; }  /* feierlich-violett */

.business-card:hover {
  box-shadow: var(--shadow-md);
}

/* Loading pulse for status badge while API data loads */
.badge-status.loading {
  background: var(--warm-grey);
  color: transparent;
  animation: statusPulse 1.4s ease-in-out infinite;
  border-radius: 2rem;
  min-width: 80px;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
  flex: 1;
  min-height: 2.6rem; /* 2 × (1rem × 1.3) — Platz für 2 Zeilen immer reservieren */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-logo {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.badge-category {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.7rem;
  background: var(--parchment);
  color: var(--mid-grey);
  border-radius: 2rem;
  padding: 0.2rem 0.6rem;
  text-transform: uppercase;
  flex-shrink: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-status {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.75rem;
  border-radius: 2rem;
  padding: 0.2rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.badge-status.open {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-status.closed {
  background: var(--mid-grey);
  color: var(--white);
}

.badge-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.status-time {
  font-size: 0.7rem;
  color: var(--mid-grey);
  line-height: 1.3;
  min-height: 0.91rem; /* 0.7rem × 1.3 — immer eine Zeile reservieren, auch wenn leer */
}

.card-rating {
  font-size: 0.78rem;
  color: var(--charcoal);
  min-height: 1.015rem; /* 0.78rem × 1.3 — Zeile immer reservieren */
  line-height: 1.3;
}

.card-rating .rating-count {
  color: var(--mid-grey);
}

.card-address {
  font-size: 0.82rem;
  color: var(--mid-grey);
  line-height: 1.4;
}

.card-distance {
  font-size: 0.8rem;
  color: var(--deep-forest);
  font-weight: 500;
}

/* Accordion Öffnungszeiten */
.accordion-toggle {
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--sage-green);
  padding: 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  border-top: 1px solid var(--warm-grey);
  padding-top: 0.5rem;
}

.accordion-toggle .chevron {
  display: inline-block;
  transition: transform 0.2s;
  font-size: 0.7rem;
}

.accordion-toggle.open .chevron {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  font-size: 0.78rem;
  color: var(--mid-grey);
  line-height: 1.7;
}

.accordion-content.open {
  display: block;
}

.accordion-content .today-hours {
  color: var(--deep-forest);
  font-weight: 500;
}

/* Karten-Aktionen (Route · Telefon · Website) */
.card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: auto;
}

.btn-route {
  flex: 1;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  text-align: center;
  transition: background 0.15s;
  white-space: nowrap;
  background: var(--sage-green);
  color: var(--white);
  text-decoration: none;
}

.btn-route:hover {
  background: var(--deep-forest);
  color: var(--white);
}

.btn-icon {
  width: 2.75rem;
  flex-shrink: 0;
  font-size: 1.05rem;
  border-radius: var(--radius);
  padding: 0.45rem 0;
  text-align: center;
  transition: background 0.15s;
  background: var(--off-white);
  color: var(--charcoal);
  border: 1.5px solid var(--warm-grey);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.btn-icon:hover:not(.btn-action--disabled) {
  background: var(--warm-grey);
}

.btn-action--disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Albersloh Badge */
.badge-area {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  background: #e8f0e9;
  color: var(--deep-forest);
  border-radius: 2rem;
  padding: 0.1rem 0.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Kartenzahlung Badge */
.badge-card-payment {
  font-size: 0.85rem;
  flex-shrink: 0;
  line-height: 1;
}

/* Loading / Error States */
.card-loading, .card-error {
  font-size: 0.78rem;
  color: var(--mid-grey);
  font-style: italic;
}

.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--mid-grey);
  font-size: 0.9rem;
  grid-column: 1 / -1;
}

.origin-note {
  font-size: 0.75rem;
  color: var(--mid-grey);
  margin-top: 0.5rem;
  text-align: center;
}

/* ============================================================
   9. CHAT — INLINE (Desktop)
   ============================================================ */
.chat-section {
  display: none;
}

.chat-header {
  background: var(--deep-forest);
  color: var(--white);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
}

.chat-header-hint {
  font-size: 0.72rem;
  color: var(--sage-light);
}

.chat-messages {
  height: 260px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: 80%;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  line-height: 1.5;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--sage-green);
  color: var(--white);
  border-bottom-right-radius: 2px;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--parchment);
  color: var(--charcoal);
  border-bottom-left-radius: 2px;
}

.chat-bubble.thinking {
  color: var(--mid-grey);
  font-style: italic;
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--warm-grey);
  background: var(--white);
}

.chat-input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--warm-grey);
  border-radius: var(--radius);
  outline: none;
  background: var(--off-white);
  transition: border-color 0.15s;
}

.chat-input:focus {
  border-color: var(--sage-green);
}

.chat-send-btn {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  background: var(--sage-green);
  color: var(--white);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  transition: background 0.15s;
  white-space: nowrap;
}

.chat-send-btn:hover:not(:disabled) {
  background: var(--deep-forest);
}

.chat-send-btn:disabled {
  background: var(--sage-light);
  cursor: not-allowed;
}

/* ============================================================
   10. CHAT — FLOATING BUBBLE (Mobile)
   ============================================================ */
.chat-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sage-green);
  color: var(--white);
  font-size: 1.4rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
}

.chat-fab:hover {
  background: var(--deep-forest);
  transform: scale(1.05);
}

/* FAB always visible on all screen sizes */

/* Chat Modal (Mobile) */
.chat-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 300;
  align-items: flex-end;
}

.chat-modal-overlay.open {
  display: flex;
}

.chat-modal {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.chat-modal .chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-modal-close {
  background: none;
  border: none;
  color: var(--sage-light);
  font-size: 1.2rem;
  padding: 0.25rem;
  cursor: pointer;
  line-height: 1;
}

.chat-modal .chat-messages {
  flex: 1;
  height: auto;
  min-height: 200px;
  max-height: 50vh;
}

/* ============================================================
   11. CTA — grieskamp.digital
   ============================================================ */
.cta-section {
  margin: 3rem 0 1.5rem;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, var(--deep-forest) 0%, #1f3526 100%);
  border-radius: var(--radius);
  text-align: center;
  color: var(--off-white);
}

.cta-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage-light);
  margin-bottom: 1rem;
}

.cta-headline {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 0.6rem;
}

.cta-subline {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--sage-light);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.cta-services {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0.6rem;
  margin-bottom: 1.5rem;
  padding: 0;
}

.cta-services li {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2rem;
  color: var(--off-white);
}

.cta-button {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--sage-green);
  color: var(--white);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  transition: background 0.15s, transform 0.15s;
  margin-bottom: 1rem;
}

.cta-button:hover {
  background: var(--sage-light);
  color: var(--deep-forest);
  transform: translateY(-1px);
}

.cta-sign {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--sage-light);
  font-style: italic;
  margin: 0;
}

.cta-feedback {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 1.75rem auto 0;
  padding-top: 1.25rem;
  max-width: 440px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.5;
}

.cta-feedback a {
  color: var(--sage-light);
  text-decoration: underline;
  display: inline-block;
  margin-top: 0.25rem;
}

.cta-feedback a:hover {
  color: var(--white);
}

@media (min-width: 540px) {
  .cta-section {
    padding: 2.5rem 2rem;
  }
  .cta-headline {
    font-size: 1.75rem;
  }
}

/* ============================================================
   12. FOOTER
   ============================================================ */
.site-footer {
  background: var(--deep-forest);
  color: var(--sage-light);
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.82rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

@media (min-width: 480px) {
  .footer-inner {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

.site-footer a {
  color: var(--sage-light);
  text-decoration: underline;
}

.site-footer a:hover {
  color: var(--white);
}

/* ============================================================
   13. IMPRESSUM / DATENSCHUTZ SEITEN
   ============================================================ */
.page-content {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
}

.page-content h1 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--deep-forest);
  margin-bottom: 1.5rem;
}

.page-content h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--deep-forest);
  margin: 1.5rem 0 0.5rem;
}

.page-content p, .page-content li {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.page-content ul {
  padding-left: 1.25rem;
}

.btn-back {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sage-green);
  text-decoration: none;
  margin-bottom: 1.5rem;
}

.btn-back:hover {
  color: var(--deep-forest);
}

/* ============================================================
   14. UTILITIES
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

/* ============================================================
   15. FOCUS-VISIBLE (Tastaturzugänglichkeit)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--sage-green);
  outline-offset: 2px;
}

/* Chat FAB focus */
.chat-fab:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* ============================================================
   16. BOTTOM NAVIGATION (Mobile, <768px)
   ============================================================ */
.bottom-nav {
  display: none; /* Desktop: versteckt */
}

@media (max-width: 767px) {
  /* Body-Padding damit Content nicht hinter Bottom Nav verschwindet */
  body {
    padding-bottom: 64px;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--white);
    border-top: 1px solid var(--warm-grey);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    height: 64px;
    align-items: stretch;
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--mid-grey);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.25rem;
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav-item:active {
    background: var(--warm-grey);
  }

  .bottom-nav-item.active {
    color: var(--deep-forest);
  }

  .bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.1);
  }

  .bottom-nav-item--chat {
    /* Chat-Button in der Mitte leicht hervorgehoben */
    position: relative;
  }

  .bottom-nav-item--chat::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sage-green);
    z-index: -1;
    transition: background 0.15s;
  }

  .bottom-nav-item--chat .bottom-nav-icon {
    position: relative;
    z-index: 1;
  }

  .bottom-nav-item--chat .bottom-nav-label {
    position: relative;
    z-index: 1;
    color: var(--deep-forest);
  }

  .bottom-nav-item--chat:active::before {
    background: var(--deep-forest);
  }

  .bottom-nav-icon {
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.15s;
  }

  .bottom-nav-label {
    line-height: 1;
  }

  /* FAB auf Mobile ausblenden, da Bottom Nav den Chat übernimmt */
  .chat-fab {
    display: none;
  }

  /* Footer etwas weniger Padding auf Mobile wegen Bottom Nav */
  .site-footer {
    margin-bottom: 0;
  }
}

/* ============================================================
   17. VERANSTALTUNGEN — Events Grid + Kacheln
   ============================================================ */
.events-layout {
  margin-top: 0.75rem;
}

.events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 540px) {
  .events-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .events-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Leerzustand */
.events-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem 2rem;
  color: var(--mid-grey);
}

.events-empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.events-empty-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}

.events-empty-sub {
  font-size: 0.85rem;
  color: var(--mid-grey);
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Event-Kachel */
.event-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.2s;
  animation: cardFadeIn 0.18s ease-out both;
}

.event-card:hover {
  box-shadow: var(--shadow-md);
}

.event-date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--deep-forest);
  color: var(--white);
  flex-shrink: 0;
  line-height: 1;
  gap: 0.1rem;
}

.event-date-day {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1;
}

.event-date-month {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sage-light);
}

.event-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.event-card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.3;
  flex: 1;
}

.event-meta {
  font-size: 0.8rem;
  color: var(--mid-grey);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.event-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.event-description {
  font-size: 0.82rem;
  color: var(--mid-grey);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   18. EINREICHUNGSFORMULAR
   ============================================================ */
.submit-section {
  margin: 2rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid var(--warm-grey);
}

.submit-header {
  margin-bottom: 1.5rem;
}

.submit-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sage-green);
  margin-bottom: 0.4rem;
}

.submit-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--deep-forest);
  margin-bottom: 0.4rem;
}

.submit-subtitle {
  font-size: 0.9rem;
  color: var(--mid-grey);
  line-height: 1.5;
  max-width: 520px;
}

.submit-form-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

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

@media (max-width: 539px) {
  .submit-form-grid {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-label {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--charcoal);
}

.form-input,
.form-textarea {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--charcoal);
  background: var(--off-white);
  border: 1.5px solid var(--warm-grey);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--sage-green);
  background: var(--white);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--mid-grey);
  line-height: 1.4;
}

.form-hint--privacy {
  color: var(--deep-forest);
  font-weight: 500;
}

.form-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--mid-grey);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--warm-grey);
}

.form-actions {
  padding-top: 0.25rem;
}

.btn-submit {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--sage-green);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  width: 100%;
}

.btn-submit:hover:not(:disabled) {
  background: var(--deep-forest);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  background: var(--sage-light);
  cursor: not-allowed;
  transform: none;
}

.submit-feedback {
  font-size: 0.85rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  margin-top: 0.75rem;
  line-height: 1.4;
}

.submit-feedback--success {
  background: #e8f5e9;
  color: #2e7d32;
}

.submit-feedback--error {
  background: #fdecea;
  color: #c62828;
}