/* Grafenpaar */
.grafen-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
  align-items: start;
}
@media(max-width:640px) { .grafen-layout { grid-template-columns: 1fr; } }

.grafen-img-col { display: flex; flex-direction: column; }
.grafen-img {
  width: 100%;
  object-fit: contain;
  display: block;
}

.grafen-table-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.grafen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.grafen-table thead tr {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
.grafen-table th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.grafen-table td {
  padding: 0.6rem 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.grafen-table tbody tr:last-child td { border-bottom: none; }
.grafen-table tbody tr:nth-child(even) { background: var(--bg3); }
.grafen-table td:first-child { color: var(--orange); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.06em; }

.grafen-info { display: flex; flex-direction: column; gap: 1rem; }
.grafen-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
}
.grafen-img-placeholder svg { width: 2.5rem; height: 2.5rem; opacity: 0.3; }
.grafen-info p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.75; }

/* ── Häs-Abschnitte (eigenständig, kein garde.css) ────────────────────── */
.haes-section {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 280px); /* Text links, Bild rechts */
  column-gap: 3rem;
  row-gap: 0;
  align-items: start;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.haes-section:last-of-type { border-bottom: none; }

/* Bild links beim geraden Häs */
.haes-section.flip { grid-template-columns: minmax(180px, 280px) 1fr; }

/* Desktop: Bild überspannt beide Zeilen, Titel oben, Beschreibung unten */
.haes-img-wrap                       { grid-column: 2; grid-row: 1 / 3; }
.haes-info-top                       { grid-column: 1; grid-row: 1; }
.haes-info-bottom                    { grid-column: 1; grid-row: 2; }
.haes-section.flip .haes-img-wrap    { grid-column: 1; grid-row: 1 / 3; }
.haes-section.flip .haes-info-top    { grid-column: 2; grid-row: 1; }
.haes-section.flip .haes-info-bottom { grid-column: 2; grid-row: 2; }

/* Bild: kein Rahmen, kein Hintergrund – Illustration liegt frei */
.haes-img-wrap {
  aspect-ratio: 9 / 16;
  overflow: hidden;
}
.haes-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.haes-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
}
.haes-img-placeholder svg { width: 3rem; height: 3rem; opacity: 0.25; }

/* Info-Container */
.haes-info-top,
.haes-info-bottom {
  display: flex;
  flex-direction: column;
}
.haes-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 0.4rem;
}
.haes-title {
  font-family: var(--font-head); font-size: 1.7rem; font-weight: 800;
  color: var(--text); margin-bottom: 0.9rem; line-height: 1.2;
}
.haes-desc {
  font-size: 0.88rem; color: var(--text-muted); line-height: 1.75;
  margin-bottom: 1rem;
}

/* Gremium */
.haes-gremium {
  display: flex; align-items: flex-start; gap: 0.75rem;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 0.75rem 1rem;
  margin-top: 0.25rem;
}
.haes-gremium-icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.haes-gremium-icon svg { width: 1rem; height: 1rem; }
.haes-gremium-label {
  font-size: 0.62rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-faint); margin-bottom: 0.2rem;
}
.haes-gremium-members {
  display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem;
  font-size: 0.83rem; font-weight: 600; color: var(--text);
}

@media(max-width: 768px) {
  .haes-section,
  .haes-section.flip {
    grid-template-columns: 1fr;
  }
  /* Mobile: Reihenfolge Titel → Bild → Beschreibung */
  .haes-img-wrap,
  .haes-section.flip .haes-img-wrap       { grid-column: 1; grid-row: 2; max-width: 240px; margin: 0 auto; }
  .haes-info-top,
  .haes-section.flip .haes-info-top       { grid-column: 1; grid-row: 1; }
  .haes-info-bottom,
  .haes-section.flip .haes-info-bottom    { grid-column: 1; grid-row: 3; }
}

/* ── Bräuche – Timeline + Akkordeon ─────────────────────────────────────── */
.brauch-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-left: 2.4rem;
}

/* Vertikale Linie */
.brauch-timeline::before {
  content: '';
  position: absolute;
  left: 0.52rem;
  top: 0.7rem;
  bottom: 0.7rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--green), var(--blue) 60%, transparent);
  border-radius: 2px;
}

/* Einzelner Eintrag */
.brauch-tl-item {
  position: relative;
  padding-bottom: 0.9rem;
}
.brauch-tl-item:last-child { padding-bottom: 0; }

/* Punkt auf der Linie – ausgeblendet */
.brauch-tl-dot { display: none; }

/* Karte */
.brauch-tl-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.brauch-tl-item.open .brauch-tl-card { border-color: var(--border-strong); }

/* Header (Button) */
.brauch-tl-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.brauch-tl-header:hover .brauch-tl-title { color: var(--text); }

.brauch-tl-meta { flex: 1; min-width: 0; }

.brauch-tl-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.brauch-tl-datum {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--orange);
  margin-bottom: 0.25rem;
}

/* Beschreibungstext – clamped → expandiert */
.brauch-tl-desc {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-top: 0.3rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  transition: -webkit-line-clamp 0s, max-height 0.35s ease;
  max-height: 3rem;
}
.brauch-tl-item.open .brauch-tl-desc {
  -webkit-line-clamp: 99;
  max-height: 80rem;
}

/* Chevron-Icon */
.brauch-tl-chevron {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.15rem;
  color: var(--text-faint);
  transition: transform 0.25s ease, color 0.2s;
}
.brauch-tl-item.open .brauch-tl-chevron {
  transform: rotate(180deg);
  color: var(--orange);
}

/* Lied */
.lied-wrap {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem 1.8rem;
  border-left: 3px solid var(--orange);
  display: flex; flex-direction: column; gap: 1.5rem;
}
.lied-label {
  font-size: 0.63rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text-faint); margin-bottom: 0.35rem;
}
.lied-body {
  font-family: var(--font-body); font-size: 0.88rem;
  color: var(--text-muted); line-height: 2;
}

/* ── Grafenpaar Tabelle + Foto nebeneinander ─────────────────────────────── */
.grafen-pair-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 1.5rem;
  align-items: start;
}
.grafen-table-wrap { min-width: 0; overflow-x: auto; }
.grafen-table { table-layout: fixed; width: 100%; }
.grafen-table th:first-child,
.grafen-table td:first-child { width: 4rem; }
.grafen-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.grafen-photo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: sticky;
  top: 80px;
}

.grafen-photo-img {
  width: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.18s ease;
  border-radius: 6px;
}

.grafen-photo-caption {
  font-size: 0.7rem;
  color: var(--text-faint);
  text-align: center;
  font-style: italic;
  line-height: 1.4;
}

/* Aktive Zeile hervorheben */
.grafen-table tr.grafen-active td { background: var(--bg3); }
.grafen-table tr.grafen-active td:first-child { color: var(--orange); }

/* Pfeil / Dreieck → zeigt auf Foto rechts */
.grafen-table tr.grafen-active td:last-child {
  position: relative;
  padding-right: 1.6rem;
}
.grafen-table tr.grafen-active td:last-child::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--orange);
}

/* Hover-Zeile mit Bild */
.grafen-table tr.hat-bild { cursor: pointer; }
.grafen-table tr.hat-bild:hover td { background: var(--bg3); }

@media(max-width: 768px) {
  .grafen-pair-layout {
    grid-template-columns: 1fr;
  }
  .grafen-photo-col {
    position: static;
    max-width: 200px;
    margin: 0 auto;
  }
}
