/* Homepage hero — full-bleed background slider */

.hero {
	position: relative;
	height: 720px;
	overflow: hidden;
	background: var(--color-off-white);
	color: var(--color-charcoal);
}

.hero__viewport,
.hero-slide,
.hero-slide__media,
.hero-slide__shade {
	position: absolute;
	inset: 0;
}

.hero__viewport {
	z-index: 0;
}

.hero-slide {
	opacity: 0;
	z-index: 0;
	pointer-events: none;
	transition: opacity 1.15s ease;
}

.hero-slide.is-active {
	opacity: 1;
	z-index: 1;
	pointer-events: auto;
}

.hero-slide__media {
	overflow: hidden;
	background: var(--color-soft-grey);
}

.hero-slide__image,
.elementor img.hero-slide__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: var(--hero-position, 72% 46%);
	transform-origin: var(--hero-position, 72% 46%);
}

.hero-slide.is-active .hero-slide__image {
	animation: hero-drift 7.6s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.hero-slide__shade {
	z-index: 1;
	background: linear-gradient(
		100deg,
		rgba(244, 236, 229, 0.94) 0%,
		rgba(244, 236, 229, 0.82) 20%,
		rgba(244, 236, 229, 0.46) 40%,
		rgba(244, 236, 229, 0.12) 58%,
		rgba(244, 236, 229, 0) 72%
	);
}

.hero-slide__copy {
	position: absolute;
	z-index: 2;
	top: 48%;
	left: 9%;
	width: min(35rem, 44%);
	transform: translateY(-50%);
}

.hero-slide__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin: 0 0 1.15rem;
	color: var(--color-sage);
	font-family: var(--font-body);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	line-height: 1.4;
	text-transform: uppercase;
}

.hero-slide__eyebrow::before {
	content: "";
	width: 1.85rem;
	height: 1px;
	background: currentColor;
	flex: 0 0 auto;
}

.hero-slide__title {
	margin: 0;
	color: var(--color-charcoal);
	font-family: var(--font-body);
	font-size: clamp(2.55rem, 4vw, 2.75rem);
	font-weight: 500;
	letter-spacing: -0.025em;
	line-height: 1.08;
	text-wrap: balance;
}

.hero-slide__line {
	display: block;
}

.hero-slide__text {
	max-width: 32rem;
	margin: 1.2rem 0 0;
	color: var(--color-charcoal);
	font-family: var(--font-body);
	font-size: 1.125rem;
	font-weight: 400;
	line-height: 1.65;
}

.hero-slide__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.85rem;
}

.hero-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.15rem;
	padding: 0.9rem 1.4rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	font-family: var(--font-body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.hero-btn--primary {
	background: var(--color-gold);
	border-color: var(--color-gold);
	color: var(--color-on-gold);
}

.hero-btn--primary:hover,
.hero-btn--primary:focus-visible {
	background: var(--color-gold-deep);
	border-color: var(--color-gold-deep);
	color: var(--color-on-gold);
}

.hero-btn--secondary {
	background: transparent;
	border-color: rgba(58, 51, 44, 0.42);
	color: var(--color-charcoal);
}

.hero-btn--secondary:hover,
.hero-btn--secondary:focus-visible {
	background: var(--color-charcoal);
	border-color: var(--color-charcoal);
	color: var(--color-off-white);
}

.hero__controls {
	position: absolute;
	z-index: 3;
	right: max(1.5rem, 4vw);
	bottom: 1.65rem;
	left: 9%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	pointer-events: none;
}

.hero__indicators,
.hero__arrows {
	display: flex;
	align-items: center;
	pointer-events: auto;
}

.hero__indicators {
	gap: 0.35rem;
}

.hero__dot {
	position: relative;
	width: 1.7rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.hero__dot::before {
	content: "";
	position: absolute;
	top: 50%;
	right: 0;
	left: 0;
	height: 1px;
	background: rgba(58, 51, 44, 0.32);
	transform: translateY(-50%);
	transition: background-color 0.35s ease, height 0.35s ease;
}

.hero__dot[aria-current="true"] {
	width: 2.65rem;
}

.hero__dot[aria-current="true"]::before {
	height: 2px;
	background: var(--color-sage);
}

.hero__arrows {
	gap: 0.5rem;
}

.hero__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.85rem;
	height: 2.85rem;
	padding: 0;
	border: 1px solid rgba(58, 51, 44, 0.28);
	border-radius: var(--radius);
	background: rgba(244, 236, 229, 0.72);
	color: var(--color-charcoal);
	cursor: pointer;
	transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.hero__arrow svg {
	display: block;
	width: 1.05rem;
	height: 1.05rem;
}

.hero__arrow:hover,
.hero__arrow:focus-visible {
	border-color: var(--color-sage);
	background: var(--color-off-white);
	color: var(--color-sage);
}

.hero-slide__eyebrow,
.hero-slide__title,
.hero-slide__text,
.hero-slide__actions .hero-btn {
	opacity: 0;
}

.hero-slide.is-active .hero-slide__eyebrow {
	animation: hero-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s forwards;
}

.hero-slide.is-active .hero-slide__title {
	animation: hero-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.24s forwards;
}

.hero-slide.is-active .hero-slide__text {
	animation: hero-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.hero-slide.is-active .hero-slide__actions .hero-btn:first-child {
	animation: hero-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.54s forwards;
}

.hero-slide.is-active .hero-slide__actions .hero-btn:nth-child(2) {
	animation: hero-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.66s forwards;
}

@keyframes hero-drift {
	from {
		transform: scale(1);
	}

	to {
		transform: scale(1.075);
	}
}

@keyframes hero-rise {
	from {
		opacity: 0;
		transform: translateY(14px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (min-width: 1500px) {
	.hero-slide__title {
		font-size: 4rem;
	}
}

@media (max-width: 1100px) {
	.hero {
		height: 640px;
	}

	.hero-slide__copy {
		left: 7%;
		width: min(32rem, 50%);
	}

	.hero__controls {
		left: 7%;
	}

	.hero-slide__title {
		font-size: clamp(2.4rem, 4.6vw, 3.25rem);
	}
}

@media (max-width: 760px) {
	.hero {
		height: 680px;
	}

	.hero-slide__image {
		object-position: var(--hero-position-sm, center 28%);
		transform-origin: var(--hero-position-sm, center 28%);
	}

	.hero-slide__shade {
		background:
			linear-gradient(
				180deg,
				rgba(244, 236, 229, 0) 0%,
				rgba(244, 236, 229, 0.18) 30%,
				rgba(244, 236, 229, 0.9) 54%,
				rgba(244, 236, 229, 0.98) 100%
			),
			linear-gradient(
				90deg,
				rgba(244, 236, 229, 0.55) 0%,
				rgba(244, 236, 229, 0.08) 70%
			);
	}

	.hero-slide__copy {
		top: auto;
		right: 1.25rem;
		bottom: 5.35rem;
		left: 1.25rem;
		width: auto;
		transform: none;
	}

	.hero-slide__eyebrow {
		margin-bottom: 0.8rem;
		letter-spacing: 0.16em;
	}

	.hero-slide__title {
		font-size: clamp(2.05rem, 8.6vw, 2.65rem);
	}

	.hero-slide__text {
		margin-top: 0.85rem;
		font-size: 1.0625rem;
		line-height: 1.6;
	}

	.hero-slide__actions {
		margin-top: 1.25rem;
	}

	.hero__controls {
		right: 1.25rem;
		bottom: 0.85rem;
		left: 1.25rem;
	}
}

@media (max-width: 560px) {
	.hero {
		height: 640px;
	}

	.hero-slide__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.hero-btn {
		width: 100%;
		white-space: normal;
	}

	.hero__arrow {
		width: 2.6rem;
		height: 2.6rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero-slide,
	.hero-slide__image,
	.hero__dot::before,
	.hero__arrow,
	.hero-btn {
		transition: none;
	}

	.hero-slide__image,
	.hero-slide.is-active .hero-slide__image {
		animation: none;
		transform: none;
	}

	.hero-slide__eyebrow,
	.hero-slide__title,
	.hero-slide__text,
	.hero-slide__actions .hero-btn,
	.hero-slide.is-active .hero-slide__eyebrow,
	.hero-slide.is-active .hero-slide__title,
	.hero-slide.is-active .hero-slide__text,
	.hero-slide.is-active .hero-slide__actions .hero-btn {
		opacity: 1;
		animation: none;
		transform: none;
	}
}

/* Full-bleed when the slider sits in an Elementor container. */

.elementor-element.dentmedica-hero-wrap,
.elementor-element-dmhs001.e-con,
.elementor-element-dmhs001.e-con > .e-con-inner {
	--padding-top: 0px;
	--padding-right: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	width: 100%;
	max-width: none;
	padding: 0;
}

.elementor-widget-dentmedica-hero .elementor-widget-container {
	margin: 0;
	padding: 0;
}

/*
 * Public homepage: slider, introduction, then the rest of the Elementor page.
 * The preview keeps document order so the slider can be selected.
 */
body.home:not(.dentmedica-elementor-preview) .site-main {
	display: flex;
	flex-direction: column;
}

body.home:not(.dentmedica-elementor-preview) .site-main > * {
	order: 4;
}

body.home:not(.dentmedica-elementor-preview) .elementor-12 {
	display: contents;
}

body.home:not(.dentmedica-elementor-preview) .elementor-12 > .elementor-element {
	order: 3;
	width: 100%;
}

body.home:not(.dentmedica-elementor-preview) #about {
	order: 2;
}

body.home:not(.dentmedica-elementor-preview) .elementor-12 > .elementor-element.dentmedica-philosophy-wrap {
	order: 2;
	width: 100%;
}

body.home:not(.dentmedica-elementor-preview) .elementor-12 > .elementor-element.dentmedica-about-wrap {
	order: 2;
	width: 100%;
}

body.home:not(.dentmedica-elementor-preview) .elementor-12 > .elementor-element-dmhs001,
body.home:not(.dentmedica-elementor-preview) .elementor-12 > .dentmedica-hero-wrap {
	order: 1;
	width: 100%;
}
