/* Sementi Bovo - base: font, reset, griglia, header/menu, pulsanti, footer, effetti */

/* Font self-hosted (solo pesi usati; Roboto e Roboto Condensed sono file variabili) */
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 600; font-display: swap; src: url(../fonts/barlow-condensed-600-italic.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: italic; font-weight: 700; font-display: swap; src: url(../fonts/barlow-condensed-700-italic.woff2) format("woff2"); }
@font-face { font-family: "Roboto Condensed"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/roboto-condensed-var.woff2) format("woff2"); }
@font-face { font-family: "Roboto Condensed"; font-style: italic; font-weight: 400 700; font-display: swap; src: url(../fonts/roboto-condensed-var-italic.woff2) format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(../fonts/roboto-var.woff2) format("woff2"); }

:root {
	--sb-brown: #66514c;
	--sb-green: #9cc623;
	--sb-green-dark: #6d8a1c;
	--sb-orange: #ec8d4b;
	--sb-cream: #fbf7f2;
	--sb-cream-2: #fbf5ef;
	--sb-footer: #323c31;
	--sb-dd-text: #33373d;
	--sb-dd-active: #3f444b;
	--sb-f-title: "Barlow Condensed", "Arial Narrow", sans-serif;
	--sb-f-text: "Roboto Condensed", "Arial Narrow", sans-serif;
	/* Colore richiesto dal CSS del banner CookieYes di MG Toolkit (prima veniva dal kit Elementor) */
	--e-global-color-primary: #6EC1E4;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: #333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.5; }
img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
h1, h2, h3, h4, p { margin: 0; font-weight: inherit; font-size: inherit; line-height: inherit; }
a { color: var(--sb-green); text-decoration: none; background: transparent; }
a:hover { color: var(--sb-green-dark); }
.sb-skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }
.sb-skip:focus { left: 10px; }

/* Griglia (contenitore 1140, colonne con padding 10 come l'originale) */
.sb-wrap { max-width: 1140px; margin: 0 auto; }
.sb-col { padding: 10px; }
.sb-row { display: flex; flex-wrap: wrap; }
.sb-c33, .sb-c33x { flex: 0 0 33.333%; max-width: 33.333%; }
.sb-c33x { flex-basis: 33%; max-width: 33%; }
.sb-c50 { flex: 0 0 50%; max-width: 50%; }
.sb-c175 { flex: 0 0 17.5%; }
.sb-c165 { flex: 0 0 16.5%; }
.sb-center { text-align: center; }
@media (max-width: 1024px) { .sb-wrap { max-width: 1024px; } }
@media (max-width: 767px) {
	.sb-wrap { max-width: 767px; }
	.sb-c33, .sb-c33x, .sb-c50 { flex-basis: 100%; max-width: 100%; }
	.sb-empty { display: none; }
}

/* Titoli e sottotitoli di sezione */
.sb-title { font-family: var(--sb-f-title); font-size: 44px; font-weight: 700; font-style: italic; line-height: 60px; color: var(--sb-brown); text-align: center; }
.sb-subtitle { font-family: var(--sb-f-text); font-size: 20px; font-weight: 600; font-style: italic; letter-spacing: -0.3px; line-height: 30px; color: var(--sb-green); text-align: center; }
@media (max-width: 767px) {
	.sb-title { font-size: 32px; line-height: 32px; }
	.sb-subtitle { font-size: 18px; line-height: 18px; margin-top: 10px; }
}

/* Pulsante verde */
.sb-btn { display: inline-block; background: var(--sb-green); color: #fff; font-family: var(--sb-f-text); font-size: 14px; font-weight: 600; line-height: 1.7em; letter-spacing: 0.6px; border-radius: 60px; padding: 10px 30px; text-align: center; transition: all .3s; }
.sb-btn__txt { display: flex; justify-content: center; }
.sb-btn:hover, .sb-btn:focus { background: var(--sb-orange); color: #fff; }
@media (max-width: 767px) { .sb-btn { font-size: 12px; } }

/* ===== Header ===== */
.sb-header { position: relative; z-index: 50; background: transparent; }
.sb-header__row { display: flex; align-items: center; }
.sb-header__logo { flex: 0 0 10%; max-width: 10%; padding: 10px; text-align: center; }
.sb-header__logo a { display: block; }
.sb-logo { width: 100%; max-width: 100px; height: auto; }
.sb-header__nav { flex: 0 0 90%; max-width: 90%; padding: 10px; }
.sb-toggle { display: none; }

.sb-menu, .sb-menu ul { list-style: none; margin: 0; padding: 0; }
.sb-menu a { display: flex; align-items: center; font-family: var(--sb-f-text); font-size: 18px; line-height: 20px; }
.sub-arrow { display: inline-flex; align-items: center; padding: 10px 0 10px 10px; margin: -10px 0; }
.sub-arrow svg { width: 11px; height: 18px; }

/* Desktop: menu orizzontale allineato a destra, sottomenu a comparsa */
@media (min-width: 1025px) {
	.sb-menu { display: flex; justify-content: flex-end; flex-wrap: wrap; }
	.sb-menu > li { position: relative; }
	.sb-menu > li > a { padding: 2px 20px; font-weight: 600; color: var(--sb-brown); transition: .4s; }
	.sb-menu > li > a { background: transparent; outline-offset: 2px; }
	.sb-menu > li > a:hover, .sb-menu > li > a:focus, .sb-menu > li.current-menu-item > a, .sb-menu > li.current-menu-ancestor > a, .sb-menu > li.is-open > a { color: var(--sb-green); background: transparent; }
	.sb-menu > li > a:focus:not(:focus-visible) { outline: none; }
	.sb-menu .sub-menu .current-menu-item > a { background: transparent; color: var(--sb-green); }
	.sb-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; z-index: 60; background: #fff; font-size: 13px; min-width: 10em; }
	.sb-menu > li.is-open > .sub-menu, .sb-menu > li:focus-within > .sub-menu { display: block; }
	.sb-menu .sub-menu a { font-family: Roboto, Arial, sans-serif; font-size: 13px; font-weight: 500; line-height: 20px; padding: 13px 20px; border-left: 8px solid transparent; color: var(--sb-dd-text); white-space: nowrap; transition: .4s; }
	.sb-menu .sub-menu a:hover, .sb-menu .sub-menu a:focus { background: var(--sb-dd-active); color: #fff; }
}

/* Fino a 1024: hamburger centrato e pannello nel flusso (scaleY + max-height 0.3s) */
@media (max-width: 1024px) {
	.sb-header__logo { flex-basis: 10%; max-width: 10%; }
	.sb-toggle { display: flex; align-items: center; justify-content: center; margin: 0 auto; padding: 5.5px; border: 0; border-radius: 3px; background: rgba(0, 0, 0, .05); color: var(--sb-dd-text); cursor: pointer; font-size: 22px; }
	.sb-toggle svg { width: 22px; height: 22px; }
	/* Test mobile: area di tocco 45px senza cambiare l'aspetto (33px visibili) */
	.sb-toggle { position: relative; }
	.sb-toggle::after { content: ""; position: absolute; inset: -6px; }
	.sb-toggle__close, .sb-toggle[aria-expanded="true"] .sb-toggle__open { display: none; }
	.sb-toggle[aria-expanded="true"] .sb-toggle__close { display: block; }
	.sb-nav { margin-top: 10px; max-height: 0; overflow: hidden; transform: scaleY(0); transform-origin: top; transition: max-height .3s, transform .3s; background: #fff; }
	.sb-nav.is-open { max-height: 1000px; transform: scaleY(1); }
	.sb-menu a { padding: 10px 20px; border-left: 8px solid transparent; font-weight: 500; color: var(--sb-dd-text); background: #fff; }
	.sb-menu a:hover, .sb-menu a:focus-visible { background: var(--sb-dd-active); color: #fff; }
	/* Voce attiva: solo testo verde, nessun riquadro (richiesta utente, come l'originale) */
	.sb-menu .current-menu-item > a, .sb-menu .current-menu-ancestor > a { background: #fff; color: var(--sb-green); }
	.sb-menu .sub-menu { display: none; overflow: hidden; }
	.sb-menu .sub-menu a { font-family: Roboto, Arial, sans-serif; font-size: 11.05px; border-left-width: 16px; }
}
@media (max-width: 767px) {
	.sb-header__row { flex-wrap: wrap; }
	.sb-header__logo, .sb-header__nav { flex-basis: 100%; max-width: 100%; }
}

/* ===== Footer ===== */
.sb-footer { background: var(--sb-footer); padding: 50px 0; }
.sb-footer__txt { font-family: var(--sb-f-text); font-size: 16px; line-height: 26px; color: #fff; text-align: center; }
@media (max-width: 1024px) { .sb-footer { padding: 30px 25px; } }
@media (max-width: 767px) { .sb-footer { padding: 30px 20px; } }
/* Test mobile: link del footer (in linea) con area di tocco >= 40px, il padding verticale non sposta il testo */
@media (max-width: 1024px) { .sb-footer a { padding: 11px 0; } }

/* ===== Componenti comuni delle pagine interne ===== */
/* Testata: sfondo come l'originale (auto, 0 0), titolo 60px e sottotitolo */
.sb-page-hero { background: var(--sb-bg) 0 0 / auto repeat; padding: 80px 0 90px; color: #fff; text-align: center; }
.sb-page-hero--left { background-position: left center; }
.sb-page-hero__titolo { font-family: var(--sb-f-title); font-size: 60px; font-weight: 700; font-style: italic; line-height: 60px; letter-spacing: 1px; }
.sb-page-hero__sotto { margin-top: 6px; font-family: var(--sb-f-text); font-size: 20px; font-weight: 600; font-style: italic; letter-spacing: .3px; line-height: 30px; }
@media (max-width: 767px) {
	.sb-page-hero { background-position: center center; }
	.sb-page-hero > .sb-col { padding: 0; }
	.sb-page-hero__titolo { font-size: 36px; line-height: 36px; }
	.sb-page-hero__sotto { margin-top: 10px; font-size: 18px; line-height: 18px; }
}
/* Riquadri servizio (Azienda, Servizi): immagine con oscillazione, titolo e testo */
.sb-scard__media { text-align: center; }
.sb-scard__media:hover img { filter: brightness(80%); }
.sb-scard__body { background: var(--sb-cream-2); padding: 10px; }
.sb-scard__title { position: relative; background: #fff; margin-top: -40px; padding: 22px 0 10px; font-family: var(--sb-f-title); font-size: 30px; font-weight: 700; font-style: italic; line-height: 1.5; color: var(--sb-brown); text-align: center; }
.sb-scard__txt { background: #fff; padding: 1px 20px 30px; font-family: var(--sb-f-text); font-size: 18px; line-height: 26px; color: #7a7a7a; text-align: center; }
@media (max-width: 767px) {
	.sb-scard__title { font-size: 28px; }
	.sb-scard__txt { font-size: 16px; line-height: 22px; }
}
/* Fascia foto finale (stessa immagine e regole della home) */
.sb-fascia { height: 460px; background: var(--sb-bg) 0 0 / auto repeat; }
@media (max-width: 767px) { .sb-fascia { height: 160px; background-position: 100% 50%; } }

/* Pagine generiche (in attesa dei template dedicati) */
.sb-generic { padding: 40px 10px; font-family: var(--sb-f-text); color: var(--sb-brown); }
.sb-generic__title { font-family: var(--sb-f-title); font-style: italic; font-weight: 700; font-size: 44px; line-height: 1.3; margin-bottom: 20px; }

/* ===== Effetti al passaggio del mouse (copiati da Elementor) ===== */
.sb-hang:hover { animation-name: sb-hang-sink, sb-hang; animation-duration: .3s, 1.5s; animation-delay: 0s, .3s; animation-timing-function: ease-out, ease-in-out; animation-iteration-count: 1, infinite; animation-fill-mode: forwards; animation-direction: normal, alternate; }
@keyframes sb-hang { 0% { transform: translateY(8px); } 50% { transform: translateY(4px); } 100% { transform: translateY(8px); } }
@keyframes sb-hang-sink { 100% { transform: translateY(8px); } }
.sb-wobble:hover { animation: sb-wobble-h 1s ease-in-out 1; }
@keyframes sb-wobble-h { 16.65% { transform: translateX(8px); } 33.3% { transform: translateX(-6px); } 49.95% { transform: translateX(4px); } 66.6% { transform: translateX(-2px); } 83.25% { transform: translateX(1px); } 100% { transform: translateX(0); } }
.sb-pulse:hover { animation: sb-pulse 1s linear infinite; }
@keyframes sb-pulse { 25% { transform: scale(1.1); } 75% { transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.sb-hang:hover, .sb-wobble:hover, .sb-pulse:hover { animation: none; }
	.sb-nav { transition: none; }
}
