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

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

.elmur-ds-slider {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	background: #111;
	margin: 2rem 0;
}

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

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

.elmur-ds-slider__slide::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to right, rgba(0,0,0,0.65) 40%, rgba(0,0,0,0.1));
}

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

.elmur-ds-slider__headline {
	font-size: clamp(1.8rem, 4vw, 3rem);
	font-weight: 900;
	color: #fff;
	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-ds-slider__subtext {
	font-size: 1.1rem;
	color: rgba(255,255,255,0.85);
	margin: 0 0 1.5rem;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease 0.25s, transform 0.5s ease 0.25s;
}

.elmur-ds-slider__btn {
	display: inline-block;
	background: var(--color-accent, #cc0000);
	color: #fff;
	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-ds-slider__btn:hover {
	background: var(--color-accent-hover, #a30000);
}

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

.elmur-ds-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0,0,0,0.4);
	border: none;
	color: #fff;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	font-size: 1.4rem;
	cursor: pointer;
	z-index: 2;
	transition: background 0.2s;
	line-height: 1;
}

.elmur-ds-slider__arrow:hover {
	background: var(--color-accent, #cc0000);
}

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

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

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

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

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

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

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

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

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

.elmur-ds-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-ds-feature-tile:hover {
	border-color: var(--color-accent, #cc0000);
}

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

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

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

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

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

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

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

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

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

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

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

.elmur-ds-hover-tile__svg-border path {
	fill: none;
	stroke: var(--color-accent, #cc0000);
	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-ds-hover-tile__img-wrap {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4/3;
	border-radius: 12px;
	background: var(--color-bg-alt, #1a1a1a);
}

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

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

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

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

.elmur-ds-hover-tile__title {
	font-size: 1.15rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 0.4rem;
}

.elmur-ds-hover-tile__desc {
	font-size: 0.875rem;
	color: rgba(255,255,255,0.85);
	margin: 0;
	line-height: 1.5;
}

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

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

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

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

.elmur-ds-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-ds-text-accent {
	color: var(--color-accent, #cc0000);
}

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

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

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

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

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

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

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

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

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

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

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

.elmur-ds-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-ds-price-card::before {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--color-accent, #cc0000);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

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

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

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

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

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

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

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

.elmur-ds-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-ds-price-card__row:last-child {
	border-bottom: none;
}

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

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

.elmur-ds-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-ds-align-left {
	text-align: left;
}

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

.elmur-ds-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-ds-text-xs {
	font-size: 0.7em;
}

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

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

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

@media (max-width: 40rem) {
	.elmur-ds-price-grid {
		grid-template-columns: 1fr;
	}
}

/* ==================================================================
   Hero block (elmur-ds/hero) – full-bleed image/video hero
   ================================================================== */

.elmur-ds-hero {
	position: relative;
	min-height: clamp(28rem, 66vh, 44rem);
	display: flex;
	align-items: center;
	color: #ffffff;
	overflow: hidden;
	isolation: isolate;
}

/* Media layer (image or video) behind everything */
.elmur-ds-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.elmur-ds-hero__img,
.elmur-ds-hero__video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

/* Darkening overlay: two scrims (top for the header, left for the text)
   at full design strength; the whole layer is scaled by the editor's
   "overlay strength" value (0..1) passed as --elmur-ds-hero-overlay-strength. */
.elmur-ds-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: var(--elmur-ds-hero-overlay-strength, 0.5);
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.1) 16%, transparent 36%),
		linear-gradient(95deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.45) 45%, transparent 78%);
}

.elmur-ds-hero__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--container-max);
	margin: 0 auto;
	padding: calc(var(--header-height) + var(--space-xl)) var(--space-lg) var(--space-xl);
}

.elmur-ds-hero__title {
	font-size: clamp(2rem, 5vw, 4rem);
	margin: 0 0 var(--space-md);
	color: inherit;
}

.elmur-ds-hero__lead {
	font-size: clamp(1.05rem, 1.6vw, 1.35rem);
	max-width: 60ch;
	margin: 0 0 var(--space-lg);
	color: rgba(255, 255, 255, 0.9);
}

.elmur-ds-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-md);
	margin: 0;
}

.elmur-ds-hero .ds-button--primary {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-on-primary);
}

.elmur-ds-hero .ds-button--primary:hover,
.elmur-ds-hero .ds-button--primary:focus-visible {
	background: var(--color-primary-hover);
	border-color: var(--color-primary-hover);
}

/* Entrance animations: text slides in from the left, buttons rise from the
   bottom, into their final positions. Disabled for reduced-motion users. */
@media (prefers-reduced-motion: no-preference) {
	.elmur-ds-hero__title[data-elmur-ds-hero-anim],
	.elmur-ds-hero__lead[data-elmur-ds-hero-anim] {
		animation: elmur-ds-hero-in-left 0.7s ease both;
	}
	.elmur-ds-hero__lead[data-elmur-ds-hero-anim] {
		animation-delay: 0.15s;
	}
	.elmur-ds-hero__actions[data-elmur-ds-hero-anim] {
		animation: elmur-ds-hero-in-up 0.7s ease 0.28s both;
	}
}

@keyframes elmur-ds-hero-in-left {
	from { opacity: 0; transform: translateX(-2rem); }
	to   { opacity: 1; transform: translateX(0); }
}

@keyframes elmur-ds-hero-in-up {
	from { opacity: 0; transform: translateY(1.5rem); }
	to   { opacity: 1; transform: translateY(0); }
}