/* AgriKompas – header, footer, layout del sito (non usato nell'editor) */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
a { text-decoration: none; }
.ak-content a:not(.wp-block-button__link):hover { text-decoration: underline; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed !important; left: 10px; top: 10px; width: auto; height: auto; margin: 0; padding: 10px 14px; clip: auto; background: #fff; color: #333; z-index: 100000; }

.ak-row { max-width: 1060px; margin: 0 auto; }
.site { overflow-x: clip; }

/* ---------- Barra superiore ---------- */
.header-top { background: #875e3d; color: #fff; font-size: 14px; padding: 0 30px; }
.header-top__row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.header-top__contact { line-height: 30px; }
.header-top__social { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; }
.header-top__social a { display: block; width: 16px; height: 16px; color: #fff; }
.header-top__social svg { display: block; width: 16px; height: 16px; }
.header-top__social a:hover { opacity: .8; }

/* ---------- Header principale ---------- */
.header-main { background: #fff; padding: 0 30px; border-bottom: 1px solid transparent; position: relative; z-index: 50; }
.header-main__row { display: flex; justify-content: space-between; align-items: flex-start; min-height: 162px; }
.site-logo { display: block; margin: 10px 0; flex: 0 0 auto; }
.site-logo img { display: block; }
.site-logo__mobile { display: none !important; }

.primary-nav { align-self: stretch; display: flex; align-items: center; }
.primary-menu { display: flex; align-items: center; gap: 35px; margin: 0; padding: 0; list-style: none; }
.primary-menu li { margin: 0; padding: 0; }
.primary-menu a { display: block; color: #875e3d; font-weight: 700; font-size: 18px; line-height: 18px; transition: color .2s; }
.primary-menu li:not(.menu-btn) > a:hover,
.primary-menu li.current-menu-item:not(.menu-btn) > a { color: #333; }
.primary-menu .menu-btn > a { font-family: var(--wp--preset--font-family--poppins); font-weight: 600; color: #fff; background: #6e9c46; border: 1px solid #fff; border-radius: 2px; text-transform: none; transition: background-color .2s, color .2s; }
.primary-menu .menu-btn--md > a { font-size: 13px; line-height: 16px; padding: 11px 23px; }
.primary-menu .menu-btn--lg > a { font-size: 14px; line-height: 17px; padding: 13px 29px; }
.primary-menu .menu-btn--brown > a { background: #875e3d; }
.primary-menu .menu-btn > a:hover { background: #fff; color: #6e9c46; border-color: #6e9c46; }
.primary-menu .menu-btn--brown > a:hover { color: #875e3d; border-color: #875e3d; }

.nav-toggle { display: none; }
.primary-nav__foot { display: none; }

/* Header "sticky" (come Avada): si rimpicciolisce allo scroll */
.site-header { display: contents; }
.header-main { position: sticky; top: 0; z-index: 1000; }
[id] { scroll-margin-top: 100px; }
.site-header.is-stuck .header-main { box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.site-header.is-stuck .header-main__row { min-height: 90px; }
.site-header.is-stuck .site-logo { margin: 5px 0; }
.site-header.is-stuck .site-logo img { height: 80px; width: auto; }

/* ---------- Pagine ---------- */
.site-main { display: block; }
.ak-content > :not(.alignfull) { width: min(1060px, calc(100% - 60px)); margin-left: auto; margin-right: auto; }
.ak-content:not(:has(> .alignfull:first-child)) { padding: 50px 0; }
.ak-content::after { content: ""; display: table; clear: both; }
.ak-content-area { padding: 50px 30px; }
.entry-title { margin-top: 0; }
.alignfull { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }

/* ---------- Footer ---------- */
.site-footer { background: #875e3d; border-top: 1px solid #fff; padding: 20px 30px 30px; color: #fff; font-size: 13px; line-height: 1.5; text-align: center; }
.site-footer a { color: #fff; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__text img { display: inline; margin: 0 5px; vertical-align: text-bottom; }

/* ---------- Mobile / tablet (<= 1060px, come Avada) ---------- */
@media (max-width: 1060px) {
	.header-top { padding: 0; }
	.header-top__row { display: block; padding: 0 0 8px; }
	.header-top__contact { height: 38px; line-height: 38px; text-align: center; }
	.header-top__social { justify-content: center; height: 22px; gap: 30px; margin-top: 12px; }
	.header-top__social a, .header-top__social svg { width: 16px; height: 16px; }

	.header-main__row { display: block; position: relative; min-height: 0; padding: 20px 0; }
	.site-logo { margin: 0; }
	.site-logo__desktop { display: none !important; }
	.site-logo__mobile { display: block !important; }
	.site-header.is-stuck .site-logo img { height: auto; }
	.site-header.is-stuck .header-main__row { min-height: 0; }

	.site-logo__mobile { width: 133px; height: auto; }
	.nav-toggle { display: flex; align-items: center; gap: 10px; position: absolute; top: 38px; right: 0; z-index: 12; height: 24px; padding: 0; margin: 0; background: none; border: 0; cursor: pointer; color: #875e3d; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 24px; transition: color .3s; }
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 3px; background: currentColor; transition: transform .3s, top .3s, background-color .3s; }
	.nav-toggle__bars { position: relative; margin-right: 3px; }
	.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle__bars::before { top: -6px; }
	.nav-toggle__bars::after { top: 6px; }
	.nav-toggle__label .is-open { display: none; }
	.nav-toggle[aria-expanded="true"] { color: #fff; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__label .is-open { display: inline; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__label .is-closed { display: none; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background-color: transparent; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

	/* Menu a tutto schermo */
	html.menu-open, html.menu-open body { overflow: hidden; }
	html.menu-open #callnowbutton { display: none; }
	.primary-nav {
		position: fixed; inset: 0; z-index: 10; margin: 0; padding: 110px 30px 40px;
		display: flex; flex-direction: column; justify-content: center; align-items: center; align-self: auto;
		background: linear-gradient(160deg, #96683f 0%, #875e3d 45%, #5e4029 100%);
		overflow-y: auto; overscroll-behavior: contain;
		opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
	}
	.primary-nav.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease; }
	.primary-nav::before { content: ""; position: absolute; left: 50%; top: 24px; width: 48px; height: 3px; margin-left: -24px; border-radius: 2px; background: #6e9c46; }

	.primary-menu { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; max-width: 420px; text-align: center; }
	.primary-menu li { width: 100%; opacity: 0; transform: translateY(16px); transition: opacity .35s ease, transform .35s ease; }
	.primary-nav.is-open .primary-menu li { opacity: 1; transform: none; }
	.primary-nav.is-open .primary-menu li:nth-child(1) { transition-delay: .08s; }
	.primary-nav.is-open .primary-menu li:nth-child(2) { transition-delay: .13s; }
	.primary-nav.is-open .primary-menu li:nth-child(3) { transition-delay: .18s; }
	.primary-nav.is-open .primary-menu li:nth-child(4) { transition-delay: .23s; }
	.primary-nav.is-open .primary-menu li:nth-child(5) { transition-delay: .28s; }
	.primary-menu a { padding: 10px 20px; font-family: var(--wp--preset--font-family--poppins); font-size: 26px; font-weight: 600; line-height: 1.3; color: #fff; text-align: center; border: 0; }
	.primary-menu li:not(.menu-btn) > a:hover, .primary-menu li.current-menu-item:not(.menu-btn) > a { color: #cfe5b4; background: none; }

	.primary-menu .menu-btn > a,
	.primary-menu .menu-btn--md > a,
	.primary-menu .menu-btn--lg > a { display: block; margin-top: 12px; padding: 14px 36px; font-family: var(--wp--preset--font-family--poppins); font-size: 17px; font-weight: 600; line-height: 1.2; color: #fff; background: #6e9c46; border: 2px solid #6e9c46; border-radius: 999px; }
	.primary-menu .menu-btn--brown > a { margin-top: 4px; color: #875e3d; background: #fff; border-color: #fff; }
	.primary-menu .menu-btn > a:hover { color: #6e9c46; background: #fff; border-color: #fff; }
	.primary-menu .menu-btn--brown > a:hover { color: #fff; background: transparent; border-color: #fff; }

	.primary-nav__foot { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 36px; padding-top: 26px; width: 100%; max-width: 420px; border-top: 1px solid rgba(255, 255, 255, .25); color: #fff; font-size: 16px; opacity: 0; transition: opacity .4s ease .35s; }
	.primary-nav.is-open .primary-nav__foot { opacity: 1; }
	.primary-nav__foot a { color: #fff; }
	.primary-nav__social { display: flex; gap: 14px; margin: 10px 0 0; padding: 0; list-style: none; }
	.primary-nav__social a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 50%; }
	.primary-nav__social svg { width: 16px; height: 16px; }
}

/* 1001–1060px: header già "mobile" ma colonne ancora affiancate; barra superiore più bassa */
@media (min-width: 1001px) and (max-width: 1060px) {
	.header-top__contact { height: 30px; line-height: 30px; }
	.header-top__social { margin-top: 11px; }
	.header-top__row { padding-bottom: 9px; }
}
