/* ==========================================================================
   PTM Italia Srl – foglio di stile (mobile-first, nessuna dipendenza esterna)
   ========================================================================== */

/* --- Font self-hosted (subset latino) ------------------------------------ */
@font-face { font-family: 'Open Sans'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/opensans-400.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/opensans-600.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/opensans-700.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/robotocondensed-700.woff2') format('woff2'); }

/* --- Tema ----------------------------------------------------------------- */
:root {
  --color-primary: #c8302b;
  --color-primary-dark: #a82520;
  --color-dark: #1b2438;
  --color-dark-2: #263149;
  --color-danger: #d32f2f;
  --color-success: #2e7d32;
  --color-warning: #f57c00;
  --color-info: #0288d1;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f6f9;
  --color-surface: #ffffff;
  --color-text: #212529;
  --color-text-secondary: #5b6472;
  --color-border: #dfe3e8;
  --color-focus: #1976d2;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, 0.18);
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-head: 'Roboto Condensed', 'Arial Narrow', system-ui, sans-serif;
  --container: 1160px;
  --header-h: 76px;
}

/* --- Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--color-primary-dark); text-underline-offset: 3px; }
a:hover { color: var(--color-primary); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; letter-spacing: 0.01em; margin: 0 0 0.6em; color: var(--color-dark); }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
address { font-style: normal; }
abbr[title] { text-decoration: none; cursor: help; color: var(--color-danger); }
code { font-size: 0.92em; background: var(--color-bg-alt); padding: 0.1em 0.4em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 2000; background: var(--color-dark); color: #fff;
  padding: 0.6rem 1rem; border-radius: var(--radius); text-decoration: none; transition: top 0.15s;
}
.skip-link:focus { top: 1rem; color: #fff; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }
.container-narrow { max-width: 860px; }
.center { text-align: center; }
.muted { color: var(--color-text-secondary); }
.muted-link { color: var(--color-text-secondary); font-size: 0.9rem; }

.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; vertical-align: -0.2em; }
.icon-lg { width: 2.25rem; height: 2.25rem; color: var(--color-primary); }

/* --- Bottoni -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 1rem/1.2 var(--font-body); padding: 0.75rem 1.4rem; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background-color 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-lg { padding: 0.9rem 1.7rem; font-size: 1.05rem; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.9rem; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--color-dark); border-color: var(--color-dark); }
.btn-secondary:hover { background: var(--color-dark); color: #fff; }
.btn-light { background: #fff; color: var(--color-dark); }
.btn-light:hover { background: #eef1f6; color: var(--color-dark); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn.is-loading::after {
  content: ''; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-icon {
  display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0;
  background: transparent; color: var(--color-dark); border-radius: 50%; cursor: pointer;
}
.btn-icon:hover { background: rgba(0, 0, 0, 0.07); }
.btn-icon .icon { width: 1.6rem; height: 1.6rem; }
.btn-icon-light { color: #fff; background: rgba(0, 0, 0, 0.35); }
.btn-icon-light:hover { background: rgba(0, 0, 0, 0.6); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: #fff; }

/* --- Topbar e header ------------------------------------------------------ */
.topbar { background: var(--color-dark); color: #dbe1ee; font-size: 0.85rem; }
.topbar-inner { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; padding-block: 0.4rem; }
.topbar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.topbar a:hover { color: #fff; text-decoration: underline; }

.site-header { position: sticky; top: 0; z-index: 900; background: #fff; box-shadow: 0 1px 0 var(--color-border), 0 4px 14px rgba(16, 24, 40, 0.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.logo img { width: 190px; height: auto; }
.nav-toggle { display: none; }
@media (max-width: 860px) { .js .nav-toggle { display: inline-grid; } }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded='true'] .icon-open { display: none; }
.nav-toggle[aria-expanded='true'] .icon-close { display: block; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 0.55rem 0.9rem; border-radius: var(--radius); color: var(--color-dark);
  text-decoration: none; font-weight: 600; font-size: 0.97rem;
}
.site-nav a:hover { background: var(--color-bg-alt); color: var(--color-primary-dark); }
.site-nav a[aria-current='page'] { color: var(--color-primary-dark); box-shadow: inset 0 -3px 0 var(--color-primary); border-radius: 0; }

@media (max-width: 860px) {
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--color-border); box-shadow: var(--shadow-lg); padding: 0.5rem 1rem 1rem; }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 0.85rem 0.5rem; border-bottom: 1px solid var(--color-border); border-radius: 0; }
  .site-nav a[aria-current='page'] { box-shadow: none; color: var(--color-primary); }
  .logo img { width: 160px; }
}

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; min-height: clamp(470px, 74vh, 660px); background: #0e1422; color: #fff; overflow: hidden; display: grid; }
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0.9s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14, 20, 34, 0.9) 0%, rgba(14, 20, 34, 0.62) 55%, rgba(14, 20, 34, 0.12) 100%); }
.hero-caption {
  position: absolute; z-index: 1; left: max(1rem, calc((100% - var(--container)) / 2 + 1rem)); bottom: 4.5rem; margin: 0;
  max-width: calc(100% - 2rem); padding: 0.45rem 0.9rem; font-size: 0.9rem; font-weight: 600; color: #fff;
  background: rgba(14, 20, 34, 0.7); border-left: 4px solid var(--color-primary);
}
.hero-overlay {
  position: relative; z-index: 2; display: flex; align-items: center; padding-block: 3rem 7rem; pointer-events: none;
}
.hero-overlay a { pointer-events: auto; }
@media (max-width: 700px) { .hero-overlay { padding-bottom: 10rem; } }
.hero-content { max-width: var(--container); }
.hero-content > * { max-width: 720px; }
.hero h1 { color: #fff; margin-bottom: 0.4em; }
.hero-lead { font-size: 1.1rem; color: #e8ecf5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--color-primary); margin-bottom: 0.6rem; }
.hero .eyebrow { color: #ff8a84; }
.hero-controls { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0.9rem; margin-inline: auto; display: flex; align-items: center; gap: 0.5rem; }
.hero-dots { display: flex; gap: 0.25rem; }
.hero-dots button {
  position: relative; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; background: transparent; cursor: pointer;
}
.hero-dots button::after { content: ''; position: absolute; left: 50%; top: 50%; width: 0.8rem; height: 0.8rem; margin: -0.4rem 0 0 -0.4rem; border-radius: 50%; background: rgba(255, 255, 255, 0.45); transition: background-color 0.2s, transform 0.2s; }
.hero-dots button[aria-current='true']::after { background: #fff; transform: scale(1.25); }

/* --- Sezioni -------------------------------------------------------------- */
.section { padding-block: clamp(2.75rem, 7vw, 5rem); }
.section-alt { background: var(--color-bg-alt); }
.section-head { max-width: 760px; margin-bottom: 2rem; }
.lead { font-size: 1.15rem; color: var(--color-text-secondary); }

.cta-band { background: var(--color-dark); color: #fff; padding-block: 2.25rem; }
.cta-band h2 { color: #fff; margin-bottom: 0.3em; font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.cta-band p { margin: 0; color: #cfd6e6; }
.cta-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }

.split { display: grid; gap: 2rem; }
.split-aside img { margin-inline: auto; max-width: 260px; }
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 320px; gap: 3.5rem; align-items: center; }
  .split-aside img { max-width: 100%; }
}

.grid { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 560px) and (max-width: 699px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border-top: 4px solid var(--color-primary); }
.card h3 { margin-bottom: 0.5rem; }
.card-link { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

.check-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.6rem; }
.check-list li { display: flex; gap: 0.6rem; align-items: flex-start; }
.check-list .icon { color: var(--color-primary); margin-top: 0.2rem; }

.tag-list { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list li, .tag-list a { display: inline-block; background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 999px; padding: 0.3rem 0.9rem; font-size: 0.95rem; text-decoration: none; color: var(--color-dark); }
.tag-list a:hover { background: var(--color-dark); color: #fff; }
.tag-list-center { justify-content: center; }
.center .btn, p.center { margin-top: 1.5rem; }

.stats { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1rem; text-align: center; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stats li { background: var(--color-dark); color: #cfd6e6; border-radius: var(--radius); padding: 1.5rem 1rem; display: grid; gap: 0.25rem; }
.stats strong { font: 700 clamp(2rem, 4vw, 2.8rem)/1 var(--font-head); color: #fff; }
.stats strong span { font-size: 0.55em; color: #ff8a84; }

.clients-title { text-align: center; font-size: 1.3rem; margin-bottom: 1.5rem; color: var(--color-text-secondary); }
.client-logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; align-items: center; }
@media (min-width: 640px) { .client-logos { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .client-logos { grid-template-columns: repeat(6, 1fr); } }
.client-logos li { background: #fff; border-radius: var(--radius); padding: 0.5rem; border: 1px solid var(--color-border); }
.client-logos img { width: 100%; height: auto; }

/* --- Pagine interne -------------------------------------------------------- */
.page-hero { background: var(--color-dark) url('../img/page-header.webp') center / cover no-repeat; color: #fff; padding-block: clamp(2rem, 6vw, 3.75rem); }
.page-hero h1 { color: #fff; margin-bottom: 0.25em; }
.page-hero .lead { color: #d3daea; max-width: 760px; margin: 0; }
.page-hero .eyebrow { color: #ff8a84; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 0.75rem; display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.9rem; }
.breadcrumb li + li::before { content: '›'; margin-right: 0.4rem; color: #8f9ab3; }
.breadcrumb a { color: #d3daea; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb [aria-current] { color: #fff; font-weight: 600; }

.prose h2 { margin-top: 1.6em; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.prose h2:first-child, .prose .muted + h2 { margin-top: 0.4em; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: 0.35em; }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--color-border); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 560px; }
.data-table th, .data-table td { padding: 0.7rem 0.85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.data-table thead th { position: sticky; top: 0; background: var(--color-dark); color: #fff; font-weight: 600; }
.data-table tbody tr:nth-child(even) { background: var(--color-bg-alt); }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }

/* Parco macchine */
.machine-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .machine-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .machine-grid { grid-template-columns: repeat(3, 1fr); } }
.machine-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.machine-card header { display: flex; gap: 0.75rem; align-items: flex-start; }
.machine-card h3 { font-size: 1.1rem; margin: 0; }
.machine-qty { flex: none; background: var(--color-primary); color: #fff; font: 700 0.9rem/1 var(--font-head); padding: 0.4rem 0.5rem; border-radius: 6px; }
.machine-specs { list-style: none; padding: 0; margin: 0.8rem 0 0; font-size: 0.9rem; color: var(--color-text-secondary); display: grid; gap: 0.15rem; }
.machine-specs li { padding-left: 0.9rem; position: relative; }
.machine-specs li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 5px; height: 5px; border-radius: 50%; background: var(--color-primary); }

/* Galleria */
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-grid a { display: block; overflow: hidden; border-radius: var(--radius); background: var(--color-bg-alt); aspect-ratio: 4 / 3; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-grid a:hover img { transform: scale(1.06); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; color: #fff; }
.lightbox::backdrop { background: rgba(8, 12, 22, 0.92); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: 3.5rem 1fr 3.5rem; align-items: center; padding: 1rem 0.25rem; }
.lightbox figure { margin: 0; display: grid; gap: 0.75rem; justify-items: center; min-width: 0; }
.lightbox img { max-height: calc(100vh - 8rem); width: auto; max-width: 100%; border-radius: 4px; background: #000; }
.lightbox figcaption { font-size: 0.95rem; text-align: center; color: #d3daea; }
.lightbox-close { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; }
.lightbox-prev { grid-column: 1; justify-self: center; }
.lightbox-next { grid-column: 3; justify-self: center; }
@media (max-width: 560px) { .lightbox-inner { grid-template-columns: 2.75rem 1fr 2.75rem; } }

/* Contatti */
.contact-cards { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; gap: 1rem; }
@media (min-width: 700px) { .contact-cards { grid-template-columns: repeat(3, 1fr); } }
.contact-cards li { text-align: center; background: var(--color-bg-alt); border-radius: var(--radius); padding: 1.5rem 1rem; }
.contact-cards h2 { font-size: 1.1rem; margin: 0.5rem 0 0.25rem; }
.contact-cards p { margin: 0; }
.contact-layout { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .contact-layout { grid-template-columns: 1.1fr 1fr; align-items: start; } }

.form { display: grid; gap: 1.1rem; margin-top: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input[type='text'], .field input[type='email'], .field input[type='tel'], .field textarea {
  width: 100%; font: inherit; padding: 0.75rem 0.9rem; border: 1px solid #aeb6c4; border-radius: var(--radius); background: #fff; color: var(--color-text);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field textarea:focus { border-color: var(--color-focus); outline: 3px solid rgba(25, 118, 210, 0.3); outline-offset: 0; }
.field input[aria-invalid='true'], .field textarea[aria-invalid='true'] { border-color: var(--color-danger); }
.field input.is-valid, .field textarea.is-valid { border-color: var(--color-success); }
.field-error { display: flex; gap: 0.35rem; align-items: flex-start; margin: 0; color: var(--color-danger); font-size: 0.88rem; font-weight: 600; }
.field-error .icon { margin-top: 0.1rem; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 400 !important; font-size: 0.93rem !important; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--color-primary); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: var(--radius); margin: 1rem 0; border: 1px solid; }
.alert .icon { margin-top: 0.15rem; }
.alert-success { background: #edf7ee; border-color: var(--color-success); color: #1b5e20; }
.alert-error { background: #fdecea; border-color: var(--color-danger); color: #8c1d18; }
.alert-info { background: #e8f4fb; border-color: var(--color-info); color: #01579b; }
.alert-info .btn { margin-left: 0.4rem; }

.map { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--color-bg-alt); border: 1px solid var(--color-border); min-height: 420px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-placeholder { min-height: 420px; display: grid; place-content: center; justify-items: center; gap: 0.5rem; text-align: center; padding: 1.5rem; }
.map-placeholder p { margin: 0; max-width: 360px; }

/* --- Footer --------------------------------------------------------------- */
.site-footer { background: var(--color-dark); color: #cfd6e6; font-size: 0.95rem; }
.site-footer a { color: #e8ecf5; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 2rem; padding-block: 3rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.6fr 0.8fr 1fr 1.2fr; } }
.site-footer h2 { font-size: 1.1rem; color: #fff; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-logo { width: 200px; height: auto; margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.site-footer address p { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.6rem; }
.site-footer address .icon { margin-top: 0.2rem; color: #ff8a84; }
.footer-legal { color: #a8b2c7; font-size: 0.88rem; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.88rem; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 1rem; }
.footer-bottom p { margin: 0; }
.footer-bottom ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

/* --- Banner cookie e dialog ----------------------------------------------- */
.cookie-banner {
  position: fixed; z-index: 1500; left: 0; right: 0; bottom: 0; padding: 0.75rem;
  display: flex; justify-content: center; pointer-events: none;
}
.cookie-banner-inner {
  pointer-events: auto; width: 100%; max-width: 1080px; background: #fff; color: var(--color-text); border-radius: 12px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-border); border-top: 4px solid var(--color-primary);
  padding: 1.1rem 1.25rem; display: grid; gap: 1rem; max-height: 85vh; overflow-y: auto;
}
.cookie-banner h2 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.cookie-banner p { font-size: 0.9rem; margin: 0; color: var(--color-text-secondary); }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cookie-banner-actions .btn { flex: 1 1 9rem; }
@media (min-width: 900px) {
  .cookie-banner-inner { grid-template-columns: 1fr auto; align-items: center; }
  .cookie-banner-actions { flex-wrap: nowrap; }
  .cookie-banner-actions .btn { flex: none; }
}

.dialog { border: 0; border-radius: 12px; padding: 0; width: min(560px, calc(100% - 1.5rem)); max-height: calc(100vh - 2rem); box-shadow: var(--shadow-lg); color: var(--color-text); }
.dialog::backdrop { background: rgba(16, 24, 40, 0.6); }
.dialog-body { padding: 1.4rem; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.dialog-head h2 { margin: 0; font-size: 1.4rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-end; margin-top: 1.25rem; }
.cookie-cat { border: 0; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.cookie-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.9rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-bg-alt); }
.cookie-row h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.cookie-row p { font-size: 0.88rem; margin: 0; color: var(--color-text-secondary); }

.switch { position: relative; flex: none; display: inline-block; width: 3.1rem; height: 1.8rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: inherit; z-index: 1; }
.switch-ui { position: absolute; inset: 0; border-radius: 999px; background: #9aa3b4; transition: background-color 0.2s; }
.switch-ui::after { content: ''; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); }
.switch input:checked + .switch-ui { background: var(--color-success); }
.switch input:checked + .switch-ui::after { transform: translateX(1.3rem); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + .switch-ui { opacity: 0.6; }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--color-focus); outline-offset: 2px; }

/* --- Toast ----------------------------------------------------------------- */
.toast-region { position: fixed; z-index: 2500; right: 1rem; bottom: 1rem; display: grid; gap: 0.5rem; max-width: calc(100% - 2rem); pointer-events: none; }
.toast { background: var(--color-dark); color: #fff; padding: 0.8rem 1.1rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 0.95rem; animation: toast-in 0.25s ease; border-left: 4px solid var(--color-info); }
.toast-success { border-left-color: #66bb6a; }
.toast-error { border-left-color: #ef5350; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.4s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* --- Accessibilità: riduzione animazioni ------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* --- Stampa ----------------------------------------------------------------- */
@media print {
  .topbar, .site-header, .cookie-banner, .toast-region, .hero-controls, .cta-band, .site-footer .footer-grid { display: none !important; }
  .page-hero, .hero { background: none; color: #000; }
  .page-hero h1, .page-hero .lead { color: #000; }
}
