/* ==========================================================================
   dy-core.css — Design system "clinical-chic" · Dermatologia Ayala
   --------------------------------------------------------------------------
   Contratto condiviso con l'agente UI:
     - token :root (--dy-*) + rideclarazione palette Kadence (--global-*)
     - primitive layout: .dy-container .dy-section .dy-eyebrow .dy-title .dy-lead
     - primitive azione: .dy-btn (+ modificatori)
   Struttura:
     01 Token            06 Header           11 Utility & polish
     02 Layout base      07 Footer
     03 Tipografia       08 Form (Fluent Forms)
     04 Link             09 Cookie notice
     05 Bottoni          10 Override Kadence content
   ========================================================================== */

/* ==========================================================================
   01 · TOKEN
   ========================================================================== */

:root {
	/* Palette */
	--dy-ivory: #F6F4EF;
	--dy-surface: #FFFFFF;
	--dy-ink: #1B2220;
	--dy-strong: #2C3532;
	--dy-body: #4A534F;
	--dy-muted: #7B847F;
	--dy-line: #E6E1D8;
	--dy-sage: #3A76B6;
	--dy-sage-deep: #275691;
	--dy-sage-tint: #EDF2F7;
	--dy-dust: #93AEBF;
	--dy-dust-deep: #6E93A8;
	--dy-dust-tint: #EEF3F6;
	--dy-alert: #B4553F;

	/* Forme — linguaggio: azioni = pill, campi = 10px, superfici = 14/22px */
	--dy-radius-sm: 8px;
	--dy-radius-md: 14px;
	--dy-radius-lg: 22px;
	--dy-radius-pill: 999px;
	--dy-radius-field: 10px;

	/* Ombre */
	--dy-shadow-sm: 0 1px 2px rgba(27, 34, 32, .05), 0 4px 12px rgba(27, 34, 32, .05);
	--dy-shadow-md: 0 2px 4px rgba(27, 34, 32, .05), 0 14px 34px rgba(27, 34, 32, .09);

	/* Spacing scale */
	--dy-space-1: 4px;
	--dy-space-2: 8px;
	--dy-space-3: 12px;
	--dy-space-4: 16px;
	--dy-space-5: 24px;
	--dy-space-6: 32px;
	--dy-space-7: 48px;
	--dy-space-8: 64px;
	--dy-space-9: 96px;
	--dy-space-10px: 10px;
	--dy-space-14px: 14px;
	--dy-space-18px: 18px;
	--dy-space-20px: 20px;
	--dy-space-22px: 22px;
	--dy-space-28px: 28px;
	--dy-space-36px: 36px;
	--dy-space-40px: 40px;
	--dy-space-56px: 56px;
	--dy-space-60px: 60px;
	--dy-space-64px: 64px;

	/* Font pairing */
	--dy-font-head: "Plus Jakarta Sans", "Iowan Old Style", Georgia, serif;
	--dy-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	/* Layout */
	--dy-container: 1200px;
	--dy-header-height: 76px;

	--dy-motion-ease: cubic-bezier(.22, 1, .36, 1);
	--dy-motion-enter: .6s;
	--dy-motion-hover: .3s;
	--dy-motion-distance: 16px;
	--dy-motion-hero-stagger: 80ms;
}

/* Rideclarazione palette Kadence — vince su ordine di caricamento:
   la stessa identità colore esiste sia in kadence-global-inline-css sia qui. */
:root {
	--global-palette1: #3A76B6;
	--global-palette2: #275691;
	--global-palette3: #1B2220;
	--global-palette4: #2C3532;
	--global-palette5: #4A534F;
	--global-palette6: #7B847F;
	--global-palette7: #E6E1D8;
	--global-palette8: #F6F4EF;
	--global-palette9: #FFFFFF;
	--global-palette9rgb: 255, 255, 255;
	--global-palette10: #93AEBF;
	--global-palette11: #4E7A5E;
	--global-palette12: #6E93A8;
	--global-palette13: #B4553F;
	--global-palette14: #C89F5B;
	--global-palette15: #C89F5B;

	--global-palette-highlight: #3A76B6;
	--global-palette-highlight-alt: #275691;
	--global-palette-highlight-alt2: #FFFFFF;

	--global-palette-btn-bg: #3A76B6;
	--global-palette-btn-bg-hover: #275691;
	--global-palette-btn: #FFFFFF;
	--global-palette-btn-hover: #FFFFFF;

	--global-palette-btn-sec-bg: #E6E1D8;
	--global-palette-btn-sec-bg-hover: #275691;
	--global-palette-btn-sec: #1B2220;
	--global-palette-btn-sec-hover: #FFFFFF;
}

/* ==========================================================================
   02 · LAYOUT BASE
   ========================================================================== */

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

.dy-container {
	width: 100%;
	max-width: var(--dy-container);
	margin-inline: auto;
	padding-inline: clamp(20px, 4vw, 32px);
}

.dy-section {
	padding-block: clamp(56px, 8vw, 96px);
}

.dy-section--alt {
	background: var(--dy-sage-tint);
}

.dy-eyebrow {
	display: inline-block;
	margin: 0 0 var(--dy-space-4);
	font-family: var(--dy-font-body);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--dy-sage-deep);
}

.dy-title {
	margin: 0 0 var(--dy-space-4);
	font-family: var(--dy-font-head);
	font-optical-sizing: auto;
	font-size: clamp(28px, 3.6vw, 42px);
	font-weight: 600;
	line-height: 1.14;
	letter-spacing: -.015em;
	color: var(--dy-ink);
}

.dy-lead {
	margin: 0;
	max-width: 62ch;
	font-family: var(--dy-font-body);
	font-size: 17px;
	line-height: 1.7;
	color: var(--dy-muted);
}

/* ==========================================================================
   03 · TIPOGRAFIA BASE
   ========================================================================== */

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

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	background: var(--dy-ivory);
	color: var(--dy-body);
	font-family: var(--dy-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 .5em;
	font-family: var(--dy-font-head);
	font-optical-sizing: auto;
	font-weight: 600;
	line-height: 1.16;
	letter-spacing: -.015em;
	color: var(--dy-ink);
}

h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -.02em; }
h2 { font-size: clamp(25px, 3.4vw, 39px); line-height: 1.12; }
h3 { font-size: clamp(21px, 2.4vw, 28px); }
h4 { font-size: clamp(18px, 1.8vw, 23px); line-height: 1.3; }
h5 { font-size: 18px; line-height: 1.35; letter-spacing: -.005em; }
h6 { font-size: 16px; line-height: 1.4; letter-spacing: 0; }

p {
	margin: 0 0 1.1em;
}

p:last-child {
	margin-bottom: 0;
}

small {
	font-size: .85em;
}

strong, b {
	font-weight: 600;
	color: var(--dy-ink);
}

::selection {
	background: var(--dy-sage-tint);
	color: var(--dy-ink);
}

::placeholder {
	color: var(--dy-muted);
	opacity: 1;
}

:focus-visible {
	outline: 2px solid var(--dy-sage);
	outline-offset: 3px;
}

/* ==========================================================================
   04 · LINK
   ========================================================================== */

a {
	color: var(--dy-ink);
	text-decoration-color: transparent;
	text-underline-offset: .18em;
	transition: color .2s ease, text-decoration-color .2s ease;
}

a:hover {
	color: var(--dy-sage-deep);
	text-decoration-color: var(--dy-sage);
}

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

.skip-link {
	position: absolute !important;
	top: -60px;
	left: var(--dy-space-4);
	z-index: 10000;
	padding: 12px 20px;
	background: var(--dy-ink);
	color: var(--dy-ivory);
	font-size: 14px;
	font-weight: 600;
	border-radius: var(--dy-radius-field);
	box-shadow: var(--dy-shadow-md);
	transition: top .2s ease;
}

.skip-link:focus {
	top: var(--dy-space-4);
	color: var(--dy-ivory);
}

/* ==========================================================================
   05 · BOTTONI
   ========================================================================== */

.dy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--dy-space-2);
	padding: 15px 30px;
	border: 1px solid transparent;
	border-radius: var(--dy-radius-pill);
	background: transparent;
	color: var(--dy-ink);
	font-family: var(--dy-font-body);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .01em;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .22s ease, border-color .22s ease, color .22s ease, box-shadow .22s ease, transform .12s ease;
}

.dy-btn:hover {
	color: inherit;
	text-decoration: none;
}

.dy-btn:active {
	transform: translateY(1px);
}

.dy-btn:disabled,
.dy-btn[aria-disabled="true"] {
	opacity: .55;
	cursor: not-allowed;
	transform: none;
}

.dy-btn--primary {
	background: var(--dy-sage);
	border-color: var(--dy-sage);
	color: var(--dy-surface);
	box-shadow: var(--dy-shadow-sm);
}

.dy-btn--primary:hover {
	background: var(--dy-sage-deep);
	border-color: var(--dy-sage-deep);
	color: var(--dy-surface);
	box-shadow: var(--dy-shadow-md);
}

.dy-btn--primary:active {
	box-shadow: var(--dy-shadow-sm);
}

.dy-btn--ghost {
	background: transparent;
	border-color: var(--dy-line);
	color: var(--dy-ink);
}

.dy-btn--ghost:hover {
	border-color: var(--dy-sage);
	background: var(--dy-sage-tint);
	color: var(--dy-sage-deep);
}

.dy-btn--sm {
	padding: 11px 22px;
	font-size: 14px;
}

/* ==========================================================================
   06 · HEADER
   ========================================================================== */

.dy-header {
	position: sticky;
	top: 0;
	z-index: 900;
	background: rgba(246, 244, 239, .82);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--dy-line);
	box-shadow: 0 10px 30px -24px rgba(27, 34, 32, .45);
}

.dy-header__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: var(--dy-space-5);
	min-height: var(--dy-header-height);
}

/* Brand ------------------------------------------------------------------ */

.dy-logo {
	display: inline-flex;
	align-items: center;
	gap: var(--dy-space-3);
	text-decoration: none;
	color: var(--dy-ink);
}

.dy-logo__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	background: var(--dy-sage);
	border-radius: var(--dy-radius-sm);
	color: var(--dy-surface);
	font-family: var(--dy-font-head);
	font-size: 19px;
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1;
	transition: background-color .22s ease;
}

.dy-logo:hover .dy-logo__mark {
	background: var(--dy-sage-deep);
}

.dy-logo__text {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.dy-logo__name {
	display: block;
	font-family: var(--dy-font-head);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -.01em;
	color: var(--dy-ink);
}

.dy-logo__tagline {
	display: block;
	font-family: var(--dy-font-body);
	font-size: 12px;
	font-style: normal;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--dy-muted);
	white-space: nowrap;
}

/* Nav -------------------------------------------------------------------- */

.dy-nav {
	justify-self: center;
}

.dy-nav__list,
.dy-nav__list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dy-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(var(--dy-space-3), 1.6vw, 28px);
}

.dy-nav__list li {
	position: relative;
	margin: 0;
	padding: 0;
}

.dy-nav__list li a {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 6px 0;
	font-family: var(--dy-font-body);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: .015em;
	color: var(--dy-ink);
	text-decoration: none;
	transition: color .2s ease;
}

.dy-nav__list li a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 2px;
	background: var(--dy-sage);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}

.dy-nav__list li a:hover,
.dy-nav__list li a:focus-visible {
	color: var(--dy-sage-deep);
}

.dy-nav__list li a:hover::after,
.dy-nav__list li a:focus-visible::after {
	transform: scaleX(1);
}

.dy-nav__list li.current-menu-item > a {
	color: var(--dy-sage-deep);
}

.dy-nav__list li.current-menu-item > a::after {
	transform: scaleX(1);
}

/* Dropdown (profondità 2) */

.dy-nav__list li ul.sub-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: -14px;
	z-index: 20;
	min-width: 236px;
	margin: 0;
	padding: var(--dy-space-2);
	background: var(--dy-surface);
	border: 1px solid var(--dy-line);
	border-radius: var(--dy-radius-md);
	box-shadow: var(--dy-shadow-md);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.dy-nav__list li ul.sub-menu::before {
	content: "";
	position: absolute;
	top: -11px;
	left: 0;
	width: 100%;
	height: 12px;
}

.dy-nav__list li:hover > ul.sub-menu,
.dy-nav__list li:focus-within > ul.sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.dy-nav__list li ul.sub-menu li {
	margin: 0;
}

.dy-nav__list li ul.sub-menu li a {
	display: flex;
	width: 100%;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: .01em;
	color: var(--dy-body);
	border-radius: var(--dy-radius-sm);
	transition: background-color .18s ease, color .18s ease;
}

.dy-nav__list li ul.sub-menu li a::after {
	display: none;
}

.dy-nav__list li ul.sub-menu li a:hover,
.dy-nav__list li ul.sub-menu li.current-menu-item > a {
	background: var(--dy-sage-tint);
	color: var(--dy-sage-deep);
}

/* Azioni ----------------------------------------------------------------- */

.dy-header__actions {
	display: flex;
	align-items: center;
	gap: var(--dy-space-3);
	justify-self: end;
}

/* Burger */

.dy-burger {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--dy-line);
	border-radius: var(--dy-radius-sm);
	background: var(--dy-surface);
	cursor: pointer;
	transition: border-color .2s ease, background-color .2s ease;
}

.dy-burger:hover {
	border-color: var(--dy-sage);
}

.dy-burger__bar {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--dy-ink);
	border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease;
}

.dy-burger[aria-expanded="true"] .dy-burger__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.dy-burger[aria-expanded="true"] .dy-burger__bar:nth-child(2) {
	opacity: 0;
}

.dy-burger[aria-expanded="true"] .dy-burger__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Nav mobile (drawer) */

.dy-mobile-nav {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	max-height: calc(100vh - var(--dy-header-height));
	max-height: calc(100dvh - var(--dy-header-height));
	z-index: 899;
	background: var(--dy-ivory);
	border-top: 1px solid var(--dy-line);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.dy-mobile-nav[hidden] {
	display: none;
}

.dy-mobile-nav__inner {
	display: flex;
	flex-direction: column;
	gap: var(--dy-space-5);
	padding: var(--dy-space-6) var(--dy-space-5) calc(var(--dy-space-8) + env(safe-area-inset-bottom, 0px));
}

.dy-mobile-nav__list,
.dy-mobile-nav__list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dy-mobile-nav__list li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--dy-line);
}

.dy-mobile-nav__list li a {
	display: block;
	padding: var(--dy-space-4) 0;
	font-family: var(--dy-font-head);
	font-size: 20px;
	font-weight: 600;
	letter-spacing: -.01em;
	color: var(--dy-ink);
	text-decoration: none;
	transition: color .2s ease;
}

.dy-mobile-nav__list li a:hover,
.dy-mobile-nav__list li.current-menu-item > a {
	color: var(--dy-sage-deep);
}

.dy-mobile-nav__list li ul {
	padding-left: var(--dy-space-5);
	border-top: 1px solid var(--dy-line);
}

.dy-mobile-nav__list li ul li a {
	font-family: var(--dy-font-body);
	font-size: 16px;
	font-weight: 500;
	color: var(--dy-body);
}

.dy-mobile-nav__cta {
	width: 100%;
}

@media (max-width: 1024px) {
	.dy-nav {
		display: none;
	}

	.dy-burger {
		display: flex;
	}

	.dy-header .dy-header__cta {
		display: none;
	}
}

@media (max-width: 1240px) and (min-width: 1025px) {
	.dy-logo__tagline {
		display: none;
	}
}

@media (max-width: 600px) {
	.dy-header__inner {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.dy-header__brand,
	.dy-logo__text {
		min-width: 0;
	}

	.dy-logo__tagline {
		display: none;
	}

	.dy-logo__name {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}

/* ==========================================================================
   07 · FOOTER
   ========================================================================== */

.dy-footer {
	background: var(--dy-ink);
	color: rgba(246, 244, 239, .78);
	font-size: 15px;
	line-height: 1.7;
}

.dy-footer a {
	color: rgba(246, 244, 239, .78);
	text-decoration: none;
	transition: color .2s ease;
}

.dy-footer a:hover {
	color: var(--dy-sage);
}

.dy-footer__grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1.4fr 1fr;
	gap: var(--dy-space-7) var(--dy-space-6);
	padding-block: clamp(48px, 6vw, 80px);
}

.dy-footer__logo .dy-logo__mark {
	width: 40px;
	height: 40px;
	flex-basis: 40px;
	font-size: 17px;
}

.dy-footer__logo .dy-logo__name {
	color: var(--dy-ivory);
	font-size: 19px;
}

.dy-footer__tagline {
	margin: var(--dy-space-4) 0 0;
	max-width: 34ch;
	font-size: 14px;
	line-height: 1.65;
	color: rgba(246, 244, 239, .55);
}

.dy-footer__title {
	margin: 0 0 var(--dy-space-5);
	font-family: var(--dy-font-body);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--dy-sage);
}

.dy-footer__menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dy-footer__menu li {
	margin: 0 0 10px;
	padding: 0;
}

.dy-footer__menu li a {
	font-size: 15px;
	color: rgba(246, 244, 239, .78);
}

.dy-footer__menu li a:hover,
.dy-footer__menu li.current-menu-item > a {
	color: var(--dy-sage);
}

.dy-footer__offices {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dy-footer__office {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: var(--dy-space-4);
}

.dy-footer__office:last-child {
	margin-bottom: 0;
}

.dy-footer__city {
	font-family: var(--dy-font-head);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -.005em;
	color: var(--dy-ivory);
}

.dy-footer__city a {
	color: inherit;
	text-decoration: none;
	transition: color 0.25s ease;
}

.dy-footer__city a:hover,
.dy-footer__city a:focus-visible {
	color: var(--dy-sage);
}

.dy-footer__address {
	font-size: 13.5px;
	color: rgba(246, 244, 239, .55);
}

.dy-footer__tel {
	font-size: 13.5px;
	color: rgba(246, 244, 239, .72);
}

.dy-footer__contact {
	margin: 0 0 var(--dy-space-5);
}

.dy-footer__contact a {
	font-size: 15px;
	text-decoration: underline;
	text-decoration-color: rgba(58, 118, 182, .5);
	text-underline-offset: .2em;
}

.dy-footer__bottom {
	border-top: 1px solid rgba(246, 244, 239, .12);
}

.dy-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--dy-space-3);
	padding-block: var(--dy-space-5);
	font-size: 13px;
	color: rgba(246, 244, 239, .5);
}

.dy-footer__legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--dy-space-5);
}

.dy-footer__legal a,
.dy-cookie-revoke {
	font-size: 13px;
	color: rgba(246, 244, 239, .5);
}

.dy-footer__legal a:hover,
.dy-cookie-revoke:hover {
	color: var(--dy-sage);
}

.dy-cookie-revoke {
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--dy-font-body);
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: .2em;
	cursor: pointer;
	transition: color .2s ease, text-decoration-color .2s ease;
}

.dy-cookie-revoke:hover {
	text-decoration-color: var(--dy-sage);
}

@media (max-width: 960px) {
	.dy-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 600px) {
	.dy-footer__grid {
		grid-template-columns: 1fr;
		gap: var(--dy-space-6);
	}

	.dy-footer__bottom-inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ==========================================================================
   08 · FORM (Fluent Forms)
   ========================================================================== */

.frm-fluent-form {
	font-family: var(--dy-font-body);
	color: var(--dy-body);
	/* Palette plugin: lo stile inline del submit usa var(--fluentform-primary).
	   Ridefinendo la variabile sull'elemento-form (ereditarietà) il bottone
	   eredita il sage della design system al posto del blu di default. */
	--fluentform-primary: var(--dy-sage);
	--fluentform-primary-dark: var(--dy-sage-deep);
	--fluentform-secondary: var(--dy-body);
	--fluentform-danger: var(--dy-alert);
	--fluentform-border-color: var(--dy-line);
	--fluentform-border-radius: var(--dy-radius-field);
}

.frm-fluent-form .ff-el-input--label,
.frm-fluent-form label {
	display: block;
	margin: 0 0 var(--dy-space-2);
	font-family: var(--dy-font-body);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--dy-ink);
}

.frm-fluent-form label {
	cursor: pointer;
}

.frm-fluent-form .ff-el-form-control,
.frm-fluent-form input[type="text"],
.frm-fluent-form input[type="email"],
.frm-fluent-form input[type="tel"],
.frm-fluent-form input[type="url"],
.frm-fluent-form input[type="number"],
.frm-fluent-form input[type="date"],
.frm-fluent-form select,
.frm-fluent-form textarea {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 14px 16px;
	border: 1px solid var(--dy-line);
	border-radius: var(--dy-radius-field);
	background: var(--dy-surface);
	color: var(--dy-body);
	font-family: var(--dy-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	box-shadow: none;
	transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.frm-fluent-form textarea {
	min-height: 140px;
	resize: vertical;
}

.frm-fluent-form select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237B847F' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	padding-right: 44px;
	cursor: pointer;
}

.frm-fluent-form .ff-el-form-control:focus,
.frm-fluent-form input:focus,
.frm-fluent-form select:focus,
.frm-fluent-form textarea:focus {
	outline: none;
	border-color: var(--dy-sage);
	box-shadow: 0 0 0 3px rgba(58, 118, 182, .22);
	background-color: var(--dy-surface);
}

.frm-fluent-form .ff-el-form-control::placeholder {
	color: var(--dy-muted);
}

/* Checkbox / radio */

.frm-fluent-form .ff-el-input--content label,
.frm-fluent-form .ff-checkbox-item label,
.frm-fluent-form .ff-radio-item label {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--dy-body);
}

.frm-fluent-form input[type="checkbox"],
.frm-fluent-form input[type="radio"] {
	display: inline-block;
	width: 18px;
	min-height: 18px;
	margin: 0;
	padding: 0;
	accent-color: var(--dy-sage);
	cursor: pointer;
}

/* Consenso privacy: Fluent Forms usa una struttura tabellare
   (label.ff_tc_label > span + div.ff_t_c) che lascia il checkbox
   attaccato al testo — la riconvertiamo in flex con gap. */

.frm-fluent-form .ff-el-form-check.ff-el-tc label.ff_tc_label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--dy-body);
	line-height: 1.5;
}

.frm-fluent-form .ff-el-form-check.ff-el-tc .ff_tc_checkbox {
	display: inline-flex;
	align-items: center;
	width: auto;
	padding-top: 3px !important; /* il plugin impone 8px con !important */
}

.frm-fluent-form .ff-el-form-check.ff-el-tc .ff_t_c {
	margin: 0;
	padding: 0;
	flex: 1;
}

/* Errori */

.frm-fluent-form .ff-el-has_error .ff-el-form-control,
.frm-fluent-form .ff-el-has_error input,
.frm-fluent-form .ff-el-has_error select,
.frm-fluent-form .ff-el-has_error textarea {
	border-color: var(--dy-alert);
}

.frm-fluent-form .ff-el-has_error .ff-el-form-control:focus,
.frm-fluent-form .ff-el-has_error input:focus {
	box-shadow: 0 0 0 3px rgba(180, 85, 63, .18);
}

.frm-fluent-form .ff-msg-error,
.frm-fluent-form .ff_el_error_message {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--dy-alert);
}

.frm-fluent-form .ff-success-message,
.frm-fluent-form .ff-message-success {
	margin-top: var(--dy-space-4);
	padding: 14px 16px;
	border: 1px solid rgba(58, 118, 182, .35);
	border-radius: var(--dy-radius-field);
	background: var(--dy-sage-tint);
	color: var(--dy-sage-deep);
	font-size: 15px;
}

/* Submit */

.frm-fluent-form .ff-btn-submit,
.frm-fluent-form input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--dy-space-2);
	min-height: 52px;
	padding: 15px 30px;
	border: 1px solid var(--dy-sage);
	border-radius: var(--dy-radius-pill);
	background: var(--dy-sage);
	color: var(--dy-surface);
	font-family: var(--dy-font-body);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .01em;
	cursor: pointer;
	transition: background-color .22s ease, border-color .22s ease, box-shadow .22s ease, transform .12s ease;
}

.frm-fluent-form .ff-btn-submit:hover,
.frm-fluent-form input[type="submit"]:hover {
	background: var(--dy-sage-deep);
	border-color: var(--dy-sage-deep);
	color: var(--dy-surface);
	box-shadow: var(--dy-shadow-md);
}

/* Specificità (0,4,0): serve a superare lo stile inline del plugin
   (form.fluent_form_3 .ff-btn-submit:not(...) = (0,3,1)) sullo stato hover. */
.frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style):hover,
.frm-fluent-form .ff-btn-submit:not(.ff_btn_no_style):focus-visible {
	background-color: var(--dy-sage-deep);
	border-color: var(--dy-sage-deep);
	color: var(--dy-surface);
}

.frm-fluent-form .ff-btn-submit:active {
	transform: translateY(1px);
}

.frm-fluent-form .ff-btn-submit:disabled {
	opacity: .55;
	cursor: not-allowed;
}

/* ==========================================================================
   09 · COOKIE NOTICE
   ========================================================================== */

#cookie-notice {
	background: #1B2220 !important;
	color: #F6F4EF;
	border-radius: var(--dy-radius-md);
	box-shadow: var(--dy-shadow-md);
	padding: 20px 22px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
	font-family: var(--dy-font-body);
	font-size: 14px;
	line-height: 1.6;
}

#cookie-notice .cookie-notice-container,
#cookie-notice .cn-btn-container {
	display: block;
}

#cookie-notice .cn-text {
	color: rgba(246, 244, 239, .8);
}

#cookie-notice .cn-text a,
#cookie-notice a {
	color: var(--dy-sage);
	text-decoration: underline;
	text-underline-offset: .18em;
}

#cookie-notice .cn-button,
#cookie-notice .cn-accept {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 14px;
	padding: 11px 24px;
	/* !important serve a sovrascrivere il background-color inline del plugin. */
	border: 1px solid var(--dy-sage);
	border-radius: var(--dy-radius-pill);
	background: var(--dy-sage) !important;
	color: var(--dy-surface);
	font-family: var(--dy-font-body);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .01em;
	cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease;
}

#cookie-notice .cn-button:hover,
#cookie-notice .cn-accept:hover {
	background: var(--dy-sage-deep) !important;
	border-color: var(--dy-sage-deep);
	color: var(--dy-surface);
}

/* ==========================================================================
   10 · OVERRIDE CONTENT KADENCE (pagine legacy migrate)
   ========================================================================== */

.entry-content a {
	color: var(--dy-sage-deep);
	text-decoration-color: rgba(39, 86, 145, .45);
}

.entry-content a:hover {
	color: var(--dy-sage);
	text-decoration-color: var(--dy-sage);
}

.entry.loop-entry,
.entry.single-entry {
	box-shadow: var(--dy-shadow-sm);
}

.entry-content-wrap {
	padding: clamp(24px, 4vw, 40px);
}

/* ==========================================================================
   11 · UTILITY & POLISH
   ========================================================================== */

.dy-text-center {
	text-align: center;
}

.dy-muted {
	color: var(--dy-muted);
}

img {
	max-width: 100%;
	height: auto;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
