/**
 * BTC Post Carousel – Karten-Design
 *
 * Alle Design-Werte sind als CSS-Variablen oben zusammengefasst.
 * Am schnellsten passt du das Carousel an dein bestehendes Divi-Design an,
 * indem du hier die Werte auf deine Divi Theme-Customizer-Einstellungen
 * (Primärfarbe, Schriften, Eckenradius etc.) anpasst.
 *
 * Tipp: In Divi findest du diese Werte unter
 * Divi > Theme-Optionen sowie im Customizer unter "Allgemeine Einstellungen".
 */

.btc-pc-wrapper {
	--btc-pc-primary: #1e73be;        /* = aktuelle btcjost.ch Divi-Buttonfarbe */
	--btc-pc-primary-hover: #195d99;  /* etwas dunkler für Hover */
	--btc-pc-text: #333333;           /* Divi Fliesstext-Farbe */
	--btc-pc-text-light: #6b6b6b;
	--btc-pc-heading-font: inherit;   /* z.B. 'Poppins', sans-serif — Divi Heading-Font */
	--btc-pc-body-font: inherit;      /* z.B. 'Open Sans', sans-serif — Divi Body-Font */
	--btc-pc-radius: 3px;             /* = aktueller btcjost.ch Divi-Button-Radius */
	--btc-pc-card-bg: #ffffff;
	--btc-pc-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	--btc-pc-card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.14);
	--btc-pc-gap: 24px;
	--btc-pc-title-lines: 2;          /* reservierte Zeilen für den Titel */
	--btc-pc-title-line-height: 1.3;

	position: relative;
	margin: 0 auto;
	box-sizing: border-box;
}

.btc-pc-wrapper * {
	box-sizing: border-box;
}

/* Pfeile stehen als echte Flex-Geschwister NEBEN dem Slider, statt
   darüber zu schweben. */
.btc-pc-row {
	display: flex;
	align-items: center;
	gap: 14px;
}

.btc-pc-swiper {
	width: 100%;
	min-width: 0; /* verhindert, dass der Slider den Flex-Container sprengt */
	flex: 1 1 auto;
	padding-bottom: 44px; /* Platz für Pagination-Dots */
}

/* Alle Karten einer Reihe gleich hoch, unabhängig von Titellänge. */
.btc-pc-swiper .swiper-wrapper {
	align-items: stretch;
}

.btc-pc-swiper .swiper-slide {
	height: auto;
	display: flex;
}

.btc-pc-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var( --btc-pc-card-bg );
	border-radius: var( --btc-pc-radius );
	box-shadow: var( --btc-pc-card-shadow );
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
	font-family: var( --btc-pc-body-font );
}

.btc-pc-card:hover {
	box-shadow: var( --btc-pc-card-shadow-hover );
	transform: translateY( -3px );
}

.btc-pc-thumb {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.btc-pc-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.btc-pc-card:hover .btc-pc-thumb img {
	transform: scale( 1.06 );
}

.btc-pc-content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 20px 22px 24px;
}

.btc-pc-cat {
	display: inline-block;
	align-self: flex-start;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var( --btc-pc-primary );
	margin-bottom: 10px;
}

.btc-pc-title {
	font-family: var( --btc-pc-heading-font );
	font-size: 19px;
	line-height: var( --btc-pc-title-line-height );
	margin: 0 0 8px;
	/* Reserviert immer Platz für 2 Zeilen, damit alle Karten trotz
	   unterschiedlich langer Titel gleich hoch bleiben. Längere Titel
	   werden nach 2 Zeilen mit "…" abgeschnitten. */
	min-height: calc( var( --btc-pc-title-line-height ) * var( --btc-pc-title-lines ) * 1em );
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var( --btc-pc-title-lines );
	overflow: hidden;
}

.btc-pc-title a {
	color: var( --btc-pc-text );
	text-decoration: none;
}

.btc-pc-title a:hover {
	color: var( --btc-pc-primary );
}

.btc-pc-date {
	font-size: 13px;
	color: var( --btc-pc-text-light );
	margin-bottom: 12px;
}

.btc-pc-excerpt {
	font-size: 15px;
	line-height: 1.6;
	color: var( --btc-pc-text-light );
	margin: 0 0 16px;
	flex-grow: 1;
}

/* Button im Stil der bestehenden Divi-Buttons auf btcjost.ch
   (blau gefüllt, Radius 3px). */
.btc-pc-link {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	margin-top: auto;
	padding: 6px 20px;
	background: var( --btc-pc-primary );
	border: 1.79px solid var( --btc-pc-primary );
	border-radius: var( --btc-pc-radius );
	font-family: var( --btc-pc-body-font );
	font-size: 15px;
	font-weight: 500;
	line-height: 1.6;
	color: #ffffff;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btc-pc-link:hover {
	background: var( --btc-pc-primary-hover );
	border-color: var( --btc-pc-primary-hover );
	color: #ffffff;
}

.btc-pc-empty {
	text-align: center;
	color: var( --btc-pc-text-light );
}

/* --- Swiper Navigation/Pagination im Divi-Look --- */

/* Höhere Spezifität als Swipers eigene .swiper-button-prev/-next-Regeln
   (position:absolute; top:50%; …) – dadurch werden die Pfeile aus dem
   Overlay gelöst und stehen als normale Flex-Items neben dem Slider. */
.btc-pc-wrapper .swiper-button-prev,
.btc-pc-wrapper .swiper-button-next {
	position: static;
	top: auto;
	left: auto;
	right: auto;
	margin-top: 0;
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	background: var( --btc-pc-card-bg );
	border-radius: 50%;
	box-shadow: var( --btc-pc-card-shadow );
	color: var( --btc-pc-primary );
}

.btc-pc-wrapper .swiper-button-prev::after,
.btc-pc-wrapper .swiper-button-next::after {
	font-size: 14px;
	font-weight: 700;
}

.btc-pc-wrapper .swiper-pagination-bullet-active {
	background: var( --btc-pc-primary );
}

/* --- Responsive Feinschliff --- */

@media ( max-width: 767px ) {
	.btc-pc-wrapper .swiper-button-prev,
	.btc-pc-wrapper .swiper-button-next {
		display: none; /* auf Mobile reicht Swipe-Geste */
	}
}
