/* Startseite: Grundlayout mit 3 Spalten (nur auf der Startseite geladen) */
.brxe-div.fiba-home-layout {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr) 300px;
	column-gap: 32px;
	row-gap: 32px;
	align-items: start;
	box-sizing: border-box;
	width: 100%;
	max-width: 1500px;
	margin-inline: auto;
	padding: 32px 30px;
}

.brxe-div.fiba-home-left,
.brxe-div.fiba-home-main,
.brxe-div.fiba-home-right {
	min-width: 0;
	width: 100%;
}

.brxe-div.fiba-home-main {
	display: flex;
	flex-direction: column;
	row-gap: 32px;
}

.fiba-home-main .footer_top-background-wrapper {
	display: none;
}

/* Fenster zu schmal fuer 3 Spalten: Kategorien wandern ueber Mitte und rechte Spalte */
@media (max-width: 1279px) {
	.brxe-div.fiba-home-layout {
		grid-template-columns: minmax(0, 1fr) 300px;
	}

	.brxe-div.fiba-home-left {
		grid-column: 1 / -1;
	}
}

@media (max-width: 991px) {
	.brxe-div.fiba-home-layout {
		grid-template-columns: minmax(0, 1fr);
		padding: 24px 26px;
	}

	.brxe-div.fiba-home-left {
		grid-column: auto;
	}
}

/* Linke Spalte: Schnellzugriff, Farben in fiba-header.css */
.fiba-quick-list {
	display: grid;
	row-gap: 8px;
	margin: 0 0 16px;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--brand-color-button-green);
	list-style: none;
}

.fiba-quick-list a {
	display: flex;
	align-items: center;
	column-gap: 10px;
	min-height: 48px;
	box-sizing: border-box;
	padding: 6px 10px 6px 8px;
	border-radius: 10px;
	background: #f1f3f5;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
}

.fiba-quick-list .fiba-quick-icon {
	width: 32px;
	height: 32px;
}

.fiba-quick-list .fiba-quick-icon .fiba-icon {
	width: 18px;
	height: 18px;
}

.fiba-quick-name {
	flex: 1 1 auto;
	min-width: 0;
}

.fiba-quick-list a > .fiba-icon {
	width: 16px;
	height: 16px;
	opacity: 0.7;
}

.fiba-quick-list a:hover,
.fiba-quick-list a:focus-visible {
	filter: brightness(0.96);
}

.fiba-cat-heading {
	margin: 0 0 4px;
	color: var(--brand-color-copy-grey);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.3;
	text-transform: uppercase;
}

/* Kategorienliste */
.fiba-cat-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fiba-cat-list a {
	display: flex;
	align-items: center;
	column-gap: 6px;
	padding: 7px 0;
	border-bottom: 1px solid var(--brand-color-button-green);
	color: var(--brand-color-dark-grey);
	font-size: 14px;
	line-height: 1.25;
	text-decoration: none;
}

.fiba-cat-list a:hover,
.fiba-cat-list a:focus-visible {
	color: var(--brand-color-blue);
}

/* Mitte: nur der Slider (Hero ist Slide 1), in fester Höhe. Darunter bleibt die Spalte leer (Entscheid des Auftraggebers) */
@media (min-width: 992px) {
	.brxe-div.fiba-home-layout {
		align-items: stretch;
	}

	.brxe-div.fiba-home-main {
		display: grid;
		grid-template-rows: auto;
		align-content: start;
		row-gap: 24px;
	}
}

/* Slider in der mittleren Spalte (ersetzt Hero und Saison-Blöcke). Bricks «Slider (verschachtelt)», Splide-Optionen im Element (JSON).
   Slide 1 ist der Hero (.fiba-hero, CSS weiter unten). Weitere Slides: .fiba-slide mit Foto (.fiba-slide-img) und Text (.fiba-slide-text),
   Farbe über .fiba-slide--agenda bzw. --hefte.
   Desktop-Darstellung ab 560 px Blockbreite, 480 px hoch (etwa doppelt so hoch wie der Hero allein),
   darunter Handy-Darstellung in natürlicher Höhe (Container Query auf .fiba-slider) */
:root {
	--fiba-agenda-1: #b9d7d1;     /* Verlauf Schulagenden */
	--fiba-agenda-2: #cbe7e0;
	--fiba-agenda-3: #c4e2e3;
	--fiba-agenda-handy: #c4e2dd; /* Handy, einfarbig */
	--fiba-hefte-1: #fbf4c6;      /* Verlauf Schulhefte */
	--fiba-hefte-2: #f9ef9e;
	--fiba-hefte-handy: #faf1b0;  /* Handy, einfarbig */
	--fiba-label-green: #006b2c;  /* Schrift im weissen Label */
	--fiba-slide-ink: #1a1a1a;    /* Titel und Kurzzeile */
	--fiba-slide-copy: #2f3b3d;   /* Text */
}

.brxe-div.fiba-slider {
	container-type: inline-size;
	min-width: 0;
	width: 100%;
}

/* Feste Höhe aller Slides, auch des Hero */
.fiba-slider .splide__list > .splide__slide {
	height: 480px;
}

.fiba-slider .brxe-div.fiba-slide {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start; /* Bricks zentriert Slides sonst */
	overflow: hidden;
}

.fiba-slide--agenda {
	background: linear-gradient(100deg, var(--fiba-agenda-1), var(--fiba-agenda-2) 55%, var(--fiba-agenda-3));
}

.fiba-slide--hefte {
	background: linear-gradient(100deg, var(--fiba-hefte-1), var(--fiba-hefte-2));
}

/* Foto rechts, etwa 55 %, läuft nach links weich aus */
.fiba-slide .brxe-image.fiba-slide-img {
	position: absolute;
	top: 0;
	right: 0;
	width: 55%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	-webkit-mask-image: linear-gradient(to right, transparent 0%, #000 24%);
	mask-image: linear-gradient(to right, transparent 0%, #000 24%);
}

.fiba-slide .brxe-div.fiba-slide-text {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	width: 52%;
	padding: 24px 0 24px clamp(24px, 5.2cqi, 40px);
	box-sizing: border-box;
}

.fiba-slide .fiba-slide-label {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	background: #fff;
	color: var(--fiba-label-green);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}

.fiba-slide .fiba-slide-title {
	margin: 2px 0 0;
	font-family: Onest, sans-serif;
	font-size: clamp(26px, 4.6cqi, 36px);
	font-weight: 400;
	line-height: 1.11;
	color: var(--fiba-slide-ink);
	text-wrap: balance;
}

.fiba-slide .fiba-slide-kicker {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--fiba-slide-ink);
}

.fiba-slide .fiba-slide-copy {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--fiba-slide-copy);
}

.fiba-slide .fiba-slide-copy--kurz {
	display: none;
}

.fiba-slide .fiba-slide-btn.brxe-button {
	min-height: 42px;
	margin-top: 4px;
	padding: 0 24px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

/* Pfeile unten rechts, über der Leiste des Hero-Slides, 44 × 44 px, mit feinem dunklem Rand (Kontrast zum Hintergrund) */
.fiba-slider .splide__arrows {
	position: absolute;
	right: 14px;
	bottom: 66px;
	z-index: 2;
	display: flex;
	gap: 10px;
}

.fiba-slider .splide__arrow {
	position: static;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: 0 0 0 1.5px var(--fiba-navy);
	opacity: 1;
	transform: none;
	cursor: pointer;
}

.fiba-slider .splide__arrow svg {
	display: block;
	width: 100%;
	height: 100%;
}

.fiba-slider .splide__arrow:focus-visible {
	outline: 3px solid var(--fiba-navy);
	outline-offset: 3px;
}

/* Hero als Slide 1: Inhalt vertikal zentriert, Leiste unten, Illustration grösser rechts mittig */
.fiba-slider .splide__slide.fiba-hero {
	align-items: stretch; /* Bricks zentriert die Kinder von Slides sonst, die Leiste würde schmal */
	justify-content: space-between;
}

.fiba-slider .fiba-hero .brxe-div.fiba-hero-main {
	--art-w: clamp(170px, 34cqi, 290px);
	--art-top: 50%;
	--art-right: clamp(16px, 4cqi, 36px);
	display: flex;
	flex: 1 1 auto;
	align-items: center;
}

.fiba-slider .fiba-hero .brxe-div.fiba-hero-text {
	width: 100%;
}

.fiba-slider .fiba-hero .brxe-shortcode.fiba-hero-art {
	transform: translateY(-50%);
}

@media (min-width: 601px) {
	.fiba-slider .fiba-hero .fiba-hero-title,
	.fiba-slider .fiba-hero .fiba-hero-lead {
		max-width: calc(100% + var(--hero-pad-x) - var(--art-right) - var(--art-w) - var(--art-gap));
	}
}

/* Handy-Darstellung: Block schmaler als 560 px */
@container (max-width: 559px) {
	.fiba-slider .splide__list > .splide__slide {
		height: auto;
	}

	.fiba-slider .brxe-div.fiba-slide {
		flex-direction: column;
		align-items: stretch;
		height: auto;
		min-height: 0;
	}

	.fiba-slide--agenda {
		background: var(--fiba-agenda-handy);
	}

	.fiba-slide--hefte {
		background: var(--fiba-hefte-handy);
	}

	.fiba-slide .brxe-image.fiba-slide-img {
		position: relative;
		width: 100%;
		height: 170px;
		-webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
		mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
	}

	.fiba-slide .brxe-div.fiba-slide-text {
		position: static;
		width: 100%;
		padding: 2px 20px 20px;
		gap: 6px;
	}

	.fiba-slide .fiba-slide-label {
		position: absolute;
		top: 14px;
		left: 20px;
	}

	.fiba-slide .fiba-slide-title {
		margin-top: 0;
		font-size: 28px;
		line-height: 1.15;
	}

	.fiba-slide .fiba-slide-copy--lang {
		display: none;
	}

	.fiba-slide .fiba-slide-copy--kurz {
		display: block;
	}

	.fiba-slide .fiba-slide-btn.brxe-button {
		align-self: stretch;
		justify-content: center;
		margin-top: 6px;
	}

	/* Pfeile unter dem Slider, rechts. Auf dem Slide lägen sie über dem Text des Hero */
	.fiba-slider .splide__arrows {
		position: static;
		justify-content: flex-end;
		margin-top: 10px;
		padding: 2px; /* Platz für den Ring, sonst schneidet der Slider ihn ab */
	}
}

/* Über Mitte und rechter Spalte: Schnellzugriff in einer Reihe, Liste mehrspaltig */
@media (max-width: 1279px) {
	.fiba-quick-list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		column-gap: 12px;
	}

	.fiba-cat-list {
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
		column-gap: 24px;
	}
}

@media (max-width: 991px) {
	.fiba-quick-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Handy: Der Schnellzugriff steht im Header, die Spalte entfällt */
@media (max-width: 767px) {
	.brxe-div.fiba-home-left {
		display: none;
	}
}

/* Wochenangebot in der rechten Spalte */
.fiba-offer {
	display: flex;
	flex-direction: column;
	row-gap: 12px;
}

.fiba-offer-title {
	margin: 0;
	font-size: 22px;
	line-height: 1.2;
}

.fiba-offer-image {
	display: block;
}

.fiba-offer-image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 240px;
	object-fit: contain;
}

.fiba-offer-meta {
	display: flex;
	align-items: center;
	column-gap: 10px;
	min-height: 30px;
}

.fiba-offer-badge {
	flex: none;
	padding: 4px 8px;
	background: var(--brand-color-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
}

.fiba-offer-stock {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	row-gap: 4px;
	min-width: 0;
	font-size: 13px;
	line-height: 1.2;
}

.fiba-offer-bar {
	display: block;
	height: 4px;
	background: var(--brand-color-button-green);
}

.fiba-offer-bar span {
	display: block;
	height: 100%;
	background: var(--brand-color-primary);
}

.fiba-offer-price {
	margin: 0;
	font-size: 14px;
	line-height: 1.3;
}

.fiba-offer-price strong {
	font-size: 22px;
}

.fiba-offer-name {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.fiba-offer-name a {
	color: inherit;
	text-decoration: none;
}

.fiba-offer-name a:hover,
.fiba-offer-name a:focus-visible {
	color: var(--brand-color-blue);
}

.fiba-offer-countdown {
	margin: 0;
	color: var(--brand-color-copy-grey);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	line-height: 1.3;
}

a.fiba-offer-button {
	justify-content: center;
	width: 100%;
}

/* Ausverkauft: Bild, Rabatt und Preis ausgegraut, Hinweis bleibt lesbar */
.fiba-offer--soldout .fiba-offer-image img,
.fiba-offer--soldout .fiba-offer-badge,
.fiba-offer--soldout .fiba-offer-price {
	filter: grayscale(1);
	opacity: 0.5;
}

.fiba-offer--soldout .fiba-offer-stock {
	font-size: 15px;
}

.fiba-offer--soldout .fiba-offer-name a {
	color: var(--brand-color-copy-grey);
}

@media (min-width: 992px) {
	.brxe-div.fiba-home-right {
		padding-left: 24px;
		border-left: 1px solid var(--brand-color-button-green);
	}
}

/* Tablet und Handy: Kategorien, Wochenangebot, Hero, Slider */
@media (max-width: 991px) {
	.brxe-div.fiba-home-left {
		order: 1;
	}

	.brxe-div.fiba-home-right {
		order: 2;
	}

	.brxe-div.fiba-home-main {
		order: 3;
	}

	/* Bild neben den Angaben, damit der Hero nicht weit nach unten rutscht */
	.fiba-offer {
		display: grid;
		grid-template-columns: 120px minmax(0, 1fr);
		column-gap: 16px;
		row-gap: 8px;
		align-items: start;
	}

	.fiba-offer-title,
	a.fiba-offer-button {
		grid-column: 1 / -1;
	}

	.fiba-offer-image {
		grid-row: span 4;
	}

	.fiba-offer-image img {
		max-height: 170px;
	}

	.fiba-offer-meta {
		flex-wrap: wrap;
		row-gap: 6px;
	}
}

/* Hero V2 «Lernen mit Stift, Papier und leuchtenden Augen» in der mittleren Spalte.
   Entwurf docs/V2-Desktop.dc.html (1280 × 304 px), auf Wunsch rund 30 % niedriger umgesetzt.
   Grössen skalieren mit der Breite des Blocks (Container-Queries, cqi), weil die Spalte nur 616 bis 776 px breit ist.
   Illustration: Shortcode [fiba_hero_illustration] aus includes/hero.php, klein oben rechts */
:root {
	--fiba-hero-bg: #f2fbfe; /* Hintergrund Hero: 6 % Logo-Blau auf Weiss, heller als die Leiste */
	--fiba-blue-light: #e4f6fc; /* Leiste: 12 % Logo-Blau (--brand-color-secondary #21B5EA) auf Weiss, analog zu --brand-color-light-green */
	--fiba-navy: #14365e;    /* Linien der Illustration */
	--fiba-yellow: #f2b705;  /* Stern und Bleistift */
	--fiba-ink: #1b2b2e;     /* Überschrift und Leiste */
	--fiba-ink-soft: #4a5759; /* Text */
}

.brxe-div.fiba-hero {
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--fiba-hero-bg);
}

/* Innenabstände und Platz der Illustration als Variablen, cqi bezieht sich auf die Breite des Hero */
.brxe-div.fiba-hero-main {
	--hero-pad-y: clamp(16px, 2.6cqi, 20px);
	--hero-pad-x: clamp(18px, 4.2cqi, 32px);
	--art-w: clamp(130px, 25cqi, 196px);
	--art-top: 10px;
	--art-right: 10px;
	--art-gap: 12px;
	position: relative;
	display: block;
	padding: var(--hero-pad-y) var(--hero-pad-x);
}

.brxe-div.fiba-hero-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

/* Titel und Text enden vor der Illustration */
.fiba-hero .fiba-hero-title,
.fiba-hero .fiba-hero-lead {
	max-width: calc(100% + var(--hero-pad-x) - var(--art-right) - var(--art-w) - var(--art-gap));
}

.fiba-hero .fiba-hero-title {
	margin: 0;
	font-family: Onest, sans-serif;
	font-size: clamp(22px, 3.6cqi, 28px);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.01em;
	color: var(--fiba-ink);
	text-wrap: balance;
}

.fiba-hero .fiba-hero-lead {
	margin: 0;
	font-size: clamp(14px, 1.95cqi, 15px);
	font-weight: 500;
	line-height: 1.45;
	color: var(--fiba-ink-soft);
}

.fiba-hero .fiba-hero-cta.brxe-button {
	min-height: 42px;
	margin-top: 4px;
	padding: 0 24px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Illustration oben rechts, ausserhalb des Textflusses */
.brxe-shortcode.fiba-hero-art {
	position: absolute;
	top: var(--art-top);
	right: var(--art-right);
	width: var(--art-w);
}

.fiba-hero-illu {
	display: block;
	width: 100%;
	height: auto;
}

.fiba-hero-illu .fiba-i-line {
	stroke: var(--fiba-navy);
}

.fiba-hero-illu .fiba-i-yellow {
	fill: var(--fiba-yellow);
}

.fiba-hero-illu .fiba-i-navy {
	fill: var(--fiba-navy);
}

/* Animation: Linie zeichnet sich, Stern erscheint */
.fiba-hero-illu .fiba-hero-line {
	stroke-dasharray: 520;
	animation: fiba-hero-draw 1.4s ease-out both;
}

.fiba-hero-illu .fiba-hero-star {
	transform-box: fill-box;
	transform-origin: center;
	animation: fiba-hero-pop 1.8s ease-out both;
}

@keyframes fiba-hero-draw {
	from { stroke-dashoffset: 520; }
	to { stroke-dashoffset: 0; }
}

@keyframes fiba-hero-pop {
	0%, 70% { transform: scale(0.2); opacity: 0; }
	100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.fiba-hero-illu .fiba-hero-line,
	.fiba-hero-illu .fiba-hero-star {
		animation: none;
	}
}

/* Leiste mit drei Punkten, Häkchen per CSS. Einzeilig ab rund 760 px Blockbreite, sonst umbrechend */
.brxe-div.fiba-hero-usps {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 16px;
	min-height: 36px;
	margin: 0;
	padding: 7px clamp(18px, 4.2cqi, 32px);
	box-sizing: border-box;
	list-style: none;
	background: var(--fiba-blue-light);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--fiba-ink);
}

.fiba-hero-usps > li {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.fiba-hero-usps > li::before {
	content: "";
	flex: 0 0 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 6.5 12 13 4.5' fill='none' stroke='%23008537' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Schmaler Block (1280 und 1024 px): Illustration nur neben dem Titel, Text darunter über die ganze Breite */
@container (max-width: 700px) {
	.brxe-div.fiba-hero-main {
		--art-w: 118px;
		--art-top: 4px;
	}

	.fiba-hero .fiba-hero-lead {
		max-width: none;
	}
}

/* Handy: Text und Button ohne Illustration, Punkte untereinander */
@media (max-width: 600px) {
	.brxe-div.fiba-hero-main {
		--hero-pad-y: 14px;
		--hero-pad-x: 16px;
	}

	.brxe-div.fiba-hero-text {
		gap: 6px;
	}

	.fiba-hero .fiba-hero-title,
	.fiba-hero .fiba-hero-lead {
		max-width: none;
	}

	.fiba-hero .fiba-hero-title {
		font-size: 21px;
	}

	.fiba-hero .fiba-hero-lead {
		font-size: 13.5px;
		line-height: 1.4;
	}

	.brxe-shortcode.fiba-hero-art {
		display: none;
	}

	.brxe-div.fiba-hero-usps {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		padding: 6px 16px;
		font-size: 12px;
	}
}

/* Abstände zwischen den Blöcken unter den drei Spalten halbiert (Client-First padding-section-large: 8rem, 6rem, 4rem).
   Nur Top Empfehlungen und Blog auf der Startseite, die Klasse bleibt auf allen anderen Seiten unverändert. */
.brxe-div.fiba-home-layout {
	padding-bottom: 16px;
}

.section_home-top-recommendations .padding-section-large.brxe-div,
.section_home-blog .padding-section-large.brxe-div {
	padding-top: 4rem;
	padding-bottom: 4rem;
}

@media (max-width: 991px) {
	.brxe-div.fiba-home-layout {
		padding-bottom: 12px;
	}

	.section_home-top-recommendations .padding-section-large.brxe-div,
	.section_home-blog .padding-section-large.brxe-div {
		padding-top: 3rem;
		padding-bottom: 3rem;
	}
}

@media (max-width: 767px) {
	.section_home-top-recommendations .padding-section-large.brxe-div,
	.section_home-blog .padding-section-large.brxe-div {
		padding-top: 2rem;
		padding-bottom: 2rem;
	}

	/* Die Pfeile des Blog-Karussells ragen in den unteren Abstand, er bleibt deshalb bei 4rem */
	.section_home-blog .padding-section-large.brxe-div {
		padding-bottom: 4rem;
	}
}

/* Feinabgleich auf die halben sichtbaren Abstände: Unter dem Blog liegt auf dem Desktop zusätzlicher Leerraum des Karussells,
   auf dem Handy stehen die Pfeile von Top Empfehlungen fast am Rand */
@media (min-width: 992px) {
	.section_home-blog .padding-section-large.brxe-div {
		padding-bottom: 2.75rem;
	}
}

@media (max-width: 767px) {
	.section_home-top-recommendations .padding-section-large.brxe-div {
		padding-bottom: 2.75rem;
	}
}
