/*
 * Start-Hero widget — ported from start-hero.html. Ambient animated particles.js
 * background is replaced entirely by a lightweight, dependency-free floating hexagon
 * pattern (assets/widgets/class-widget-start-hero.php renders the positions) that
 * echoes the molecule/hexagon motif already used by the Cannabinoide/Terpene/
 * Flavonoide widgets — fitting for a cannabis-as-medicine visual identity instead of
 * a generic particle canvas. CSS custom properties are namespaced (--ac-hero-*) so
 * they never collide with a theme's own --primary/--dark/etc. globals.
 */

.ac-hero-section {
	--ac-hero-dark: #111111;
	--ac-hero-light: #ffffff;
	--ac-hero-gray-100: #f7f9fc;
	--ac-hero-gray-500: #adb5bd;
	--ac-hero-text: #303030;

	position: relative;
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding: 170px 0 80px;
	background-color: var( --ac-hero-dark );
	overflow: hidden;
	font-family: 'Amiko', sans-serif;
}

.ac-hero-container {
	width: 100%;
	margin: 0 auto;
	padding: 0 3rem;
}

.ac-hero-bg {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.ac-hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ac-hero-overlay {
	position: absolute;
	inset: 0;
	background: #000;
	opacity: 0.6;
	z-index: 2;
}

.ac-hero-hexbg {
	position: absolute;
	inset: 0;
	z-index: 3;
	overflow: hidden;
	pointer-events: none;
}

.ac-hero-hex {
	position: absolute;
	width: var( --ac-hex-size, 80px );
	height: calc( var( --ac-hex-size, 80px ) * 1.15 );
	top: var( --ac-hex-top, 10% );
	left: var( --ac-hex-left, 10% );
	clip-path: polygon( 50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25% );
	background: var( --ac-accent, #2e6741 );
	opacity: var( --ac-hex-opacity, 0.12 );
	animation: ac-hero-hex-float var( --ac-hex-duration, 14s ) ease-in-out infinite alternate;
	animation-delay: var( --ac-hex-delay, 0s );
}

@keyframes ac-hero-hex-float {
	0% {
		transform: translate( 0, 0 ) rotate( 0deg );
	}
	100% {
		transform: translate( 18px, -22px ) rotate( 8deg );
	}
}

.ac-hero-content {
	position: relative;
	z-index: 5;
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
}

.ac-hero-text {
	flex: 0 0 50%;
	padding-right: 50px;
}

.ac-hero-badge {
	display: inline-flex;
	align-items: center;
	background: rgba( 255, 255, 255, 0.15 );
	backdrop-filter: blur( 10px );
	border-radius: 50px;
	padding: 8px 20px;
	margin-bottom: 25px;
	color: var( --ac-hero-light );
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.ac-hero-badge-icon {
	display: inline-flex;
	margin-right: 10px;
	font-size: 18px;
	line-height: 1;
	color: var( --ac-accent, #2e6741 );
}

/*
 * Elementor icon controls can render either a font-icon (<i class="fas ...">, sized via
 * font-size) or an inline <svg> (Font Awesome 6 / SVG library mode), which does NOT scale
 * with font-size on its own — without this it renders at its raw intrinsic size, which is
 * why hero icons showed up oversized. Constraining every icon's svg to 1em × 1em makes
 * both rendering modes size identically off the same font-size rule, and fill: currentColor
 * makes the SVG follow the same `color` value the font-icon already uses.
 */
.ac-hero-badge-icon svg,
.ac-hero-btn-icon svg,
.ac-hero-badge-float-icon svg,
.ac-hero-scroll-icon svg {
	width: 1em !important;
	height: 1em !important;
	fill: currentColor !important;
}

.ac-hero-title {
	font-family: 'Montserrat', sans-serif;
	font-size: 4rem;
	font-weight: 800;
	line-height: 1.1;
	margin: 0 0 25px;
	color: var( --ac-hero-light );
	text-shadow: 0 2px 10px rgba( 0, 0, 0, 0.1 );
	letter-spacing: -1.5px;
}

.ac-hero-title span {
	display: block;
	color: var( --ac-accent, #2e6741 );
}

.ac-hero-description {
	font-size: 1.15rem;
	color: rgba( 255, 255, 255, 0.9 );
	margin-bottom: 40px;
	max-width: 600px;
	font-weight: 300;
	line-height: 1.7;
	letter-spacing: 1px;
}

.ac-hero-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 20px;
}

.ac-hero-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 15px 35px;
	border-radius: 50px;
	font-weight: 600;
	font-size: 16px;
	transition: all 0.3s cubic-bezier( 0.25, 0.46, 0.45, 0.94 );
	border: none;
	cursor: pointer;
	text-decoration: none;
}

/* Basis + alle Link-States gepinnt — Kit-Regeln für a/a:hover/:visited dürfen
   die Buttons nie umfärben (etablierte Hausregel gegen Theme-Bleed-Through). */
.ac-hero-btn-primary,
.ac-hero-btn-primary:link,
.ac-hero-btn-primary:visited {
	background-color: var( --ac-accent, #2e6741 ) !important;
	color: var( --ac-hero-light ) !important;
	box-shadow: 0 10px 20px rgba( 35, 164, 85, 0.3 );
}

.ac-hero-btn-primary:hover,
.ac-hero-btn-primary:focus,
.ac-hero-btn-primary:active {
	background-color: var( --ac-accent, #2e6741 ) !important;
	color: var( --ac-hero-light ) !important;
	transform: translateY( -5px );
	box-shadow: 0 15px 25px rgba( 35, 164, 85, 0.15 );
}

.ac-hero-btn-secondary,
.ac-hero-btn-secondary:link,
.ac-hero-btn-secondary:visited {
	background-color: transparent !important;
	color: var( --ac-hero-light ) !important;
	border: 2px solid rgba( 255, 255, 255, 0.3 ) !important;
	backdrop-filter: blur( 5px );
}

.ac-hero-btn-secondary:hover,
.ac-hero-btn-secondary:focus,
.ac-hero-btn-secondary:active {
	background-color: transparent !important;
	border-color: var( --ac-accent, #2e6741 ) !important;
	color: var( --ac-accent, #2e6741 ) !important;
	transform: translateY( -5px );
	box-shadow: 0 10px 20px rgba( 0, 0, 0, 0.1 );
}

.ac-hero-btn-icon {
	display: inline-flex;
	margin-left: 10px;
	font-size: 18px;
	line-height: 1;
	transition: transform 0.3s;
}

.ac-hero-btn:hover .ac-hero-btn-icon {
	transform: translateX( 5px );
}

.ac-hero-image {
	flex: 0 0 45%;
	position: relative;
	height: 300px;
}

/*
 * inset:0 (statt fester top/left/width/height) — das Bild füllt seinen Bereich
 * standardmäßig immer vollständig aus, unabhängig von der Bereichsgröße (Elementor-
 * Style-Control "Höhe" oben). margin-left/right:auto ist hier absichtlich als
 * No-Op-Baseline gesetzt: solange kein max-width gesetzt ist, bleibt kein Freiraum
 * übrig, den die Margins verteilen könnten. Setzt der Editor über den Style-Control
 * "Bildbreite (max.)" einen kleineren Wert, wird das Bild dadurch automatisch
 * horizontal zentriert statt nur linksbündig zu verkleinern.
 */
.ac-hero-visual {
	position: absolute;
	inset: 0;
	margin-left: auto;
	margin-right: auto;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 30px 60px rgba( 0, 0, 0, 0.3 );
}

.ac-hero-visual::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient( 135deg, rgba( 35, 164, 85, 0.2 ) 0%, rgba( 97, 206, 112, 0.1 ) 100% );
	z-index: 3;
	border-radius: 10px;
}

.ac-hero-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 10px;
	transform: scale( 1.1 );
	animation: ac-hero-pulse 8s infinite alternate ease-in-out;
}

img.ac-hero-img {
    height: 100%;
}

@keyframes ac-hero-pulse {
	0% {
		transform: scale( 1.05 );
	}
	100% {
		transform: scale( 1.15 );
	}
}

.ac-hero-badge-float {
	position: absolute;
	padding: 15px 25px;
	background: var( --ac-hero-light );
	border-radius: 10px;
	box-shadow: 0 15px 30px rgba( 0, 0, 0, 0.15 );
	display: flex;
	align-items: center;
	z-index: 6;
	animation: ac-hero-float 4s infinite alternate ease-in-out;
}

@keyframes ac-hero-float {
	0% {
		transform: translateY( 0 );
	}
	100% {
		transform: translateY( -10px );
	}
}

/*
 * Scoped to the .ac-hero-badges wrapper (not just .ac-hero-badge-float) so nth-child
 * counts only the badges themselves — nth-of-type on the bare class previously counted
 * ALL sibling <div>s including .ac-hero-visual, which shifted every index by one and
 * caused the "n+3" hide rule to wrongly hide the real second badge.
 *
 * These are fallback positions only: each badge's Elementor "Position" fields (Oben/
 * Rechts/Unten/Links) render as inline style and win per-property over these class
 * rules, so editors can freely reposition badge 1/2 or place additional badges anywhere.
 */
.ac-hero-badges .ac-hero-badge-float:nth-child( 1 ) {
	top: 20%;
	left: 50%;
}

.ac-hero-badges .ac-hero-badge-float:nth-child( 2 ) {
	bottom: 15%;
	left: -30px;
}

/* Badges beyond the first two only render once an explicit position is set
   (.ac-hero-badge-float--positioned, added in PHP) — otherwise they'd stack at 0,0. */
.ac-hero-badges .ac-hero-badge-float:not( .ac-hero-badge-float--positioned ):nth-child( n + 3 ) {
	display: none;
}

.ac-hero-badge-float-icon {
	width: 40px;
	height: 40px;
	background: var( --ac-hero-gray-100 );
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	color: var( --ac-accent, #2e6741 );
	margin-right: 15px;
	flex-shrink: 0;
}

.ac-hero-badge-float-text {
	font-weight: 600;
	color: var( --ac-hero-text );
	font-size: 14px;
}

.ac-hero-badge-float-text span {
	display: block;
	font-size: 12px;
	color: var( --ac-hero-gray-500 );
	font-weight: 400;
}

.ac-hero-scroll,
.ac-hero-scroll:active,
.ac-hero-scroll:focus {
	position: absolute;
	bottom: 40px;
	left: 50%;
	transform: translateX( -50% );
	color: var( --ac-hero-light );
	font-size: 14px;
	font-weight: 500;
	display: flex;
	flex-direction: column;
	align-items: center;
	z-index: 10;
	opacity: 0.8;
	transition: all 0.3s;
	cursor: pointer;
	text-decoration: none;
}

.ac-hero-scroll:hover {
	opacity: 1;
	transform: translate( -50%, -5px );
}

.ac-hero-scroll-icon {
	display: inline-flex;
	font-size: 24px;
	line-height: 1;
	margin-top: 8px;
	animation: ac-hero-scroll-bounce 2s infinite;
}

@keyframes ac-hero-scroll-bounce {
	0% {
		transform: translateY( 0 );
		opacity: 0.8;
	}
	50% {
		opacity: 0.4;
	}
	100% {
		transform: translateY( 10px );
		opacity: 0.8;
	}
}

@media screen and ( max-width: 1200px ) {
	.ac-hero-title {
		font-size: 3.4rem;
	}

	.ac-hero-content {
		flex-direction: column;
		text-align: center;
	}

	.ac-hero-text {
		flex: 0 0 100%;
		padding-right: 0;
		margin-bottom: 50px;
	}

	.ac-hero-buttons,
	.ac-hero-description {
		justify-content: center;
		margin-left: auto;
		margin-right: auto;
	}

	.ac-hero-badge-float {
		display: none;
	}

	.ac-hero-image {
		flex: 0 0 80%;
		max-width: 500px;
	}
}

@media screen and ( max-width: 768px ) {
	.ac-hero-title {
		font-size: 2.7rem;
	}

	.ac-hero-badge {
		margin-left: auto;
		margin-right: auto;
	}

	.ac-hero-description {
		font-size: 1rem;
		color: #fff;
		line-height: 1.5;
	}

	.ac-hero-container {
		padding: 0 1rem;
	}

	.ac-hero-buttons {
		flex-direction: column;
		gap: 15px;
	}

	.ac-hero-btn {
		width: 100%;
	}
}
