/* Gemeinsame Stile für die Lebensworte-Widgets. */

.lw-example-widget__title {
	margin: 0 0 10px;
}

.lw-example-widget__description {
	line-height: 1.6;
}

/* ---------- Laufschrift (Marquee) ---------- */

.lw-marquee {
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	white-space: nowrap;
	box-sizing: border-box;
}

.lw-marquee__track {
	display: inline-flex;
	align-items: center;
	flex-wrap: nowrap;
	width: max-content;
	min-width: 100%;
	animation-name: lw-marquee-scroll;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	animation-fill-mode: forwards;
	will-change: transform;
}

.lw-marquee__track--reverse {
	animation-direction: reverse;
}

.lw-marquee--pausable:hover .lw-marquee__track {
	animation-play-state: paused;
}

.lw-marquee__item {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	flex-shrink: 0;
}

.lw-marquee__word {
	display: inline-block;
	flex-shrink: 0;
}

.lw-marquee__separator {
	display: inline-block;
	margin-left: 20px;
	object-fit: contain;
	flex-shrink: 0;
}

/* --lw-loop-x wird pro Widget-Instanz inline gesetzt
   (abhängig von der Anzahl der Wiederholungen), damit der
   Loop immer exakt an der richtigen Stelle nahtlos schließt. */
@keyframes lw-marquee-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(var(--lw-loop-x, -50%));
	}
}

/* ---------- Zitate-Slider ---------- */

.lw-quote-slider__card {
	position: relative;
	background: #EEF3E6;
	max-width: 1000px;
	margin: 0 auto;
	padding: 60px 80px;
	border-radius: 32px;
	box-sizing: border-box;
	text-align: center;
}

.lw-quote-slider__slides {
	position: relative;
}

.lw-quote-slide {
	display: none;
	flex-direction: column;
	align-items: center;
}

.lw-quote-slide.is-active {
	display: flex;
	animation: lw-quote-fade-in 0.5s ease;
}

@keyframes lw-quote-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lw-quote-slider__avatar {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 30%;
	margin-bottom: 14px;
}

.lw-quote-slider__label {
	font-weight: 700;
	font-size: 14px;
	color: #4B6142;
	margin-bottom: 4px;
}

.lw-quote-slider__author {
	font-size: 13px;
	color: #7C8A72;
	margin-bottom: 28px;
}

.lw-quote-slider__quote {
	font-size: 28px;
	line-height: 1.45;
	color: #33422D;
	width: 100%;
}

.lw-quote-slider__quote em,
.lw-quote-slider__quote i {
	color: #E3A16B;
	font-style: italic;
}

.lw-quote-slider__nav-wrap {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 36px;
}

.lw-quote-slider__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	border: none;
	background: #DCE3D6;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.2s ease;
}

.lw-quote-slider__nav svg {
	fill: #4B5A44;
}

.lw-quote-slider__nav:hover {
	background: #C8D2BF;
}

/* ---------- Beitragsraster (Post Grid) ---------- */

.lw-post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}

.lw-post-card {
	display: flex;
	flex-direction: column;
}

.lw-post-card__media {
	position: relative;
	display: block;
	height: 260px;
	border-radius: 20px;
	overflow: hidden;
	margin-bottom: 20px;
	cursor: default;
}

.lw-post-card__media--placeholder {
	background-color: #DCD3BF;
}

.lw-post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.lw-post-card:hover .lw-post-card__media img {
	transform: scale(1.06);
}

.lw-post-card__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	background: #FFFFFF;
	color: #2E2E2E;
	font-size: 14px;
	font-weight: 500;
	padding: 8px 16px;
	border-radius: 999px;
	white-space: nowrap;
}

.lw-post-card__meta {
	display: flex;
	align-items: center;
	gap: 18px;
	color: #5B6B54;
	font-size: 14px;
	margin-bottom: 14px;
}

.lw-post-card__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.lw-post-card__meta svg {
	fill: #5B6B54;
	flex-shrink: 0;
}

.lw-post-card__title {
	margin: 0 0 10px;
	font-size: 26px;
	line-height: 1.3;
}

.lw-post-card__title a {
	color: #33422D;
	text-decoration: none;
}

.lw-post-card__title a:hover {
	text-decoration: underline;
}

.lw-post-card__excerpt {
	margin: 0 0 24px;
	color: #5B6B54;
	font-size: 16px;
	line-height: 1.5;
}

.lw-post-card__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	background: #FFFFFF;
	color: #2E2E2E;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	padding: 14px 22px;
	border-radius: 999px;
	transition: background-color 0.2s ease;
}

.lw-post-card__button:hover {
	background: #EFEAE0;
}

.lw-post-card__button svg {
	fill: #2E2E2E;
	flex-shrink: 0;
}

.lw-post-grid__empty {
	opacity: 0.7;
}

/* ---------- Kategorie-Filter (Beitragsraster) ---------- */

.lw-post-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 36px;
}

.lw-post-filter__item {
	display: inline-flex;
	align-items: center;
	background: #FBF8F1;
	color: #2E2E2E;
	border: 1px solid #DCD3BF;
	text-decoration: none;
	font-size: 15px;
	padding: 12px 22px;
	border-radius: 999px;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lw-post-filter__item:not(.is-active):hover {
	background: #F1EBDC;
}

.lw-post-filter__item.is-active {
	background: #1F2E1B;
	border-color: #1F2E1B;
	color: #FFFFFF;
}

/* ---------- Paginierung (Beitragsraster) ---------- */

.lw-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 40px;
}

.lw-pagination__item,
.lw-pagination__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: #FBF8F1;
	color: #2E2E2E;
	text-decoration: none;
	font-size: 15px;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.lw-pagination__item:not(.is-active):hover,
.lw-pagination__nav:hover {
	background: #F1EBDC;
}

.lw-pagination__item.is-active {
	background: #1F2E1B;
	color: #FFFFFF;
}

.lw-pagination__nav svg {
	fill: #2E2E2E;
}

/* ---------- Meta-Widgets (Datum, Lesezeit) ---------- */

.lw-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #5B6B54;
	font-size: 15px;
}

.lw-meta-item svg {
	fill: #5B6B54;
	flex-shrink: 0;
}

/* ---------- Inhaltsverzeichnis (TOC) ---------- */

.lw-toc {
	background-color: #FBF8F1;
	border-radius: 16px;
	padding: 28px;
}

.lw-toc__title {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 600;
	color: #33422D;
}

.lw-toc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: lw-toc-counter;
}

.lw-toc__item {
	position: relative;
	margin-bottom: 10px;
	padding-left: 4px;
	--lw-toc-bar-color: #33422D;
}

.lw-toc__item:last-child {
	margin-bottom: 0;
}

.lw-toc--numbered .lw-toc__item {
	counter-increment: lw-toc-counter;
}

.lw-toc__link {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	color: #5B6B54;
	text-decoration: none;
	line-height: 1.5;
	transition: color 0.2s ease;
}

.lw-toc__link:hover {
	color: #33422D;
}

.lw-toc__marker {
	flex-shrink: 0;
	color: #A9B79F;
	font-variant-numeric: tabular-nums;
}

.lw-toc--numbered .lw-toc__marker::before {
	content: counter(lw-toc-counter) ".";
}

.lw-toc--bulleted .lw-toc__marker::before {
	content: "•";
}

.lw-toc__item.is-active {
	padding-left: 12px;
}

.lw-toc__item.is-active::before {
	content: "";
	position: absolute;
	left: 0;
	top: 4px;
	bottom: 4px;
	width: 2px;
	background-color: var(--lw-toc-bar-color, #33422D);
	border-radius: 2px;
}

.lw-toc__item.is-active > .lw-toc__link {
	color: #33422D;
	font-weight: 600;
}

.lw-toc__placeholder {
	list-style: none;
	color: #9AA593;
	font-size: 14px;
	font-style: italic;
}

/* ---------- Galerie (horizontal scrollbar) ---------- */

.lw-gallery-wrap {
	width: 100%;
}

.lw-gallery {
	display: flex;
	overflow-x: auto;
	gap: 20px;
	width: 100%;
	box-sizing: border-box;
}

.lw-gallery--snap {
	scroll-snap-type: x mandatory;
}

.lw-gallery--snap[data-dragging="true"] {
	scroll-snap-type: none;
}

.lw-gallery--no-scrollbar {
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE/Edge */
}

.lw-gallery--no-scrollbar::-webkit-scrollbar {
	display: none; /* Chrome/Safari */
}

.lw-gallery[data-drag="yes"] {
	cursor: grab;
}

.lw-gallery[data-dragging="true"] {
	cursor: grabbing;
	scroll-behavior: auto;
	user-select: none;
}

.lw-gallery__item {
	position: relative;
	flex: 0 0 auto;
	width: 340px;
	height: 420px;
	border-radius: 24px;
	overflow: hidden;
	background-color: #DCD3BF;
	scroll-snap-align: start;
}

.lw-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

.lw-gallery__nav-wrap {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 20px;
}

.lw-gallery__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: #FFFFFF;
	cursor: pointer;
	padding: 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	transition: background-color 0.2s ease;
}

.lw-gallery__nav svg {
	fill: #2E2E2E;
}

.lw-gallery__item--zoomable {
	cursor: zoom-in;
}

/* ---------- Lightbox (Vollbildansicht) ---------- */

.lw-gallery__lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
	background-color: rgba(20, 20, 18, 0.94);
	padding: 40px;
	box-sizing: border-box;
}

.lw-gallery__lightbox.is-open {
	display: flex;
}

.lw-lightbox-img {
	max-width: 90vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
}

.lw-lightbox-close,
.lw-lightbox-prev,
.lw-lightbox-next {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: none;
	background-color: rgba(255, 255, 255, 0.12);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.lw-lightbox-close:hover,
.lw-lightbox-prev:hover,
.lw-lightbox-next:hover {
	background-color: rgba(255, 255, 255, 0.24);
}

.lw-lightbox-close svg,
.lw-lightbox-prev svg,
.lw-lightbox-next svg {
	fill: #FFFFFF;
}

.lw-lightbox-close {
	top: 24px;
	right: 24px;
}

.lw-lightbox-prev {
	left: 24px;
	top: 50%;
	transform: translateY(-50%);
}

.lw-lightbox-next {
	right: 24px;
	top: 50%;
	transform: translateY(-50%);
}

@media (max-width: 768px) {
	.lw-gallery__lightbox {
		padding: 16px;
	}
	.lw-lightbox-prev,
	.lw-lightbox-next,
	.lw-lightbox-close {
		width: 40px;
		height: 40px;
	}
}

/* ---------- Leistungen-Raster ---------- */

.lw-leistungen-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	column-gap: 40px;
	row-gap: 48px;
}

.lw-leistungen-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
}

.lw-leistungen-card__media {
	position: relative;
	display: block;
	height: 260px;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 20px;
}

.lw-leistungen-card__media--placeholder {
	background-color: #DCD3BF;
}

.lw-leistungen-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.lw-leistungen-card:hover .lw-leistungen-card__media img {
	transform: scale(1.06);
}

.lw-leistungen-card__title {
	margin: 0 0 8px;
	font-size: 22px;
	line-height: 1.3;
	color: #33422D;
}

.lw-leistungen-card__excerpt {
	margin: 0 0 20px;
	color: #5B6B54;
	font-size: 15px;
	line-height: 1.55;
}

.lw-leistungen-card__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	background: #FFFFFF;
	color: #2E2E2E;
	font-size: 14px;
	font-weight: 600;
	padding: 12px 20px;
	border-radius: 999px;
	transition: background-color 0.2s ease;
}

.lw-leistungen-card:hover .lw-leistungen-card__button {
	background: #EFEAE0;
}

.lw-leistungen-card__button svg {
	fill: #2E2E2E;
	flex-shrink: 0;
}

.lw-leistungen-grid__empty {
	opacity: 0.7;
}

@media (max-width: 767px) {
	.lw-leistungen-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Bilder-Karussell ---------- */

.lw-carousel {
	position: relative;
	width: 100%;
}

.lw-carousel__track {
	display: flex;
	overflow-x: auto;
	gap: 20px;
	scroll-snap-type: x mandatory;
	scroll-behavior: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.lw-carousel__track::-webkit-scrollbar {
	display: none;
}

.lw-carousel__item {
	position: relative;
	flex: 0 0 calc((100% - 20px) / 2);
	max-width: calc((100% - 20px) / 2);
	height: 420px;
	border-radius: 20px;
	overflow: hidden;
	background-color: #DCD3BF;
	scroll-snap-align: start;
	cursor: zoom-in;
}

.lw-carousel__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

.lw-carousel__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.85);
	cursor: pointer;
	padding: 0;
	z-index: 2;
	transition: background-color 0.2s ease;
}

.lw-carousel__nav:hover {
	background: #FFFFFF;
}

.lw-carousel__nav svg {
	fill: #2E2E2E;
}

.lw-carousel__nav--prev {
	left: 16px;
}

.lw-carousel__nav--next {
	right: 16px;
}

@media (max-width: 767px) {
	.lw-carousel__item {
		flex: 0 0 calc(100% - 20px);
		max-width: calc(100% - 20px);
	}
}

/* ---------- Teilen (Share) ---------- */

.lw-share {
	position: relative;
	display: inline-block;
}

.lw-share__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: #5B6B54;
	font-size: 15px;
}

.lw-share__trigger svg {
	fill: #5B6B54;
	flex-shrink: 0;
}

.lw-share__popover {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	z-index: 20;
	display: flex;
	flex-direction: column;
	min-width: 180px;
	background: #FFFFFF;
	border-radius: 12px;
	padding: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.lw-share__popover[hidden] {
	display: none;
}

.lw-share__option {
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	padding: 10px 12px;
	border-radius: 8px;
	color: #2E2E2E;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.lw-share__option:hover {
	background-color: #F1EBDC;
}
