/* ==========================================================================
   CP Header — cutlitepenta.com — Zmot Lab
   Tutte le regole sono sotto .cph (header) o .cph-mm (menù mobile):
   nessun effetto sul resto del sito.
   ========================================================================== */

.cph,
.cph-mm {
	--cph-bg: #162125;
	--cph-ink: #162125;
	--cph-acc: #D3171B;
	--cph-acc-h: #9A1114;
	--cph-hover: #ff6b6b;
	--cph-line: #2D3E45;
	--cph-muted: #8a8f95;
	--cph-f: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--cph-ease: cubic-bezier(.16, 1, .3, 1);
	font-family: var(--cph-f);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.cph *, .cph *::before, .cph *::after,
.cph-mm *, .cph-mm *::before, .cph-mm *::after { box-sizing: border-box; }

.cph a, .cph-mm a { text-decoration: none; transition: color .2s, background-color .2s; }
.cph img, .cph-mm img { max-width: 100%; height: auto; display: block; }

/* Reset pulsanti: specificità alta per battere gli stili globali del kit Elementor / tema */
.cph .cph-reset, .cph .cph-reset:hover, .cph .cph-reset:focus, .cph .cph-reset:active,
.cph-mm .cph-reset, .cph-mm .cph-reset:hover, .cph-mm .cph-reset:focus, .cph-mm .cph-reset:active {
	-webkit-appearance: none;
	appearance: none;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	text-transform: none;
	letter-spacing: inherit;
	line-height: inherit;
	cursor: pointer;
}

.cph :focus-visible, .cph-mm :focus-visible { outline: 2px solid var(--cph-hover); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Sticky: la location header di Elementor che contiene questo header resta
   attaccata in alto (sotto la barra admin quando si è loggati).
   -------------------------------------------------------------------------- */
.elementor-location-header:has(.cph) {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	z-index: 1000;
}
/* Barra admin visibile solo quando WordPress la mostra davvero (classe admin-bar sul body):
   nell'anteprima dell'editor Elementor la barra non c'è e l'header resta attaccato al bordo. */
body.admin-bar .elementor-location-header:has(.cph) { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .elementor-location-header:has(.cph) { top: 46px; }
}
@media (max-width: 600px) {
	body.admin-bar .elementor-location-header:has(.cph) { top: 0; }
}

/* --------------------------------------------------------------------------
   Contenitore
   -------------------------------------------------------------------------- */
.cph .cph-hdr {
	position: relative;
	background: var(--cph-bg);
	border-bottom: 1px solid var(--cph-line);
	color: #fff;
	transition: box-shadow .3s var(--cph-ease), border-color .3s var(--cph-ease);
}
.cph .cph-hdr.is-scrolled { box-shadow: 0 2px 16px rgba(0, 0, 0, .2); border-bottom-color: transparent; }

.cph .cph-wrap { max-width: 1640px; margin: 0 auto; padding: 0 40px; }

/* --------------------------------------------------------------------------
   Barra superiore
   -------------------------------------------------------------------------- */
.cph .cph-tb { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.cph .cph-tb__in {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 18px;
	padding: 8px 0;
	font-size: 12.5px;
	line-height: 1.4;
	color: #fff;
}
.cph .cph-tb__in a { color: #fff; }
.cph .cph-tb__in a:hover { color: var(--cph-hover); }
.cph .cph-sep { width: 1px; height: 11px; background: rgba(255, 255, 255, .14); flex: none; }

/* Lingue in linea */
.cph .cph-langs { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .03em; }
.cph .cph-tb__in .cph-langs a { color: rgba(255, 255, 255, .5); }
.cph .cph-tb__in .cph-langs a.is-current { color: #fff; }
.cph .cph-tb__in .cph-langs a:hover { color: var(--cph-hover); }
.cph .cph-langs__sep { opacity: .3; }

/* Tendina "Altre divisioni" */
.cph .cph-dd { position: relative; }
.cph .cph-dd .cph-dd__btn {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	transition: color .2s;
}
.cph .cph-dd__btn .cph-chev { opacity: .6; transition: transform .2s; }
.cph .cph-dd.is-open .cph-dd__btn { color: var(--cph-hover); }
.cph .cph-dd.is-open .cph-dd__btn .cph-chev { transform: rotate(180deg); }

.cph .cph-dd__menu {
	position: absolute;
	top: 100%;
	right: 0;
	padding-top: 10px;
	z-index: 1200;
	display: flex;
	width: max-content;
	filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .22));
	visibility: hidden;
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
	transition: opacity .28s var(--cph-ease), transform .32s var(--cph-ease), visibility 0s linear .28s;
}
.cph .cph-dd:focus-within .cph-dd__menu,
.cph .cph-dd.is-open .cph-dd__menu {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	transition: opacity .28s var(--cph-ease), transform .32s var(--cph-ease);
}
.cph .cph-tb__in .cph-dd__menu a {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	color: var(--cph-ink);
	font-size: 13px;
	font-weight: 700;
	padding: 12px 15px;
	white-space: nowrap;
	flex: none;
}
.cph .cph-tb__in .cph-dd__menu a + a { border-left: 1px solid #ececec; }
.cph .cph-tb__in .cph-dd__menu a:first-child { border-radius: 9px 0 0 9px; }
.cph .cph-tb__in .cph-dd__menu a:last-child { border-radius: 0 9px 9px 0; }
.cph .cph-tb__in .cph-dd__menu a:only-child { border-radius: 9px; }
.cph .cph-tb__in .cph-dd__menu a:hover { background: #f0f1f2; color: var(--cph-acc); }
.cph .cph-dd__menu img { height: 20px; width: auto; max-width: none; flex: none; }

/* --------------------------------------------------------------------------
   Riga principale
   -------------------------------------------------------------------------- */
.cph .cph-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 92px;
}
.cph .cph-left { display: flex; align-items: center; gap: 76px; }
.cph .cph-logo img { height: 54px; width: auto; }

.cph .cph-nav { display: flex; gap: 2px; align-items: center; }
.cph .cph-nav .cph-nav__link {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 13px;
	border-radius: 6px;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.6;
}
.cph .cph-nav__link::after {
	content: '';
	position: absolute;
	left: 13px;
	right: 13px;
	bottom: 1px;
	height: 2px;
	background: var(--cph-acc);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .22s var(--cph-ease);
}
.cph .cph-nav .cph-nav__link:hover,
.cph .cph-nav .cph-nav__link:focus-visible,
.cph .cph-nav__it.is-open > .cph-nav__link { color: #fff; background: rgba(255, 255, 255, .06); }
.cph .cph-nav__link:hover::after,
.cph .cph-nav__link.is-current::after,
.cph .cph-nav__it.is-open > .cph-nav__link::after { transform: scaleX(1); }

.cph .cph-nav__link .cph-chev { opacity: .55; transition: transform .2s; }
.cph .cph-nav__it.is-open > .cph-nav__link .cph-chev { transform: rotate(180deg); }

/* Ponte invisibile tra voce e pannello, per non perdere l'hover */
.cph .cph-nav__it > .cph-nav__link::before {
	content: '';
	position: absolute;
	top: 100%;
	left: -14px;
	right: -14px;
	height: 30px;
}

/* Pannello a tutta larghezza (Macchine Laser, Azienda) */
.cph .cph-sub {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	box-shadow: 0 30px 50px rgba(10, 16, 18, .16);
	z-index: 1200;
	visibility: hidden;
	opacity: 0;
	transform: translateY(14px);
	pointer-events: none;
	transition: opacity .32s var(--cph-ease), transform .38s var(--cph-ease), visibility 0s linear .32s;
}
/* Le voci stanno sempre su una riga: le colonne si stringono e il testo va a capo dentro la colonna */
.cph .cph-sub__in {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 260px);
	justify-content: center;
	column-gap: clamp(24px, 4.5vw, 84px);
	padding: 44px 40px 48px;
}
.cph .cph-nav__it:focus-within .cph-sub,
.cph .cph-nav__it.is-open .cph-sub {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	transition: opacity .32s var(--cph-ease), transform .38s var(--cph-ease);
}

.cph .cph-sub .cph-sub__a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	text-align: center;
	color: var(--cph-ink);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .35s var(--cph-ease), transform .4s var(--cph-ease);
}
.cph .cph-nav__it:focus-within .cph-sub__a,
.cph .cph-nav__it.is-open .cph-sub__a { opacity: 1; transform: translateY(0); }
.cph .cph-sub__a:nth-child(2) { transition-delay: .05s; }
.cph .cph-sub__a:nth-child(3) { transition-delay: .1s; }
.cph .cph-sub__a:nth-child(4) { transition-delay: .15s; }
.cph .cph-sub__a:nth-child(5) { transition-delay: .2s; }
.cph .cph-sub__a:nth-child(n+6) { transition-delay: .25s; }

.cph .cph-sub__t { font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--cph-ink); transition: color .2s; text-wrap: balance; }
.cph .cph-sub__d { font-size: 12.5px; font-weight: 400; line-height: 1.4; color: var(--cph-muted); text-wrap: balance; }
.cph .cph-sub .cph-sub__a:hover { color: var(--cph-ink); }
.cph .cph-sub__a:hover .cph-sub__t,
.cph .cph-sub__a.is-current .cph-sub__t { color: var(--cph-acc); }

/* Apertura al passaggio del mouse solo sui dispositivi che hanno davvero l'hover */
@media (hover: hover) {
	.cph .cph-nav__it:hover > .cph-nav__link { background: rgba(255, 255, 255, .06); }
	.cph .cph-nav__it:hover > .cph-nav__link::after { transform: scaleX(1); }
	.cph .cph-nav__it:hover > .cph-nav__link .cph-chev { transform: rotate(180deg); }
	.cph .cph-nav__it:hover .cph-sub {
		visibility: visible;
		opacity: 1;
		transform: translateY(0);
		pointer-events: auto;
		transition: opacity .32s var(--cph-ease), transform .38s var(--cph-ease);
	}
	.cph .cph-nav__it:hover .cph-sub__a { opacity: 1; transform: translateY(0); }

	.cph .cph-dd:hover .cph-dd__btn { color: var(--cph-hover); }
	.cph .cph-dd:hover .cph-dd__btn .cph-chev { transform: rotate(180deg); }
	.cph .cph-dd:hover .cph-dd__menu {
		visibility: visible;
		opacity: 1;
		transform: translateY(0);
		pointer-events: auto;
		transition: opacity .28s var(--cph-ease), transform .32s var(--cph-ease);
	}
}

/* CTA */
.cph .cph-right { display: flex; align-items: center; gap: 12px; }
.cph .cph-right .cph-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: var(--cph-acc);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
	text-transform: uppercase;
	letter-spacing: .04em;
	white-space: nowrap;
}
.cph .cph-right .cph-cta:hover,
.cph .cph-right .cph-cta:focus-visible { background: var(--cph-acc-h); color: #fff; }

/* Hamburger */
.cph .cph-main .cph-bur {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 8px;
}
.cph .cph-bur span { display: block; width: 20px; height: 1.5px; background: #fff; margin: 4.5px auto; }

@media (max-width: 1024px) {
	.cph .cph-nav, .cph .cph-right { display: none; }
	.cph .cph-main .cph-bur { display: flex; }
}
@media (max-width: 768px) {
	.cph .cph-tb { display: none; }
	.cph .cph-wrap { padding: 0 20px; }
	.cph .cph-main { height: 72px; }
	.cph .cph-logo img { height: 42px; }
}

/* --------------------------------------------------------------------------
   Menù mobile a schermo intero
   -------------------------------------------------------------------------- */
.cph-mm {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	padding: 24px 32px;
	background: var(--cph-bg);
	color: #fff;
	overflow-y: auto;
	overscroll-behavior: contain;
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s, visibility 0s linear .3s;
}
.cph-mm.is-open { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .3s; }
html.cph-lock, html.cph-lock body { overflow: hidden; }

.cph-mm .cph-mm__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.cph-mm .cph-mm__top img { height: 36px; width: auto; }
.cph-mm .cph-mm__top .cph-mm__x {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: #fff;
	font-size: 30px;
	line-height: 1;
}

.cph-mm .cph-mm__nav { display: flex; flex-direction: column; }
.cph-mm .cph-mm__line,
.cph-mm .cph-mm__it { border-bottom: 1px solid var(--cph-line); }
.cph-mm .cph-mm__nav .cph-mm__a {
	display: block;
	padding: 17px 0;
	color: #fff;
	font-size: 21px;
	font-weight: 500;
	line-height: 1.3;
}
.cph-mm .cph-mm__nav .cph-mm__a.is-current { color: var(--cph-hover); }

.cph-mm .cph-mm__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cph-mm .cph-mm__row .cph-mm__a { flex: 1; }
.cph-mm .cph-mm__row .cph-mm__tgl {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 44px;
	color: #fff;
}
/* Voce madre senza pagina (URL #): tutta la riga apre la tendina */
.cph-mm .cph-mm__it > .cph-mm__tgl--full,
.cph-mm .cph-mm__it > .cph-mm__tgl--full:hover,
.cph-mm .cph-mm__it > .cph-mm__tgl--full:focus {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 17px 14px 17px 0;
	color: #fff;
	font-size: 21px;
	font-weight: 500;
	line-height: 1.3;
	text-align: left;
}

.cph-mm .cph-mm__tgl .cph-chev { transition: transform .25s var(--cph-ease); }
.cph-mm .cph-mm__tgl[aria-expanded="true"] .cph-chev { transform: rotate(180deg); }

.cph-mm .cph-mm__sub { padding: 0 0 14px 16px; border-left: 2px solid var(--cph-acc); margin-bottom: 16px; }
.cph-mm .cph-mm__sub[hidden] { display: none; }
.cph-mm .cph-mm__sub a {
	display: block;
	padding: 9px 0;
	color: rgba(255, 255, 255, .8);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
}
.cph-mm .cph-mm__sub a:hover,
.cph-mm .cph-mm__sub a.is-current { color: #fff; }

.cph-mm .cph-mm__label {
	margin: 26px 0 12px;
	color: rgba(255, 255, 255, .4);
	font-size: 11px;
	font-weight: 900;
	letter-spacing: .12em;
	text-transform: uppercase;
}
.cph-mm .cph-mm__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cph-mm .cph-mm__chips a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border: 1px solid var(--cph-line);
	border-radius: 8px;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}
.cph-mm .cph-mm__chips a.is-current { background: var(--cph-acc); border-color: var(--cph-acc); }
.cph-mm .cph-mm__chips img { height: 18px; width: auto; max-width: none; flex: none; }

.cph-mm .cph-mm__cta { margin-top: auto; padding-top: 28px; }
.cph-mm .cph-mm__cta a {
	display: block;
	padding: 17px;
	background: var(--cph-acc);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.cph-mm .cph-mm__cta a:hover { background: var(--cph-acc-h); color: #fff; }

/* Movimento ridotto */
@media (prefers-reduced-motion: reduce) {
	.cph *, .cph *::before, .cph *::after,
	.cph-mm, .cph-mm * { transition-duration: .01ms !important; transition-delay: 0s !important; }
}
