/*
Theme Name:   ECS
Theme URI:    https://www.ecs.it
Description:  Child theme di Kadence per ecs.it (controlli numerici ECS).
Author:       ECS
Template:     kadence
Version:      0.8.2
Text Domain:  ecs-child
*/

/* Palette e font sono impostati in functions.php (default Kadence).
   Qui solo i ritocchi che il Customizer non copre. */

:root {
	--ecs-green: #87bf27;
	--ecs-sky: #54acfd;
	--ecs-teal: #007092;
	--ecs-orange: #f18b00; /* colore del logo alternativo ECS, usato come accento */
	--ecs-navy: #1a1a1a;
	--ecs-deep: #0a0a0a;
}

/* Menu principale: Inter, maiuscolo, come BDF Digital */
.main-navigation .primary-menu-container > ul > li.menu-item > a {
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Voce attiva / al passaggio del mouse: sottolineatura arancione (il nero da solo non si distingue) */
.main-navigation .primary-menu-container > ul > li.menu-item > a { position: relative; }
.main-navigation .primary-menu-container > ul > li.menu-item > a::after {
	content: "";
	position: absolute;
	left: var(--global-xs-spacing, .5em);
	right: var(--global-xs-spacing, .5em);
	bottom: .35em;
	height: 2px;
	background: var(--ecs-orange);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s ease;
}
.main-navigation .primary-menu-container > ul > li.menu-item > a:hover::after,
.main-navigation .primary-menu-container > ul > li.menu-item > a:focus-visible::after,
.main-navigation .primary-menu-container > ul > li.current-menu-item > a::after,
.main-navigation .primary-menu-container > ul > li.current-menu-ancestor > a::after { transform: none; }

/* Footer: link del menu legale più discreti */
.site-footer .footer-navigation .menu > li > a {
	font-size: 14px;
}

/* ---------- Menu tablet/mobile: barra sempre visibile, niente pannello a scomparsa ---------- */
#mobile-header .site-bottom-header-wrap .site-header-row-container-inner {
	background: var(--global-palette9);
	border-top: 1px solid var(--global-palette7);
}
#mobile-header .site-bottom-header-wrap .site-container { padding-inline: 0; }
#mobile-header .site-bottom-header-inner-wrap { min-height: 0 !important; display: block; }
#mobile-header .site-header-bottom-section-center { justify-content: flex-start; width: 100%; }
#mobile-header .mobile-navigation { width: 100%; }
#mobile-header .mobile-navigation ul.menu {
	display: flex;
	flex-wrap: nowrap !important;
	gap: .25rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding: 0 12px;
	margin: 0;
	/* sfumatura a destra: fa capire che la barra scorre */
	-webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
	mask-image: linear-gradient(90deg, #000 88%, transparent);
}
#mobile-header .mobile-navigation ul.menu::-webkit-scrollbar { display: none; }
#mobile-header .mobile-navigation ul.menu > li { flex: 0 0 auto; border: 0 !important; }
#mobile-header .mobile-navigation ul.menu > li > a,
#mobile-header .mobile-navigation ul.menu > li > .drawer-nav-drop-wrap > a {
	display: block;
	padding: .8rem .65rem;
	font-family: Inter, sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--global-palette3);
	border-bottom: 2px solid transparent;
}
#mobile-header .mobile-navigation ul.menu > li.current-menu-item > a,
#mobile-header .mobile-navigation ul.menu > li.current-menu-ancestor > .drawer-nav-drop-wrap > a,
#mobile-header .mobile-navigation ul.menu > li.current-menu-item > .drawer-nav-drop-wrap > a {
	color: var(--global-palette1);
	border-bottom-color: var(--ecs-orange);
}
/* I sottomenu (famiglie, applicazioni) sono già elencati nelle pagine di primo livello */
#mobile-header .mobile-navigation .sub-menu,
#mobile-header .mobile-navigation .drawer-sub-toggle { display: none !important; }
#mobile-header .mobile-navigation .drawer-nav-drop-wrap { display: block; border: 0; }

/* ---------- Header trasparente sulla home ---------- */
.transparent-header #masthead .ecs-lang summary { color: #fff; border-color: rgba(255, 255, 255, .45); }
.transparent-header #masthead .item-is-stuck .ecs-lang summary { color: var(--global-palette3); border-color: var(--global-palette7); }
.transparent-header #mobile-header .site-bottom-header-wrap .site-header-row-container-inner {
	background: rgba(10, 10, 10, .35);
	border-top-color: rgba(255, 255, 255, .15);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}
.transparent-header #mobile-header .mobile-navigation ul.menu > li > a,
.transparent-header #mobile-header .mobile-navigation ul.menu > li > .drawer-nav-drop-wrap > a { color: #fff; }
.transparent-header #mobile-header .item-is-stuck .site-header-row-container-inner { background: var(--global-palette9); }
.transparent-header #mobile-header .item-is-stuck .mobile-navigation ul.menu > li > a,
.transparent-header #mobile-header .item-is-stuck .mobile-navigation ul.menu > li > .drawer-nav-drop-wrap > a { color: var(--global-palette3); }
#masthead .item-is-stuck { box-shadow: 0 2px 18px rgba(10, 10, 10, .08); }

/* ---------- Home ---------- */

/* Comparsa allo scroll: attiva solo se JS gira e il movimento non è ridotto (classe ecs-js su <html>) */
html.ecs-js .ecs-reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
html.ecs-js .ecs-reveal.ecs-in { opacity: 1; transform: none; }
html.ecs-js .ecs-reveal.wp-block-columns { opacity: 1; transform: none; }
html.ecs-js .ecs-reveal.wp-block-columns > .wp-block-column { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
html.ecs-js .ecs-reveal.wp-block-columns.ecs-in > .wp-block-column { opacity: 1; transform: none; }
html.ecs-js .ecs-reveal.ecs-in > .wp-block-column:nth-child(2) { transition-delay: .12s; }
html.ecs-js .ecs-reveal.ecs-in > .wp-block-column:nth-child(3) { transition-delay: .24s; }
html.ecs-js .ecs-reveal.ecs-in > .wp-block-column:nth-child(4) { transition-delay: .36s; }

.ecs-eyebrow {
	font-family: Inter, sans-serif;
	font-size: 13px !important;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ecs-orange);
	margin-bottom: .4rem !important;
}
.home .entry-content > .ecs-eyebrow { margin-top: 5rem; }
.home .entry-content > .ecs-eyebrow + .wp-block-heading { margin-top: 0; }
.home .entry-content > .wp-block-heading,
.ecs-why-band > .wp-block-heading { font-size: clamp(1.8rem, 3vw, 2.4rem); }

/* Hero */
.ecs-hero { overflow: hidden; padding-top: 140px !important; padding-bottom: 120px !important; }
.ecs-hero .wp-block-cover__background {
	background: linear-gradient(100deg, rgba(10, 10, 10, .97) 0%, rgba(26, 26, 26, .88) 45%, rgba(26, 26, 26, .6) 100%) !important;
	opacity: 1 !important;
}
.ecs-hero::after { /* griglia tecnica */
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
	background-size: 48px 48px;
	-webkit-mask-image: radial-gradient(ellipse at 75% 50%, #000 0%, transparent 70%);
	mask-image: radial-gradient(ellipse at 75% 50%, #000 0%, transparent 70%);
}
.ecs-hero .wp-block-cover__inner-container { position: relative; z-index: 2; width: 100% !important; max-width: 1240px !important; margin: 0 auto !important; padding: 0 46% 0 24px; }
.ecs-hero .wp-block-cover__inner-container > *:not(.ecs-hero-fx) { position: relative; z-index: 2; }
.ecs-hero .ecs-kicker {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	margin: 0;
	padding: .45rem .9rem;
	font-family: Inter, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	background: rgba(255, 255, 255, .06);
}
.ecs-hero .ecs-kicker::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ecs-orange);
	box-shadow: 0 0 0 4px rgba(241, 139, 0, .25);
	animation: ecs-pulse 2s infinite;
}
.ecs-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.9rem); line-height: 1.07; letter-spacing: -.02em; margin: 1.2rem 0 1.1rem; color: #fff; }
.ecs-hero h1 strong {
	font-weight: inherit;
	background: linear-gradient(90deg, #ffb347, var(--ecs-orange));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.ecs-hero p.ecs-lead-hero { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.6; color: rgba(255, 255, 255, .82); max-width: 36rem; }
.ecs-hero .wp-block-buttons { margin-top: 2rem; gap: .9rem; }
.ecs-hero .wp-block-button__link { padding: .85rem 1.6rem; font-weight: 600; border-radius: 6px; transition: background .2s, color .2s, border-color .2s; }
.ecs-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--ecs-orange); color: #fff; border: 2px solid var(--ecs-orange); }
.ecs-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link::after { content: " →"; display: inline-block; transition: transform .2s; }
.ecs-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover::after { transform: translateX(4px); }
.ecs-hero .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff !important; border: 2px solid rgba(255, 255, 255, .5); background: transparent; }
.ecs-hero .wp-block-button__link:hover,
.ecs-hero .wp-block-button__link:focus-visible { background: #fff !important; color: var(--ecs-navy) !important; border-color: #fff !important; }

/* Percorso utensile animato (shortcode [ecs_hero_fx]) */
.ecs-hero-fx { position: absolute; z-index: 1; right: 0; top: 50%; width: 46%; transform: translateY(-50%); }
.ecs-tp { display: block; width: 100%; height: auto; overflow: visible; }
.ecs-tp-axis { stroke: rgba(255, 255, 255, .35); stroke-width: 1; fill: none; }
.ecs-tp-lbl { fill: rgba(255, 255, 255, .5); font: 600 10px Inter, sans-serif; }
.ecs-tp-stock { fill: rgba(255, 255, 255, .03); stroke: rgba(255, 255, 255, .18); stroke-dasharray: 4 4; }
.ecs-tp-ghost { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 1.5; }
.ecs-tp-path { fill: none; stroke: #ffb347; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(241, 139, 0, .7)); }
.ecs-tp-hole { fill: none; stroke: #ffb347; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.2); transition: opacity .3s, transform .4s cubic-bezier(.2, .7, .2, 1.4); }
.ecs-tp-hole.on { opacity: 1; transform: none; }
.ecs-tp-tool { fill: #fff; filter: drop-shadow(0 0 8px #ffb347); }
.ecs-tp-ring { fill: none; stroke: rgba(255, 179, 71, .55); stroke-width: 1; }
.ecs-dro {
	position: absolute;
	right: 4%;
	bottom: -10%;
	display: grid;
	grid-template-columns: repeat(3, auto);
	gap: .2rem 1.2rem;
	padding: .8rem 1.1rem;
	border-radius: 10px;
	background: rgba(12, 12, 12, .8);
	border: 1px solid rgba(255, 255, 255, .14);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	font: 600 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: #fff;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
.ecs-dro span { color: var(--ecs-orange); margin-right: .45rem; }
.ecs-dro b { display: inline-block; min-width: 7.5ch; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.ecs-dro-st { grid-column: 1 / -1; font-size: 11px; letter-spacing: .08em; color: rgba(255, 255, 255, .65); border-top: 1px solid rgba(255, 255, 255, .12); padding-top: .35rem; margin-top: .2rem; }
.ecs-dro-st i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; margin-right: .45rem; animation: ecs-pulse 1.4s infinite; }
@keyframes ecs-pulse { 50% { opacity: .35; } }
@media (max-width: 1024px) {
	.ecs-hero { padding-top: 175px !important; padding-bottom: 96px !important; }
	.ecs-hero .wp-block-cover__inner-container { padding: 0 8px; }
	.ecs-hero-fx { width: 90%; right: -25%; opacity: .3; }
	.ecs-dro { display: none; }
}

/* Numeri */
.ecs-stats {
	position: relative;
	z-index: 3;
	max-width: 1100px;
	margin: -64px auto 0 !important;
	padding: 1.8rem 1rem;
	gap: 0 !important;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(10, 10, 10, .14);
}
.ecs-stats > .wp-block-column { padding: .4rem 1.4rem; text-align: center; }
.ecs-stats > .wp-block-column + .wp-block-column { border-left: 1px solid var(--global-palette7); }
.ecs-stat { margin: 0; color: var(--global-palette5); font-size: .95rem; line-height: 1.35; }
.ecs-stat strong {
	display: block;
	margin-bottom: .3rem;
	font-family: Inter, sans-serif;
	font-size: clamp(2.2rem, 3.6vw, 3rem);
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--ecs-navy);
	font-variant-numeric: tabular-nums;
}
@media (max-width: 781px) {
	.ecs-stats { margin: -40px 16px 0 !important; display: grid !important; grid-template-columns: 1fr 1fr; }
	.ecs-stats > .wp-block-column { padding: 1rem .5rem; }
	.ecs-stats > .wp-block-column + .wp-block-column { border-left: 0; }
	.ecs-stats > .wp-block-column:nth-child(even) { border-left: 1px solid var(--global-palette7); }
	.ecs-stats > .wp-block-column:nth-child(n+3) { border-top: 1px solid var(--global-palette7); }
}

/* Nastro tecnologie */
.ecs-ticker { margin-top: 4rem !important; padding: 1.1rem 0; background: var(--ecs-deep); overflow: hidden; }
.ecs-ticker p { margin: 0; white-space: nowrap; font-family: Inter, sans-serif; font-weight: 600; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.ecs-ticker .ecs-ticker-track { display: inline-flex; width: max-content; animation: ecs-marquee 40s linear infinite; }
.ecs-ticker .ecs-ticker-track > span { padding-right: 3rem; }
.ecs-ticker:hover .ecs-ticker-track { animation-play-state: paused; }
@keyframes ecs-marquee { to { transform: translateX(-50%); } }

/* Card soluzioni */
.ecs-solutions { gap: 2rem !important; margin-top: 2.5rem; }
.ecs-solutions > .wp-block-column {
	padding: 1.6rem 1.6rem 1.8rem;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--global-palette7);
	transition: transform .35s ease, box-shadow .35s ease, border-color .35s;
}
.ecs-solutions > .wp-block-column:hover { transform: translateY(-6px); box-shadow: 0 24px 50px rgba(10, 10, 10, .13); border-color: transparent; }
.ecs-solutions .wp-block-image { margin: -1.6rem -1.6rem 1.4rem; overflow: hidden; border-radius: 14px 14px 0 0; background: #fff; border-bottom: 1px solid var(--global-palette7); }
.ecs-solutions .wp-block-image img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; padding: 1.5rem; border: 0; background: none; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.ecs-solutions > .wp-block-column:hover .wp-block-image img { transform: scale(1.06); }
.ecs-solutions h3 { font-size: 1.35rem; }

/* Spotlight CNC1000 */
.ecs-spotlight {
	position: relative;
	overflow: hidden;
	margin-top: 5rem !important;
	padding: 90px 24px !important;
	color: rgba(255, 255, 255, .85);
	background: radial-gradient(ellipse at 25% 50%, #3a3a3a 0%, var(--ecs-navy) 45%, var(--ecs-deep) 100%);
}
.ecs-spotlight h2,
.ecs-spotlight strong { color: #fff; }
.ecs-spotlight h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); }
/* L'immagine del CNC1000 ha un riquadro bianco attorno: si mostra solo il pannello (ritaglio 168,178 → 698,590 su 768×760) */
.ecs-spotlight .wp-block-media-text__media {
	align-self: center;
	overflow: hidden;
	aspect-ratio: 530 / 412;
	border-radius: 10px;
	box-shadow: 0 30px 60px rgba(0, 0, 0, .45), 0 0 90px rgba(241, 139, 0, .22);
	animation: ecs-float 6s ease-in-out infinite;
}
.ecs-spotlight .wp-block-media-text__media img { display: block; width: 144.9% !important; max-width: none !important; height: auto !important; margin: -33.6% 0 0 -31.7%; }
@keyframes ecs-float { 50% { transform: translateY(-14px); } }
.ecs-spotlight ul { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem 1rem; }
.ecs-spotlight li { position: relative; padding-left: 1.6rem; }
.ecs-spotlight li::before { content: ""; position: absolute; left: 0; top: .4em; width: .8rem; height: .45rem; border-left: 2px solid var(--ecs-orange); border-bottom: 2px solid var(--ecs-orange); transform: rotate(-45deg); }
.ecs-spotlight .wp-block-button__link { background: var(--ecs-orange); color: #fff; }
.ecs-spotlight .wp-block-button__link:hover,
.ecs-spotlight .wp-block-button__link:focus-visible { background: #fff; color: var(--ecs-navy); }
@media (max-width: 600px) { .ecs-spotlight ul { grid-template-columns: 1fr; } }

/* Riquadri applicazioni (foto a tutto riquadro, titolo sopra) */
.ecs-apps { gap: 1.25rem !important; margin-bottom: 1.25rem !important; }
.ecs-apps > .wp-block-column { position: relative; overflow: hidden; border-radius: 14px; isolation: isolate; }
.ecs-apps .wp-block-image { margin: 0 !important; }
.ecs-apps .wp-block-image a { display: block; }
.ecs-apps .wp-block-image img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.ecs-apps > .wp-block-column::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(10, 10, 10, 0) 35%, rgba(10, 10, 10, .92) 100%); transition: background .4s; }
.ecs-apps > .wp-block-column:hover::after { background: linear-gradient(180deg, rgba(26, 26, 26, .25) 0%, rgba(10, 10, 10, .95) 100%); }
.ecs-apps > .wp-block-column:hover .wp-block-image img { transform: scale(1.08); }
.ecs-apps h3 { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; margin: 0; padding: 1.2rem 1.4rem; font-size: 1.2rem; line-height: 1.3; }
.ecs-apps h3 a { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; color: #fff !important; text-decoration: none !important; }
.ecs-apps h3 a::before { content: ""; position: absolute; inset: -100vh 0 0; } /* tutto il riquadro cliccabile */
.ecs-apps h3 a::after {
	content: "→";
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 50%;
	background: var(--ecs-orange);
	font-size: 1rem;
	transform: translateX(-8px);
	opacity: 0;
	transition: .3s;
}
.ecs-apps > .wp-block-column:hover h3 a::after,
.ecs-apps h3 a:focus-visible::after { transform: none; opacity: 1; }
@media (max-width: 781px) {
	.ecs-apps { display: grid !important; grid-template-columns: 1fr 1fr; gap: .75rem !important; margin-bottom: .75rem !important; }
	.ecs-apps h3 { font-size: 1rem; padding: .8rem; }
}

/* Perché ECS */
.ecs-why-band { margin-top: 5rem !important; padding: 80px 24px !important; background: var(--global-palette8); }
.ecs-why { gap: 1.25rem !important; margin-top: 2.5rem; }
.ecs-why > .wp-block-column {
	position: relative;
	overflow: hidden;
	padding: 2rem 1.5rem 1.6rem;
	background: #fff;
	border-radius: 14px;
	border: 1px solid var(--global-palette7);
	transition: transform .35s, box-shadow .35s;
}
.ecs-why > .wp-block-column::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--ecs-orange), #ffb347); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.ecs-why > .wp-block-column:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(10, 10, 10, .1); }
.ecs-why > .wp-block-column:hover::after { transform: none; }
.ecs-why h3 { font-size: 1.15rem; }
.ecs-why h3::before { content: ""; display: block; width: 52px; height: 52px; margin-bottom: 1.1rem; border-radius: 12px; background: var(--ecs-navy) center / 26px no-repeat; }
.ecs-why > .wp-block-column:nth-child(1) h3::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3Cpath d='M15.5 13 17 22l-5-3-5 3 1.5-9'/%3E%3C/svg%3E"); }
.ecs-why > .wp-block-column:nth-child(2) h3::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3Cpath d='M6.5 10v4a3 3 0 0 0 3 3H14M17.5 14v-4a3 3 0 0 0-3-3H10'/%3E%3C/svg%3E"); }
.ecs-why > .wp-block-column:nth-child(3) h3::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4M7 9h4M7 12h7'/%3E%3C/svg%3E"); }
.ecs-why > .wp-block-column:nth-child(4) h3::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-3-6.7L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3C/svg%3E"); }

/* Fascia finale */
.ecs-cta-band { position: relative; overflow: hidden; padding-top: 90px !important; padding-bottom: 90px !important; background: linear-gradient(120deg, var(--ecs-deep), var(--ecs-navy)) !important; }
.ecs-cta-band::before {
	content: "";
	position: absolute;
	inset: -48px;
	pointer-events: none;
	background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
	background-size: 48px 48px;
	animation: ecs-grid 12s linear infinite;
}
@keyframes ecs-grid { to { transform: translate(48px, 48px); } }
.ecs-cta-band > * { position: relative; }
.ecs-cta-band h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.ecs-cta-band .wp-block-button__link { padding: .85rem 1.6rem; font-weight: 600; border-radius: 6px; }
.ecs-cta-band .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: var(--ecs-orange); color: #fff; }
.ecs-cta-band .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff !important; border-color: rgba(255, 255, 255, .6); background: transparent; }
.ecs-cta-band .wp-block-button__link:hover,
.ecs-cta-band .wp-block-button__link:focus-visible { background: #fff !important; color: var(--ecs-navy) !important; border-color: #fff !important; }

@media (prefers-reduced-motion: reduce) {
	.ecs-ticker .ecs-ticker-track,
	.ecs-spotlight .wp-block-media-text__media,
	.ecs-cta-band::before,
	.ecs-hero .ecs-kicker::before,
	.ecs-dro-st i { animation: none !important; }
	.ecs-ticker p { white-space: normal; text-align: center; padding: 0 16px; }
}

/* ---------- Briciole di pane ---------- */
.kadence-breadcrumbs { font-size: 13px; letter-spacing: .02em; margin-bottom: .6rem; }
.kadence-breadcrumbs a { color: var(--global-palette5); text-decoration: none; }
.kadence-breadcrumbs a:hover, .kadence-breadcrumbs a:focus-visible { color: var(--global-palette3); text-decoration: underline; text-decoration-color: var(--ecs-orange); }
.kadence-breadcrumbs .kadence-bread-current { color: var(--global-palette3); }

/* ---------- Pagina Azienda ---------- */
.ecs-about-lead { font-size: clamp(1.15rem, 1.8vw, 1.45rem); line-height: 1.55; color: var(--global-palette3); max-width: 52rem; }
.ecs-about-stats { gap: 0 !important; margin: 2.5rem 0 !important; padding: 1.6rem 1rem; border-radius: 14px; background: var(--global-palette8); }
.ecs-about-stats > .wp-block-column { text-align: center; padding: .4rem 1rem; }
.ecs-about-stats > .wp-block-column + .wp-block-column { border-left: 1px solid var(--global-palette7); }
@media (max-width: 781px) {
	.ecs-about-stats { display: grid !important; grid-template-columns: 1fr 1fr; }
	.ecs-about-stats > .wp-block-column + .wp-block-column { border-left: 0; }
	.ecs-about-stats > .wp-block-column:nth-child(even) { border-left: 1px solid var(--global-palette7); }
	.ecs-about-stats > .wp-block-column:nth-child(n+3) { border-top: 1px solid var(--global-palette7); }
}
.ecs-about-cards { gap: 1.25rem !important; margin-top: 1.5rem; }
.ecs-about-cards > .wp-block-column { padding: 1.6rem 1.5rem; border: 1px solid var(--global-palette7); border-radius: 14px; border-top: 3px solid var(--ecs-orange); }
.ecs-about-cards h3 { font-size: 1.15rem; margin-top: 0; }

/* Cronologia */
.ecs-timeline { list-style: none; margin: 2rem 0 3rem; padding: 0; position: relative; }
.ecs-timeline::before { content: ""; position: absolute; left: 6.4rem; top: .4rem; bottom: .4rem; width: 2px; background: var(--global-palette7); }
.ecs-timeline li { position: relative; padding: 0 0 1.5rem 8.2rem; min-height: 2rem; }
.ecs-timeline li::after { content: ""; position: absolute; left: calc(6.4rem - 5px); top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--ecs-orange); }
.ecs-timeline li strong:first-child { position: absolute; left: 0; top: 0; width: 5.6rem; text-align: right; white-space: nowrap; font-family: Inter, sans-serif; font-size: 1.15rem; font-weight: 800; color: var(--global-palette3); }
@media (max-width: 600px) {
	.ecs-timeline::before { left: .35rem; }
	.ecs-timeline li { padding-left: 2rem; }
	.ecs-timeline li::after { left: -.05rem; }
	.ecs-timeline li strong:first-child { position: static; display: block; width: auto; text-align: left; }
}

/* ---------- Pagina Applicazioni: schede con icone animate ([ecs_applicazioni]) ---------- */
.ecs-app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 2rem 0 3rem; }
@media (max-width: 960px) { .ecs-app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ecs-app-grid { grid-template-columns: 1fr; } }
.ecs-app-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .5rem;
	padding: 1.8rem 1.6rem 1.6rem;
	border: 1px solid var(--global-palette7);
	border-radius: 14px;
	background: #fff;
	color: inherit;
	text-decoration: none !important;
	overflow: hidden;
	transition: transform .35s ease, box-shadow .35s ease, border-color .35s;
}
.ecs-app-card::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--ecs-orange), #ffb347); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.ecs-app-card:hover, .ecs-app-card:focus-visible { transform: translateY(-6px); box-shadow: 0 22px 48px rgba(10, 10, 10, .12); border-color: transparent; }
.ecs-app-card:hover::before, .ecs-app-card:focus-visible::before { transform: none; }
.ecs-app-media { position: relative; display: block; margin: -1.8rem -1.6rem 2.6rem; aspect-ratio: 16 / 9; background: var(--ecs-deep); }
.ecs-app-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.ecs-app-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, 0) 45%, rgba(10, 10, 10, .55) 100%); }
.ecs-app-card { padding-top: 1.8rem; }
.ecs-app-card:hover .ecs-app-media img { transform: scale(1.06); }
.ecs-app-media { overflow: visible; }
.ecs-app-media img { border-radius: 14px 14px 0 0; }
.ecs-app-icon { position: absolute; z-index: 2; left: 1.4rem; bottom: -36px; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 18px; background: var(--ecs-deep); color: var(--ecs-orange); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); transition: background .35s; }
.ecs-app-card:hover .ecs-app-icon { background: #000; }
.ecs-ai { width: 56px; height: 56px; overflow: visible; }
.ecs-app-title { margin: 0; font-size: 1.25rem; color: var(--global-palette3); }
.ecs-app-text { margin: 0; color: var(--global-palette5); font-size: .95rem; line-height: 1.5; }
.ecs-app-go { margin-top: auto; padding-top: .8rem; font-weight: 700; color: var(--global-palette3); transition: transform .25s, color .25s; }
.ecs-app-card:hover .ecs-app-go { transform: translateX(6px); color: var(--ecs-orange); }

/* Animazioni delle icone: ferme, partono al passaggio del mouse (sempre attive sui touch) */
.ecs-ai * { animation-play-state: paused; }
.ecs-app-card:hover .ecs-ai *, .ecs-app-card:focus-visible .ecs-ai * { animation-play-state: running; }
@media (hover: none) { .ecs-ai * { animation-play-state: running; } }
.ecs-ai-spin { animation: ecs-ai-spin 2.4s linear infinite; }
@keyframes ecs-ai-spin { to { transform: rotate(360deg); } }
.ecs-ai-move { animation: ecs-ai-move 3s ease-in-out infinite; }
@keyframes ecs-ai-move { 0%, 100% { transform: translateX(-8px); } 50% { transform: translateX(8px); } }
.ecs-ai-flute { stroke-dasharray: 3 3; animation: ecs-ai-dash .5s linear infinite; }
@keyframes ecs-ai-dash { to { stroke-dashoffset: -6; } }
.ecs-ai-chip, .ecs-ai-spark { animation: ecs-ai-spark .6s ease-out infinite; }
@keyframes ecs-ai-spark { 0% { opacity: 0; transform: translateY(2px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-4px); } }
.ecs-ai-feed { animation: ecs-ai-feed 2.4s ease-in-out infinite; }
@keyframes ecs-ai-feed { 0%, 100% { transform: translateX(6px); } 50% { transform: translateX(-2px); } }
.ecs-ai-jet { stroke-dasharray: 4 3; animation: ecs-ai-jet .35s linear infinite; }
@keyframes ecs-ai-jet { to { stroke-dashoffset: -7; } }
.ecs-ai-beam { animation: ecs-ai-beam .8s ease-in-out infinite; }
@keyframes ecs-ai-beam { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.ecs-ai-cut { stroke-dasharray: 18; stroke-dashoffset: 18; animation: ecs-ai-cut 2s linear infinite; }
@keyframes ecs-ai-cut { to { stroke-dashoffset: 0; } }
.ecs-ai-press { animation: ecs-ai-press 2s ease-in-out infinite; }
@keyframes ecs-ai-press { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.ecs-ai-l, .ecs-ai-r { transform-origin: 32px 31px; }
.ecs-ai-l { animation: ecs-ai-l 2s ease-in-out infinite; }
.ecs-ai-r { animation: ecs-ai-r 2s ease-in-out infinite; }
@keyframes ecs-ai-l { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(18deg); } }
@keyframes ecs-ai-r { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-18deg); } }
@media (prefers-reduced-motion: reduce) { .ecs-ai * { animation: none !important; } }

/* ---------- Stile della home su tutte le pagine ---------- */
/* Testata della pagina (titolo + briciole di pane): fascia nera con griglia tecnica */
.entry-hero .entry-hero-container-inner {
	position: relative;
	overflow: hidden;
	background: radial-gradient(ellipse at 80% 40%, #2a2a2a 0%, #141414 45%, #0a0a0a 100%) !important;
	border: 0 !important;
}
.entry-hero .entry-hero-container-inner::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
	background-size: 48px 48px;
	-webkit-mask-image: radial-gradient(ellipse at 80% 50%, #000 0%, transparent 75%);
	mask-image: radial-gradient(ellipse at 80% 50%, #000 0%, transparent 75%);
}
.entry-hero .entry-hero-container-inner::after { content: ""; position: absolute; left: 0; bottom: 0; width: 120px; height: 3px; background: var(--ecs-orange); }
.entry-hero .hero-container { position: relative; z-index: 1; }
.entry-hero .entry-header { min-height: 220px !important; padding-top: 3rem; padding-bottom: 3rem; justify-content: center; }
.entry-hero h1.entry-title { color: #fff !important; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.02em; }
.entry-hero .kadence-breadcrumbs, .entry-hero .kadence-breadcrumbs a, .entry-hero .kadence-breadcrumbs .kadence-bread-current { color: rgba(255, 255, 255, .7) !important; }
.entry-hero .kadence-breadcrumbs a:hover { color: #fff !important; }
.entry-hero .entry-taxonomies a, .entry-hero .entry-meta, .entry-hero .entry-meta a { color: var(--ecs-orange) !important; }
.entry-hero .archive-description, .entry-hero .archive-description p { color: rgba(255, 255, 255, .75); }
@media (max-width: 767px) { .entry-hero .entry-header { min-height: 160px !important; padding-top: 2rem; padding-bottom: 2rem; } }

/* Fascia finale globale */
.ecs-cta-global { position: relative; overflow: hidden; margin-top: 4rem; padding: 90px 24px; text-align: center; color: #fff; }
.ecs-cta-global .ecs-cta-inner { position: relative; max-width: 760px; margin: 0 auto; }
.ecs-cta-global h2 { color: #fff; margin: 0 0 .6rem; }
.ecs-cta-global p { color: rgba(255, 255, 255, .8); margin: 0 0 1.8rem; }
.ecs-cta-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }
.ecs-btn { display: inline-block; padding: .85rem 1.6rem; border-radius: 6px; border: 2px solid transparent; font-weight: 600; text-decoration: none !important; transition: background .2s, color .2s, border-color .2s; }
.ecs-btn--primary { background: var(--ecs-orange); color: #fff !important; border-color: var(--ecs-orange); }
.ecs-btn--ghost { color: #fff !important; border-color: rgba(255, 255, 255, .6); }
.ecs-btn:hover, .ecs-btn:focus-visible { background: #fff; color: var(--ecs-navy) !important; border-color: #fff; }

/* Accessibilità (WCAG 2.1 AA): l'arancione del logo su bianco ha contrasto 2,5:1.
   Testo piccolo arancione su sfondi chiari in tonalità più scura (5,2:1 su bianco);
   sugli sfondi scuri resta l'arancione del logo. Pulsanti arancioni con testo scuro. */
:root { --ecs-orange-text: #a65800; }
.ecs-eyebrow { color: var(--ecs-orange-text); }
.ecs-hero .ecs-eyebrow,
.ecs-cta-band .ecs-eyebrow,
.ecs-cta-global .ecs-eyebrow,
.entry-hero .ecs-eyebrow,
.wp-block-cover .ecs-eyebrow { color: var(--ecs-orange); }
.ecs-hero .wp-block-button:not(.is-style-outline) .wp-block-button__link,
.ecs-cta-band .wp-block-button:not(.is-style-outline) .wp-block-button__link,
.ecs-btn--primary { color: #111 !important; }

/* Gruppo BDF Digital: logo in home e fascia in cima al footer */
.ecs-group-logo { margin: 1.6rem auto .6rem !important; }
.ecs-group-logo img { height: auto; }
.ecs-group-note { color: var(--global-palette5); font-size: 15px; }
.ecs-group-band { background: var(--global-palette1); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.ecs-group-band__inner { display: flex; align-items: center; justify-content: center; gap: 1.1rem; padding-top: 1.4rem; padding-bottom: 1.4rem; flex-wrap: wrap; }
.ecs-group-band__label { color: rgba(255, 255, 255, .75); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.ecs-group-band__link { display: inline-flex; line-height: 0; opacity: .92; transition: opacity .2s; }
.ecs-group-band__link:hover, .ecs-group-band__link:focus-visible { opacity: 1; }
.ecs-group-band__logo { width: 120px; height: auto; }

/* Barra del gruppo sopra l'header (in home l'header trasparente scende sotto la barra) */
.ecs-topbar { position: relative; z-index: 101; background: #0a0a0a; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.ecs-topbar__inner { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; min-height: 34px; }
.ecs-topbar__label { color: rgba(255, 255, 255, .7); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.ecs-topbar__link { display: inline-flex; line-height: 0; opacity: .9; transition: opacity .2s; }
.ecs-topbar__link:hover, .ecs-topbar__link:focus-visible { opacity: 1; }
.transparent-header #masthead { margin-top: 35px; }
@media (max-width: 767px) { .ecs-topbar__inner { justify-content: center; } }

/* Hero: ritaglio del logo ECS dalla lastra (shortcode [ecs_hero_fx], js/ecs-home.js) */
.ecs-tp-plate { fill: #222; fill-opacity: .92; stroke: rgba(255, 255, 255, .22); }
.ecs-tp-hole-fill { fill: url(#ecs-tp-deep); }
.ecs-tp-piece { fill: #2c2c2c; stroke: rgba(255, 255, 255, .3); stroke-width: 1; }
.ecs-tp-kerfline { fill: none; stroke: #ffb347; stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 5px rgba(241, 139, 0, .75)); transition: stroke .8s, stroke-opacity .8s, filter .8s; }
.ecs-tp-kerfline.is-cool { stroke: #8a5412; stroke-opacity: .7; filter: none; }
.ecs-tp-rapidline { stroke: rgba(255, 255, 255, .25); stroke-width: 1; stroke-dasharray: 4 5; }
.ecs-tp-spark { fill: #f18b00; }
.ecs-tp-spark.is-hot { fill: #ffd08a; }
.ecs-dro-st em { font-style: normal; }

/* Cellulare: la riga del menu scorre dentro se stessa e non allarga la pagina
   (prima era larga 716 px su uno schermo da 375 e trascinando compariva una fascia bianca). */
.site-header-item-mobile-navigation { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.site-header-item-mobile-navigation::-webkit-scrollbar { display: none; }
.site-header-item-mobile-navigation .mobile-navigation ul { flex-wrap: nowrap; }
/* Rete di sicurezza: nessun elemento può creare scorrimento orizzontale della pagina. */
html, body { overflow-x: clip; }
