/* Greenius CTA-Boxen – Frontend Styles */

.grsw-widget {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background-color: #222;
	min-height: 280px;
	width: 100%;
	box-sizing: border-box;
	border-radius: 0;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.grsw-widget * {
	box-sizing: border-box;
}

/* Hintergrundbild als eigene Ebene (statt direkt als background-image auf .grsw-widget),
   damit es beim Hover unabhängig vom Text/den Buttons leicht gezoomt werden kann. */
.grsw-widget::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background-image: var( --grsw-bg-image );
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transform: scale(1);
	transition: transform 0.6s ease;
}

.grsw-widget:hover::before {
	transform: scale(1.08);
}

.grsw-overlay {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 1;
}

/* Label/Eyebrow bleibt oben, unabhängig von der Höhe der Box. */
.grsw-top {
	position: relative;
	z-index: 2;
	padding: 24px 26px 0;
}

/* Headline/Subtext/Buttons werden per margin-top:auto an den unteren Rand gedrückt –
   dadurch bleibt das Label (falls vorhanden) oben und der restliche Inhalt unten,
   egal wie hoch die Box eingestellt ist. */
.grsw-content {
	position: relative;
	z-index: 2;
	margin-top: auto;
	padding: 28px 26px 26px;
}

.grsw-eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.95;
}

.grsw-headline {
	font-size: 26px;
	line-height: 1.25;
	margin: 0 0 20px;
	letter-spacing:0.03em;
}

.grsw-subtext {
	line-height: 1.55;
	margin: 0 0 18px;
	opacity: 0.92;
}

.grsw-subtext p {
	margin: 0 0 10px;
}

.grsw-subtext p:last-child {
	margin-bottom: 40px;
}

.grsw-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Buttons: pro Stil ein eigener Mechanismus, 1:1 von der echten Website übernommen und
   per Playwright-Selbsttest verifiziert.
   Style "Gefüllt" (.grsw-btn-filled): echter 3px-Rahmen per ::before (Farbe über das
   Feld "Rahmenfarbe"), plus ein Quadrat (::after), das genau innerhalb dieses Rahmens
   (Inset 3px) von 7×7px auf "calc(100% - 6px)" wächst und dabei zum neuen Innen-
   Hintergrund wird – der Rahmen bleibt die ganze Zeit sichtbar (Outline-Eindruck).
   Style "Outline/Text" (.grsw-btn-outline): KEIN Rahmen-Element, KEIN Hintergrund im
   Ruhezustand. Padding ist von Anfang an FEST (wie bei "Gefüllt") – der Text
   verschiebt sich beim Hover NICHT. Nur ein kleines Quadrat (::before) oben links
   wächst dahinter zur vollen Box und WIRD dabei der neue Hintergrund.
   Beide Stile: Wachsen dauert 0.45s (Hover rein), Schrumpfen 0.3s (Hover raus) –
   bewusst asymmetrisch, exakt wie auf der Website. */
.grsw-btn1,
.grsw-btn2 {
	position: relative;
	/* z-index:0 (statt auto) erzwingt einen EIGENEN Stacking-Context für den Button.
	   Ohne das würde das wachsende Element (z-index:-1) unten bis zum nächsten
	   Vorfahren mit Stacking-Context "durchrutschen" (z. B. body) und HINTER dem
	   eigenen Hintergrund des Buttons gemalt werden (unsichtbar bei Style "Gefüllt").
	   Mit eigenem Stacking-Context liegt das Element garantiert zwischen dem
	   Button-Hintergrund (unten) und dem Text (oben). */
	z-index: 0;
	display: inline-flex;
	align-items: center;
	overflow: hidden;
	font-size: 0.85rem;
	font-style: normal;
	text-transform: none;
	font-weight: 400;
	letter-spacing: 0.03em;
	line-height: 1.1;
	padding: 1em 1.5em; /* bei beiden Stilen von Anfang an fest, kein Sprung beim Hover */
	border: none;
	border-radius: 0;
	box-sizing: border-box;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition-timing-function: ease;
}

/* ---- Style "Gefüllt" ---- */

.grsw-btn-filled {
	transition-duration: 0.3s;
}

.grsw-btn-filled::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	border-radius: inherit;
	border-width: 3px;
	border-style: solid;
	border-color: inherit;
	border-image: inherit;
	transition: inherit;
}

.grsw-btn-filled::after {
	content: "";
	position: absolute;
	z-index: -1;
	left: 3px;
	top: 3px;
	width: 7px;
	height: 7px;
	transition: width 0.3s ease, height 0.3s ease;
}

.grsw-btn-filled:hover::after,
.grsw-btn-filled:focus::after,
.grsw-btn-filled.grsw-tapped::after {
	width: calc(100% - 6px);
	height: calc(100% - 6px);
	transition: width 0.45s ease, height 0.45s ease;
}

/* ---- Style "Outline/Text" ---- */

.grsw-btn-outline {
	background: transparent;
	transition: color 0.3s ease;
}

.grsw-btn-outline::before {
	content: "";
	position: absolute;
	z-index: -1;
	left: 0;
	top: 0;
	width: 7px;
	height: 7px;
	transition: width 0.3s ease, height 0.3s ease;
}

.grsw-btn-outline:hover::before,
.grsw-btn-outline:focus::before,
.grsw-btn-outline.grsw-tapped::before {
	width: 100%;
	height: 100%;
	transition: width 0.45s ease, height 0.45s ease;
}

.grsw-btn1:not(:focus-visible),
.grsw-btn2:not(:focus-visible) {
	outline: none;
}

/* Pfeil-CTA: exakt in der Ecke, ohne Abstand zum Rand der Box. */
.grsw-arrow-cta {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 3;
	width: 40px;
	height: 40px;
	border-radius: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, color 0.2s ease;
	text-decoration: none;
}

.grsw-arrow-cta svg {
	width: 16px;
	height: auto;
	fill: currentColor;
	transition: transform 0.25s ease;
}

/* Auf Hover dreht sich nur der Pfeil selbst um 45° nach oben (nicht nach unten), nicht die Box. */
.grsw-arrow-cta:hover svg,
.grsw-arrow-cta:focus svg {
	transform: rotate(-45deg);
}

.grsw-arrow-cta:not(:focus-visible) {
	outline: none;
}

@media (max-width: 480px) {
	.grsw-top {
		padding: 18px 18px 0;
	}
	.grsw-content {
		padding: 22px 18px 20px;
	}
	.grsw-headline {
		font-size: 19px;
	}
}
