/**
 * studioK - Highlight Blöcke (Glassmorphism & Boxen)
 * Frontend & Shared Stylesheet
 * Version 1.0.0
 */

:root {
	--ag-hb-default-blur: 18px;
}

/* ==========================================================================
   Highlight Box Layout & Wrapper
   ========================================================================== */

.ag-highlight-box-wrapper {
	width: 100%;
	display: flex;
	box-sizing: border-box;
	clear: both;
}

.ag-highlight-box-wrapper.ag-hb-align-center {
	justify-content: center;
}

.ag-highlight-box-wrapper.ag-hb-align-left {
	justify-content: flex-start;
}

.ag-highlight-box-wrapper.ag-hb-align-right {
	justify-content: flex-end;
}

.ag-highlight-box.ag-hb-align-center,
.ag-highlight-box-wrapper.ag-hb-align-center .ag-highlight-box {
	margin-left: auto;
	margin-right: auto;
}

.ag-highlight-box.ag-hb-align-left,
.ag-highlight-box-wrapper.ag-hb-align-left .ag-highlight-box {
	margin-left: 0;
	margin-right: auto;
}

.ag-highlight-box.ag-hb-align-right,
.ag-highlight-box-wrapper.ag-hb-align-right .ag-highlight-box {
	margin-left: auto;
	margin-right: 0;
}

/* ==========================================================================
   Highlight Box Core Styling
   ========================================================================== */

.ag-highlight-box {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: var(--ag-hb-max-w, 760px);
	padding: var(--ag-hb-pad-v, 38px) var(--ag-hb-pad-h, 44px);
	margin-top: var(--ag-hb-mar-t, 24px);
	margin-bottom: var(--ag-hb-mar-b, 24px);
	box-sizing: border-box;
	position: relative;
	text-decoration: none;
	color: var(--ag-hb-text-color, #ffffff);
	text-align: var(--ag-hb-text-align, center);

	/* Background & Blur */
	background: var(--ag-hb-bg, rgba(255, 255, 255, 0.18));
	-webkit-backdrop-filter: blur(var(--ag-hb-blur, 18px));
	backdrop-filter: blur(var(--ag-hb-blur, 18px));

	/* Border & Radius */
	border: var(--ag-hb-border-width, 1px) var(--ag-hb-border-style, solid) var(--ag-hb-border-color, rgba(255, 255, 255, 0.28));
	border-radius: var(--ag-hb-radius, 24px);

	/* Shadow & Depth */
	box-shadow: var(--ag-hb-shadow, 0 16px 36px rgba(0, 0, 0, 0.14));

	/* Transitions */
	transition:
		transform var(--ag-hb-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1),
		box-shadow var(--ag-hb-trans-dur, 0.35s) cubic-bezier(0.16, 1, 0.3, 1),
		border-color var(--ag-hb-trans-dur, 0.35s) ease,
		background var(--ag-hb-trans-dur, 0.35s) ease;
	will-change: transform, box-shadow;
}

/* 3D Glass Rim Top Highlight (Sheen) */
.ag-highlight-box.ag-hb-has-rim-light {
	box-shadow:
		inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.4),
		var(--ag-hb-shadow, 0 16px 36px rgba(0, 0, 0, 0.14));
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
	.ag-highlight-box.ag-hb-is-glass {
		background: rgba(240, 245, 250, 0.88);
		color: #1e293b;
	}
}

/* Box Link States */
a.ag-highlight-box {
	cursor: pointer;
	text-decoration: none;
}

a.ag-highlight-box:focus-visible {
	outline: 2px solid #3b82f6;
	outline-offset: 4px;
}

/* ==========================================================================
   Decorative SVG Icon
   ========================================================================== */

.ag-hb-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 22px;
	line-height: 1;
	pointer-events: none;
}

.ag-highlight-box.ag-hb-align-center .ag-hb-icon,
.ag-highlight-box[style*="text-align: center"] .ag-hb-icon,
.ag-highlight-box[style*="--ag-hb-text-align: center"] .ag-hb-icon {
	align-self: center;
	margin-left: auto;
	margin-right: auto;
}

.ag-highlight-box.ag-hb-align-left .ag-hb-icon,
.ag-highlight-box[style*="text-align: left"] .ag-hb-icon,
.ag-highlight-box[style*="--ag-hb-text-align: left"] .ag-hb-icon {
	align-self: flex-start;
	margin-left: 0;
	margin-right: auto;
}

.ag-highlight-box.ag-hb-align-right .ag-hb-icon,
.ag-highlight-box[style*="text-align: right"] .ag-hb-icon,
.ag-highlight-box[style*="--ag-hb-text-align: right"] .ag-hb-icon {
	align-self: flex-end;
	margin-left: auto;
	margin-right: 0;
}

.ag-hb-icon svg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* ==========================================================================
   Content Body Typography
   ========================================================================== */

.ag-hb-content {
	font-size: var(--ag-hb-font-size, 20px);
	font-weight: var(--ag-hb-font-weight, 400);
	line-height: var(--ag-hb-line-height, 1.6);
	color: var(--ag-hb-text-color, inherit);
	letter-spacing: -0.01em;
	word-break: break-word;
}

.ag-hb-content p {
	margin: 0 0 1em 0;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

.ag-hb-content p:last-child {
	margin-bottom: 0;
}

.ag-hb-content strong,
.ag-hb-content b {
	font-weight: 700;
}

.ag-hb-content a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: opacity 0.2s ease;
}

.ag-hb-content a:hover {
	opacity: 0.8;
}

/* InnerBlocks Mode */
.ag-hb-inner-blocks {
	width: 100%;
}

/* ==========================================================================
   Author & Subtitle
   ========================================================================== */

.ag-hb-author {
	margin-top: 20px;
	font-size: var(--ag-hb-author-size, 14px);
	color: var(--ag-hb-author-color, rgba(255, 255, 255, 0.82));
	font-weight: 400;
	letter-spacing: 0.03em;
	line-height: 1.4;
	opacity: 0.95;
}

/* ==========================================================================
   Hover & Floating Animation Effects
   ========================================================================== */

/* Lift Effect */
.ag-highlight-box.ag-hb-hover-lift:hover {
	transform: translateY(-5px);
	box-shadow:
		inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.5),
		0 24px 48px rgba(0, 0, 0, 0.2),
		0 8px 18px rgba(0, 0, 0, 0.1);
}

/* Zoom / Scale Effect */
.ag-highlight-box.ag-hb-hover-zoom:hover {
	transform: scale(1.02);
	box-shadow:
		inset 0 1px 1.5px 0 rgba(255, 255, 255, 0.5),
		0 22px 42px rgba(0, 0, 0, 0.18);
}

/* Glow Effect */
.ag-highlight-box.ag-hb-hover-glow:hover {
	border-color: rgba(255, 255, 255, 0.6);
	box-shadow:
		inset 0 1px 2px 0 rgba(255, 255, 255, 0.65),
		0 0 32px rgba(255, 255, 255, 0.35),
		0 18px 40px rgba(0, 0, 0, 0.16);
}

/* Glass Focus (Background intensification) */
.ag-highlight-box.ag-hb-hover-glass-focus:hover {
	transform: translateY(-3px);
	background: rgba(255, 255, 255, 0.28);
	-webkit-backdrop-filter: blur(calc(var(--ag-hb-blur, 18px) + 8px));
	backdrop-filter: blur(calc(var(--ag-hb-blur, 18px) + 8px));
	border-color: rgba(255, 255, 255, 0.45);
	box-shadow:
		inset 0 1px 2px 0 rgba(255, 255, 255, 0.5),
		0 20px 44px rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   Responsive Adaptations (Mobile & Tablet)
   ========================================================================== */

@media (max-width: 768px) {
	.ag-highlight-box {
		padding: max(22px, calc(var(--ag-hb-pad-v, 38px) * 0.65)) max(20px, calc(var(--ag-hb-pad-h, 44px) * 0.55));
		margin-top: calc(var(--ag-hb-mar-t, 24px) * 0.75);
		margin-bottom: calc(var(--ag-hb-mar-b, 24px) * 0.75);
	}

	.ag-hb-content {
		font-size: max(16px, calc(var(--ag-hb-font-size, 20px) * 0.9));
	}

	.ag-highlight-box.ag-hb-hover-lift:hover {
		transform: translateY(-2px);
	}

	.ag-highlight-box.ag-hb-hover-zoom:hover {
		transform: scale(1.01);
	}
}
