/* ==========================================================================
   elmur Blocks – Frontend Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Slider
   -------------------------------------------------------------------------- */

.elmur-slider {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	background: var(--color-bg-alt);
	margin: 2rem 0;
}

.elmur-slider__track {
	display: flex;
	transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.elmur-slider__slide {
	flex: 0 0 100%;
	min-height: 30rem;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	position: relative;
}

.elmur-slider__slide::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to right, var(--elmur-overlay-scrim-strong) 40%, var(--elmur-overlay-scrim-soft));
}

.elmur-slider__content {
	position: relative;
	z-index: 1;
	padding: 3rem 4rem;
	max-width: 40rem;
}

.elmur-slider__headline {
	font-size: clamp(1.8rem, 4vw, 3rem);
	font-weight: 900;
	color: var(--elmur-on-overlay);
	margin: 0 0 1rem;
	line-height: 1.15;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}

.elmur-slider__subtext {
	font-size: 1.1rem;
	color: var(--elmur-on-overlay-muted);
	margin: 0 0 1.5rem;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease 0.25s, transform 0.5s ease 0.25s;
}

.elmur-slider__btn {
	display: inline-block;
	background: var(--color-accent);
	color: var(--elmur-on-overlay);
	padding: 0.75rem 1.75rem;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 700;
	font-size: 1rem;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s, background 0.2s;
}

.elmur-slider__btn:hover {
	background: var(--color-accent-hover);
}

.elmur-slider__slide.is-active .elmur-slider__headline,
.elmur-slider__slide.is-active .elmur-slider__subtext,
.elmur-slider__slide.is-active .elmur-slider__btn {
	opacity: 1;
	transform: translateY(0);
}

.elmur-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: var(--elmur-overlay-scrim);
	border: none;
	color: var(--elmur-on-overlay);
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	font-size: 1.4rem;
	cursor: pointer;
	z-index: 2;
	transition: background 0.2s;
	line-height: 1;
}

.elmur-slider__arrow svg {
	width: 1.4rem;
	height: 1.4rem;
	display: block;
	margin: 0 auto;
}

.elmur-slider__arrow:hover {
	background: var(--color-accent);
}

.elmur-slider__arrow--prev { left: 1.25rem; }
.elmur-slider__arrow--next { right: 1.25rem; }

.elmur-slider__dots {
	position: absolute;
	bottom: 1.25rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 0.5rem;
	z-index: 2;
}

.elmur-slider__dot {
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 50%;
	border: 2px solid var(--elmur-on-overlay-faint);
	background: transparent;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
	padding: 0;
}

.elmur-slider__dot.is-active {
	background: var(--color-accent);
	border-color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Feature Tiles
   -------------------------------------------------------------------------- */

.elmur-feature-tiles {
	display: grid;
	gap: 1.5rem;
	margin: 2rem 0;
}

.elmur-feature-tiles--cols-2 { grid-template-columns: repeat(2, 1fr); }
.elmur-feature-tiles--cols-3 { grid-template-columns: repeat(3, 1fr); }
.elmur-feature-tiles--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 56.25rem) {
	.elmur-feature-tiles--cols-3,
	.elmur-feature-tiles--cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 35rem) {
	.elmur-feature-tiles--cols-2,
	.elmur-feature-tiles--cols-3,
	.elmur-feature-tiles--cols-4 { grid-template-columns: 1fr; }
}

.elmur-feature-tile {
	background: var(--color-bg-alt, #f5f5f5);
	border: 1px solid var(--color-border, #e5e5e5);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.25s ease;
}

.elmur-feature-tile:hover {
	border-color: var(--color-accent);
}

.elmur-feature-tile__img-wrap {
	overflow: hidden;
	aspect-ratio: 16/9;
}

.elmur-feature-tile__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.elmur-feature-tile__body {
	padding: 1.25rem;
}

.elmur-feature-tile__title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
	color: var(--color-text, #1a1a1a);
}

.elmur-feature-tile__desc {
	font-size: 0.9rem;
	color: var(--color-text-muted, #6b6b6b);
	margin: 0;
	line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Hover Tiles
   -------------------------------------------------------------------------- */

.elmur-hover-tiles {
	display: grid;
	gap: 1.5rem;
	margin: 2rem 0;
}

.elmur-hover-tiles--cols-2 { grid-template-columns: repeat(2, 1fr); }
.elmur-hover-tiles--cols-3 { grid-template-columns: repeat(3, 1fr); }
.elmur-hover-tiles--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 56.25rem) {
	.elmur-hover-tiles--cols-3,
	.elmur-hover-tiles--cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 35rem) {
	.elmur-hover-tiles--cols-2,
	.elmur-hover-tiles--cols-3,
	.elmur-hover-tiles--cols-4 { grid-template-columns: 1fr; }
}

.elmur-hover-tile {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 12px;
	position: relative;
	/* No overflow:hidden here – img-wrap clips image itself */
}

/* ---- SVG clockwise border (stroke-dasharray / dashoffset set by JS) ---- */

.elmur-hover-tile__svg-border {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 5;
	/* Corner rounding handled by .elmur-hover-tile__img-wrap overflow:hidden + border-radius */
}

.elmur-hover-tile__svg-border path {
	fill: none;
	stroke: var(--color-accent);
	stroke-width: 4; /* 4px total: half (2px) clipped by clip-path, 2px visible inside edge */
	vector-effect: non-scaling-stroke;
	stroke-linecap: round;
	stroke-linejoin: round;
	/* stroke-dasharray and stroke-dashoffset are controlled exclusively by JS */
}

/* ---- Image ---- */
.elmur-hover-tile__img-wrap {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4/3;
	border-radius: 12px;
	background: var(--color-bg-alt, #1a1a1a);
}

.elmur-hover-tile__img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s ease;
}

.elmur-hover-tile:hover .elmur-hover-tile__img-wrap img {
	transform: scale(1.08);
}

/* ---- Overlay ---- */
.elmur-hover-tile__overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 1.5rem 1.25rem 1.25rem;
	background: linear-gradient(to top, var(--elmur-overlay-scrim-max) 0%, transparent 100%);
	transform: translateY(100%);
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.elmur-hover-tile:hover .elmur-hover-tile__overlay {
	transform: translateY(0);
}

.elmur-hover-tile__title {
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--elmur-on-overlay);
	margin: 0 0 0.4rem;
}

.elmur-hover-tile__desc {
	font-size: 0.875rem;
	color: var(--elmur-on-overlay-muted);
	margin: 0;
	line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 40rem) {
	.elmur-slider__content {
		padding: 2rem 1.5rem;
	}

	.elmur-slider__slide {
		min-height: 20rem;
	}
}

/* ==========================================================================
   Price Cards
   ========================================================================== */

.elmur-price-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16.25rem, 18.75rem));
	justify-content: start;
	gap: 1.5rem;
	margin: 2rem 0;
}

/* Text color utilities for user-entered formatting.
   Theme colors follow the active scheme; palette colors use per-mode
   tokens (defined in the theme's color files) with a safe fallback,
   so every color stays readable in light and dark mode. */
.elmur-text-accent {
	color: var(--color-accent);
}

.elmur-text-muted {
	color: var(--color-text-muted, #aaa);
}

.elmur-text-contrast {
	color: var(--color-text, #1a1a1a);
}

.elmur-text-soft {
	color: var(--elmur-text-soft, #8a8a8a);
}

.elmur-text-red {
	color: var(--elmur-text-red, #c62828);
}

.elmur-text-orange {
	color: var(--elmur-text-orange, #e65100);
}

.elmur-text-yellow {
	color: var(--elmur-text-yellow, #b58900);
}

.elmur-text-green {
	color: var(--elmur-text-green, #2e7d32);
}

.elmur-text-teal {
	color: var(--elmur-text-teal, #00695c);
}

.elmur-text-blue {
	color: var(--elmur-text-blue, #1565c0);
}

.elmur-text-purple {
	color: var(--elmur-text-purple, #6a1b9a);
}

.elmur-text-pink {
	color: var(--elmur-text-pink, #ad1457);
}

.elmur-price-card {
	background: var(--color-bg-alt, #1a1a1a);
	border: 1px solid var(--color-border, #2d2d2d);
	border-radius: 12px;
	padding: 1.5rem;
	position: relative;
	overflow: hidden;
	max-width: 18.75rem;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.elmur-price-card::before {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--color-accent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.elmur-price-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	border-color: var(--color-accent);
}

.elmur-price-card:hover::before {
	transform: scaleX(1);
}

.elmur-price-card__icon {
	height: 3rem;
	width: auto;
	max-width: 100%;
	display: block;
	margin: 0 auto 0.75rem;
	opacity: 0.75;
}

[data-theme="dark"] .elmur-price-card__icon,
.dark .elmur-price-card__icon {
	filter: brightness(0) invert(0.6);
}

.elmur-price-card__badge {
	display: block;
	font-size: 2rem;
	font-weight: 800;
	line-height: 1;
	color: var(--color-accent);
	margin-bottom: 0.25rem;
	letter-spacing: -0.02em;
}

.elmur-price-card__title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-text, #fff);
	margin: 0 0 1rem;
}

/* Price rows */
.elmur-price-card__rows {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--color-border, #333);
}

.elmur-price-card__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.6rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.elmur-price-card__row:last-child {
	border-bottom: none;
}

.elmur-price-card__label {
	font-size: 0.875rem;
	color: var(--color-text-muted, #aaa);
}

.elmur-price-card__value {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--color-accent);
	white-space: nowrap;
	margin-left: 1rem;
}

.elmur-price-card__note {
	padding: 0.5rem 0;
	font-size: 0.875rem;
	color: var(--color-text-muted, #777);
	line-height: 1.5;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	list-style: none;
}

/* Explicit text alignment for note rows (set via the editor toolbar) */
.elmur-align-left {
	text-align: left;
}

.elmur-align-center {
	text-align: center;
}

.elmur-align-right {
	text-align: right;
}

/* Font-size utilities (set via the editor toolbar). Relative (em) so they
   scale with the surrounding text and stay responsive on every device. */
.elmur-text-xs {
	font-size: 0.7em;
}

.elmur-text-s {
	font-size: 0.85em;
}

.elmur-text-l {
	font-size: 1.25em;
}

.elmur-text-xl {
	font-size: 1.55em;
}

@media (max-width: 40rem) {
	.elmur-price-grid {
		grid-temp