/* ==========================================================================
   Casa della Scarpa - CSS di base (reset, tipografia, header, footer, griglia)
   Valori misurati sul sito originale (Betheme 28): colori, font, spaziature.
   ========================================================================== */

/* ---- Font self-hosted (niente Google Fonts) ---- */
@font-face {
	font-family: "Roboto";
	font-style: normal;
	font-weight: 300 700;
	font-display: swap;
	src: url("../fonts/roboto-latin.woff2") format("woff2");
}
@font-face {
	font-family: "Tinos";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/tinos-400-latin.woff2") format("woff2");
}
@font-face {
	font-family: "Tinos";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/tinos-700-latin.woff2") format("woff2");
}

/* ---- Variabili ---- */
:root {
	--c-text: #626262;
	--c-heading: #001111;
	--c-link: #282828;
	--c-gold: #b7905a;
	--c-footer: #444444;
	--f-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	--f-head: "Tinos", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

	/* Scala tipografica: schermo largo (>= 1240px) */
	--fs-body: 14px;
	--lh-body: 25px;
	--fs-menu: 18px;
	--fs-h1: 42px;
	--lh-h1: 50px;
	--fs-h2: 42px;
	--lh-h2: 34px;
	--fs-h3: 32px;
	--lh-h3: 29px;
	--fs-h4: 23px;
	--lh-h4: 25px;
	--fs-h5: 18px;
	--lh-h5: 25px;
	--fs-h6: 15px;
	--lh-h6: 25px;

	--wrap: 1220px;
	--gap: 12px;
	--header-h: 90px;

	/* Il toolkit/CookieYes (mg-main-plug) usa questa variabile di Elementor per i colori dei pulsanti del banner cookie: senza, il pulsante Accetta tutti era trasparente con testo bianco */
	--e-global-color-primary: #001111;
}
@media (max-width: 1239px) {
	:root {
		--fs-body: 13px; --lh-body: 21px; --fs-menu: 15px;
		--fs-h1: 36px; --lh-h1: 43px;
		--fs-h2: 36px; --lh-h2: 29px;
		--fs-h3: 27px; --lh-h3: 25px;
		--fs-h4: 20px; --lh-h4: 21px;
		--fs-h5: 15px; --lh-h5: 21px;
		--fs-h6: 13px; --lh-h6: 21px;
		--wrap: 940px;
	}
}
@media (max-width: 959px) {
	:root {
		--fs-body: 15px; --lh-body: 24px; --fs-menu: 16px;
		--fs-h1: 32px; --lh-h1: 38px;
		--fs-h2: 32px; --lh-h2: 26px;
		--fs-h3: 24px; --lh-h3: 22px;
		--fs-h4: 17px; --lh-h4: 19px;
		--fs-h5: 14px; --lh-h5: 19px;
		--lh-h6: 19px;
		--wrap: 708px;
		--header-h: 60px;
	}
}
@media (max-width: 767px) {
	:root {
		--fs-body: 16px; --lh-body: 26px; --fs-menu: 16px;
		--fs-h1: 25px; --lh-h1: 30px;
		--fs-h2: 25px; --lh-h2: 20px;
		--fs-h3: 19px; --lh-h3: 19px;
		--fs-h4: 14px; --lh-h4: 19px;
		--fs-h5: 13px; --lh-h5: 19px;
		--wrap: 550px;
	}
}

/* ---- Reset ---- */
*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	scroll-padding-top: 80px;
	-webkit-tap-highlight-color: rgba(183, 144, 90, 0.25);
	background: #fcfcfc;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}
body {
	margin: 0;
	font-family: var(--f-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	font-weight: 400;
	color: var(--c-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* clip (non hidden): non trasforma il body in contenitore di scroll, altrimenti con html{overflow:hidden} (menu aperto) l'header sticky sparisce */
	overflow-x: hidden;
	overflow-x: clip;
	/* iPhone con notch in orizzontale: margini di sicurezza (0 negli altri casi) */
	padding-left: env(safe-area-inset-left);
	padding-right: env(safe-area-inset-right);
}
img,
iframe,
svg {
	max-width: 100%;
}
img {
	height: auto;
	border: 0;
}
a {
	color: var(--c-link);
	text-decoration: none;
}
a:hover {
	color: #000;
	text-decoration: underline;
}
p {
	margin: 0 0 15px;
}
ul,
ol {
	margin: 0;
	padding: 0;
}
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 15px;
	font-family: var(--f-head);
	color: var(--c-heading);
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: 400; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 300; }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 300; }
h4 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 500; }
h5 { font-size: var(--fs-h5); line-height: var(--lh-h5); font-weight: 700; }
h6 { font-size: var(--fs-h6); line-height: var(--lh-h6); font-weight: 400; }
/* Classi di aspetto: il livello del titolo (h2/h3) segue la struttura della pagina, la grafica resta quella di prima */
.t3 { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 300; }
.t4 { font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: 500; }
.t5 { font-size: var(--fs-h5); line-height: var(--lh-h5); font-weight: 700; }
.big {
	font-size: 110%;
	line-height: 180%;
}
b,
strong {
	font-weight: 700;
}

/* Accessibilita' */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 18px;
	clip: auto;
	clip-path: none;
	background: #fff;
	color: #000;
	box-shadow: 0 0 0 2px #000;
}
:focus-visible {
	outline: 2px solid #001111;
	outline-offset: 2px;
}

/* ---- Header ---- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 701;
	background: #fff;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
.site-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 90px;
	transition: min-height 0.2s ease;
}
.site-logo {
	display: flex;
	align-items: center;
	margin: 0 30px 0 20px;
	padding: 15px 0;
	height: 90px;
}
.site-logo__img {
	display: block;
	width: 268px;
	max-width: 100%;
	height: auto;
}

.main-nav .menu {
	display: flex;
	list-style: none;
}
.main-nav .menu > li {
	margin: 0;
	display: block;
}
.main-nav .menu > li > a {
	display: block;
	padding: 15px 0;
	line-height: 60px;
	font-family: var(--f-body);
	font-size: var(--fs-menu);
	font-weight: 400;
	color: var(--c-heading);
}
.main-nav .menu > li > a > span {
	display: block;
	padding: 0 20px;
	line-height: 60px;
	white-space: nowrap;
	border-right: 1px solid rgba(0, 0, 0, 0.05);
}
.main-nav .menu > li:last-child > a > span {
	border-right: 0;
}
.main-nav .menu > li > a:hover {
	text-decoration: none;
	color: var(--c-heading);
}


/* Barra "sticky" (dopo lo scroll): piu' bassa, con ombra */
.site-header.is-scrolled {
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
}
.site-header.is-scrolled .site-header__inner {
	min-height: 60px;
}
.site-header.is-scrolled .site-logo {
	height: 60px;
	padding: 0;
}
.site-header.is-scrolled .main-nav .menu > li > a {
	padding: 0;
}

/* Pulsante del menu mobile (nascosto su desktop) */
.nav-toggle {
	display: none;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 3px;
	background: transparent;
	color: #282828;
	cursor: pointer;
}
.nav-toggle svg {
	display: block;
	width: 22px;
	height: 22px;
	margin: auto;
}

@media (max-width: 959px) {
	.site-header__inner {
		min-height: 60px;
	}
	.site-logo {
		height: 60px;
		margin: 0 0 0 15px;
		padding: 5px 0;
	}
	.site-logo__img {
		width: auto;
		max-width: 60vw;
		max-height: 50px;
	}
	.nav-toggle {
		display: block;
		position: absolute;
		right: 8px;
		top: 50%;
		width: 48px;
		height: 48px;
		margin-top: -24px;
	}
	.nav-toggle svg {
		width: 26px;
		height: 26px;
	}
	.main-nav {
		display: none;
		/* pannello fisso rispetto allo schermo, sotto la barra da 60px; scorre da solo se le voci non stanno */
		position: fixed;
		top: 60px;
		left: 0;
		right: 0;
		bottom: 0;
		background: #fff;
		border-top: 1px solid rgba(0, 0, 0, 0.08);
		box-shadow: 0 6px 10px rgba(0, 0, 0, 0.08);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
		padding-bottom: env(safe-area-inset-bottom);
	}
	.admin-bar .main-nav { top: 92px; }
	@media (max-width: 782px) {
		.admin-bar .main-nav { top: 106px; }
	}
	.site-header.is-open .main-nav {
		display: block;
	}
	/* menu aperto: la pagina sotto non scorre */
	html.nav-open {
		overflow: hidden;
	}
	.main-nav .menu {
		display: block;
	}
	.main-nav .menu > li > a {
		padding: 0 25px;
		line-height: normal;
	}
	.main-nav .menu > li + li {
		border-top: 1px solid rgba(0, 0, 0, 0.05);
	}
	.main-nav .menu > li > a > span {
		display: inline;
		padding: 0;
		line-height: 52px;
		border: 0;
	}
	.site-header.is-scrolled .site-logo {
		padding: 5px 0;
	}
	.site-header.is-scrolled .main-nav .menu > li > a {
		padding: 0 25px;
	}
}

/* ---- Contenuto ---- */
#content {
	display: block;
	width: 100%;
	padding-top: 0;
	background: #fff;
	position: relative;
}
/* spazio sopra: solo home, pagine di testo, ricerca, 404 (le altre pagine partono subito sotto l'header) */
.home #content,
.page-template-default #content,
.search #content,
.archive #content,
.error404 #content,
.blog #content {
	padding-top: 30px;
}
/* spazio finale (come la riga vuota di fine pagina del sito originale) */
#content::after {
	content: "";
	display: block;
	height: 40px;
}

/* Griglia semplice: 1 sezione > .cds-wrap > colonne */
.cds-section {
	position: relative;
}
.cds-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	max-width: var(--wrap);
	margin: 0 auto;
}
.cds-section--full > .cds-wrap {
	max-width: none;
}
.cds-col {
	min-width: 0;
	position: relative;
}
.cds-col__in {
	margin: 0 var(--gap) 40px;
	position: relative;
}
.cds-section--flush .cds-col__in {
	margin: 0;
}
.w-1 { width: 100%; }
.w-1-2 { width: 50%; }
.w-1-3 { width: 33.333%; }
.w-2-5 { width: 40%; }
.w-1-4 { width: 25%; }
.w-1-5 { width: 20%; }
.w-1-6 { width: 16.666%; }
.align-center { text-align: center; }
.align-left { text-align: left; }
.cds-space { display: block; height: 0; width: 100%; }

/* Sezioni "equal height": le colonne si allungano alla piu' alta */
.cds-section--equal .cds-wrap {
	align-items: stretch;
}
.cds-section--equal .cds-col {
	display: flex;
}
.cds-section--equal .cds-col__in {
	flex: 1 1 auto;
}

@media (max-width: 767px) {
	.cds-wrap {
		padding-left: 33px;
		padding-right: 33px;
	}
	.cds-section--full > .cds-wrap {
		padding-left: 0;
		padding-right: 0;
	}
	.cds-col {
		width: 100% !important;
	}
}

/* Pagine di testo (Privacy, Cookie) */
.cds-section--text .the-content {
	width: 98%;
	margin: 0 1% 15px;
}
.the-content ul,
.the-content ol {
	margin: 0 0 15px 30px;
}
.the-content ul { list-style: disc outside; }
.the-content ol { list-style: decimal; }
.the-content li { margin-bottom: 10px; }

/* Bottone generico */
.cds-button {
	display: inline-block;
	padding: 16px 20px;
	border-radius: 5px;
	background: #000;
	color: #fff;
	font-size: 14px;
	line-height: 1;
	text-align: center;
	transition: background 0.2s;
}
.cds-button:hover {
	background: #333;
	color: #fff;
	text-decoration: none;
}

/* 404 */
.error-404 {
	text-align: center;
	padding: 60px 12px 40px;
}
.error-404__code {
	margin: 0;
	font-family: var(--f-head);
	font-size: 120px;
	line-height: 1;
	color: var(--c-gold);
}

/* Icone social inline */
.social-icons a {
	display: inline-block;
	color: inherit;
	margin-right: 8px;
}
.social-icons svg {
	display: block;
	width: 1em;
	height: 1em;
}

/* Newsletter (blocco riusabile) */
.cds-newsletter .cds-col__in {
	padding: 40px 0;
}
.cds-newsletter__form {
	max-width: 420px;
	margin: 20px auto 0;
	text-align: left;
}

/* Campi dei form (stile Betheme) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="url"],
textarea,
select {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0 0 20px;
	padding: 10px;
	border: 1px solid #ebebeb;
	border-radius: 0;
	background: #fff;
	color: var(--c-text);
	font-family: var(--f-body);
	font-size: 15px;
	-webkit-appearance: none;
	appearance: none;
}
textarea { min-height: 60px; line-height: 20px; }
label { display: block; margin-bottom: 5px; font-weight: 500; }

/* ---- Footer ---- */
.site-footer {
	background: #fff;
	color: var(--c-footer);
	position: relative;
}
.site-footer a,
.site-footer a:hover {
	color: var(--c-footer);
}
.site-footer h2 {
	color: var(--c-footer);
}
.footer-widgets {
	padding: 15px 0;
}
.footer-widgets__inner {
	display: flex;
	flex-wrap: wrap;
	max-width: var(--wrap);
	margin: 0 auto;
}
.footer-col {
	width: 33.333%;
}
.footer-col .widget {
	margin: 30px var(--gap);
	position: relative;
}
.footer-col .social-icons {
	margin: 0;
	font-size: 32px;
	line-height: 29px;
	font-family: var(--f-head);
}
.footer-col .search-form .field {
	margin: 0;
}
.footer-copy {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-copy__inner {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 30px var(--gap) 0;
	margin-bottom: 20px;
	min-height: 63px;
}
.footer-copy .copyright {
	float: left;
}
.back-to-top {
	float: right;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin: -9px 0 0 12px;
	border-radius: 5px;
	background: #dbdddf;
	color: #65666c !important;
}
.back-to-top svg {
	display: block;
	width: 20px;
	height: 20px;
}
.back-to-top:hover {
	background: #d3d3d3;
	text-decoration: none;
}
.footer-copy__inner::after {
	content: "";
	display: block;
	clear: both;
}
@media (max-width: 767px) {
	.footer-widgets__inner,
	.footer-copy__inner {
		padding-left: 33px;
		padding-right: 33px;
	}
	.footer-col {
		width: 100%;
	}
	.footer-col .widget {
		margin-left: 0;
		margin-right: 0;
	}
	.footer-col .social-icons {
		font-size: 24px;
	}
}
@media (max-width: 1239px) {
	.footer-col .social-icons { font-size: 27px; line-height: 25px; }
}


/* ==========================================================================
   Rifiniture mobile (solo schermi stretti o touch: il desktop non cambia)
   ========================================================================== */
@media (max-width: 959px) {
	/* campi a 16px: iOS non fa lo zoom automatico al tocco */
	input[type="text"],
	input[type="email"],
	input[type="tel"],
	input[type="search"],
	input[type="url"],
	input[type="date"],
	input[type="number"],
	textarea,
	select {
		font-size: 16px;
		min-height: 48px;
	}
	input[type="checkbox"],
	input[type="radio"] {
		width: 22px;
		height: 22px;
		margin: 2px 8px 0 0;
		accent-color: #001111;
	}
	/* pulsanti di invio dei form (Brevo e form del tema): grandi e a tutta larghezza */
	.sib-default-btn,
	input[type="submit"],
	button[type="submit"]:not(.screen-reader-text):not(.cky-btn) {
		display: block;
		width: 100%;
		margin-top: 16px;
		min-height: 52px;
		padding: 14px 20px;
		border: 0;
		border-radius: 5px;
		background: #000;
		color: #fff;
		font-family: var(--f-body);
		font-size: 16px;
		font-weight: 500;
		cursor: pointer;
	}
	/* messaggi di errore/successo dei form Brevo ben leggibili */
	.sib_signup_form .sib_msg_disp,
	.sib-form-message-panel {
		font-size: 15px;
		line-height: 22px;
	}

	/* link con area di tocco sufficiente (footer e testi legali) */
	.footer-col .widget p a,
	.footer-copy .copyright a {
		display: inline-block;
		padding: 8px 0;
		line-height: 1.3;
	}
	.footer-col .social-icons a {
		padding: 10px 12px 10px 0;
		margin-right: 0;
	}
	.footer-col .widget {
		margin-top: 20px;
		margin-bottom: 20px;
	}
	.footer-copy .copyright {
		float: none;
		line-height: 1.6;
	}
	.back-to-top {
		float: none;
		margin: 0 0 20px auto;
		width: 48px;
		height: 48px;
	}
	.footer-copy__inner {
		padding-bottom: calc(env(safe-area-inset-bottom) + 10px);
	}
	.footer-copy__inner {
		min-height: 0;
	}
	.error-404__code {
		font-size: 80px;
	}
	/* contatti: telefono, e-mail e social con area di tocco comoda */
	.ct-main h3 a {
		display: inline-block;
		padding: 8px 0;
	}
	.ct-main h2.social-icons a {
		padding: 10px 14px 10px 0;
	}
	.news-back {
		display: inline-block;
		padding: 10px 0;
	}
	/* testi legali: link lunghi vanno a capo e righe piu' arieggiate (bersagli di tocco) */
	.the-content {
		overflow-wrap: anywhere;
	}
	.the-content p,
	.the-content li {
		line-height: 1.75;
	}
	.the-content li {
		margin-bottom: 14px;
	}
}
/* Dispositivi touch: bersagli piu' comodi nel pulsante del menu e animazioni delicate */
@media (hover: none) {
	.cds-button,
	.home-button {
		min-height: 48px;
	}
}
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}