/* =========================================
   JEvents – Nächste Termine schöner machen
   ========================================= */

.mod_events_latest,
.mod_events_latest_table,
.mod_events_latest_table tbody {
  width: 100%;
}

.mod_events_latest_table {
  border-collapse: separate !important;
  border-spacing: 0 14px !important;
  width: 100%;
  background: transparent !important;
}

.mod_events_latest_table tr {
  display: block;
  background: #fbf8f2;
  border: 1px solid rgba(15, 45, 87, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mod_events_latest_table tr:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.mod_events_latest_table td {
  display: block;
  width: 100% !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  line-height: 1.45;
}

/* Datum */
.mod_events_latest_table td:first-child {
  font-size: 0.98rem;
  color: #6b6b6b;
  margin-bottom: 6px;
  font-weight: 600;
}

/* Uhrzeit */
.mod_events_latest_table td:nth-child(2) {
  font-size: 0.95rem;
  color: #8a8a8a;
  margin-bottom: 8px;
}

/* Titel / Link */
.mod_events_latest_table td:last-child a {
  display: inline-block;
  font-size: 1.00rem;
  line-height: 1.2;
  font-weight: 700;
  color: #184c3a;
  text-decoration: none;
  transition: color 0.18s ease;
}

.mod_events_latest_table td:last-child a:hover,
.mod_events_latest_table td:last-child a:focus {
  color: #b08b2f;
  text-decoration: underline;
}

/* Falls unter dem Titel noch Text kommt */
.mod_events_latest_table td:last-child {
  color: #2f2f2f;
}

/* Mobile etwas kompakter */
@media (max-width: 768px) {
  .mod_events_latest_table tr {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .mod_events_latest_table td:last-child a {
    font-size: 1.25rem;
  }

  .mod_events_latest_table td:first-child,
  .mod_events_latest_table td:nth-child(2) {
    font-size: 0.92rem;
  }
}
/* =========================================
   Startseite – Raster nach Skizze
   ========================================= */

.home-grid-unified {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 22px;
  align-items: start;
}

.home-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.home-block h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.2;
  color: #184c3a;
  font-weight: 700;
  text-transform: none;
}

.home-block .card {
  min-height: 150px;
  height: 100%;
}

/* Kontakt soll breiter sein */
.home-block--contact {
  grid-column: span 2;
}

/* Bilder */
.home-block .tile-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Tablet */
@media (max-width: 1100px) {
  .home-grid-unified {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .home-block--contact {
    grid-column: span 2;
  }
}

/* Handy */
@media (max-width: 700px) {
  .home-grid-unified {
    grid-template-columns: 1fr !important;
  }

  .home-block--contact {
    grid-column: auto;
  }
}

/* === Galerie Plugin === */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 1rem;
}

.gallery-grid .gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.gallery-grid .gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.gallery-grid .gallery-item:hover img {
  transform: scale(1.03);
}

.galleryfolder-error,
.galleryfolder-empty {
  padding: 1rem 1.2rem;
  border-radius: 12px;
  margin-top: 1rem;
  background: #fff8f8;
  border: 1px solid rgba(180, 0, 0, 0.12);
}

.galleryfolder-empty {
  background: #fffdf7;
  border-color: rgba(180, 140, 0, 0.14);
}

/* ===== Phoca Gallery – Kategorien schöner ===== */

.pg-categories-view,
.pg-cv-categories,
.pg-csv-box {
  width: 100%;
}

.pg-categories-view {
  margin-top: 1rem;
}

.pg-categories-view::after {
  content: "";
  display: block;
  clear: both;
}

/* Karten */
.pg-cv-box {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #fffaf2;
  border: 1px solid rgba(200, 162, 74, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pg-cv-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

/* Bildbereich */
.pg-cv-box img,
.pg-csv-box img,
.pg-box-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

/* Overlay unten schöner */
.pg-cv-name {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 18px !important;
  background: linear-gradient(to top, rgba(17, 33, 24, 0.88), rgba(17, 33, 24, 0.25), transparent) !important;
  color: #fff8e8 !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* Link im Titel */
.pg-cv-name a {
  color: #fff8e8 !important;
  text-decoration: none !important;
}

.pg-cv-name a:hover {
  color: #f0d78a !important;
}

/* Anzahl Bilder kleiner und dezenter */
.pg-cv-name small,
.pg-cv-name .small,
.pg-cv-name span.small {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.9rem !important;
  font-weight: 600;
  opacity: 0.9;
}

/* Ordnersymbol ruhiger */
.pg-cv-name svg,
.pg-cv-name i,
.pg-cv-name img[alt*="folder"],
.pg-cv-name .pg-icon-category {
  opacity: 0.9;
  margin-right: 6px;
}

/* Außenabstand zwischen den Karten */
.pg-cv-box,
.pg-csv-box {
  margin: 12px !important;
}

/* Falls Phoca Float-Layout nutzt */
.pg-cv-box {
  float: left;
}

/* Mobile */
@media (max-width: 900px) {
  .pg-cv-box img,
  .pg-csv-box img,
  .pg-box-image img {
    height: 190px;
  }

  .pg-cv-name {
    font-size: 1rem !important;
    padding: 14px 14px !important;
  }
}

@media (max-width: 600px) {
  .pg-cv-box img,
  .pg-csv-box img,
  .pg-box-image img {
    height: 170px;
  }
}

/* Abstand unter Bild entfernen */
.pg-detailview,
.pg-detail-view,
.pg-detail-view-top,
.pg-detail-view-bottom {
  margin: 0 !important;
  padding: 0 !important;
}

/* Titelbereich komplett ausblenden */
.pg-detail-view .pg-title,
.pg-detail-view .pg-detail-title {
  display: none !important;
}

/* unnötige Leerbereiche entfernen */
.pg-detail-view .pg-box-desc,
.pg-detail-view .pg-description {
  display: none !important;
}

/* Kategorien als Liste statt Kacheln */

.pg-cv-box {
  width: 100% !important;
  display: block !important;
  margin: 0 !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid #ddd;
  box-shadow: none !important;
  background: none !important;
}

/* Bild ausblenden */
.pg-cv-box img {
  display: none !important;
}

/* Titel als Link */
.pg-cv-name {
  position: static !important;
  background: none !important;
  padding: 0 !important;
  font-size: 18px !important;
  font-weight: 600;
  color: #2c3e2f !important;
}

/* schöner Hover */
.pg-cv-box:hover {
  background: #f5f1e8 !important;
}