/*
 * Rocket Builder – Basis-CSS (Raster, Abstände, Animationen).
 * Breakpoint-abhängige Regeln kommen aus Responsive_Css (inline).
 * (c) rocketsuits – GPL-2.0-or-later
 */

/* ---------- Section ---------- */
.rb-section:where(.rb-el,.rb-el *) {
	position: relative;
	box-sizing: border-box;
}
.rb-section:where(.rb-el,.rb-el *) > .rb-container {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--rb-section-width, var(--rb-content-width, 1280px));
	margin-inline: auto;
}
/* Gestreckt: aus dem Theme-Inhaltsbereich auf volle Fensterbreite */
.rb-section.rb-stretch:where(.rb-el,.rb-el *) {
	width: var(--rb-vw, 100vw);
	max-width: none;
	margin-left: calc(50% - var(--rb-vw, 100vw) / 2);
	margin-right: calc(50% - var(--rb-vw, 100vw) / 2);
}
/* Section in einer Spalte (z. B. globaler Block): bleibt in der Spalte. */
.rb-col .rb-section.rb-stretch:where(.rb-el,.rb-el *) {
	width: auto;
	margin-inline: 0;
}
/* Section „nur als Hülle“: Section, Zeile, Spalte und Block ohne eigenes Layout – die Sections
   im Block verhalten sich wie Sections direkt auf der Seite (auch gestreckt auf volle Breite). */
.rb-section.rb-section-pass:where(.rb-el,.rb-el *),
.rb-section-pass > .rb-container:where(.rb-el *),
.rb-section-pass > .rb-container > .rb-row:where(.rb-el *),
.rb-section-pass > .rb-container > .rb-row > .rb-col:where(.rb-el *),
.rb-section-pass > .rb-container > .rb-row > .rb-col > .rb-block:where(.rb-el *) {
	display: contents;
}
.rb-section-pass .rb-block > .rb-section.rb-stretch:where(.rb-el,.rb-el *) {
	width: var(--rb-vw, 100vw);
	margin-left: calc(50% - var(--rb-vw, 100vw) / 2);
	margin-right: calc(50% - var(--rb-vw, 100vw) / 2);
}
/* Seitenrand an der Section: eigene Innenabstände der Section ersetzen ihn. */
:where(.rb-section.rb-stretch):where(.rb-el,.rb-el *) {
	padding-inline: var(--rb-side-padding, 1.5rem);
}
.rb-section.rb-stretch-content:where(.rb-el,.rb-el *) > .rb-container {
	max-width: none;
}
:where(.rb-section.rb-stretch-nopad):where(.rb-el,.rb-el *) {
	padding-inline: 0;
}
.rb-section.rb-stretch-nopad:where(.rb-el,.rb-el *) > .rb-container {
	max-width: none;
}
.rb-section.rb-full-height:where(.rb-el,.rb-el *) {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
/* Ab der zweiten Section ihres Bereichs: sichtbare Höhe abzüglich des fixierten Headers. */
.rb-section.rb-full-height:not(:first-of-type):where(.rb-el,.rb-el *) {
	min-height: calc(100vh - var(--rb-full-offset, 0px));
	min-height: calc(100svh - var(--rb-full-offset, 0px));
}
.rb-section.rb-full-height.rb-place-top:where(.rb-el,.rb-el *) { justify-content: flex-start; }
.rb-section.rb-full-height.rb-place-bottom:where(.rb-el,.rb-el *) { justify-content: flex-end; }

/* Spalten-Werte (Breite, Versatz, Reihenfolge je Gerät) gelten nur für die eigene Spalte –
   nicht für Spalten in Blöcken darin (z. B. Block im Menü einer Header-Spalte). */
:where(.rb-col) { --rb-row-gap: initial; --rb-row-vgap: initial; --rb-w-l: initial; --rb-w-t: initial; --rb-w-m: initial; --rb-o: initial; --rb-o-l: initial; --rb-o-t: initial; --rb-o-m: initial; --rb-ord: initial; --rb-ord-l: initial; --rb-ord-t: initial; --rb-ord-m: initial; }

/* ---------- Row (CSS Grid, 60 Teile) ---------- */
.rb-row {
	--_gap: var(--rb-row-gap, var(--rb-gap, 1.5rem));
	display: grid;
	grid-template-columns: repeat(60, minmax(0, 1fr));
	row-gap: var(--rb-row-vgap, var(--_gap)); /* Abstand, sobald Spalten untereinander stehen */
	margin-inline: calc(var(--_gap) / -2);
	align-items: stretch;
}
.rb-row.rb-align-middle { align-items: center; }
.rb-row.rb-align-bottom { align-items: end; }
.rb-row.rb-align-top { align-items: start; }
/* Fließende Zeile für fest geschriebene Vorlagen: Spaltenbreite aus .rb-col-w-1 … -12. */
.rb-col-w-1 { --rb-flow: 1; }
.rb-col-w-2 { --rb-flow: 2; }
.rb-col-w-3 { --rb-flow: 3; }
.rb-col-w-4 { --rb-flow: 4; }
.rb-col-w-5 { --rb-flow: 5; }
.rb-col-w-6 { --rb-flow: 6; }
.rb-col-w-7 { --rb-flow: 7; }
.rb-col-w-8 { --rb-flow: 8; }
.rb-col-w-9 { --rb-flow: 9; }
.rb-col-w-10 { --rb-flow: 10; }
.rb-col-w-11 { --rb-flow: 11; }
.rb-col-w-12 { --rb-flow: 12; }
.rb-row.rb-row-flow {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	row-gap: 0;
	margin-inline: -1.5rem;
}
.rb-row.rb-row-flow > .rb-col {
	display: flex;
	flex-direction: column;
	width: calc(var(--rb-flow, 12) / 12 * 100%);
	margin-inline: 0;
}
.rb-row-flow > .rb-col > .rb-col-inner {
	flex-grow: 1;
	padding-inline: 1.5rem;
}
.rb-row.rb-row-fit {
	grid-template-columns: var(--rb-fit-cols);
	column-gap: var(--_gap);
	margin-inline: 0;
}
.rb-row.rb-row-fit > .rb-col {
	grid-column-end: auto;
	margin-inline: 0;
}
/* Spaltenaufteilung (Raster-Vorlage je Gerät): Spalten füllen die Plätze der Reihe nach,
   Abstand waagerecht und senkrecht gleich (wie ein CSS-Raster mit „gap“). */
.rb-row.rb-row-tpl {
	grid-template-columns: var(--rb-tpl);
	column-gap: var(--_gap);
	margin-inline: 0;
}
.rb-row.rb-row-tpl > .rb-col {
	grid-column: auto;
	margin-inline: 0;
}

/* ---------- Column ---------- */
.rb-col {
	--_w: var(--rb-w, 60);
	--_o: var(--rb-o, 0);
	--_ord: var(--rb-ord, 0);
	grid-column-end: span calc(var(--_w) + var(--_o));
	/* Spaltenabstand als Außenabstand: eigenes CSS an der Spalte (Innenabstand, Hintergrund,
	   Schatten) verändert den Abstand zwischen den Spalten nicht. */
	margin-left: calc(var(--_o) / (var(--_w) + var(--_o)) * 100% + var(--_gap) / 2);
	margin-right: calc(var(--_gap) / 2);
	order: var(--_ord);
	min-width: 0;
	box-sizing: border-box;
	position: relative; /* Bezugspunkt für absolut platzierte Inhalte */
}
/* Spalte bis zum Bildschirmrand strecken: die erste Spalte reicht bis zum linken, die letzte bis zum
   rechten Rand. --_edge = Abstand vom Inhaltsbereich (Container) bis zum Fensterrand (negativ). */
.rb-container:has(> .rb-row > .rb-col-stretch) { container-type: inline-size; }
.rb-col.rb-col-stretch { --_edge: calc((100cqw - var(--rb-vw, 100vw)) / 2); }
.rb-row > .rb-col.rb-col-stretch:first-child { margin-left: calc(var(--_edge) + var(--_gap) / 2); }
.rb-row > .rb-col.rb-col-stretch:last-child { margin-right: calc(var(--_edge) + var(--_gap) / 2); }
.rb-row.rb-row-fit > .rb-col.rb-col-stretch:first-child,
.rb-row.rb-row-tpl > .rb-col.rb-col-stretch:first-child { margin-left: var(--_edge); }
.rb-row.rb-row-fit > .rb-col.rb-col-stretch:last-child,
.rb-row.rb-row-tpl > .rb-col.rb-col-stretch:last-child { margin-right: var(--_edge); }
.rb-row.rb-row-flow > .rb-col.rb-col-stretch:first-child { margin-left: calc(var(--_edge) + 1.5rem); }
.rb-row.rb-row-flow > .rb-col.rb-col-stretch:last-child { margin-right: calc(var(--_edge) + 1.5rem); }
.rb-col-inner {
	box-sizing: border-box;
}
.rb-equal > .rb-col > .rb-col-inner { height: 100%; }
.rb-col.rb-valign-middle > .rb-col-inner,
.rb-col.rb-valign-bottom > .rb-col-inner {
	height: 100%;
	display: flex;
	flex-direction: column;
}
.rb-col.rb-valign-middle > .rb-col-inner { justify-content: center; }
.rb-col.rb-valign-bottom > .rb-col-inner { justify-content: flex-end; }

/* Abstand zwischen Elementen in einer Spalte */
.rb-col-inner > .rb-el + .rb-el { margin-top: var(--rb-el-gap, 1.5rem); }
/* Block „nur die Elemente“: Hülle ohne eigenes Layout, Elemente stehen wie direkt in der Spalte. */
.rb-block.rb-block-flat { display: contents; }
.rb-block-flat > .rb-el + .rb-el,
.rb-col-inner > .rb-el + .rb-block-flat > .rb-el:first-child { margin-top: var(--rb-el-gap, 1.5rem); }

/* ---------- Text ---------- */
.rb-text:where(.rb-el,.rb-el *) > :first-child { margin-top: 0; }
.rb-text:where(.rb-el,.rb-el *) > :last-child { margin-bottom: 0; }

/* ---------- Einblend-Animationen (nur mit JavaScript) ---------- */
.rb-js .rb-anim:where(.rb-el,.rb-el *) {
	opacity: 0;
	transition-property: opacity, transform;
	transition-duration: var(--rb-anim-duration, 0.6s);
	transition-delay: var(--rb-anim-delay, 0s);
	transition-timing-function: cubic-bezier(0.2, 0.6, 0.3, 1);
}
.rb-js .rb-anim-slide-up { transform: translateY(2rem); }
.rb-js .rb-anim-slide-down { transform: translateY(-2rem); }
.rb-js .rb-anim-slide-left { transform: translateX(2rem); }
.rb-js .rb-anim-slide-right { transform: translateX(-2rem); }
.rb-js .rb-anim-zoom { transform: scale(0.9); }
.rb-js .rb-anim-flip { transform: perspective(800px) rotateX(25deg); }
.rb-js .rb-anim.rb-in:where(.rb-el,.rb-el *) {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	.rb-js .rb-anim:where(.rb-el,.rb-el *),
	.rb-js .rb-anim.rb-in:where(.rb-el,.rb-el *) {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ---------- Hover-Effekte ---------- */
.rb-hover-lift { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.rb-hover-lift:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12); }
.rb-hover-grow { transition: transform 0.25s ease; }
.rb-hover-grow:hover { transform: scale(1.03); }
.rb-hover-shadow { transition: box-shadow 0.25s ease; }
.rb-hover-shadow:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15); }
@media (prefers-reduced-motion: reduce) {
	.rb-hover-lift:hover, .rb-hover-grow:hover { transform: none; }
}

/* ---------- Buttons (für Button, Button-Gruppe, CTA, Preistabelle …) ---------- */
/* Nur für Vorleseprogramme – auch in Themes ohne eigene Regel dafür. */
.rb-el .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
.rb-button:where(:not(.rb-el)):where(.rb-el,.rb-el *) {
	box-sizing: border-box;
	--_bg: var(--rb-color-primary, #1e6fb8);
	--_fg: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.75em 1.5em;
	background: var(--_bg);
	color: var(--_fg);
	border: 2px solid var(--_bg);
	border-radius: var(--rb-btn-radius, 4px);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.rb-button:hover:where(:not(.rb-el)):where(.rb-el,.rb-el *), .rb-button:focus-visible:where(:not(.rb-el)):where(.rb-el,.rb-el *) { filter: brightness(0.92); color: var(--_fg); text-decoration: none; }
.rb-button:focus-visible:where(:not(.rb-el)):where(.rb-el,.rb-el *) { outline: 2px solid var(--_bg); outline-offset: 3px; }
.rb-button-accent { --_bg: var(--rb-color-accent, #a13030); }
.rb-button-outline { background: transparent; color: var(--_bg); }
.rb-button-outline:hover, .rb-button-outline:focus-visible { background: var(--_bg); color: #fff; filter: none; }
.rb-button-light { --_bg: #fff; --_fg: #1f2933; border-color: #fff; }
.rb-button-text { background: none; border-color: transparent; color: var(--rb-color-primary, #1e6fb8); padding-inline: 0; }
.rb-button-text:hover { text-decoration: underline; color: var(--rb-color-primary, #1e6fb8); filter: none; }
.rb-button-theme { background: revert; color: revert; border: revert; padding: revert; }
.rb-button-small { font-size: 0.85em; padding: 0.55em 1.1em; }
.rb-button-large { font-size: 1.15em; padding: 0.9em 2em; }
.rb-button-full { display: flex; width: 100%; }
.rb-button:where(:not(.rb-el)):where(.rb-el,.rb-el *) .rb-svg-icon { width: 1.1em; height: 1.1em; flex: none; }

/* SVG-Icons allgemein */
.rb-svg-icon { display: inline-block; vertical-align: middle; }
/* Symbole im Fließtext/HTML (ersetzen Zeichen einer Icon-Schrift): so groß wie die Schrift. */
.rb-svg-icon.rb-inline-icon { width: 1em; height: 1em; }

/* Ausrichtung (mehrere Elemente) */
.rb-align-left { text-align: left; }
.rb-align-center { text-align: center; }
.rb-align-right { text-align: right; }

/* Social-Liste (Social Icons, Team) */
.rb-social-list { --rb-icon-size: 18px; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0; padding: 0; list-style: none; }
.rb-social-list a {
	display: inline-flex; align-items: center; justify-content: center;
	padding: calc(var(--rb-icon-size) * 0.5);
	background: var(--rb-icon-bg, var(--rb-color-primary, #1e6fb8)); color: var(--rb-icon-color, #fff);
	border-radius: 50%; transition: transform 0.2s, filter 0.2s;
}
.rb-social-list a:hover, .rb-social-list a:focus-visible { transform: translateY(-2px); filter: brightness(1.1); }
.rb-social-list a:focus-visible { outline: 2px solid var(--rb-color-primary, #1e6fb8); outline-offset: 2px; }
.rb-social-list .rb-svg-icon { width: var(--rb-icon-size); height: var(--rb-icon-size); }
.rb-align-center .rb-social-list { justify-content: center; }
@media (prefers-reduced-motion: reduce) { .rb-social-list a:hover { transform: none; } }

/* ---------- Section: Abstände, Farbschema, Formtrenner, Video ---------- */
:where(.rb-section.rb-space-small):where(.rb-el,.rb-el *) { padding-block: var(--rb-space-small, 2rem); }
:where(.rb-section.rb-space-medium):where(.rb-el,.rb-el *) { padding-block: var(--rb-space-medium, 4rem); }
:where(.rb-section.rb-space-large):where(.rb-el,.rb-el *) { padding-block: var(--rb-space-large, 6rem); }
:where(.rb-section.rb-space-huge):where(.rb-el,.rb-el *) { padding-block: var(--rb-space-huge, 8rem); }
.rb-section.rb-scheme-alternate:where(.rb-el,.rb-el *) { background-color: var(--rb-scheme-alt-bg, #f5f5f5); }
.rb-section.rb-scheme-dark:where(.rb-el,.rb-el *) { background-color: var(--rb-scheme-dark-bg, #1f1f24); color: var(--rb-scheme-dark-text, #fff); }
.rb-section.rb-scheme-footer:where(.rb-el,.rb-el *) { background-color: var(--rb-scheme-footer-bg, #1f1f24); color: var(--rb-scheme-footer-text, #fff); }
.rb-section.rb-scheme-footer-bottom:where(.rb-el,.rb-el *) { background-color: var(--rb-scheme-footer-bottom-bg, #15151b); color: var(--rb-scheme-footer-text, #fff); }
.rb-section.rb-scheme-footer a:where(.rb-el *), .rb-section.rb-scheme-footer-bottom a:where(.rb-el *) { color: var(--rb-scheme-footer-link, inherit); }
:where(.rb-section.rb-has-shape):where(.rb-el,.rb-el *) { --rb-shape-top-h: 5vh; --rb-shape-bottom-h: 5vh; --rb-shape-top-color: #fff; --rb-shape-bottom-color: #fff; }
.rb-shape:where(.rb-el,.rb-el *) { position: absolute; left: 0; right: 0; z-index: 1; line-height: 0; pointer-events: none; }
.rb-shape:where(.rb-el,.rb-el *) svg { display: block; width: 100%; height: 100%; }
.rb-shape-top { top: -1px; height: var(--rb-shape-top-h); color: var(--rb-shape-top-color); transform: rotate(180deg); }
.rb-shape-bottom { bottom: -1px; height: var(--rb-shape-bottom-h); color: var(--rb-shape-bottom-color); }
.rb-section.rb-has-shape:not(.rb-shape-overlap):where(.rb-el,.rb-el *) > .rb-container { padding-block: var(--rb-shape-top-h, 0) var(--rb-shape-bottom-h, 0); }
.rb-section:where(.rb-el,.rb-el *) > .rb-container { z-index: 2; }
.rb-section.rb-has-video:where(.rb-el,.rb-el *) { overflow: hidden; }
.rb-section-video { position: absolute; inset: 0; z-index: 0; }
.rb-section-video video { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .rb-section-video { display: none; } }

/* Links übernehmen die Textfarbe (z. B. Titel in Kacheln), Hover-Farbe bleibt. */
.rb-link-inherit a:not(:hover) { color: inherit; }
