/* ==========================================================================
   Novachem – foglio di stile principale
   ========================================================================== */

/* ---------- Font (self-hosted, nessuna richiesta verso terzi) ---------- */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sans-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/open-sans-700-normal.woff2") format("woff2"); }

/* ---------- Variabili ---------- */
:root {
	--orange: #fb5211;
	--blue: #2685c7;
	--text: #6c6c6c;
	--text-dark: #4a4a4a;
	--muted: #969696;
	--line: #d6d6d6;
	--bg: #eaeae9;
	--font-head: "Open Sans", Arial, Helvetica, sans-serif;
	--font-body: Arial, Helvetica, sans-serif;
	--container: 960px;
	--gutter: 10px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg) url("../img/body-tail.jpg");
	color: var(--text);
	font: 12px/21px var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
p { margin-bottom: 18px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.visually-hidden {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.center { text-align: center; }

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
}

/* ---------- Pulsanti ---------- */
.btn {
	display: inline-block;
	padding: 8px;
	background: var(--orange);
	color: #fff;
	font: 700 11px/13px var(--font-body);
	text-transform: uppercase;
}
.btn:hover, .btn:focus-visible { background: var(--text-dark); color: #fff; text-decoration: none; }
.btn-blue { background: var(--blue); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	border-top: 4px solid var(--orange);
	border-bottom: 2px solid var(--orange);
	background: url("../img/body-tail.jpg");
}
.header-inner {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-areas:
		"logo nav"
		"lang .";
	align-items: start;
	column-gap: 20px;
	padding-bottom: 6px;
}
.logo { grid-area: logo; margin-top: 8px; }
.logo img { width: 214px; }

.main-nav { grid-area: nav; justify-self: end; }
.main-nav ul { display: flex; }
.main-nav li { position: relative; }
.main-nav li + li::before {
	content: "";
	position: absolute; left: 0; top: 19px; bottom: 0;
	border-left: 1px solid #dcdcdc;
	box-shadow: -1px 0 0 #fff;
}
.main-nav a {
	display: block;
	padding: 16px 19px;
	color: var(--text-dark);
	font: 700 14px/28px var(--font-head);
	text-transform: uppercase;
	transition: background-color .2s, color .2s;
}
.main-nav a:hover, .main-nav a:focus-visible,
.main-nav .current a {
	background: var(--orange);
	color: #fff;
	text-decoration: none;
}

.lang-switch { grid-area: lang; display: flex; gap: 12px; align-self: center; margin: 8px 0 4px; padding-left: 10px; }
.lang-switch img { width: 18px; }

/* Pulsante menu mobile (nascosto su desktop) */
.nav-toggle { display: none; }

/* ==========================================================================
   Slider
   ========================================================================== */
.slider-wrap { border-bottom: 1px solid #fff; box-shadow: 0 1px 0 #ddd; }
.slider {
	position: relative;
	aspect-ratio: 940 / 300;
	background: #fff;
	overflow: hidden;
}
.slides, .slide { height: 100%; }
.slide {
	position: absolute; inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .7s ease, visibility 0s .7s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s ease; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.slide-caption {
	position: absolute; left: 0; right: 0; bottom: 0;
	margin: 0;
	font: 21px/23px var(--font-head);
}
.slide-caption a, .slide-caption span {
	display: block;
	padding: 10px 10px 10px 20px;
	background: var(--orange);
	color: #fff;
}
.slide-caption a:hover { text-decoration: none; background: #e2460b; }

.slider-nav {
	position: absolute; top: 50%;
	width: 46px; height: 46px; margin-top: -40px;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
	cursor: pointer;
	transition: background-color .2s;
}
.slider-nav::after {
	content: "";
	position: absolute; top: 50%; left: 50%;
	width: 9px; height: 9px;
	border: solid var(--text-dark); border-width: 2px 2px 0 0;
}
.slider-prev { left: 10px; }
.slider-next { right: 10px; }
.slider-prev::after { transform: translate(-30%, -50%) rotate(-135deg); }
.slider-next::after { transform: translate(-70%, -50%) rotate(45deg); }
.slider-nav:hover { background: #fff; }

/* ==========================================================================
   Contenuto (3 colonne)
   ========================================================================== */
.content {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr) 220px;
	gap: 20px;
	padding-top: 15px;
	padding-bottom: 22px;
}
/* Le colonne possono restringersi sotto la larghezza del loro contenuto (immagini larghe, parole lunghe) */
.content > * { min-width: 0; }

.col-title {
	margin-bottom: 20px;
	color: var(--text-dark);
	font: 600 22px/1.1 var(--font-head);
	text-transform: uppercase;
}

/* Menu prodotti */
.product-menu li {
	border-top: 1px solid #f9f9f9;
	border-bottom: 1px solid var(--line);
}
.product-menu li:first-child { border-top: 0; }
.product-menu a {
	display: block;
	padding: 12px 0 11px 15px;
	color: var(--text-dark);
	font: 700 12px/15px var(--font-body);
}
.product-menu .highlight a { padding-left: 28px; color: var(--orange); }
.product-menu a:hover, .product-menu a:focus-visible { color: var(--orange); text-decoration: none; background: rgba(255, 255, 255, .5); }

/* Colonna centrale */
.col-intro p { text-align: justify; }
.col-intro .center { text-align: center; }
.intro-title {
	padding: 3px 0 16px;
	text-align: center;
	color: var(--text);
	font: italic 400 16px/1.3 var(--font-head);
}
.col-intro strong { color: var(--text-dark); }

.security-box {
	padding: 0 10px 5px;
	border: 2px solid var(--blue);
}
.security-box p { font-size: 13px; }
.security-logo { display: block; width: 350px; max-width: 100%; margin: 0 auto 15px; }

/* News */
.news-list { margin-bottom: 20px; }
.news-list li {
	display: flex;
	gap: 10px;
	padding-bottom: 18px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--line);
}
.news-list time {
	flex: 0 0 45px;
	margin-top: 5px;
	color: var(--text-dark);
	font: 700 11px/14px var(--font-head);
	text-align: center;
	text-transform: uppercase;
	text-shadow: 0 0 3px rgba(0, 0, 0, .22);
}
.news-list time span {
	display: block;
	width: 32px; height: 33px;
	margin: 0 auto;
	padding-top: 3px;
	background: url("../img/time-bg.png") no-repeat;
	font-size: 12px; line-height: 33px;
}
.news-body h3 {
	margin-bottom: 5px;
	font: italic 700 13px/22px var(--font-head);
	text-transform: uppercase;
}
.news-body h3 a { color: var(--text); }
.news-body h3 a:hover { color: var(--orange); text-decoration: none; }
.news-body p { margin: 0; }
.news-body .more {
	display: inline-block;
	width: 13px; height: 5px;
	margin-left: 4px;
	border-bottom: 2px solid #8cc63f;
	vertical-align: middle;
}

/* ==========================================================================
   Pagine interne (2 colonne: contenuto + laterale)
   ========================================================================== */
.content-page {
	grid-template-columns: minmax(0, 1fr) 300px;
	column-gap: 40px;
	padding-top: 30px;
}
.content-page p { text-align: justify; }
.content-page strong { color: var(--text-dark); }
.img-center { margin: 0 auto 18px; }
.section-gap { margin-top: 30px; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #fff; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.05); opacity: .9; }

.doc-links { margin-bottom: 30px; }
.doc-links li { margin-bottom: 18px; }
.doc-links a { text-decoration: underline; }

.api-badge { margin: 0; text-align: center; }
.api-badge img { margin: 0 auto 30px; }
.api-badge figcaption { font-weight: 700; color: var(--text-dark); }

/* Pagina a due colonne uguali (Dove siamo) */
.content-halves { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; padding-top: 30px; }

.map {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	aspect-ratio: 430 / 233;
	margin-bottom: 30px;
	padding: 20px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, .6);
	text-align: center;
}
.map p { margin: 0; max-width: 340px; font-size: 11px; line-height: 16px; }
.map .btn { border: 0; cursor: pointer; }
.map.is-loaded { padding: 0; border: 0; display: block; }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }

.location address { font-style: normal; }
.address-name {
	min-height: 40px;
	padding: 0 0 0 60px;
	background: url("../img/address-icon.png") no-repeat 0 3px;
}
.address-info { padding-left: 60px; }
.address-info a { color: var(--text); }
.address-info a:hover { color: var(--orange); }

/* Pagina Contatti */
.contact-list { margin: 0 0 30px; }
.contact-list dt { font-weight: 700; color: var(--text-dark); }
.contact-list dd { margin: 0; }
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--orange); }
.content-halves .company-data { margin-bottom: 30px; text-align: left; }
.api-badge-left { width: 200px; }
.api-badge-left img { border-radius: 50%; }

.contact-form p { margin-bottom: 8px; text-align: justify; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
	width: 100%;
	max-width: 400px;
	padding: 5px;
	border: 1px solid #d8d8d8;
	background: rgba(255, 255, 255, .4);
	color: var(--text);
	font: 12px/16px var(--font-body);
}
.contact-form textarea { height: 255px; resize: vertical; }
.contact-form ::placeholder { color: var(--muted); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--orange); background: #fff; outline: none; }
.contact-form .hp { position: absolute; left: -9999px; }
.field-check { display: flex; gap: 8px; align-items: flex-start; margin: 15px 0; }
.field-check input { margin: 4px 0 0; accent-color: var(--orange); }
.form-actions { display: flex; gap: 15px; margin-top: 15px; }
.form-actions .btn { border: 0; cursor: pointer; }
.form-actions .btn[disabled] { opacity: .6; cursor: wait; }
.form-status { margin-top: 15px; padding: 10px; border-left: 4px solid #8cc63f; background: rgba(255, 255, 255, .6); color: var(--text-dark); }
.form-status.is-error { border-left-color: var(--orange); }

/* Pagina Prodotti */
.content-products { padding-top: 22px; padding-bottom: 22px; }
.innovative-box {
	margin: 0 0 20px;
	padding: 20px 12px 0;
	border: 4px solid #ff6600;
}
.product-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0 28px;
}
.product-card { margin-bottom: 25px; }
.product-img { display: block; margin-bottom: 25px; overflow: hidden; }
.product-img img { width: 100%; aspect-ratio: 300 / 179; object-fit: cover; transition: transform .3s; }
.product-img:hover img, .product-img:focus-visible img { transform: scale(1.04); }
.product-card h3 {
	margin-bottom: 5px;
	color: var(--text);
	font: italic 400 16px/22px var(--font-head);
	text-transform: uppercase;
}
.product-card p { margin-bottom: 8px; }
.product-card .new { color: #000; }
.product-list li {
	margin-bottom: 8px;
	padding-left: 15px;
	background: url("../img/list-arrow.gif") no-repeat 0 4px;
	color: #000;
	font-weight: 700;
	line-height: 15px;
}
.product-list a { display: block; color: #ff6600; }

/* Schede prodotto (contenuto + menu prodotti a destra) */
.content-product { grid-template-columns: minmax(0, 1fr) 220px; column-gap: 40px; padding-top: 30px; }
.product-page p { text-align: justify; }
.product-page .center { text-align: center; }
.product-page h3 {
	margin: 25px 0 8px;
	color: var(--text);
	font: italic 400 16px/22px var(--font-head);
	text-transform: uppercase;
}
.product-page h3 em { font-style: inherit; }
.product-page .hl { color: #ff6600; }
.product-page strong { color: var(--text-dark); }
.product-page .product-list li { margin-bottom: 10px; }
.product-page .product-list a { display: inline; color: inherit; }
.product-page .product-list a:hover .hl { text-decoration: underline; }
.product-page .product-list img { display: inline-block; margin-top: 4px; }
.doc-link { font-weight: 700; text-decoration: underline; }

.vc-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 20px; }
.vc-col-12 { grid-column: span 12; }
.vc-col-8 { grid-column: span 8; }
.vc-col-6 { grid-column: span 6; }
.vc-col-4 { grid-column: span 4; }
.vc-col-2 { grid-column: span 2; }
.vc-col > :last-child { margin-bottom: 18px; }

.img-block { margin: 0 0 15px; }
.img-block img { max-width: 100%; }
.img-block.align-center img { margin: 0 auto; }
.img-block.align-right img { margin-left: auto; }
.img-block .boxed { display: inline-block; border: 1px solid #000; line-height: 0; }
.img-block.align-center .boxed { display: table; margin: 0 auto; }
.vc-col-4 > .center { margin-bottom: 4px; }

.product-side .product-menu { margin-bottom: 40px; }
.product-menu .current > a { background: rgba(255, 255, 255, .6); color: var(--orange); }
.quick-contact > p { font-size: 12px; }
.contact-form-compact input[type="text"],
.contact-form-compact input[type="email"] { max-width: none; }
.contact-form-compact .form-actions { flex-wrap: wrap; }

/* News: data a calendario (stessa grafica del box News in home) */
.date-badge {
	flex: 0 0 55px;
	color: var(--text-dark);
	font: 700 11px/14px var(--font-head);
	text-align: center;
	text-transform: uppercase;
	text-shadow: 0 0 3px rgba(0, 0, 0, .22);
}
.date-badge span {
	display: block;
	width: 32px; height: 33px;
	margin: 0 auto;
	padding-top: 3px;
	background: url("../img/time-bg.png") no-repeat;
	font-size: 12px; line-height: 33px;
}
.date-badge small { display: block; font-size: 10px; font-weight: 400; }

/* News: elenco */
.news-feed li.news-item {
	display: flex;
	gap: 15px;
	padding-bottom: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--line);
}
.news-item .news-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.news-item h2 {
	margin-bottom: 6px;
	font: italic 400 16px/22px var(--font-head);
	text-transform: uppercase;
}
.news-item h2 a { color: var(--text); }
.news-item h2 a:hover { color: var(--orange); text-decoration: none; }
.news-item p { margin-bottom: 10px; text-align: justify; }

/* News: articolo */
.post-meta { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 20px; }
.post-meta h1 {
	padding-top: 4px;
	color: var(--text);
	font: italic 400 18px/24px var(--font-head);
	text-transform: uppercase;
}
.post-thumb { margin: 0 0 20px; }
.post-content { overflow-wrap: anywhere; }
.post-content p { text-align: justify; }
.post-content img { display: inline-block; vertical-align: middle; }
.post-content ul:not(.gallery) { margin: 0 0 18px 18px; list-style: disc; }
.post-content .gallery { margin-bottom: 18px; }
.post-content .gallery a { aspect-ratio: auto; }
.post-content .gallery img { height: auto; display: block; }
.gallery-1 { grid-template-columns: 1fr; max-width: 460px; }
.post-nav {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin: 30px 0 20px;
	padding-top: 15px;
	border-top: 1px solid var(--line);
	font-weight: 700;
}

/* Pagine legali (Cookie) */
.legal-page h2 { margin-bottom: 15px; color: var(--text-dark); font: 600 16px/22px var(--font-head); }
.legal-page .product-list { margin-bottom: 18px; }
.legal-page .product-list li { color: var(--text); font-weight: 400; line-height: 21px; }
.legal-page .product-list li strong { color: var(--text-dark); }
.legal-page .product-list a { display: inline; color: var(--orange); text-decoration: underline; }
.legal-updated { margin-top: 30px; font-style: italic; color: var(--muted); }

/* Lightbox */
.lightbox {
	max-width: min(95vw, 900px);
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .8); }
.lightbox img { max-height: 85vh; width: auto; margin: 0 auto; box-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.lightbox p { margin: 8px 0 0; color: #fff; text-align: center; font: 14px var(--font-head); }
.lightbox-close {
	position: absolute; top: -40px; right: 0;
	width: 36px; height: 36px;
	border: 0; background: var(--orange); color: #fff;
	font: 700 22px/36px var(--font-body);
	cursor: pointer;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	padding: 20px 0 9px;
	border-top: 1px solid #fff;
	box-shadow: 0 -1px 0 #ddd;
	text-align: center;
}
.site-footer p { margin-bottom: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--orange); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 959px) {
	.main-nav a { padding: 16px 12px; font-size: 13px; }
	.content { grid-template-columns: 200px minmax(0, 1fr); }
	.col-news { grid-column: 1 / -1; }
	.news-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }
	.content-page { grid-template-columns: minmax(0, 1fr) 240px; column-gap: 30px; }
	.product-grid { gap: 0 18px; }
	.content-product { grid-template-columns: minmax(0, 1fr) 200px; column-gap: 25px; }
}

@media (max-width: 767px) {
	.header-inner {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"logo toggle"
			"nav nav"
			"lang lang";
		padding-top: 6px;
	}
	.logo { margin-top: 4px; }

	.nav-toggle {
		grid-area: toggle;
		justify-self: end;
		display: block;
		position: relative;
		width: 44px; height: 44px;
		border: 0; background: var(--orange);
		cursor: pointer;
	}
	.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
		position: absolute; left: 12px;
		width: 20px; height: 2px;
		background: #fff;
		transition: transform .2s, opacity .2s;
	}
	.nav-toggle-bar { top: 21px; }
	.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; }
	.nav-toggle-bar::before { top: -6px; }
	.nav-toggle-bar::after { top: 6px; }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

	.main-nav { justify-self: stretch; display: none; margin-top: 8px; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; }
	.main-nav li + li::before { display: none; }
	.main-nav li { border-top: 1px solid var(--line); }
	.main-nav a { padding: 10px; }

	.lang-switch { padding-left: 0; margin-top: 10px; }

	.slider { aspect-ratio: auto; height: auto; }
	.slides { position: relative; }
	.slide { position: absolute; }
	.slide.is-active { position: relative; }
	.slide img { aspect-ratio: 940 / 300; height: auto; }
	.slide-caption { position: static; font-size: 15px; line-height: 19px; }
	.slide-caption a, .slide-caption span { padding: 10px; }
	.slider-nav { width: 36px; height: 36px; margin-top: 0; top: calc((100vw - 2 * var(--gutter)) * 300 / 940 / 2 - 18px); }

	.content, .content-page, .content-halves { grid-template-columns: 1fr; }
	.content-halves { padding-top: 20px; }
	.map { aspect-ratio: 4 / 3; }
	.content-page { padding-top: 20px; }
	.col-intro { order: -1; }
	.gallery { grid-template-columns: 1fr 1fr; }
	.product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
	.product-img { margin-bottom: 12px; }
	.col-news { grid-column: auto; }

	.content-product { grid-template-columns: 1fr; padding-top: 20px; }
	.vc-col-6, .vc-col-8, .vc-col-12 { grid-column: span 12; }
	.vc-col-2 { grid-column: span 12; }
	.vc-row { column-gap: 10px; }
	.vc-col-4 .center { font-size: 11px; line-height: 15px; }
	.vc-col-empty { display: none; }
}

@media (max-width: 479px) {
	.product-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.slide, .slide.is-active { transition: none; }
}
