/* ────────────────────────────────────────────────────────────
   Höfetour Zukunft – Stationsübersicht & Detailseiten CSS
   ──────────────────────────────────────────────────────────── */

:root {
  --ht-green:        #5F842D;
  --ht-green-dark:   #4a6622;
  --ht-green-light:  #f2f6ea;
  --ht-green-border: #c8d9b0;
  --ht-yellow:       #d4d98a;
  --ht-yellow-dark:  #b8bd60;
  --ht-text:         #2d3520;
  --ht-muted:        #6b7280;
  --ht-white:        #ffffff;
  --ht-radius:       12px;
  --ht-shadow:       0 4px 24px rgba(74,103,65,.12);
  --ht-transition:   .22s ease;
}

/* ── Gemeinsame Schrift ───────────────────────────────────── */
.ht-stations-overview,
.ht-station-detail {
  font-family: 'Nunito', 'Segoe UI', Arial, sans-serif;
  color: var(--ht-text);
}

/* ═══════════════════════════════════════════════════════════
   ÜBERSICHT – Kacheln
   ═══════════════════════════════════════════════════════════ */

.ht-period-heading {
  display: none;
}

.ht-station-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

/* Kachel */
.ht-station-tile {
  background: var(--ht-white);
  border: 1px solid var(--ht-green-border);
  border-radius: var(--ht-radius);
  overflow: hidden;
  transition: var(--ht-transition);
  display: flex;
  flex-direction: column;
}
.ht-station-tile:hover {
  box-shadow: var(--ht-shadow);
  transform: translateY(-3px);
  border-color: var(--ht-green);
}

.ht-tile-image-link { display: block; position: relative; overflow: hidden; }
.ht-tile-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.ht-station-tile:hover .ht-tile-img { transform: scale(1.04); }

.ht-tile-img-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #c8d9b0 0%, #e8f0d0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.ht-tile-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ht-tile-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ht-muted);
  margin-bottom: 8px;
}
.ht-tile-host { font-style: italic; }

.ht-tile-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ht-green);
  margin: 0 0 10px;
  line-height: 1.3;
}
.ht-tile-title a {
  color: inherit;
  text-decoration: none;
}
.ht-tile-title a:hover { text-decoration: underline; }

.ht-tile-excerpt {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
  flex: 1;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ht-tile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* Buttons */
.ht-btn-outline {
  border: 1.5px solid var(--ht-green);
  color: var(--ht-green);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--ht-transition);
  background: transparent;
}
.ht-btn-outline:hover {
  background: var(--ht-green-light);
  text-decoration: none;
}

.ht-btn-primary-sm {
  background: var(--ht-green);
  color: var(--ht-white);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--ht-transition);
}
.ht-btn-primary-sm:hover {
  background: var(--ht-green-dark);
  color: var(--ht-white);
  text-decoration: none;
}

/* CTA-Leiste unten */
.ht-cta-bar {
  text-align: center;
  padding: 32px 0 8px;
}

.ht-btn-cta {
  display: inline-block;
  background: var(--ht-green);
  color: var(--ht-white);
  border-radius: 10px;
  padding: 14px 32px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(74,103,65,.25);
  transition: var(--ht-transition);
}
.ht-btn-cta:hover {
  background: var(--ht-green-dark);
  color: var(--ht-white);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   DETAILSEITE
   ═══════════════════════════════════════════════════════════ */

.ht-station-page { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.ht-station-detail { font-family: 'Nunito', 'Segoe UI', Arial, sans-serif; }

/* Header */
.ht-detail-header {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--ht-green-border);
  margin-bottom: 32px;
}
.ht-detail-meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.ht-badge-period {
  background: var(--ht-yellow);
  color: var(--ht-green-dark);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
}
.ht-detail-location { font-size: 14px; color: var(--ht-muted); }
.ht-detail-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--ht-green);
  margin: 0 0 10px;
  line-height: 1.2;
}
.ht-detail-host {
  font-size: 15px;
  color: var(--ht-muted);
  margin: 0 0 20px;
}

/* Galerie */
.ht-gallery { margin-bottom: 36px; }

.ht-gallery-main {
  border-radius: var(--ht-radius);
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}
.ht-gallery-main a { display: block; cursor: zoom-in; }
.ht-gallery-main-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.ht-gallery-main a:hover .ht-gallery-main-img { transform: scale(1.02); }

.ht-gallery-count {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
}

/* Fotocredit – vertikal aufwärts, rechte untere Ecke */
.ht-photo-credit {
  position: absolute;
  bottom: 6px;
  right: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: 10px;
  color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.35);
  padding: 4px 3px;
  line-height: 1;
  white-space: nowrap;
  z-index: 3;
  pointer-events: none;
  border-radius: 2px 0 0 2px;
  max-height: 90%;
  overflow: hidden;
}

.ht-gallery-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ht-gallery-thumbs a {
  display: block;
  width: 90px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: var(--ht-transition);
  cursor: zoom-in;
}
.ht-gallery-thumbs a:hover,
.ht-gallery-thumbs a.active {
  border-color: var(--ht-green);
}
.ht-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content + Sidebar */
.ht-detail-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 36px;
  align-items: start;
}
.ht-detail-text {
  font-size: 16px;
  line-height: 1.75;
  color: #374151;
}
.ht-detail-text p { margin-bottom: 1.2em; }
.ht-detail-text h2,
.ht-detail-text h3 { color: var(--ht-green); margin-top: 1.5em; }

.ht-detail-sidebar { display: flex; flex-direction: column; gap: 20px; }

.ht-detail-infobox {
  background: var(--ht-green-light);
  border: 1px solid var(--ht-green-border);
  border-radius: var(--ht-radius);
  padding: 20px;
}
.ht-detail-infobox h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ht-green);
  margin: 0 0 10px;
}
.ht-detail-infobox p {
  font-size: 14px;
  color: #4b5563;
  margin: 0 0 12px;
}

.ht-btn-maps {
  display: inline-block;
  background: var(--ht-white);
  border: 1.5px solid var(--ht-green);
  color: var(--ht-green);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--ht-transition);
}
.ht-btn-maps:hover {
  background: var(--ht-green);
  color: var(--ht-white);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════ */

.ht-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ht-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
}
.ht-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}
.ht-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}
.ht-lightbox-counter {
  color: rgba(255,255,255,.7);
  font-size: 13px;
  margin-top: 10px;
}
.ht-lightbox-close,
.ht-lightbox-prev,
.ht-lightbox-next {
  position: fixed;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 2;
  transition: background .2s;
  border-radius: 50%;
  line-height: 1;
}
.ht-lightbox-close:hover,
.ht-lightbox-prev:hover,
.ht-lightbox-next:hover { background: rgba(255,255,255,.3); }

.ht-lightbox-close {
  top: 16px; right: 20px;
  font-size: 24px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
}
.ht-lightbox-prev {
  left: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
}
.ht-lightbox-next {
  right: 16px; top: 50%;
  transform: translateY(-50%);
  font-size: 36px;
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .ht-station-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .ht-station-grid { grid-template-columns: 1fr; }
  .ht-detail-content { grid-template-columns: 1fr; }
  .ht-detail-sidebar { order: -1; }
  .ht-gallery-main-img { height: 260px; }
  .ht-detail-title { font-size: 24px; }
  .ht-lightbox-prev { left: 6px; }
  .ht-lightbox-next { right: 6px; }
}
