/* ==========================================================================
   Val di Chienti Plast – stili del tema
   I colori arrivano da Aspetto → Personalizza come variabili CSS.
   ========================================================================== */

:root {
	--vctheme-header-bg: #f7f5f1;
	--vctheme-header-text: #1a1a1a;
	--vctheme-header-hover: #808080;
	--vctheme-submenu-bg: #f7f5f1;
	--vctheme-submenu-mobile-bg: #e5dfd2;
	--vctheme-footer-bg: #f7f1f3;
	--vctheme-footer-text: #666666;
	--vctheme-footer-link: #6f5c45;
	--vctheme-accent: #aa7f4b;
	--vctheme-accent-dark: #997243;
	--vctheme-logo-h: 132px;
	--vctheme-logo-h-mobile: 80px;
	--vctheme-eu-logo-w: 260px;
	--vctheme-header-maxw: 1600px;
	--vctheme-container: 1140px;
	--vctheme-font-body: "Montserrat", "Open Sans", Arial, sans-serif;
	--vctheme-font-heading: "Playfair Display", Georgia, serif;
	--vctheme-gutter: 20px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--vctheme-font-body);
	font-size: 16px;
	line-height: 1.6;
	color: #111111;
	background: #ffffff;
	-webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; }

a { color: var(--vctheme-accent); }
a:hover, a:focus { color: var(--vctheme-accent-dark); }

:focus-visible { outline: 2px solid var(--vctheme-accent); outline-offset: 2px; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto;
	left: 8px; top: 8px; z-index: 100000; padding: 12px 18px;
	background: #fff; color: #111; font-weight: 600; text-decoration: none;
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.vctheme-icon { width: 1em; height: 1em; fill: currentColor; flex: none; }

.vctheme-btn {
	display: inline-block; padding: 10px 22px; border-radius: 2px;
	background: var(--vctheme-accent); color: #fff; text-decoration: none;
	font-weight: 600; line-height: 1.4; transition: background .2s;
}
.vctheme-btn:hover, .vctheme-btn:focus { background: var(--vctheme-accent-dark); color: #fff; }

/* Le pagine Nicepage/Elementor gestiscono da sole margini e larghezza. */
.site-main--builder { display: block; }
.site-main--builder > :first-child { margin-top: 0; }

/* ==========================================================================
   Protezione header/footer dagli stili globali di Nicepage
   (Nicepage forza font-size e margini su a, p, ul, h1-h6).
   ========================================================================== */
#masthead a, #masthead p, #masthead ul, #masthead li,
#colophon a, #colophon p, #colophon ul, #colophon li,
#colophon h3 {
	font-size: inherit;
	line-height: inherit;
	letter-spacing: normal;
}
#masthead ul, #colophon ul { margin: 0; padding: 0; list-style: none; }
#masthead p, #colophon p { margin: 0; }
#masthead, #colophon { font-family: var(--vctheme-font-body); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.vctheme-header {
	position: relative;
	z-index: 100;
	background: var(--vctheme-header-bg);
	color: var(--vctheme-header-text);
}
.vctheme-sticky-header .vctheme-header { position: sticky; top: 0; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.admin-bar.vctheme-sticky-header .vctheme-header { top: 32px; }
@media (max-width: 782px) { .admin-bar.vctheme-sticky-header .vctheme-header { top: 46px; } }

.vctheme-header__inner {
	width: 95%;
	max-width: var(--vctheme-header-maxw);
	margin: 0 auto;
	padding: 22px 20px;
	display: flex;
	align-items: center;
	gap: 30px;
	min-height: 176px;
}

.vctheme-header__brand { flex: none; line-height: 0; }
.vctheme-header__brand .custom-logo-link { display: inline-block; }
.vctheme-header__brand .custom-logo {
	display: block;
	height: var(--vctheme-logo-h);
	width: auto;
	max-width: none;
}
.vctheme-site-title {
	font-family: var(--vctheme-font-heading);
	font-size: 1.5rem !important;
	line-height: 1.2 !important;
	color: var(--vctheme-header-text);
	text-decoration: none;
}

.vctheme-nav { flex: 1 1 auto; display: flex; align-items: center; }
.vctheme-nav__panel { display: flex; align-items: center; gap: 30px; width: 100%; }

/* Allineamento menu (Personalizza → Header) */
.vctheme-menu-center .vctheme-menu { justify-content: center; }
.vctheme-menu-right  .vctheme-menu { justify-content: flex-end; }
.vctheme-menu-left   .vctheme-menu { justify-content: flex-start; }

.vctheme-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 30px;
	flex: 1 1 auto;
	font-size: 1rem;
	font-weight: 400;
}
.vctheme-menu > li { position: relative; }

.vctheme-menu a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 0;
	color: var(--vctheme-header-text);
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: border-color .2s, color .2s;
}
#masthead .vctheme-menu > li > a { font-size: 1rem; line-height: 1.1; }

.vctheme-menu > li > a:hover,
.vctheme-menu > li > a:focus-visible { border-bottom-color: var(--vctheme-header-hover); color: var(--vctheme-header-text); }

.vctheme-menu > .current-menu-item > a,
.vctheme-menu > .current-menu-ancestor > a,
.vctheme-menu > .current_page_item > a { border-bottom-color: var(--vctheme-header-text); }

/* freccia sottomenu */
.vctheme-submenu-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	background: none; border: 0; padding: 4px; margin: 0 0 0 -4px;
	color: inherit; cursor: pointer; font-size: 14px;
}
.vctheme-submenu-toggle .vctheme-icon { transition: transform .2s; }
.vctheme-submenu-toggle[aria-expanded="true"] .vctheme-icon { transform: rotate(180deg); }
.vctheme-menu > li.menu-item-has-children { display: flex; align-items: center; }

/* Sottomenu desktop */
.vctheme-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: -11px;
	min-width: 230px;
	padding: 8px 0;
	background: var(--vctheme-submenu-bg);
	box-shadow: 3px 3px 5px 0 rgba(0,0,0,.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s, transform .2s, visibility .2s;
	z-index: 20;
}
.vctheme-menu .sub-menu .sub-menu { top: 0; left: 100%; }
.vctheme-menu li:hover > .sub-menu,
.vctheme-menu li:focus-within > .sub-menu,
.vctheme-menu li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.vctheme-menu .sub-menu a {
	display: block;
	padding: 10px 11px;
	border: 0;
	color: #4d4d4d;
	line-height: 1.1 !important;
	white-space: nowrap;
}
.vctheme-menu .sub-menu a:hover,
.vctheme-menu .sub-menu a:focus-visible,
.vctheme-menu .sub-menu .current-menu-item > a { color: var(--vctheme-header-text); background: rgba(0,0,0,.04); }

/* Selettore lingua GTranslate: ultima voce del menu, allineata alle altre */
.vctheme-menu li.menu-item-gtranslate a { border-bottom: 0 !important; }

.vctheme-header__cta { flex: none; }

/* Hamburger (nascosto su desktop) */
.vctheme-nav__toggle, .vctheme-nav__close {
	display: none;
	background: none; border: 0; padding: 8px; cursor: pointer;
	color: var(--vctheme-header-text); font-size: 28px; line-height: 0;
}

/* ---------- Mobile / tablet ---------- */
@media (max-width: 1199px) {
	.vctheme-header__inner { min-height: 0; padding: 15px 20px; justify-content: space-between; }
	.vctheme-header__brand .custom-logo { height: var(--vctheme-logo-h-mobile); }
	.vctheme-nav { flex: none; }
	.vctheme-nav__toggle { display: inline-flex; }

	.vctheme-nav__panel {
		position: fixed;
		top: 0; right: 0; bottom: 0;
		width: min(360px, 88vw);
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
		padding: 70px 24px 40px;
		background: var(--vctheme-header-bg);
		overflow-y: auto;
		transform: translateX(100%);
		transition: transform .3s ease;
		z-index: 1001;
		text-align: center;
	}
	.vctheme-nav.is-open .vctheme-nav__panel { transform: none; box-shadow: -6px 0 24px rgba(0,0,0,.12); }

	.vctheme-nav__close { display: inline-flex; position: absolute; top: 14px; right: 14px; }

	.vctheme-nav__overlay {
		position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1000;
	}
	.vctheme-nav__overlay[hidden] { display: none; }

	.vctheme-menu { flex-direction: column; align-items: stretch; gap: 0; flex: none; }
	.vctheme-menu > li { display: block !important; text-align: center; }
	.vctheme-menu > li > a { justify-content: center; padding: 12px 0; }
	#masthead .vctheme-menu > li > a { font-size: 1.25rem; }
	.vctheme-menu > li > a:hover { border-bottom-color: transparent; color: var(--vctheme-header-hover); }

	.vctheme-menu li.menu-item-has-children > a { display: inline-flex; }
	.vctheme-submenu-toggle { font-size: 18px; margin: 0; vertical-align: middle; }

	.vctheme-menu .sub-menu {
		position: static;
		display: none;
		opacity: 1; visibility: visible; transform: none;
		min-width: 0;
		margin: 4px 0 10px;
		padding: 10px 0;
		background: var(--vctheme-submenu-mobile-bg);
		border-radius: 8px;
		box-shadow: none;
	}
	.vctheme-menu li.is-open > .sub-menu { display: block; }
	.vctheme-menu .sub-menu a { white-space: normal; text-align: center; font-size: 1rem !important; }

	.vctheme-menu li.menu-item-gtranslate { display: flex !important; justify-content: center; margin: 15px auto 0; }

	body.vctheme-menu-open { overflow: hidden; }
}

/* ==========================================================================
   CONTENUTI DEL TEMA (pagine non-builder, articoli, archivi)
   ========================================================================== */
.vctheme-container { width: 100%; max-width: calc(var(--vctheme-container) + 2 * var(--vctheme-gutter)); margin: 0 auto; padding: 60px var(--vctheme-gutter); }
.vctheme-container--narrow { max-width: calc(820px + 2 * var(--vctheme-gutter)); }

.entry-title {
	font-family: var(--vctheme-font-heading);
	font-weight: 400;
	font-size: clamp(2rem, 4vw, 2.625rem);
	line-height: 1.15;
	color: #32373c;
	margin: 0 0 30px;
	text-align: center;
}
.entry-meta { color: #808080; font-size: .875rem; margin: 0 0 10px; }
.entry-thumb { margin: 0 0 30px; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2, .entry-content h3 { font-family: var(--vctheme-font-heading); font-weight: 400; }

.vctheme-archive-header { margin-bottom: 30px; text-align: center; }
.vctheme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.vctheme-card { background: #fff; display: flex; flex-direction: column; }
.vctheme-card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #f7f1f3; display: block; }
.vctheme-card__body { padding: 18px 0; }
.vctheme-card__title { font-family: var(--vctheme-font-heading); font-weight: 400; font-size: 1.375rem; line-height: 1.25; margin: 0 0 10px; text-transform: none; }
.vctheme-card__title a { color: #111; text-decoration: none; }
.vctheme-card__excerpt { font-size: 14px; line-height: 1.6; color: #444; }
.vctheme-card__more { font-weight: 600; font-size: 14px; text-decoration: none; }

.pagination, .post-navigation { margin-top: 40px; }
.nav-links { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-numbers { padding: 6px 12px; text-decoration: none; }
.page-numbers.current { background: var(--vctheme-accent); color: #fff; }

.search-form { display: flex; gap: 8px; max-width: 480px; margin: 20px 0; }
.search-field { flex: 1; padding: 10px 12px; border: 1px solid #ccc; border-radius: 4px; font: inherit; }
.search-submit { padding: 10px 18px; border: 0; background: var(--vctheme-accent); color: #fff; font: inherit; cursor: pointer; }
.vctheme-404 { text-align: center; }
.vctheme-404 .search-form { margin: 20px auto; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.vctheme-footer {
	background: var(--vctheme-footer-bg);
	color: var(--vctheme-footer-text);
	font-size: 15px;
	line-height: 1.6;
}
.vctheme-footer a { color: var(--vctheme-footer-link); text-decoration: none; }
.vctheme-footer a:hover, .vctheme-footer a:focus-visible { text-decoration: underline; color: var(--vctheme-footer-link); }

.vctheme-footer__widgets,
.vctheme-footer__inner {
	width: 100%;
	max-width: calc(var(--vctheme-container) + 2 * var(--vctheme-gutter));
	margin: 0 auto;
	padding-left: var(--vctheme-gutter);
	padding-right: var(--vctheme-gutter);
}

.vctheme-footer__widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 30px;
	padding-top: 40px;
	padding-bottom: 10px;
}
#colophon .widget-title { font-family: var(--vctheme-font-heading); font-size: 1.25rem; font-weight: 400; margin: 0 0 12px; color: #111; }

.vctheme-footer__inner { padding-top: 34px; padding-bottom: 34px; }

.vctheme-footer__contacts {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 28px;
	padding-bottom: 24px !important;
	margin-bottom: 28px !important;
	border-bottom: 1px solid rgba(0,0,0,.08);
	font-size: 14px;
}
.vctheme-footer__contacts li { display: inline-flex; align-items: center; gap: 8px; }
.vctheme-footer__contacts .vctheme-icon { color: var(--vctheme-accent); font-size: 16px; }
.vctheme-footer__hours { font-weight: 600; }

.vctheme-footer__main {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 30px;
}
.vctheme-footer__col--legal { font-size: 14px; }
.vctheme-footer__col--legal p + p { margin-top: 4px !important; }
.vctheme-footer__col--center { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.vctheme-footer__col--eu { display: flex; justify-content: flex-end; }

.vctheme-footer__signature { display: block; width: 258px; max-width: 100%; height: auto; }

.vctheme-footer-nav ul { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px !important; }

.vctheme-social { display: flex !important; gap: 12px; }
.vctheme-social a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; height: 32px; border-radius: 50%;
	background: var(--vctheme-footer-text); color: #fff !important;
	transition: background .2s, transform .2s;
}
.vctheme-social a:hover, .vctheme-social a:focus-visible { background: var(--vctheme-accent); transform: translateY(-2px); text-decoration: none; }
.vctheme-social .vctheme-icon { width: 16px; height: 16px; }

.vctheme-eu { text-align: center; max-width: var(--vctheme-eu-logo-w); }
.vctheme-eu img { display: block; width: var(--vctheme-eu-logo-w); max-width: 100%; height: auto; background: #fff; }
.vctheme-eu__note { margin-top: 8px; font-size: 12px; line-height: 1.4; }
.vctheme-eu__note p { margin: 0; }

@media (max-width: 991px) {
	.vctheme-footer__main { grid-template-columns: 1fr; text-align: center; }
	.vctheme-footer__col--eu { justify-content: center; }
	.vctheme-footer__col--legal { order: 3; }
	.vctheme-footer-nav ul { justify-content: center; }
	.vctheme-footer__contacts { flex-direction: column; align-items: center; }
}

/* ==========================================================================
   Pulsante WhatsApp
   ========================================================================== */
.vctheme-wa-float {
	position: fixed; right: 20px; bottom: 20px; z-index: 9999;
	width: 60px; height: 60px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: #25d366; color: #fff;
	box-shadow: 2px 4px 10px rgba(0,0,0,.3);
	transition: transform .2s, background .2s;
}
.vctheme-wa-float:hover, .vctheme-wa-float:focus-visible { transform: scale(1.1); background: #20ba5a; color: #fff; }
.vctheme-wa-float .vctheme-icon { width: 32px; height: 32px; }
@media (max-width: 768px) {
	.vctheme-wa-float { right: 15px; bottom: 15px; width: 50px; height: 50px; }
	.vctheme-wa-float .vctheme-icon { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Ritocchi */
.vctheme-footer__contacts li { justify-content: center; text-align: center; }
body.vctheme-menu-open .vctheme-wa-float { display: none; }
.vctheme-footer__signature-link, .vctheme-eu__link { display: inline-block; transition: opacity .2s; } .vctheme-footer__signature-link:hover, .vctheme-eu__link:hover { opacity: .8; }

/* ==========================================================================
   GTranslate nel menu
   Gli stili del menu valgono SOLO per la voce "Italiano ▼" (a.gt_switcher-popup),
   non per i link dentro la finestra delle lingue (.gt_white_content).
   ========================================================================== */
.vctheme-gtranslate { display: flex; align-items: center; position: relative; }
.vctheme-gtranslate .gtranslate_wrapper { display: inline-flex; align-items: center; }

#masthead .vctheme-menu li.menu-item-gtranslate { font-family: var(--vctheme-font-body); }
#masthead .vctheme-menu li.menu-item-gtranslate a.gt_switcher-popup {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 0;
	font-size: 1rem;
	line-height: 1.1;
	color: var(--vctheme-header-text);
	border-bottom: 2px solid transparent !important;
}
#masthead .vctheme-menu li.menu-item-gtranslate a.gt_switcher-popup img { width: 20px; height: 20px; }
#masthead .vctheme-menu li.menu-item-gtranslate a.gt_switcher-popup span { font-size: 1rem; line-height: 1.1; }
#masthead .vctheme-menu li.menu-item-gtranslate a.gt_switcher-popup span[style] { font-size: 8px !important; color: #666 !important; }
@media (max-width: 1199px) {
	#masthead .vctheme-menu li.menu-item-gtranslate a.gt_switcher-popup,
	#masthead .vctheme-menu li.menu-item-gtranslate a.gt_switcher-popup span:not([style]) { font-size: 1.25rem; }
}

/* Finestra delle lingue: ripristina l'aspetto originale di GTranslate */
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content,
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content * { text-align: left; }
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content .gt_languages { display: block; }
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content a.glink {
	display: block !important;
	padding: 10px 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-bottom: 1px solid #e7e7e7 !important;
	line-height: 0 !important;
	white-space: nowrap;
	gap: 0;
	color: #111 !important;
	background: transparent;
	font-size: 15px !important;
}
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content a.glink:hover,
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content a.gt-search-selected { background: #f5f5f5; }
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content a.glink img {
	display: inline; width: 24px; height: 24px; vertical-align: middle; margin: 0 !important;
}
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content a.glink span {
	font-size: 15px !important; line-height: 24px !important; vertical-align: middle; margin: 0 0 0 5px; color: #111 !important;
}
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content a.gt-current-lang span { font-weight: 700; }
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content .gt_search { display: flex; }
#masthead .vctheme-menu li.menu-item-gtranslate .gt_white_content input.gt_language_search { font-size: 14px; line-height: normal; }
/* La finestra deve stare sopra al pannello del menu mobile */
.vctheme-menu li.menu-item-gtranslate .gt_black_overlay { z-index: 100000 !important; }
.vctheme-menu li.menu-item-gtranslate .gt_white_content { z-index: 100001 !important; }
