/* =========================================================
   FOTOGALERIE PREMIUM – elegantes, responsives Redesign
   Eigenständige Styles; vorhandene Theme-Farben bleiben erhalten.
   ========================================================= */
:root {
  --fg-radius: 16px;
  --fg-radius-sm: 11px;
  --fg-line: rgba(120, 130, 145, .20);
  --fg-shadow: 0 7px 24px rgba(20, 30, 45, .075);
  --fg-shadow-hover: 0 14px 34px rgba(20, 30, 45, .14);
}

/* Galerie-Raster */
.fotogalerie-modern-scope .row-flex,
.row-flex { display: flex; flex-wrap: wrap; align-items: stretch; }
.row-flex::before, .row-flex::after { display: none; }
.row-flex > [class*="col-"] { display: flex; float: none; margin-bottom: 18px; }
.row-flex > [class*="col-"] > .panel,
.row-flex > [class*="col-"] .panel {
  display: flex; flex-direction: column; width: 100%; height: 100%;
  overflow: hidden; border: 1px solid var(--fg-line); border-radius: var(--fg-radius);
  box-shadow: var(--fg-shadow); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.row-flex > [class*="col-"] > .panel:hover,
.row-flex > [class*="col-"] .panel:hover { transform: translateY(-4px); box-shadow: var(--fg-shadow-hover); border-color: rgba(120,130,145,.36); }
.row-flex .panel-body { flex: 1; padding: 13px; }

/* Bilder: gleichmäßige Vorschauflächen */
.row-flex img.img-thumbnail,
.row-flex img.f_hover-shadow {
  display: block; width: 100%; max-width: 100%; object-fit: cover; object-position: center;
  border: 0; border-radius: var(--fg-radius-sm); padding: 0; margin: 0 auto;
  cursor: zoom-in; background: rgba(120,130,145,.08);
  transition: transform .28s ease, filter .2s ease;
}
.row-flex .panel-body > img:hover,
.row-flex .panel-body > div > img:hover { filter: brightness(.97); }
.row-flex h5 { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px; margin: 12px 0 0; }
.row-flex h5 .btn { border-radius: 9px; padding: 7px 11px; transition: transform .18s ease, box-shadow .18s ease; }
.row-flex h5 .btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.10); }

/* Kategorie-Karten */
.thumbnail {
  height: 100%; padding: 12px; margin-bottom: 18px; overflow: hidden;
  border: 1px solid var(--fg-line); border-radius: var(--fg-radius); box-shadow: var(--fg-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.thumbnail:hover { transform: translateY(-4px); box-shadow: var(--fg-shadow-hover); border-color: rgba(120,130,145,.36); }
.thumbnail h2 { display: block !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 3px 0 11px; font-size: 1.08em; font-weight: 700; }
.thumbnail img { display: block; width: 100%; max-width: 100%; max-height: 250px; object-fit: cover; object-position: center; border: 0; border-radius: var(--fg-radius-sm); padding: 0; }
.thumbnail h5 { margin: 11px 0 0; line-height: 1.5; }

/* Kopfzeilen und Standard-Aktionen */
.fotogalerie-modern-scope .panel,
.fotogalerie-slideshow-panel { border-radius: var(--fg-radius); overflow: hidden; }
.fotogalerie-modern-scope .panel-heading,
.fotogalerie-slideshow-panel > .panel-heading { font-weight: 700; letter-spacing: .01em; }
.fotogalerie-modern-scope .btn,
.fotogalerie-slideshow-panel .btn { border-radius: 9px; }

/* Slimbox / Vollbild */
.f_modal { position: fixed; inset: 0; z-index: 99999; overflow: auto; backdrop-filter: blur(7px); background: rgba(8, 12, 18, .94); }
.f_modal-content { width: min(94vw, 1100px); margin: 3vh auto; border-radius: 16px; overflow: hidden; }
.f_mySlides { text-align: center; }
.f_mySlides img { display: block; width: auto !important; height: auto !important; max-width: min(88vw, 1080px) !important; max-height: 78vh !important; object-fit: contain; margin: auto; border: 0; border-radius: 9px; }
.f_prev, .f_next { z-index: 2; border-radius: 50%; padding: 12px 17px; background: rgba(255,255,255,.16); color: #fff; transition: background .2s ease, transform .2s ease; }
.f_prev:hover, .f_next:hover { background: rgba(255,255,255,.30); transform: scale(1.04); }
.f_close { transition: transform .2s ease, color .2s ease; }
.f_close:hover { transform: scale(1.12); }

/* Diashow – kompakter, fester Bildrahmen, Bilder vollständig sichtbar */
.fotogalerie-slideshow-panel { border-radius: var(--fg-radius); box-shadow: var(--fg-shadow); }
.fotogalerie-slideshow-panel .panel-body { padding: clamp(8px, 1.8vw, 18px); }
.fotogalerie-slideshow { width: 100%; max-width: 100%; margin: 0 auto; }
.fotogalerie-slideshow .carousel-inner { position: relative; width: 100%; background: #111820; border-radius: 14px; overflow: hidden; }
.fotogalerie-slideshow .item { text-align: center; }
.fotogalerie-slide-stage {
  width: 100%; height: clamp(240px, 52vh, 470px); min-height: 0; max-height: 470px;
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  padding: 18px 66px; overflow: hidden;
}
.fotogalerie-slide-stage img {
  display: block; width: auto !important; height: auto !important;
  max-width: 100% !important; max-height: 100% !important;
  object-fit: contain; object-position: center; margin: auto;
  border-radius: 7px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.fotogalerie-slideshow .carousel-control {
  width: 56px; background: none !important; opacity: .92; text-shadow: none;
  display: flex; align-items: center; justify-content: center;
}
.fotogalerie-slideshow .carousel-control .glyphicon {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,.17); color: #fff; font-size: 16px;
  border: 1px solid rgba(255,255,255,.24); transition: background .2s ease, transform .2s ease;
}
.fotogalerie-slideshow .carousel-control:hover .glyphicon { background: rgba(255,255,255,.29); transform: scale(1.05); }
.fotogalerie-slide-caption { padding: 12px 16px 14px; color: #fff; background: #111820; font-weight: 600; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }


/* Neues Foto: modernes NEU-Badge */
.fg-photo-wrap { position: relative; }
.fg-photo-wrap .fg-new-badge {
  position: absolute; top: 9px; right: 9px; z-index: 5;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 25px; padding: 4px 9px; border-radius: 999px;
  color: #fff; background: linear-gradient(135deg, #e63946, #b9152b);
  border: 1px solid rgba(255,255,255,.78); box-shadow: 0 3px 10px rgba(0,0,0,.24);
  font: 800 10px/1 Arial, sans-serif; letter-spacing: .09em; pointer-events: none;
}
@media (max-width: 480px) { .fg-photo-wrap .fg-new-badge { top: 6px; right: 6px; min-height: 22px; padding: 3px 7px; font-size: 9px; } }

@media (max-width: 767px) {
  .row-flex > [class*="col-"] { margin-bottom: 12px; }
  .row-flex .panel-body { padding: 9px; }
  .row-flex h5 { gap: 6px; margin-top: 9px; }
  .row-flex h5 .btn { padding: 6px 8px; font-size: 12px; }
  .thumbnail { padding: 9px; margin-bottom: 12px; }
  .thumbnail img { max-height: 210px; }
  .f_modal-content { width: 96vw; margin: 6vh auto; }
  .f_mySlides img { max-width: 92vw !important; max-height: 72vh !important; }
  .fotogalerie-slideshow-panel .panel-body { padding: 7px; }
  .fotogalerie-slide-stage { height: min(43vh, 330px); min-height: 190px; padding: 10px 42px; }
  .fotogalerie-slideshow .carousel-control { width: 40px; }
  .fotogalerie-slideshow .carousel-control .glyphicon { width: 30px; height: 30px; font-size: 13px; }
  .fotogalerie-slide-caption { padding: 9px 11px 11px; font-size: 13px; }
}
@media (max-width: 420px) {
  .fotogalerie-slide-stage { height: 38vh; min-height: 170px; padding: 8px 34px; }
  .fotogalerie-slideshow .carousel-control { width: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .thumbnail, .row-flex .panel, .row-flex img, .f_prev, .f_next, .f_close,
  .row-flex h5 .btn, .fotogalerie-slideshow .carousel-control .glyphicon { transition: none !important; }
}
