/* ===========================================================================
   cl-physio — components.css
   Shared UI primitives used across multiple page templates (home, Über mich,
   Leistungen …). Loaded site-wide after chrome.css, before per-page styles.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   Section title
   --------------------------------------------------------------------------- */
.section__title {
	text-align: center;
	margin: 0 0 2.5rem;
}

/* ---------------------------------------------------------------------------
   Card (icon card + plain card)
   --------------------------------------------------------------------------- */
.card {
	background: var(--c-white);
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	padding: 2rem 1.75rem;
	box-shadow: var(--shadow-sm);
	text-align: center;
}
.card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--c-indigo);
	margin-bottom: 1rem;
}
.card__icon svg {
	width: 44px;
	height: 44px;
}
.card__title {
	font-size: 1.2rem;
	margin: 0 0 0.6rem;
}
.card__text {
	color: var(--c-stone);
	margin: 0;
}

/* ---------------------------------------------------------------------------
   Media row — alternating image/text
   --------------------------------------------------------------------------- */
.media-row {
	display: grid;
	gap: 2rem;
	align-items: center;
	grid-template-columns: 1fr;
}
.media-row + .media-row {
	margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}
.media-row__title {
	margin: 0 0 1.25rem;
}
.media-row__actions {
	margin: 1.5rem 0 0;
}
.media-row__img {
	width: 100%;
	border-radius: var(--radius);
	object-fit: cover;
	box-shadow: var(--shadow-md);
}
@media (min-width: 880px) {
	.media-row {
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
	}
	.media-row--reverse .media-row__media {
		order: -1;
	}
}

/* ---------------------------------------------------------------------------
   Testimonials slider — "Das sagen meine Kunden"
   --------------------------------------------------------------------------- */
.testimonials__slider {
	position: relative;
}
.testimonials__track {
	display: flex;
	gap: 1.5rem;
	margin: 0;
	padding: 0 0 0.5rem;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.testimonials__track::-webkit-scrollbar {
	display: none;
}
.testimonial {
	flex: 0 0 100%;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	background: var(--c-white);
	border: 1px solid var(--c-line);
	border-radius: var(--radius);
	padding: 1.75rem;
	box-shadow: var(--shadow-sm);
}
.testimonial__quote {
	margin: 0;
	color: var(--c-ink);
	font-style: italic;
	line-height: 1.7;
}
.testimonial__author {
	margin: 0;
	font-weight: 600;
	color: var(--c-indigo);
}
/* Controls — hidden until testimonials.js finds the track actually overflows.
   Two cases produce a control that does nothing: JavaScript unavailable, the
   buttons scrolling the track from script only; and a row that already shows
   every testimonial it is given — Über mich is capped at three (FR-12) and
   three cards fill the row from 980px up, where the arrows have nothing left
   to scroll to. Below that the cards drop to two-up and one-up and the arrows
   are the only affordance, .testimonials__track hiding the scrollbar, so this
   is measured per width rather than set at a breakpoint. Same no-dead-controls
   rule the multi-image component follows (NFR-04, AC-38). */
.testimonials__nav {
	display: none;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 1.5rem;
}
.testimonials__slider.is-enhanced .testimonials__nav {
	display: flex;
}
.testimonials__btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--c-line);
	background: #fff;
	color: var(--c-indigo);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}
.testimonials__btn:hover {
	background: var(--c-mist);
}
@media (min-width: 680px) {
	.testimonial { flex-basis: calc((100% - 1.5rem) / 2); }
}
@media (min-width: 980px) {
	.testimonial { flex-basis: calc((100% - 3rem) / 3); }
}

/* ---------------------------------------------------------------------------
   Multi-image component (FR-31)

   One carousel used everywhere more than one image is allocated: the home
   hero, the Räumlichkeiten block, and further sections as they arrive. The
   base here is layout-neutral; per-location framing (aspect ratio, radius,
   full-bleed) belongs in the page partial via a --modifier.

   Moved here from home.css in v2.0, the component no longer being home-only.

   Progressive enhancement: the controls stay hidden until carousel.js adds
   .is-enhanced, so no dead buttons are shown when JavaScript is unavailable
   (NFR-04, AC-38). The first slide carries .is-active in the markup, so one
   image is always visible.
   --------------------------------------------------------------------------- */
.carousel {
	position: relative;
}
.carousel__viewport {
	position: relative;
	overflow: hidden;
}
.carousel__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity var(--carousel-fade, 0.6s) var(--ease);
}
.carousel__slide.is-active {
	opacity: 1;
}
.carousel__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Controls — hidden until the script takes over. */
.carousel__nav,
.carousel__dots {
	display: none;
}
.carousel.is-enhanced .carousel__nav {
	display: grid;
}
.carousel.is-enhanced .carousel__dots {
	display: flex;
}

.carousel__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: var(--c-indigo);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
}
.carousel__nav--prev {
	left: 0.6rem;
}
.carousel__nav--next {
	right: 0.6rem;
}
.carousel__nav:hover {
	background: #fff;
}

.carousel__dots {
	position: absolute;
	bottom: 0.7rem;
	left: 0;
	right: 0;
	justify-content: center;
	gap: 0.4rem;
}
.carousel__dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.6);
	cursor: pointer;
}
.carousel__dot.is-active {
	background: #fff;
}

/* Räumlichkeiten and other in-flow placements keep the v1.0 card framing. */
.carousel:not(.carousel--hero) .carousel__viewport {
	aspect-ratio: 3 / 2;
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
}

/* Dot plate — the dots are white and several allocated photographs are pale
   masonry in sunlight, where a bare white dot measured as low as 1.01:1
   against the image. A translucent indigo plate holds them above the 3:1 of
   WCAG 1.4.11 (Non-text Contrast) on every slide. The hero needs no plate:
   its scrim already darkens the same area. */
.carousel:not(.carousel--hero) .carousel__dots {
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	width: fit-content;
	padding: 0.4rem 0.6rem;
	border-radius: var(--radius-pill);
	background: rgba(33, 29, 68, 0.55);
}
