/*
 * Hundeberatung – shanti-dog.de
 * Teil des Plugins "Shanti Hundeberatung".
 *
 * Schrift und Grundfarben kommen aus dem Theme.
 * Anpassbar ueber die Variablen unten.
 */

.sd-hb {
	--sd-hb-akzent: #66b32e;          /* Shanti-Gruen, Flaechen und Balken */
	--sd-hb-akzent-dunkel: #46801d;   /* dunkler, fuer Text und Buttons     */
	--sd-hb-akzent-hell: #f0f7ea;     /* Flaechenhintergrund                */
	--sd-hb-rahmen: #e2e2dd;
	--sd-hb-text: #2b2b2b;
	--sd-hb-radius: 10px;

	text-align: left;
}

/* ---------- Zweispaltiges Grundgeruest ---------- */

.sd-hb__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
	gap: 2.5rem;
	align-items: start;
}

.sd-hb__spalte-fragen {
	min-width: 0;
	max-width: 34rem;
}

.sd-hb__spalte-galerie {
	min-width: 0;
	padding: 1.25rem;
	background: var(--sd-hb-akzent-hell);
	border-radius: var(--sd-hb-radius);
	position: sticky;
	top: 2rem;
}

.sd-hb__spalte-galerie[hidden] {
	display: none;
}

.sd-hb__galtitel {
	margin: 0 0 .25rem;
	font-size: 1rem;
}

.sd-hb__galzaehler {
	margin: 0 0 1rem;
	font-size: .8rem;
	letter-spacing: .03em;
	text-transform: uppercase;
	opacity: .65;
}

/* ---------- Galerie ---------- */

.sd-hb__galerie {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
	gap: .6rem;
	max-height: 30rem;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.sd-hb__galerie.is-eng {
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	max-height: none;
	overflow: visible;
}

.sd-hb__kachel {
	margin: 0;
	text-align: center;
	transition: opacity .35s ease, transform .35s ease;
}

.sd-hb__kachel a {
	display: block;
	text-decoration: none;
	color: inherit;
}

.sd-hb__kachel img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 50%;
	background: #fff;
}

.sd-hb__platzhalter {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	background: #fff;
	border-radius: 50%;
	font-weight: 700;
	opacity: .4;
}

.sd-hb__kachel figcaption {
	margin-top: .3rem;
	font-size: .65rem;
	line-height: 1.25;
	opacity: .8;
	overflow-wrap: anywhere;
}

.sd-hb__galerie.is-eng figcaption {
	font-size: .75rem;
}

.sd-hb__kachel.is-raus {
	display: none;
}

/* Ausblenden weich, wenn die Galerie schon klein ist */
.sd-hb__galerie.is-eng .sd-hb__kachel {
	transform: none;
}

/* ---------- Fortschritt ---------- */

.sd-hb__fortschritt {
	height: 4px;
	background: var(--sd-hb-rahmen);
	border-radius: 999px;
	overflow: hidden;
}

.sd-hb__balken {
	height: 100%;
	background: var(--sd-hb-akzent);
	transition: width .3s ease;
}

.sd-hb__zaehler {
	margin: .5rem 0 1.5rem;
	font-size: .8rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	opacity: .6;
}

/* ---------- Frage ---------- */

.sd-hb__frage {
	margin: 0 0 .5rem;
	font-size: 1.5rem;
	line-height: 1.3;
}

.sd-hb__hilfe {
	margin: 0 0 1.5rem;
	opacity: .75;
}

.sd-hb__optionen {
	display: grid;
	gap: .75rem;
}

/* Alle Zustaende explizit setzen – sonst faerbt das Theme die Buttons um. */
.sd-hb .sd-hb__option,
.sd-hb .sd-hb__option:link,
.sd-hb .sd-hb__option:visited {
	display: block;
	width: 100%;
	padding: 1rem 1.25rem;
	text-align: left;
	font: inherit;
	color: var(--sd-hb-text) !important;
	background: #fff !important;
	border: 1px solid var(--sd-hb-rahmen);
	border-radius: var(--sd-hb-radius);
	box-shadow: none;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}

.sd-hb .sd-hb__option:hover,
.sd-hb .sd-hb__option:focus,
.sd-hb .sd-hb__option:focus-visible,
.sd-hb .sd-hb__option:active,
.sd-hb .sd-hb__option.is-gewaehlt {
	color: var(--sd-hb-text) !important;
	background: var(--sd-hb-akzent-hell) !important;
	border-color: var(--sd-hb-akzent);
}

.sd-hb .sd-hb__option:focus-visible {
	outline: 2px solid var(--sd-hb-akzent-dunkel);
	outline-offset: 2px;
}

.sd-hb .sd-hb__zurueck,
.sd-hb .sd-hb__zurueck:hover,
.sd-hb .sd-hb__zurueck:focus,
.sd-hb .sd-hb__zurueck:focus-visible,
.sd-hb .sd-hb__zurueck:active {
	display: inline-block;
	margin-top: 1.5rem;
	padding: .5rem 0;
	font: inherit;
	font-size: .9rem;
	color: var(--sd-hb-akzent-dunkel) !important;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	cursor: pointer;
	text-decoration: underline;
}

.sd-hb .sd-hb__zurueck:hover {
	text-decoration: none;
}

.sd-hb .sd-hb__zurueck:focus-visible {
	outline: 2px solid var(--sd-hb-akzent-dunkel);
	outline-offset: 2px;
}

/* ---------- Ergebnis ---------- */

.sd-hb__karten {
	display: grid;
	gap: 1rem;
	margin-bottom: 2rem;
}

.sd-hb__karte {
	display: flex;
	gap: 1rem;
	padding: 1rem;
	border: 1px solid var(--sd-hb-rahmen);
	border-radius: var(--sd-hb-radius);
	background: #fff;
}

.sd-hb__bild {
	flex: 0 0 96px;
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: calc(var(--sd-hb-radius) - 4px);
}

.sd-hb__inhalt {
	flex: 1 1 auto;
	min-width: 0;
}

.sd-hb__name {
	margin: 0 0 .25rem;
	font-size: 1.15rem;
}

.sd-hb__name a {
	color: inherit;
	text-decoration: none;
}

.sd-hb__name a:hover {
	color: var(--sd-hb-akzent-dunkel);
	text-decoration: underline;
}

.sd-hb__meta {
	margin: 0 0 .5rem;
	font-size: .85rem;
	opacity: .7;
}

.sd-hb__spur {
	height: 5px;
	margin-bottom: .75rem;
	background: var(--sd-hb-rahmen);
	border-radius: 999px;
	overflow: hidden;
}

.sd-hb__fuell {
	height: 100%;
	background: var(--sd-hb-akzent);
}

.sd-hb__hinweis {
	margin: 0 0 .5rem;
	padding-left: .75rem;
	border-left: 3px solid var(--sd-hb-rahmen);
	font-size: .875rem;
	line-height: 1.5;
	opacity: .85;
}

.sd-hb .sd-hb__mehr,
.sd-hb .sd-hb__mehr:link,
.sd-hb .sd-hb__mehr:visited {
	display: inline-block;
	margin-top: .25rem;
	font-size: .9rem;
	color: var(--sd-hb-akzent-dunkel) !important;
}

/* Zweitlink steht unter dem Button, nicht daneben. */
.sd-hb .sd-hb__cta .sd-hb__zweitlink,
.sd-hb .sd-hb__cta .sd-hb__zweitlink:link,
.sd-hb .sd-hb__cta .sd-hb__zweitlink:visited {
	display: block;
	width: fit-content;
	margin: 1.25rem 0 0;
	font-size: .9rem;
	color: var(--sd-hb-akzent-dunkel) !important;
}

.sd-hb .sd-hb__mehr:hover,
.sd-hb .sd-hb__zweitlink:hover {
	color: var(--sd-hb-akzent-dunkel) !important;
	text-decoration: underline;
}

.sd-hb__leer {
	padding: 1.25rem;
	border: 1px dashed var(--sd-hb-rahmen);
	border-radius: var(--sd-hb-radius);
}

/* ---------- Abschluss ---------- */

.sd-hb__cta {
	padding: 1.5rem;
	background: var(--sd-hb-akzent-hell);
	border-radius: var(--sd-hb-radius);
}

.sd-hb__cta p {
	margin: 0 0 1rem;
}

.sd-hb .sd-hb__ctalink,
.sd-hb .sd-hb__ctalink:link,
.sd-hb .sd-hb__ctalink:visited,
.sd-hb .sd-hb__ctalink:hover,
.sd-hb .sd-hb__ctalink:focus,
.sd-hb .sd-hb__ctalink:active {
	display: inline-block;
	padding: .7rem 1.4rem;
	color: #fff !important;
	background: var(--sd-hb-akzent-dunkel) !important;
	border: none;
	border-radius: 999px;
	text-decoration: none;
}

.sd-hb .sd-hb__ctalink:hover {
	background: var(--sd-hb-akzent) !important;
}

.sd-hb .sd-hb__ctalink:focus-visible {
	outline: 2px solid var(--sd-hb-akzent-dunkel);
	outline-offset: 3px;
}



/* ---------- Schmale Fenster ---------- */

@media (max-width: 900px) {
	.sd-hb__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	.sd-hb__spalte-galerie {
		position: static;
	}

	.sd-hb__galerie {
		max-height: 16rem;
	}
}

@media (max-width: 480px) {
	.sd-hb__karte {
		flex-direction: column;
	}

	.sd-hb__bild {
		width: 100%;
		height: 140px;
		flex-basis: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sd-hb *,
	.sd-hb *::before,
	.sd-hb *::after {
		transition: none !important;
	}
}

/* ---------- Hinweisbox in den Lexikoneintraegen ---------- */

.sd-hb-box {
	margin: 2rem 0 0;
	padding: 1.25rem 1.5rem;
	background: #f0f7ea;
	border-left: 4px solid #66b32e;
	border-radius: 10px;
}

.sd-hb-box p {
	margin: 0 0 .75rem;
}

.sd-hb-box p:last-child {
	margin-bottom: 0;
}

.sd-hb-box__link,
.sd-hb-box__link:link,
.sd-hb-box__link:visited,
.sd-hb-box__link:hover,
.sd-hb-box__link:focus {
	display: inline-block;
	padding: .6rem 1.2rem;
	color: #fff !important;
	background: #46801d !important;
	border-radius: 999px;
	text-decoration: none;
}

.sd-hb-box__link:hover {
	background: #66b32e !important;
}

.sd-hb-box.is-vorschau {
	border-left-style: dashed;
}

.sd-hb-box__vorschau {
	font-size: .85rem;
	font-style: italic;
	opacity: .75;
}

.sd-hb-box__zweit,
.sd-hb-box__zweit:link,
.sd-hb-box__zweit:visited {
	display: inline-block;
	font-size: .9rem;
	color: #46801d !important;
}

/* ---------- Erklaerung und Ausgang in der Fragestrecke ---------- */

.sd-hb__galhilfe {
	margin: 0 0 1rem;
	font-size: .8rem;
	line-height: 1.45;
	opacity: .7;
}

.sd-hb__fuss {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 1.5rem;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--sd-hb-rahmen);
}

.sd-hb__fuss .sd-hb__zurueck {
	margin-top: 0;
}

.sd-hb .sd-hb__ausstieg,
.sd-hb .sd-hb__ausstieg:link,
.sd-hb .sd-hb__ausstieg:visited {
	font-size: .9rem;
	color: var(--sd-hb-akzent-dunkel) !important;
	opacity: .75;
	text-decoration: underline;
}

.sd-hb .sd-hb__ausstieg:hover {
	opacity: 1;
}

/* Der Hinweis auf die Galerie erscheint nur, wenn sie darunter steht. */
.sd-hb__bruecke {
	display: none;
	margin: 1.5rem 0 0;
	font-size: .85rem;
	opacity: .6;
}

@media (max-width: 900px) {
	.sd-hb__bruecke {
		display: block;
	}
}
