/* ==========================================================================
   Grünes Herz – Social Wall (EXT:t3social, Layout „Streifen“)
   Aktiv über Konstante plugin.tx_gruenesherztheme.socialwall.layout = streifen.

   Barrierefreiheit (WCAG 2.1 AA / EN 301 549):
     Karte: Weiß/Wiesengrün auf Dunkelblau (13.6:1 / 8.6:1), Bild nur aktiv
       und mit dunklem Verlauf (Text bleibt ≥ 7:1)
     Bedienung: Pfeil-Buttons, Tastatur (Tab/Enter), Ziehen, Wischen
     Detailansicht: natives <dialog> (Fokusfalle, Escape schließt,
       Fokus zurück auf die Karte)
     Bewegung: ohne Animation bei „Bewegung reduzieren“
   ========================================================================== */

.gh-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

/* 100vw enthält die Scrollleiste – kein waagerechtes Scrollen der Seite */
html, body { overflow-x: clip; }

.gh-wall {
	--gh-ease: cubic-bezier(.22, .8, .2, 1);
	color: var(--gh-dunkelblau);
}

/* Werkzeugleiste: Profil-Link + Pfeile rechtsbündig */
.gh-wall__tools {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	flex-wrap: wrap;
	gap: .875rem;
	margin-bottom: 1rem;
}
.gh-wall__handle {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	margin-right: auto;
	padding: .625rem 0;
	border-bottom: 2px solid currentColor;
	color: var(--gh-dunkelblau);
	font-weight: 700;
	text-decoration: none;
}
.gh-wall__handle svg { width: 1.125rem; }
/* Das Basis-Theme setzt vor externe Links ein Symbol – hier steht schon das Instagram-Symbol */
.gh-wall__handle > .fa-external-link-alt { display: none; }
.gh-wall__handle:hover { color: var(--gh-laubgruen-dunkel); text-decoration: none; }
.gh-wall__nav {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0;
	border: 2px solid var(--gh-dunkelblau);
	border-radius: 50%;
	background: none;
	color: var(--gh-dunkelblau);
	cursor: pointer;
	transition: background-color .3s, color .3s;
}
.gh-wall__nav:hover { background: var(--gh-dunkelblau); color: #fff; }
.gh-wall__nav:active { background: var(--gh-wiesengruen); border-color: var(--gh-wiesengruen); color: var(--gh-dunkelblau); }
/* Deaktiviert: bleibt erkennbar (Rahmen gestrichelt, 3:1 zu Weiß nicht nötig, da inaktiv) */
.gh-wall__nav:disabled { border-style: dashed; opacity: .45; cursor: default; background: none; color: var(--gh-dunkelblau); }
.gh-wall__nav svg { width: 1rem; }
.gh-wall__nav--prev svg { transform: rotate(180deg); }
.gh-icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* Streifen */
.gh-wall__track {
	list-style: none;
	display: flex;
	gap: clamp(.875rem, 1.4vw, 1.5rem);
	/* Über die volle Fensterbreite, Karten von Rand zu Rand (Außenabstand
	   links/rechts setzt gh-socialwall.js) */
	margin: 0;
	padding: 6px 0 16px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	cursor: grab;
	-webkit-overflow-scrolling: touch;
}
.gh-wall__track::-webkit-scrollbar { display: none; }
.gh-wall__track.dragging { cursor: grabbing; scroll-snap-type: none; }
.gh-wall__track.dragging .gh-wall__post { pointer-events: none; }
.gh-wall__item {
	/* Desktop: Platz 1 + drei aufgedeckte + eine angedeutete Karte */
	flex: 0 0 clamp(14rem, 21.5vw, 22rem);
	scroll-snap-align: start;
	display: flex;
	margin: 0;
	padding: 0;
}
.gh-wall__item::before { content: none; }
.gh-wall__item.is-entering { animation: gh-wall-in .4s ease both; }
@keyframes gh-wall-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Karte */
.gh-wall__post {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	aspect-ratio: 3 / 4.1;
	padding: clamp(1.25rem, 1.8vw, 1.75rem);
	border: 0;
	border-radius: var(--gh-radius, 6px);
	background: var(--gh-dunkelblau);
	color: #fff;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
:root .gh-wall__post:focus-visible {
	outline: 3px solid var(--gh-wiesengruen) !important;
	outline-offset: -3px;
}
.gh-wall__img {
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: 0;
	transition: opacity .7s var(--gh-ease), transform 2.4s var(--gh-ease);
}
.gh-wall__img img { width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; }
.gh-wall__img::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 50, 70, .96) 15%, rgba(0, 50, 70, .55) 60%, rgba(0, 50, 70, .35));
}
.gh-wall__item:is(.is-active, .is-hover) .gh-wall__img { opacity: 1; transform: scale(1.08); }
.gh-wall__date {
	color: var(--gh-wiesengruen);
	font-size: clamp(1.5rem, 2.1vw, 2.25rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
}
.gh-wall__nw {
	position: absolute;
	top: clamp(1.25rem, 1.8vw, 1.75rem);
	right: clamp(1.25rem, 1.8vw, 1.75rem);
	width: 1.375rem;
	opacity: .75;
	transition: opacity .3s;
}
.gh-wall__nw .gh-icon { width: 1.375rem; height: 1.375rem; }
.gh-wall__item:is(.is-active, .is-hover) .gh-wall__nw { opacity: 1; }
.gh-wall__play {
	display: none;
	position: absolute;
	top: clamp(1.25rem, 1.8vw, 1.75rem);
	right: calc(clamp(1.25rem, 1.8vw, 1.75rem) + 2rem);
	width: 1.125rem;
	color: var(--gh-wiesengruen);
}
.gh-wall__post.is-video .gh-wall__play { display: block; }
.gh-wall__title {
	margin-top: auto;
	color: var(--gh-wiesengruen);
	font-size: clamp(1.5rem, 2.2vw, 2.5rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -.02em;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: font-size .6s var(--gh-ease);
}
.gh-wall__item:is(.is-active, .is-hover) .gh-wall__title { font-size: clamp(1.125rem, 1.4vw, 1.5rem); line-height: 1.15; }
.gh-wall__text {
	max-height: 0;
	margin-top: 0;
	opacity: 0;
	font-size: clamp(.9375rem, .95vw, 1rem);
	line-height: 1.55;
	color: #fff;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: max-height .6s var(--gh-ease), opacity .5s, margin-top .6s var(--gh-ease);
}
.gh-wall__item:is(.is-active, .is-hover) .gh-wall__text { max-height: 5em; margin-top: 1em; opacity: 1; transition-delay: .1s; }

/* Fortschrittsbalken */
.gh-wall__progress { position: relative; height: 3px; margin-top: .5rem; background: rgba(0, 50, 70, .15); overflow: hidden; }
.gh-wall__progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 20%; background: var(--gh-wiesengruen); transition: transform .2s; }
.gh-wall__empty { padding: 2rem; text-align: center; background: var(--gh-naturweiss); border-radius: var(--gh-radius, 6px); }

/* Detailansicht */
.gh-wall__dialog {
	width: min(44rem, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	padding: 0;
	border: 0;
	border-radius: var(--gh-radius, 8px);
	overflow: auto;
	background: #fff;
	color: var(--gh-dunkelblau);
}
.gh-wall__dialog::backdrop { background: rgba(0, 20, 30, .8); }
.gh-wall__close {
	position: sticky;
	top: .6rem;
	float: right;
	margin: .6rem .6rem -3.4rem 0;
	z-index: 3;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	border: 2px solid var(--gh-wiesengruen);
	background: var(--gh-dunkelblau);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}
.gh-wall__close:hover { background: var(--gh-wiesengruen); color: var(--gh-dunkelblau); }
:root .gh-wall__close:focus-visible { outline: 3px solid var(--gh-dunkelblau) !important; outline-offset: 2px; }
.gh-post__figure { margin: 0; background: #021b25; }
.gh-post__figure img { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 0; }
.gh-post__body { display: grid; gap: .9rem; padding: 1.1rem 1.25rem 1.3rem; }
.gh-post__header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .9rem; }
.gh-post__network { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.gh-post__date { color: #3d5a68; font-variant-numeric: tabular-nums; }
.gh-post__text { font-size: 1rem; line-height: 1.55; overflow-wrap: anywhere; color: var(--gh-schiefergrau); }
.gh-post__text p { margin: 0 0 .6rem; }
.gh-post__footer { padding-top: .2rem; }

/* YouTube mit Einwilligung (in der Detailansicht) */
.gh-post__video { margin: 0; position: relative; }
.gh-post__consent { position: relative; aspect-ratio: 16 / 9; background: var(--gh-dunkelblau); color: #fff; overflow: hidden; }
.gh-post__video-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .3; }
.gh-post__video-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .18); }
.gh-post__video-placeholder .gh-icon { width: 40%; height: 40%; }
.gh-post__consent-box { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: .6rem; padding: 1rem 1.25rem; font-size: .95rem; line-height: 1.45; }
.gh-post__consent-box p { margin: 0; }
.gh-post__consent-box a { color: var(--gh-wiesengruen); }
.gh-post__consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.gh-post__consent-all { border: 0; background: none; color: #fff; font: inherit; text-decoration: underline; cursor: pointer; padding: .25rem 0; }
:root .gh-post__consent-all:focus-visible { outline-color: var(--gh-wiesengruen) !important; }
.gh-post__player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }

@media (prefers-reduced-motion: reduce) {
	.gh-wall__img, .gh-wall__title, .gh-wall__text, .gh-wall__nav { transition: none; }
	.gh-wall__item:is(.is-active, .is-hover) .gh-wall__img { transform: none; }
	.gh-wall__item.is-entering { animation: none; }
}
@media (forced-colors: active) {
	.gh-wall__post { border: 2px solid CanvasText; }
	.gh-wall__img::after { display: none; }
}
