/* ============================================================
   Sissi Creation – Phase 2: Galerie, Lightbox, Suche, Cover
   Ergänzt css/styles.css, ohne bestehende Regeln zu ändern.
   ============================================================ */

/* ---------- 1) Cover der Kategoriekarten ---------- */

.kat-media { overflow: hidden; }

.kat-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;        /* proportional beschneiden, kein Verzerren */
  /* object-position wird pro Kategorie per JS gesetzt (Bildfokus) */
}

.kat-media .badge { z-index: 2; }

/* ---------- 2) Galerie ---------- */

.galerie-figure { margin: 0; }

.galerie-stage {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.galerie-figure {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #F5F1EA 0%, #E6DFD3 100%);
  cursor: zoom-in;
}

.galerie-bild {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gal-arrow {
  align-self: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #EBE5DA;
  color: #171717;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(23, 23, 23, 0.08);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gal-arrow:hover {
  background: #171717;
  border-color: #171717;
  color: #FFFFFF;
}

/* --- Bildunterschrift: nur sichtbar, wenn Titel/Text vorhanden --- */

.galerie-caption { margin-top: 12px; }

.gal-titel {
  font-size: 14px;
  font-weight: 600;
  color: #171717;
}

.gal-beschreibung {
  font-size: 13px;
  color: #5F5A54;
  margin-top: 2px;
}

/* --- Thumbnails: horizontales Scrollen bei vielen Bildern --- */

.galerie-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: #D8CFBF transparent;
  -webkit-overflow-scrolling: touch;
}

.galerie-thumbs::-webkit-scrollbar { height: 6px; }
.galerie-thumbs::-webkit-scrollbar-thumb { background: #D8CFBF; border-radius: 3px; }

.galerie-thumb {
  flex: 0 0 auto;
  width: 72px;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

.thumb-rahmen {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #F5F1EA 0%, #E6DFD3 100%);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.galerie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.galerie-thumb:hover .thumb-rahmen { border-color: #D8CFBF; }

.galerie-thumb.is-aktiv .thumb-rahmen {
  border-color: #B7985F;   /* klarer, aber dezenter Aktiv-Zustand */
}

.galerie-thumb.is-aktiv { opacity: 1; }
.galerie-thumb:not(.is-aktiv) { opacity: 0.72; }

/* --- Lade-Fallback: kein kaputtes Bildsymbol --- */

.bild-fehlt {
  background: repeating-linear-gradient(
    135deg, #F5F1EA 0 14px, #EDE7DB 14px 28px);
}

.bild-fehlt::after {
  content: "Bild konnte nicht geladen werden.";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  color: #9A938A;
}

/* --- Preisliste-Button (erscheint erst bei echtem Bild) --- */

.preis-btn {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #171717;
  background: #FFFFFF;
  border: 1px solid #171717;
  border-radius: 999px;
  padding: 10px 24px;
  transition: background 0.2s ease, color 0.2s ease;
}

.preis-btn:hover { background: #171717; color: #FFFFFF; }

/* ---------- 3) Modale (Lightbox + Suche) ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 23, 23, 0.55);
  backdrop-filter: blur(2px);
  z-index: 140;
}

/* --- Lightbox --- */

.lightbox { position: relative; z-index: 150; }

.lightbox-figure {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 160;
  margin: 0;
  max-width: min(92vw, 1000px);
  background: #FFFFFF;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 24px 70px rgba(23, 23, 23, 0.35);
}

.lightbox-figure img {
  display: block;
  max-width: calc(92vw - 28px);
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;      /* Originalverhältnis bleibt erhalten */
  touch-action: pinch-zoom; /* Handy: Zoomen erlaubt */
}

.lightbox-caption {
  margin-top: 10px;
  font-size: 13px;
  color: #5F5A54;
  text-align: center;
}

.lightbox-btn {
  position: fixed;
  z-index: 170;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #EBE5DA;
  color: #171717;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(23, 23, 23, 0.18);
  transition: background 0.2s ease, color 0.2s ease;
}

.lightbox-btn:hover { background: #171717; border-color: #171717; color: #FFFFFF; }

.lb-close { top: 20px; right: 20px; }
.lb-prev  { top: 50%; left: 18px; transform: translateY(-50%); }
.lb-next  { top: 50%; right: 18px; transform: translateY(-50%); }

/* --- Such-Modal --- */

.such-modal { position: relative; z-index: 150; }

.such-box {
  position: fixed;
  top: 14vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 160;
  width: min(92vw, 560px);
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(23, 23, 23, 0.3);
  overflow: hidden;
}

.such-feld {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #EBE5DA;
}

.such-icon { color: #9A938A; flex: 0 0 auto; }

.such-feld input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 16px;
  color: #171717;
  background: transparent;
}

.such-feld input::placeholder { color: #B3AC9F; }

.such-feld:focus-within { box-shadow: inset 0 -2px 0 #B7985F; }

.such-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5F5A54;
  transition: background 0.2s ease, color 0.2s ease;
}

.such-close:hover { background: #FAF7F2; color: #171717; }

.such-ergebnisse {
  max-height: 52vh;
  overflow-y: auto;
  padding: 8px;
}

.such-hinweis {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #A8874F;
  padding: 10px 14px 6px;
}

.such-leer {
  padding: 26px 16px;
  text-align: center;
  font-size: 14.5px;
  color: #9A938A;
}

.such-treffer {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  background: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.such-treffer:hover, .such-treffer:focus-visible { background: #FAF7F2; }

.such-thumb {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #F5F1EA 0%, #E6DFD3 100%);
}

.such-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.such-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.such-titel { font-size: 14.5px; font-weight: 600; color: #171717; }

.such-ausschnitt {
  font-size: 12.5px;
  color: #9A938A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 4) Responsive ---------- */

@media (max-width: 720px) {
  .gal-arrow { width: 36px; height: 36px; }

  .galerie-thumb { width: 60px; }
  .thumb-rahmen { width: 60px; height: 60px; }

  .lightbox-figure { padding: 10px; max-width: 96vw; }
  .lightbox-figure img { max-width: calc(96vw - 20px); max-height: 72vh; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
  .lb-close { top: 12px; right: 12px; }

  .such-box { top: 8vh; width: 94vw; }
  .such-ergebnisse { max-height: 60vh; }
}

/* ---------- 5) Reduzierte Animation ---------- */

@media (prefers-reduced-motion: reduce) {
  .kat-cover, .galerie-bild, .gal-arrow, .lightbox-btn,
  .such-treffer, .thumb-rahmen {
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   PHASE 4: Kontakt (Maps-Zustimmung), Social Media, Bewertungen
   ============================================================ */

/* ---------- Google Maps: nur nach Zustimmung laden ----------
   EIN Kartenbereich (.map-bereich): vor der Zustimmung lokale
   schematische Übersicht + Zustimmung, danach iframe – beide
   füllen exakt denselben Container, kein Überlappen. */
.map-bereich {
  position: relative;
  height: 420px;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid #EBE5DA;
  background: #EFECE4;
  isolation: isolate;
}
.map-vorschau {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.map-consent {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 24px rgba(23, 23, 23, 0.10);
  color: #5F5A54;
  backdrop-filter: blur(4px);
}
.map-consent-text {
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
.map-laden-btn {
  font-family: "Jost", sans-serif;
  font-size: 14px;
  letter-spacing: 0.05em;
  min-height: 46px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1.5px solid #171717;
  background: #171717;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.map-laden-btn:hover, .map-laden-btn:focus-visible {
  background: #A8874F;
  border-color: #A8874F;
}
.map-fehler {
  font-size: 12.5px;
  line-height: 1.55;
  color: #B3402A;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 0;
}
/* Lade-Fehllage: schmaler Hinweis oben im Kartenbereich + „Erneut versuchen".
   Kein Vollbild-Overlay – bleibt die Karte wider Erwarten doch sichtbar,
   wird sie nicht verdeckt. */
.karte-fehler-box {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 16px;
  text-align: center;
  background: rgba(250, 247, 242, 0.96);
  border-bottom: 1px solid #EBE5DA;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  z-index: 2;
}
.karte-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@media (max-width: 640px) {
  .map-bereich { height: 320px; }
}
.map-route { margin-top: 14px; }
.route-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Jost", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #171717;
  border: 1.5px solid #EBE5DA;
  border-radius: 999px;
  padding: 11px 22px;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.route-btn:hover, .route-btn:focus-visible {
  border-color: #A8874F;
  background: #FAF7F2;
}

/* ---------- Social Media: Links + Bild-Streifen ---------- */
.social-link {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #8A6B3A;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.social-link:hover, .social-link:focus-visible { color: #171717; }
.social-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #EBE5DA;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: #F5F1EA;
  cursor: pointer;
}
.social-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.social-thumb .badge {
  top: 8px;
  left: 8px;
}
.social-thumb:hover, .social-thumb:focus-visible {
  border-color: #B7985F;
}
.social-thumb:focus-visible {
  outline: 2px solid #B7985F;
  outline-offset: 2px;
}

/* ---------- Bewertungen (ausgeblendet, bis echte Daten vorliegen) ---------- */
.bewertungen-section {
  padding: 72px 0;
  background: var(--bg);
}
.bewertungen-liste {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.bewertung {
  border: 1px solid #EBE5DA;
  border-radius: var(--radius-card);
  background: #ffffff;
  padding: 20px;
}
.bewertung-text { font-size: 14px; line-height: 1.6; color: #171717; margin: 0; }
.bewertung-quelle { font-size: 12px; color: #9A938A; margin: 10px 0 0; }
