/**
 * Home — layout sezioni Taberna38.
 */

.taberna38-page--home {
	overflow-x: clip;
}

/* Override main.css (img { height: auto }) sui media full-bleed */
.taberna38-page--home .taberna38-home-s1__image,
.taberna38-page--home .taberna38-home-s1__video,
.taberna38-page--home .taberna38-home-s3__image,
.taberna38-page--home .taberna38-home-s3__video,
.taberna38-page--home .taberna38-home-s3__overlay-image,
.taberna38-page--home .taberna38-home-s7__image,
.taberna38-page--home .taberna38-home-s7__video,
.taberna38-page--home .taberna38-home-media__image,
.taberna38-page--home .taberna38-home-media__video {
	max-width: none;
	height: 100%;
}

/* Contenitore foreground S1 — absolute, max dimensioni, immagine centrata nel flex. */
.taberna38-home-s1__foreground-slot {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	margin: auto;
	box-sizing: border-box;
	pointer-events: none;
	padding: 120px;
}

@media (max-width: 767.98px) {
	.taberna38-home-s1__foreground-slot {
		padding: 20px;
	}
}

.taberna38-home-s1__foreground-image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
}

/* Overlay S3 — stesso box dello sfondo (inset 0), sovrapposizione 1:1. */
.taberna38-home-s3__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	box-sizing: border-box;
	pointer-events: none;
}

.taberna38-home-s3__overlay-slot {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	pointer-events: none;
}

.taberna38-home-s3__overlay-image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
}

/* —— Media responsive condivisi —— */
.taberna38-home-media {
	position: relative;
	width: 100%;
	height: 100%;
}

.taberna38-home-media__slot {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.taberna38-home-media__slot--mobile {
	display: none;
}

.taberna38-home-media--has-mobile .taberna38-home-media__slot--desktop {
	display: block;
}

.taberna38-home-media__image,
.taberna38-home-media__video,
.taberna38-home-s1__image,
.taberna38-home-s1__video,
.taberna38-home-s3__image,
.taberna38-home-s3__video,
.taberna38-home-s7__image,
.taberna38-home-s7__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

@media (max-width: 767.98px) {
	.taberna38-home-media--has-mobile .taberna38-home-media__slot--desktop {
		display: none;
	}

	.taberna38-home-media--has-mobile .taberna38-home-media__slot--mobile {
		display: block;
	}
}

/* —— Sezione 1 Hero —— */
.taberna38-home-s1 {
	padding-block: 0;
}

.taberna38-home-s1__stage {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	background-color: var(--taberna38-color-text);
}

@supports (height: 100dvh) {
	.taberna38-home-s1__stage {
		min-height: 100dvh;
	}
}

.taberna38-home-s1__bg {
	position: absolute;
	inset: 0;
}

.taberna38-home-s1__media {
	position: absolute;
	inset: 0;
}

.taberna38-home-s1__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-color: var(--taberna38-home-s1-scrim, transparent);
}

.taberna38-home-s1__foreground {
	position: absolute;
	inset: 0;
	z-index: 10;
	box-sizing: border-box;
	padding: 50px;
	pointer-events: none;
}

@media (min-width: 768px) {
	.taberna38-home-s1__foreground-slot {
		inset: auto 0 0;
		margin-top: 0;
		max-height: calc(100% - 50px);
	}
}

.taberna38-home-s1__foreground-slot--mobile {
	display: none;
}

@media (max-width: 767.98px) {
	.taberna38-home-s1__foreground {
		padding: 20px;
		height: 100%;
	}

	.taberna38-home-s1--has-mobile .taberna38-home-s1__foreground-slot--desktop {
		display: none;
	}

	.taberna38-home-s1--has-mobile .taberna38-home-s1__foreground-slot--mobile {
		display: flex;
	}
}

/* —— Forme decorative sezione —— */
.taberna38-home-section--has-shapes {
	position: relative;
	overflow: visible;
	z-index: 1;
}

.taberna38-home-shape {
	position: absolute;
	left: 0;
	width: 100%;
	pointer-events: none;
	z-index: 4;
	line-height: 0;
}

.taberna38-home-shape--top {
	top: 0;
}

.taberna38-home-shape--bottom {
	bottom: 0;
}

.taberna38-home-shape__image {
	display: block;
	width: 100%;
	height: auto;
}

/* —— Split (S2, S4, S6) —— */
.taberna38-home-split {
	background-color: var(--taberna38-home-split-bg, transparent);
}

.taberna38-home-split__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: start;
}

.taberna38-home-split__content .taberna38-btn-group {
	justify-content: flex-start;
}

.taberna38-home-split__media {
	display: flex;
	justify-content: center;
	width: 100%;
}

.taberna38-home-split__media .taberna38-media-frame,
.taberna38-home-split__media .taberna38-media,
.taberna38-home-split__media-el {
	width: auto;
	max-width: 100%;
	height: auto;
	position: relative;
	z-index: 10;
}

.taberna38-home-split__media .taberna38-media__image,
.taberna38-home-split__media .taberna38-media__video,
.taberna38-home-split__media-el .taberna38-media__image,
.taberna38-home-split__media-el .taberna38-media__video,
.taberna38-home-split__media-el img,
.taberna38-home-split__media-el video {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
}

.taberna38-page--home .taberna38-home-split__media .taberna38-video-player {
	width: auto;
	max-width: 100%;
	height: auto;
}

@media (min-width: 992px) {
	.taberna38-home-split__media {
		justify-content: flex-end;
	}

	.taberna38-home-split--reverse .taberna38-home-split__content {
		padding-left: var(--taberna38-container-padding-x);
	}

	.taberna38-home-split--reverse .taberna38-home-split__media {
		justify-content: flex-start;
	}
}

.taberna38-home-split--custom-text .taberna38-title,
.taberna38-home-split--custom-text .taberna38-text,
.taberna38-home-split--custom-text .taberna38-wysiwyg,
.taberna38-home-split--custom-text .taberna38-wysiwyg a {
	color: var(--taberna38-home-split-text, var(--taberna38-color-text));
}

/* —— Sezione 3 layer —— */
.taberna38-home-s3 {
	padding-block: var(--taberna38-section-padding-y);
	padding-inline: var(--taberna38-section-padding-y);
	background-color: var(--taberna38-home-s3-bg, transparent);
	box-sizing: border-box;
}

.taberna38-home-s3__stage {
	position: relative;
	/* lvh = viewport “grande” stabile: non segue la barra Safari come dvh. */
	height: calc(100vh - 2 * var(--taberna38-section-padding-y));
	height: calc(100lvh - 2 * var(--taberna38-section-padding-y));
	overflow: hidden;
	z-index: 10;
}

.taberna38-home-s3__bg {
	position: absolute;
	inset: 0;
}

.taberna38-home-s3__media {
	position: absolute;
	inset: 0;
}

.taberna38-home-s3__overlay-slot--mobile {
	display: none;
}

@media (max-width: 767.98px) {
	.taberna38-home-s3 {
		--taberna38-home-s3-padding-y: 103px;
		padding-inline: 0;
		padding-block: var(--taberna38-home-s3-padding-y);
	}

	.taberna38-home-s3__stage {
		/* --taberna38-home-s3-vh impostato da home.js (solo resize/orient., non scroll). */
		height: calc(var(--taberna38-home-s3-vh, 100lvh) - 2 * var(--taberna38-home-s3-padding-y));
		min-height: 320px;
	}

	.taberna38-home-s3--has-mobile .taberna38-home-s3__overlay-slot--desktop {
		display: none;
	}

	.taberna38-home-s3--has-mobile .taberna38-home-s3__overlay-slot--mobile {
		display: block;
	}
}

.taberna38-home-s3--has-overlay:not(.taberna38-home-s3--layer-init) .taberna38-home-media__slot {
	opacity: 0;
	visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.taberna38-home-s3--has-overlay .taberna38-home-media__slot {
		opacity: 1;
		visibility: visible;
	}

	.taberna38-home-s3--has-overlay .taberna38-home-s3__overlay {
		display: none;
	}
}

/* —— Sezione 5 showcase + Swiper —— */
.taberna38-home-s5 {
	background-color: var(--taberna38-home-s5-bg, transparent);
}

.taberna38-home-s5:not(.taberna38-home-section--has-shapes) {
	overflow: hidden;
}

.taberna38-home-s5__intro {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	margin-bottom: 2.5rem;
	position: relative;
	z-index: 10;
}

.taberna38-home-s5__intro .taberna38-btn-group {
	justify-content: flex-start;
	width: 100%;
}

.taberna38-home-s5--custom-text .taberna38-title,
.taberna38-home-s5--custom-text .taberna38-text,
.taberna38-home-s5--custom-text .taberna38-wysiwyg,
.taberna38-home-s5--custom-text .taberna38-wysiwyg a {
	color: var(--taberna38-home-s5-text, var(--taberna38-color-text));
}

@media (min-width: 768px) {
	.taberna38-home-s5__intro {
		align-items: center;
		margin-inline: auto;
		text-align: center;
	}

	.taberna38-home-s5__intro .taberna38-title,
	.taberna38-home-s5__intro .taberna38-text,
	.taberna38-home-s5__intro .taberna38-wysiwyg {
		width: 100%;
	}

	.taberna38-home-s5__intro .taberna38-btn-group {
		justify-content: center;
		width: auto;
	}
}

.taberna38-page--home .container-fluid.taberna38-home-s5__carousel {
	width: 100%;
	max-width: none;
	margin-inline: 0;
	padding-inline: var(--taberna38-container-padding-x);
}

.taberna38-home-s5__carousel {
	margin-top: 0;
	overflow: visible;
	padding-inline: 20px;
	position: relative;
	z-index: 10;
}

.taberna38-home-s5__swiper {
	overflow: visible;
}

.taberna38-home-s5__slide-image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

/* —— Sezione 7 full media —— */
.taberna38-home-s7 {
	padding-block: 0;
}

.taberna38-home-s7__media {
	position: relative;
	width: 100%;
	min-height: 800px;
}

.taberna38-home-s7__media .taberna38-home-media {
	position: absolute;
	inset: 0;
	height: 100%;
}

/* —— Sezione 8 CTA —— */
.taberna38-home-s8 {
	background-color: var(--taberna38-home-s8-bg, var(--taberna38-color-bg));
}

.taberna38-home-s8__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 56rem;
	margin-inline: auto;
	text-align: center;
}

.taberna38-home-s8__inner .taberna38-title,
.taberna38-home-s8__inner .taberna38-text,
.taberna38-home-s8__inner .taberna38-wysiwyg {
	width: 100%;
	text-align: center;
}

.taberna38-home-s8__inner .taberna38-btn-group {
	justify-content: center;
	align-items: center;
	width: auto;
}

.taberna38-home-s8--custom-text .taberna38-title,
.taberna38-home-s8--custom-text .taberna38-text,
.taberna38-home-s8--custom-text .taberna38-wysiwyg,
.taberna38-home-s8--custom-text .taberna38-wysiwyg a {
	color: var(--taberna38-home-s8-text, var(--taberna38-color-text));
}

/* —— Video player (split / controlli) —— */
.taberna38-page--home .taberna38-video-player {
	position: relative;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

.taberna38-page--home .taberna38-video-player__center {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.taberna38-page--home .taberna38-video-player__btn--mute {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
}
