/* GG Hero Tabs Shortcode v1.0.3 */
.ghs {
	--ghs-tab-h: var(--ghs-tab-h-d, 64px);
	--ghs-bw: 2px;
	position: relative;
	width: 100%;
	max-width: none;
	margin: 0;
}
.ghs *, .ghs *::before, .ghs *::after { box-sizing: border-box; }

/* A tutto schermo: esce dal contenitore del tema/sezione.
   --ghs-vw viene impostata via JS alla larghezza reale (senza barra di scorrimento). */
.ghs.ghs--full {
	width: var(--ghs-vw, 100vw) !important;
	max-width: var(--ghs-vw, 100vw) !important;
	margin-left: calc(50% - var(--ghs-vw, 100vw) / 2) !important;
	margin-right: calc(50% - var(--ghs-vw, 100vw) / 2) !important;
	left: auto;
	right: auto;
	transform: none;
}
body:has(.ghs--full) { overflow-x: clip; }

/* ---------- HERO ---------- */
.ghs-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--ghs-hero-h, 560px);
	overflow: hidden;
	isolation: isolate;
}
.ghs--overlap .ghs-hero { padding-bottom: var(--ghs-tab-h); }

.ghs-media,
.ghs-media .ghs-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.ghs-media { z-index: 0; display: block; margin: 0; }
.ghs .ghs-media .ghs-img {
	display: block;
	max-width: none;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: var(--ghs-img-pos, center center);
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.ghs-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-color: var(--ghs-overlay, rgba(0, 0, 0, .12));
}
.ghs-overlay--gradient::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 45%;
	background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
}

.ghs-content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--ghs-content-w, 960px);
	margin: 0 auto;
	padding: 48px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.ghs--align-left .ghs-content { align-items: flex-start; text-align: left; }
.ghs--align-right .ghs-content { align-items: flex-end; text-align: right; }

.ghs .ghs-title {
	margin: 0 0 24px;
	padding: 0;
	color: var(--ghs-title-c, #fff);
	font-size: var(--ghs-title-fs, clamp(32px, 5vw, 64px));
	font-weight: 800;
	line-height: 1.08;
	text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}
.ghs .ghs-subtitle {
	margin: 0 0 24px;
	color: var(--ghs-title-c, #fff);
	font-size: clamp(16px, 1.6vw, 20px);
	line-height: 1.5;
	text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}
.ghs-shortcode { width: 100%; max-width: 900px; }

/* ---------- SCHEDE ---------- */
.ghs-tabs-wrap {
	position: relative;
	z-index: 3;
	width: 100%;
	max-width: var(--ghs-tabs-w, 1180px);
	margin: 0 auto;
	padding: 0 20px;
}
.ghs--overlap .ghs-tabs-wrap { margin-top: calc(-1 * var(--ghs-tab-h)); }
.ghs--below .ghs-tabs-wrap { padding-top: 16px; }

.ghs-tabs {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: 6px;
	margin: 0;
	padding: 0;
}

/* Schede sull'immagine */
.ghs .ghs-tab {
	flex: 1 1 0;
	min-width: 0;
	min-height: var(--ghs-tab-h);
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin: 0;
	padding: 12px 24px;
	border: var(--ghs-bw) solid var(--ghs-tbd, rgba(255, 255, 255, .9));
	border-radius: var(--ghs-radius, 16px);
	background: var(--ghs-tbg, rgba(0, 0, 0, .35));
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: var(--ghs-t, #fff);
	font-family: inherit;
	font-size: var(--ghs-fs, 18px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-align: left;
	text-decoration: none;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease, border-color .25s ease;
	-webkit-tap-highlight-color: transparent;
}
.ghs--tab-center .ghs-tab { justify-content: center; text-align: center; }
.ghs--overlap .ghs-tab {
	border-bottom-width: 0;
	border-radius: var(--ghs-radius, 16px) var(--ghs-radius, 16px) 0 0;
}
.ghs .ghs-tab:not(.is-active):hover,
.ghs .ghs-tab:not(.is-active):focus {
	background: var(--ghs-thbg, rgba(0, 0, 0, .55));
	color: var(--ghs-t, #fff);
	text-decoration: none;
}
.ghs .ghs-tab.is-active,
.ghs .ghs-tab.is-active:hover,
.ghs .ghs-tab.is-active:focus {
	background: var(--ghs-tabg, #fff);
	border-color: var(--ghs-tabg, #fff);
	color: var(--ghs-ta, #111);
}
.ghs .ghs-tab:focus { outline: none; }
.ghs .ghs-tab:focus-visible { outline: 3px solid #2f6bff; outline-offset: 2px; }

/* Schede sotto l'hero */
.ghs--below .ghs-tab {
	background: var(--ghs-tbg2, #f2f4f7);
	border-color: var(--ghs-tbd2, #e3e6ea);
	color: var(--ghs-t2, #111);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.ghs--below .ghs-tab:not(.is-active):hover,
.ghs--below .ghs-tab:not(.is-active):focus {
	background: var(--ghs-thbg2, #e6e9ee);
	color: var(--ghs-t2, #111);
}
.ghs--below .ghs-tab.is-active,
.ghs--below .ghs-tab.is-active:hover,
.ghs--below .ghs-tab.is-active:focus {
	background: var(--ghs-tabg2, #111);
	border-color: var(--ghs-tabg2, #111);
	color: var(--ghs-ta2, #fff);
}

.ghs-tab__label {
	display: block;
	white-space: normal;
	overflow-wrap: anywhere;
}

.ghs-select { display: none; }

/* ---------- PANNELLI / CONTENITORI ---------- */
.ghs-panels { width: 100%; }
.ghs-target-hidden { display: none !important; }

@keyframes ghs-fade {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}
.ghs-fade-in { animation: ghs-fade .35s ease both; }
@media (prefers-reduced-motion: reduce) {
	.ghs-fade-in { animation: none; }
	.ghs .ghs-tab { transition: none; }
}

/* ---------- MOBILE ---------- */
@media (max-width: 767px) {
	.ghs { --ghs-tab-h: var(--ghs-tab-h-m, 52px); }
	.ghs-hero { min-height: var(--ghs-hero-h-m, 480px); }
	.ghs-content { padding: 32px 16px; }
	.ghs .ghs-title { font-size: var(--ghs-title-fs-m, clamp(28px, 8vw, 40px)); }
	.ghs-tabs-wrap { padding: 0 16px; }

	.ghs .ghs-tab {
		font-size: var(--ghs-fs-m, 14px);
		padding: 10px 14px;
	}

	/* Posizione: sul bordo dell'hero */
	.ghs--m-overlap .ghs-hero { padding-bottom: var(--ghs-tab-h); }
	.ghs--m-overlap .ghs-tabs-wrap { margin-top: calc(-1 * var(--ghs-tab-h)); padding-top: 0; }
	.ghs--m-overlap .ghs-tab {
		border-bottom-width: 0;
		border-radius: var(--ghs-radius, 16px) var(--ghs-radius, 16px) 0 0;
		background: var(--ghs-tbg, rgba(0, 0, 0, .35));
		border-color: var(--ghs-tbd, rgba(255, 255, 255, .9));
		color: var(--ghs-t, #fff);
	}
	.ghs--m-overlap .ghs-tab.is-active {
		background: var(--ghs-tabg, #fff);
		border-color: var(--ghs-tabg, #fff);
		color: var(--ghs-ta, #111);
	}

	/* Posizione: sotto l'hero */
	.ghs--m-below .ghs-hero { padding-bottom: 0; }
	.ghs--m-below .ghs-tabs-wrap { margin-top: 0; padding-top: 14px; }
	.ghs--m-below .ghs-tab {
		border-bottom-width: var(--ghs-bw);
		border-radius: min(var(--ghs-radius, 16px), 12px);
		background: var(--ghs-tbg2, #f2f4f7);
		border-color: var(--ghs-tbd2, #e3e6ea);
		color: var(--ghs-t2, #111);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
	.ghs--m-below .ghs-tab:not(.is-active):hover,
	.ghs--m-below .ghs-tab:not(.is-active):focus {
		background: var(--ghs-thbg2, #e6e9ee);
		color: var(--ghs-t2, #111);
	}
	.ghs--m-below .ghs-tab.is-active,
	.ghs--m-below .ghs-tab.is-active:hover,
	.ghs--m-below .ghs-tab.is-active:focus {
		background: var(--ghs-tabg2, #111);
		border-color: var(--ghs-tabg2, #111);
		color: var(--ghs-ta2, #fff);
	}

	/* Layout: griglia (tutte visibili) */
	.ghs--m-grid .ghs-tabs {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}
	.ghs--m-grid .ghs-tab {
		justify-content: center;
		text-align: center;
	}
	.ghs--m-grid .ghs-tab:last-child:nth-child(odd) { grid-column: 1 / -1; }

	/* Layout: scorrimento orizzontale */
	.ghs--m-scroll .ghs-tabs-wrap { padding-left: 0; padding-right: 0; }
	.ghs--m-scroll .ghs-tabs {
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		scroll-padding-left: 16px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding: 0 16px;
		gap: 8px;
	}
	.ghs--m-scroll .ghs-tabs::-webkit-scrollbar { display: none; }
	.ghs--m-scroll .ghs-tab {
		flex: 0 0 auto;
		max-width: 80%;
		scroll-snap-align: start;
	}
	.ghs--m-scroll .ghs-tab__label { white-space: nowrap; }

	/* Layout: menu a tendina */
	.ghs--m-select .ghs-tabs { display: none; }
	.ghs--m-select .ghs-select {
		display: block;
		width: 100%;
		min-height: 52px;
		margin: 0;
		padding: 0 44px 0 16px;
		border: 1px solid #d0d5dd;
		border-radius: 12px;
		background-color: #fff;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: right 16px center;
		background-size: 14px 9px;
		-webkit-appearance: none;
		appearance: none;
		color: #111;
		font-family: inherit;
		font-size: 16px;
		font-weight: 600;
		box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
	}
	.ghs--m-select.ghs--m-overlap .ghs-hero { padding-bottom: 76px; }
	.ghs--m-select.ghs--m-overlap .ghs-tabs-wrap { margin-top: -68px; padding-bottom: 16px; }
}
