/* build 2026-06-08 mobile */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,600&display=swap');

:root {
  --green: #7ec242;
  --green-light: #a8d96a;
  --turquoise: #00b4a6;
  --blue: #1e56a0;
  --blue-dark: #143d75;
  --navy: #0f1b33;
  --navy-mid: #1a2744;
  --navy-light: #334155;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-600: #64748b;
  --white: #ffffff;
  --gradient: linear-gradient(135deg, var(--green) 0%, var(--turquoise) 48%, var(--blue) 100%);
  --gradient-soft: linear-gradient(135deg, rgba(126, 194, 66, 0.15) 0%, rgba(0, 180, 166, 0.12) 50%, rgba(30, 86, 160, 0.15) 100%);
  --shadow-sm: 0 2px 8px rgba(15, 27, 51, 0.04);
  --shadow: 0 8px 32px rgba(15, 27, 51, 0.08);
  --shadow-lg: 0 24px 64px rgba(15, 27, 51, 0.14);
  --shadow-glow: 0 8px 40px rgba(0, 180, 166, 0.25);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --max-width: 1180px;
  --header-h: 112px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: var(--font);
  color: var(--navy-mid);
  line-height: 1.65;
  background:
    linear-gradient(180deg, var(--gray-50) 0%, var(--white) 28%, var(--white) 72%, var(--gray-50) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  -webkit-tap-highlight-color: rgba(0, 180, 166, 0.15);
}

body.menu-open {
  overflow: hidden;
}

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

a { color: var(--blue); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--turquoise); }

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  height: var(--header-h);
  transition: box-shadow 0.3s var(--ease);
}

.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 3.5rem);
  display: flex;
  align-items: center;
}

.logo img {
  display: block;
  height: clamp(48px, 11vw, 98px);
  width: auto;
  max-width: min(420px, 68vw);
  object-fit: contain;
  object-position: left center;
}

.nav-desktop { display: flex; align-items: center; gap: 0.15rem; }

.nav-desktop a {
  color: var(--navy-light);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  transition: all 0.2s var(--ease);
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--blue);
  background: var(--gray-100);
}

.nav-cta {
  background: var(--gradient) !important;
  color: var(--white) !important;
  padding: 0.55rem 1rem !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  line-height: 1.25 !important;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 180, 166, 0.3);
  margin-left: 0.5rem;
  position: relative;
  z-index: 2;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
  color: var(--white) !important;
}

.menu-toggle {
  display: none;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  cursor: pointer;
  padding: 0.65rem;
  color: var(--navy);
  flex-shrink: 0;
  position: relative;
  z-index: 9510;
  box-shadow: var(--shadow-sm);
}

.menu-toggle[aria-expanded="true"] {
  background: var(--gray-100);
  border-color: var(--blue);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

.nav-mobile {
  display: none;
  position: fixed;
  z-index: 9500;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1.5rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  flex-direction: column;
  gap: 0.25rem;
  border-top: 1px solid var(--gray-200);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-lg);
}

.nav-mobile.open { display: flex; }

body.menu-open .site-header {
  z-index: 9515;
}

.nav-mobile a {
  color: var(--navy-mid);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
}

.nav-mobile a:hover { background: var(--gray-100); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.925rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 180, 166, 0.35);
}

.btn-primary:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy-mid);
  border-color: var(--gray-200);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--turquoise);
  color: var(--blue);
  background: var(--white);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.85rem; }

/* ─── Hero Premium ─── */
.hero-premium {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  max-height: 920px;
  display: flex;
  align-items: center;
  padding: 3rem 0 5rem;
  overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, #0a1428 0%, #0f1b33 40%, #1a2744 68%, #143d75 100%);
}

.hero-premium--home .hero-bg {
  background:
    linear-gradient(
      108deg,
      rgba(10, 20, 40, 0.93) 0%,
      rgba(15, 27, 51, 0.88) 38%,
      rgba(20, 61, 117, 0.72) 62%,
      rgba(15, 27, 51, 0.4) 100%
    ),
    url("../assets/photos/lampada-spettro.jpg") 72% 52% / min(520px, 48vw) no-repeat,
    linear-gradient(118deg, #0a1428 0%, #0f1b33 40%, #1a2744 68%, #143d75 100%);
}

.hero-bg::before {
  content: none;
}

.hero-premium--compact .hero-bg::before {
  content: none;
}

.hero-bg::after {
  content: none;
}

@keyframes hero-gradient-shift {
  0% { background-position: 0% 40%, 100% 60%, 50% 50%, 0% 50%; }
  100% { background-position: 100% 60%, 0% 40%, 50% 50%, 100% 50%; }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content { color: var(--white); }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
  letter-spacing: 0.02em;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-premium h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.25rem);
  line-height: 1.08;
  font-weight: 800;
  margin-bottom: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--white);
}

.hero-premium h1 .gradient-text {
  background: linear-gradient(135deg, var(--green-light) 0%, var(--turquoise) 50%, #6eb5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 1rem;
  max-width: 500px;
  line-height: 1.7;
}

.hero-seo-note {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 2rem;
  max-width: 520px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 20;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.hero-tag {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.hero-visual { position: relative; }

.hero-image-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-image-frame img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.hero-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 27, 51, 0.5) 100%);
}

.hero-float-card {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  z-index: 2;
}

.hero-float-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

.hero-float-card strong {
  display: block;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.hero-float-card span {
  font-size: 0.78rem;
  color: var(--gray-600);
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: -2.5rem;
  position: relative;
  z-index: 10;
  padding-bottom: 1rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
  transition: all 0.3s var(--ease);
  text-align: center;
  position: relative;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto 1rem 0 1rem;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 180, 166, 0.2);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-card.is-counted strong {
  transition: opacity 0.2s ease;
}

.stat-card strong {
  display: block;
  font-size: 1.85rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.stat-card span {
  font-size: 0.8rem;
  color: var(--gray-600);
  font-weight: 500;
  line-height: 1.4;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
  z-index: 3;
}

.hero-wave svg { width: 100%; height: 60px; display: block; }

/* ─── Sections ─── */
section { padding: 5.75rem 0; }

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
  letter-spacing: -0.025em;
  color: var(--navy);
}

.section-header p {
  color: var(--gray-600);
  font-size: 1.05rem;
  line-height: 1.7;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--turquoise);
  margin-bottom: 0.75rem;
}

.section-label::before,
.section-label::after {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.bg-light {
  background: var(--gray-50);
  position: relative;
}

.bg-light::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0, 180, 166, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* ─── Cards ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all 0.35s var(--ease);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.card:hover {
  border-color: rgba(0, 180, 166, 0.2);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.card:hover::before { opacity: 1; }

.icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--gradient-soft);
  border: 1px solid rgba(0, 180, 166, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
  color: var(--blue);
  transition: all 0.35s var(--ease);
}

.card:hover .icon-wrap {
  background: var(--gradient);
  color: var(--white);
  border-color: transparent;
  transform: scale(1.05);
}

.icon-wrap svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.card h3 {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 0.55rem;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.card p {
  color: var(--gray-600);
  font-size: 0.925rem;
  line-height: 1.65;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--blue);
  transition: gap 0.25s var(--ease);
}

.card-link:hover { gap: 0.65rem; color: var(--turquoise); }

.card-compact { padding: 1.5rem; }
.card-compact .icon-wrap { width: 44px; height: 44px; margin-bottom: 1rem; }
.card-compact .icon-wrap svg { width: 20px; height: 20px; }
.card-compact h3 { font-size: 1rem; }
.card-compact p { font-size: 0.875rem; }

/* ─── NFC Showcase ─── */
.nfc-showcase {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a6b 50%, var(--navy-mid) 100%);
  color: var(--white);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.nfc-showcase::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 180, 166, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  pointer-events: none;
}

.nfc-showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.nfc-showcase .section-label { color: var(--green-light); }
.nfc-showcase .section-label::before,
.nfc-showcase .section-label::after { background: linear-gradient(90deg, var(--green-light), var(--turquoise)); }

.nfc-showcase h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.nfc-showcase p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.nfc-features {
  list-style: none;
  margin-bottom: 2rem;
}

.nfc-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
}

.nfc-features li::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

.nfc-phone-mock {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 2rem;
  backdrop-filter: blur(20px);
  max-width: 360px;
  margin: 0 auto;
}

.nfc-mock-screen {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  color: var(--navy);
  box-shadow: var(--shadow-lg);
}

.nfc-mock-pulse {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: nfc-ping-mock 2s ease infinite;
}

@keyframes nfc-ping-mock {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 180, 166, 0.4); }
  50% { box-shadow: 0 0 0 16px rgba(0, 180, 166, 0); }
}

.nfc-mock-screen h4 {
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.nfc-mock-screen p {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.nfc-mock-btn {
  display: block;
  text-align: center;
  background: var(--gradient);
  color: white;
  padding: 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

/* ─── CTA ─── */
.cta-band {
  background: var(--gradient);
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.cta-band .container { position: relative; z-index: 1; }

.cta-band h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

.cta-band p {
  opacity: 0.92;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-inline: auto;
  font-size: 1.05rem;
}

.cta-band .btn-primary {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-lg);
}

.cta-band .btn-primary:hover {
  color: var(--blue);
  transform: translateY(-2px);
}

/* ─── Page hero ─── */
.page-hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
  border-bottom: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
  z-index: 2;
}

.page-hero h1 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.page-hero p {
  color: var(--gray-600);
  font-size: 1.1rem;
  max-width: 600px;
  line-height: 1.7;
}

.page-hero--band {
  padding: 3.5rem 0 3.25rem;
  background: linear-gradient(165deg, #0f1b33 0%, #1a2744 42%, #143d75 88%);
  border-bottom: none;
  color: var(--white);
}

.page-hero--band::before {
  height: 3px;
  opacity: 0.95;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 85% 20%, rgba(0, 180, 166, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 10% 90%, rgba(126, 194, 66, 0.12) 0%, transparent 50%),
    linear-gradient(160deg, rgba(15, 27, 51, 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero--assistenza .page-hero-bg {
  background:
    linear-gradient(
      108deg,
      rgba(15, 27, 51, 0.93) 0%,
      rgba(15, 27, 51, 0.82) 45%,
      rgba(20, 61, 117, 0.7) 100%
    ),
    url("../assets/photos/chiavi-assistenza.jpg") center / cover no-repeat;
}

.page-hero-watermark {
  position: absolute;
  right: -2%;
  top: 50%;
  transform: translateY(-50%);
  width: min(42vw, 360px);
  opacity: 0.12;
  z-index: 0;
  pointer-events: none;
}

.page-hero-watermark img {
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
}

.page-hero-inner {
  position: relative;
  z-index: 1;
}

.page-hero--chi-siamo {
  padding: 4.5rem 0 3.5rem;
}

.page-hero--chi-siamo .page-hero-logo-watermark {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-48%);
  width: min(420px, 44vw);
  opacity: 0.14;
  z-index: 0;
  pointer-events: none;
}

.page-hero--chi-siamo .page-hero-logo-watermark img {
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.page-chi-siamo main {
  position: relative;
  z-index: 0;
}

.page-chi-siamo main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/logo.png") 92% 18% / min(480px, 50vw) no-repeat;
  opacity: 0.055;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

.page-chi-siamo main > * {
  position: relative;
  z-index: 1;
}

.page-hero--band .breadcrumb,
.page-hero--band .breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
}

.page-hero--band .breadcrumb a:hover {
  color: var(--green-light);
}

.page-hero--band h1 {
  color: var(--white);
}

.page-hero--band h1 .gradient-text {
  background: linear-gradient(135deg, var(--green-light) 0%, var(--turquoise) 55%, #8ec8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero--band p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 640px;
}

.breadcrumb {
  font-size: 0.825rem;
  color: var(--gray-400);
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.breadcrumb a { color: var(--gray-600); }

/* ─── Content ─── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

.content-block h2 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.content-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.content-block p,
.content-block li { color: var(--gray-600); margin-bottom: 0.75rem; }

.content-block ul { padding-left: 1.25rem; }

.highlight-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.highlight-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient);
}

.highlight-box h3 { margin-top: 0; color: var(--navy); font-weight: 800; }

.highlight-box ul { list-style: none; padding: 0; }

.highlight-box li {
  padding: 0.45rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--gray-600);
  font-size: 0.95rem;
}

.highlight-box li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--turquoise);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.contact-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s var(--ease);
}

.contact-item:hover {
  border-color: rgba(0, 180, 166, 0.3);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.contact-item strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--turquoise);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.contact-item span,
.contact-item a { font-size: 1rem; font-weight: 700; color: var(--navy); }

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  margin-top: 2rem;
  box-shadow: var(--shadow);
}

.map-wrap iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ─── Forms ─── */
.form-section { padding: 3.5rem 0 5.5rem; background: var(--gray-50); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow);
}

.form-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.825rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: var(--navy);
}

.form-group label .req { color: #ef4444; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.925rem;
  color: var(--navy);
  background: var(--gray-50);
  transition: all 0.2s var(--ease);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--turquoise);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(0, 180, 166, 0.12);
}

.form-group textarea { min-height: 120px; resize: vertical; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-hint { font-size: 0.78rem; color: var(--gray-400); margin-top: 0.35rem; }

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.checkbox-group input { width: auto; margin-top: 0.25rem; accent-color: var(--turquoise); }

.file-input-wrap {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  background: var(--gray-50);
}

.file-input-wrap:hover {
  border-color: var(--turquoise);
  background: rgba(0, 180, 166, 0.04);
}

.file-input-wrap input { display: none; }

.tips-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.tips-card h3 { font-size: 1rem; font-weight: 800; margin-bottom: 1rem; }

.tips-card ul { list-style: none; padding: 0; }

.tips-card li {
  padding: 0.55rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.tips-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--turquoise);
  font-weight: 800;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 1.75rem;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand img {
  width: auto;
  max-width: 300px;
  height: 68px;
  margin-bottom: 1.15rem;
  object-fit: contain;
  object-position: left center;
}

.footer-brand p { font-size: 0.9rem; line-height: 1.75; }

.footer-col h4 {
  color: var(--white);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  margin-bottom: 1.15rem;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.825rem;
}

.footer-bottom a { color: rgba(255, 255, 255, 0.5); }

/* ─── Legal / Confirm ─── */
.legal-content { max-width: 720px; margin: 0 auto; padding: 3rem 0 5rem; }
.legal-content h2 { font-size: 1.25rem; font-weight: 800; margin: 2rem 0 0.75rem; }
.legal-content p, .legal-content li { color: var(--gray-600); margin-bottom: 0.75rem; }

.confirm-box {
  text-align: center;
  max-width: 480px;
  margin: 5rem auto;
  padding: 3rem 2rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
}

.confirm-icon {
  width: 72px;
  height: 72px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1.5rem;
  color: var(--white);
  box-shadow: var(--shadow-glow);
}

/* ─── Cookie ─── */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 680px;
  margin: 0 auto;
  background: var(--navy);
  color: var(--white);
  padding: 1.15rem 1.35rem;
  z-index: 200;
  border-radius: var(--radius-lg);
  transform: translateY(calc(100% + 2rem));
  transition: transform 0.4s var(--ease);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-banner.show { transform: translateY(0); }

.cookie-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cookie-inner p { font-size: 0.875rem; opacity: 0.9; flex: 1; min-width: 200px; }
.cookie-inner a { color: var(--green-light); }

/* ─── NFC pages ─── */
.nfc-body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--navy) 0%, #1a3a6b 40%, var(--gray-50) 40%);
}

.nfc-header { text-align: center; padding: 2rem 1rem 0.5rem; }

.nfc-logo {
  height: 54px;
  margin: 0 auto 0.85rem;
  background: white;
  padding: 8px 16px;
  border-radius: 12px;
}

.nfc-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-light);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

.nfc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.25rem;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.nfc-pulse {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 1.75rem;
}

.nfc-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--gradient);
  opacity: 0.25;
  animation: nfc-ping 2s ease-out infinite;
}

.nfc-pulse-icon {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-glow);
}

.nfc-pulse-icon svg { width: 32px; height: 32px; }

@keyframes nfc-ping {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.7); opacity: 0; }
}

.nfc-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--white);
  letter-spacing: -0.02em;
}

.nfc-subtitle {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.nfc-instrument-card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  margin-bottom: 1.5rem;
  text-align: left;
  box-shadow: var(--shadow-lg);
}

.nfc-card-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--turquoise);
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.nfc-instrument-card strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.nfc-instrument-card p { font-size: 0.875rem; color: var(--gray-600); margin: 0; }

.nfc-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.nfc-btn-main { width: 100%; padding: 1.15rem; font-size: 1.05rem; }
.nfc-btn-secondary { width: 100%; background: rgba(255, 255, 255, 0.95); }

.nfc-steps { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }

.nfc-step {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: var(--shadow-sm);
}

.nfc-step span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gradient);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nfc-footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.85rem;
  color: var(--gray-600);
}

.nfc-context-banner {
  background: linear-gradient(135deg, rgba(126, 194, 66, 0.1), rgba(0, 180, 166, 0.1));
  border: 1px solid rgba(0, 180, 166, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.nfc-context-banner strong { display: block; color: var(--navy); font-weight: 800; margin-bottom: 0.2rem; }
.nfc-context-banner p { font-size: 0.875rem; color: var(--gray-600); margin: 0; }

.nfc-context-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.nfc-context-icon svg { width: 20px; height: 20px; }

/* ─── Portal homepage ─── */
.page-portal .site-header {
  height: auto;
  min-height: var(--header-h);
}

.page-portal .header-inner {
  height: var(--header-h);
}

.portal-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.55rem 0 0.85rem;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.portal-nav-pills a {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--navy-light);
  transition: all 0.2s var(--ease);
}

.portal-nav-pills a:hover {
  background: var(--white);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.hero-premium--compact {
  min-height: clamp(320px, 52vh, 520px);
  max-height: none;
  padding: 2.75rem 0 4.75rem;
}

.hero-premium--text .hero-grid--single {
  grid-template-columns: 1fr;
  max-width: 760px;
}

.hero-art {
  display: none;
}

.hero-watermark {
  position: absolute;
  right: -4%;
  top: 50%;
  transform: translateY(-48%);
  width: min(42vw, 380px);
  opacity: 0.08;
  z-index: 1;
  pointer-events: none;
}

.hero-watermark img {
  width: 100%;
  height: auto;
  opacity: 1;
  filter: none;
}

.page-hero-watermark img,
.page-hero-watermark svg {
  width: 100%;
  height: auto;
  opacity: 0.22;
  mix-blend-mode: multiply;
}

.page-portal {
  background:
    linear-gradient(180deg, var(--gray-50) 0%, #f4f8fc 40%, var(--gray-50) 100%);
}

.portal-shell {
  position: relative;
  z-index: 5;
  background: transparent;
  padding-bottom: 0;
}

.portal-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(0, 180, 166, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.portal-shell > .container,
.portal-shell > section {
  position: relative;
  z-index: 1;
}

.hero-stats-row--compact {
  margin-top: -1.25rem;
  padding-bottom: 0.5rem;
  pointer-events: none;
}

.hero-stats-row--compact .stat-card {
  pointer-events: auto;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.25rem;
  padding: 0.5rem 0 3rem;
  align-items: start;
}

.portal-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.portal-section-head h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.portal-section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.portal-section-lead {
  color: var(--gray-600);
  font-size: 1rem;
  max-width: 520px;
}

.portal-section-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.story-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  box-shadow: var(--shadow-sm);
}

.story-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 180, 166, 0.25);
}

.story-card--featured {
  border: 1px solid rgba(0, 180, 166, 0.2);
  box-shadow: var(--shadow);
  position: relative;
}

.story-card--featured::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient);
  z-index: 2;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.story-card--featured:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(15, 27, 51, 0.12);
}

.story-card-link:focus-visible {
  outline: 2px solid var(--turquoise);
  outline-offset: 3px;
  border-radius: var(--radius-lg);
}

.story-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.story-card-link:hover { color: inherit; }

.story-card--featured .story-card-link {
  flex-direction: row;
}

.story-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: var(--gradient-soft);
  transition: transform 0.45s var(--ease);
  overflow: hidden;
}

.story-card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/logo-mark.png") center center / min(75%, 90px) no-repeat;
  opacity: 0.1;
  pointer-events: none;
}

.story-card-media .story-emoji {
  position: relative;
  z-index: 1;
}

.story-card:hover .story-card-media {
  transform: scale(1.03);
}

.story-card-media--accent {
  background: linear-gradient(135deg, rgba(126, 194, 66, 0.2), rgba(0, 180, 166, 0.18));
}

.story-card--featured .story-card-media {
  flex: 0 0 140px;
  min-height: 100%;
}

.story-emoji { font-size: 2.25rem; }

.story-card-body {
  padding: 1.15rem 1.25rem 1.35rem;
  flex: 1;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-bottom: 0.5rem;
}

.story-tag {
  font-weight: 700;
  color: var(--turquoise);
}

.story-card-body h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.story-card--featured .story-card-body h3 {
  font-size: 1.2rem;
}

.story-card-body p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.55;
}

.portal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  position: sticky;
  top: calc(var(--header-h) + 5.5rem);
}

.portal-widget {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-sm);
}

.portal-widget h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.55rem;
}

.portal-widget p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0.65rem;
}

.portal-widget--cta {
  background: linear-gradient(160deg, var(--navy) 0%, var(--blue-dark) 100%);
  border-color: transparent;
  color: var(--white);
}

.portal-widget--cta h3,
.portal-widget--cta p { color: rgba(255, 255, 255, 0.92); }

.portal-phone a {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--blue);
}

.portal-widget-note {
  font-size: 0.85rem !important;
  margin-bottom: 0.35rem !important;
}

.quick-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.quick-links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy-light);
  padding: 0.35rem 0;
  display: block;
}

.quick-links a:hover { color: var(--turquoise); }

.spotlight-ricondizionata--banner {
  padding: 0 0 2.5rem;
}

.spotlight-banner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 55%, #1a5a8a 100%);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  color: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.spotlight-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-light);
  margin-bottom: 0.65rem;
}

.spotlight-banner h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
  color: var(--white);
}

.spotlight-banner p {
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 1.1rem;
  line-height: 1.65;
}

.spotlight-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }

.spotlight-photo--banner img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.spotlight-photo--logo {
  position: relative;
  min-height: 200px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.spotlight-photo--logo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("../assets/logo-mark.png") center center / min(85%, 180px) no-repeat;
  opacity: 0.22;
}

.portal-topics,
.portal-gallery,
.portal-sectors {
  padding: 2.5rem 0;
  position: relative;
}

.portal-topics { padding-top: 1rem; }

.portal-topics::before,
.portal-gallery::before,
.portal-sectors::before {
  content: "";
  display: block;
  width: min(100%, 200px);
  height: 3px;
  margin: 0 auto 2rem;
  background: var(--gradient);
  border-radius: 999px;
  opacity: 0.65;
}

.portal-section-head h2 {
  position: relative;
  padding-bottom: 0.35rem;
}

.portal-section-head h2::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.45rem;
  background: var(--gradient);
  border-radius: 2px;
}

.portal-section-head--center h2::after {
  margin-inline: auto;
}

.topic-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.topic-tile {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.35rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all 0.25s var(--ease);
  color: inherit;
}

.topic-tile:hover {
  border-color: rgba(0, 180, 166, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: inherit;
}

.topic-tile-icon { font-size: 1.5rem; }

.topic-tile-title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy);
}

.topic-tile-desc {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.photo-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.photo-card-visual {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(145deg, #f0f7fc 0%, #f8fafc 48%, #eef6f1 100%);
}

.photo-card-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/logo-mark.png") center center / min(82%, 220px) no-repeat;
  opacity: 0.32;
  pointer-events: none;
}

.photo-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(126, 194, 66, 0.08) 0%,
    transparent 40%,
    rgba(0, 180, 166, 0.1) 60%,
    rgba(30, 86, 160, 0.08) 100%
  );
  pointer-events: none;
}

.photo-card-visual--alt::before {
  opacity: 0.34;
  background-size: min(76%, 210px);
}

.photo-card-visual--teal {
  background: linear-gradient(145deg, #e8f6f4 0%, #f8fafc 50%, #edf2f9 100%);
}

.photo-card-visual--teal::before {
  opacity: 0.33;
}

.photo-card figcaption {
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-light);
}

.sector-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}

.sector-chip {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all 0.2s var(--ease);
  color: inherit;
}

.sector-chip:hover {
  border-color: var(--turquoise);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.sector-chip strong {
  font-size: 0.95rem;
  color: var(--navy);
}

.sector-chip span {
  font-size: 0.8rem;
  color: var(--gray-600);
}

.portal-footer-band {
  padding: 3rem 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

.portal-contact-row { align-items: start; }

.cta-band--compact {
  padding: 3rem 0 4rem;
  text-align: center;
}

.logo img.logo-fallback-active { opacity: 1; }

/* ─── Animations ─── */
.fade-up {
  animation: fadeUp 0.7s var(--ease) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

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

  .hero-bg {
    animation: none;
    background-size: auto;
  }

  .fade-up,
  .hero-badge-dot,
  .hero-art {
    animation: none;
  }

  .story-card:hover,
  .story-card:hover .story-card-media,
  .stat-card:hover,
  .card:hover,
  .topic-tile:hover,
  .sector-chip:hover,
  .btn-primary:hover,
  .nav-cta:hover {
    transform: none;
  }

  .story-card:hover .story-card-media {
    transform: none;
  }
}

/* ─── Homepage compatta ─── */
.page-home {
  background: var(--gray-50);
}

.hero-premium--home {
  min-height: clamp(260px, 42vh, 400px);
  max-height: none;
  padding: 2rem 0 3.25rem;
}

.page-hero--assistenza .page-hero-watermark {
  display: none;
}

.home-stats {
  margin-top: -1rem;
  padding-bottom: 0.25rem;
}

.home-section {
  padding: 2.25rem 0;
}

.home-section--tight {
  padding: 1.25rem 0 2rem;
}

.home-section--blog {
  padding-bottom: 2.5rem;
}

.home-spotlight {
  padding: 0.5rem 0 1.5rem;
}

.section-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.35rem;
}

.section-header-row h2,
.home-subtitle {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin: 0;
}

.home-subtitle {
  margin-bottom: 1rem;
}

.cards-grid--home {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.topic-tiles--home {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.topic-tiles--home .topic-tile {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.15rem;
}

.topic-tiles--home .topic-tile-icon {
  font-size: 1.35rem;
}

.topic-tiles--home .topic-tile-title {
  font-size: 0.95rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.blog-grid--home {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 820px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.blog-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.blog-card-thumb {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-soft);
  font-size: 1.75rem;
}

.blog-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
}

.blog-meta {
  display: flex;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-bottom: 0.45rem;
}

.blog-tag {
  font-weight: 700;
  color: var(--teal);
}

.blog-card-body h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.blog-card-body h3 a {
  color: var(--navy);
}

.blog-card-body h3 a:hover {
  color: var(--blue);
}

.blog-read-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
}

@media (max-width: 960px) {
  .cards-grid--home,
  .topic-tiles--home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-grid--home {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .cards-grid--home,
  .topic-tiles--home {
    grid-template-columns: 1fr;
  }
}

/* ─── Barra conversione fissa ─── */
.conversion-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px) saturate(160%);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -10px 40px rgba(15, 27, 51, 0.12);
}

.conversion-bar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.45rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s;
  white-space: nowrap;
}

.conversion-bar-btn--phone {
  background: var(--white);
  color: var(--navy);
  border-color: var(--gray-300);
}

.conversion-bar-btn--phone:hover {
  background: var(--gray-50);
  color: var(--blue);
  border-color: var(--blue);
}

.conversion-bar-btn--wa {
  background: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

.conversion-bar-btn--wa:hover {
  background: #dcfce7;
  color: #14532d;
  border-color: #25d366;
}

.conversion-bar-btn--cta {
  background: var(--gradient);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(0, 180, 166, 0.28);
}

.conversion-bar-btn--cta:hover {
  color: var(--white);
  box-shadow: 0 6px 22px rgba(0, 180, 166, 0.38);
  transform: translateY(-1px);
}

.conversion-bar-btn:hover {
  transform: translateY(-1px);
}

body.has-conversion-bar {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

body.has-conversion-bar .cookie-banner {
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 961px) {
  .conversion-bar {
    left: auto;
    right: 1.25rem;
    bottom: 1.25rem;
    width: auto;
    min-width: 300px;
    max-width: 340px;
    grid-template-columns: 1fr;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
  }

  .conversion-bar-btn {
    font-size: 0.85rem;
    min-height: 46px;
    padding: 0.65rem 1rem;
  }

  body.has-conversion-bar {
    padding-bottom: 0;
  }

  body.has-conversion-bar .cookie-banner {
    bottom: 0;
  }
}

/* ─── FAQ SEO ─── */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 820px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
}

.faq-item h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.45rem;
}

.faq-item p {
  font-size: 0.925rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0;
}

.card--featured {
  border-color: rgba(0, 180, 166, 0.35);
  box-shadow: var(--shadow);
}

.card--featured::before {
  opacity: 1;
}

/* ─── Popup assessment (homepage) ─── */
.site-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.site-popup.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

body.popup-open {
  overflow: hidden;
}

.popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 40, 0.62);
  backdrop-filter: blur(4px);
}

.popup-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem 2rem 1.5rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.35s var(--ease);
}

.site-popup.is-open .popup-dialog {
  transform: translateY(0) scale(1);
}

.popup-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: var(--gray-100);
  color: var(--navy);
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.popup-close:hover {
  background: var(--gray-200);
}

.popup-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(0, 180, 166, 0.12);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.popup-dialog h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--navy);
}

.popup-dialog p {
  color: var(--gray-600);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.popup-list {
  margin: 0 0 1.25rem 1.1rem;
  color: var(--gray-700);
  line-height: 1.65;
}

.popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.popup-dismiss {
  display: block;
  width: 100%;
  border: none;
  background: none;
  color: var(--gray-500);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0;
  text-decoration: underline;
}

.popup-dismiss:hover {
  color: var(--navy);
}

/* ─── Responsive ─── */
@media (max-width: 960px) {
  :root {
    --header-h: 72px;
  }

  .container {
    width: min(100% - 1.5rem, var(--max-width));
  }

  .site-header,
  .header-inner {
    max-width: 100%;
  }

  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-mobile {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  .hero-grid,
  .two-col,
  .form-grid,
  .footer-grid,
  .nfc-showcase-grid,
  .portal-layout,
  .spotlight-banner,
  .topic-tiles,
  .photo-strip { grid-template-columns: 1fr; }

  .nav-desktop { display: none; }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
  }

  .header-inner {
    gap: 0.65rem;
  }

  .hero-premium {
    min-height: auto;
    max-height: none;
    padding: 2rem 0 3.5rem;
  }

  .hero-premium--compact {
    min-height: auto;
    padding: 2rem 0 3.25rem;
  }

  .hero-premium--home .hero-bg {
    background:
      linear-gradient(
        108deg,
        rgba(10, 20, 40, 0.96) 0%,
        rgba(15, 27, 51, 0.92) 45%,
        rgba(20, 61, 117, 0.82) 100%
      ),
      linear-gradient(118deg, #0a1428 0%, #0f1b33 40%, #1a2744 68%, #143d75 100%);
  }

  .logo img {
    height: 46px;
    max-width: min(190px, 54vw);
  }

  .page-hero--chi-siamo .page-hero-logo-watermark {
    display: none;
  }

  .page-chi-siamo main::before {
    opacity: 0.04;
    background-size: min(320px, 70vw);
    background-position: center 8%;
  }

  .hero-watermark,
  .page-hero-watermark {
    display: none;
  }

  .story-card--featured .story-card-link { flex-direction: column; }
  .story-card--featured .story-card-media { flex: none; min-height: 120px; }
  .story-grid { grid-template-columns: 1fr; }
  .portal-sidebar { position: static; }
  .portal-nav-pills { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.65rem; -webkit-overflow-scrolling: touch; }
  .portal-section-link { white-space: normal; }

  .hero-visual { order: -1; }
  .hero-image-frame img { height: 260px; }
  .hero-stats-row { grid-template-columns: repeat(2, 1fr); margin-top: -0.75rem; }
  .hero-stats-row--compact { margin-top: -0.5rem; }
  .nfc-phone-mock { max-width: 100%; }

  .page-hero,
  .page-hero--band {
    padding: 2.75rem 0 2.25rem;
  }

  .page-hero h1 {
    font-size: clamp(1.65rem, 6vw, 2.25rem);
  }

  .page-hero p {
    font-size: 1rem;
  }

  .spotlight-banner {
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .spotlight-actions {
    flex-direction: column;
  }

  .spotlight-actions .btn {
    width: 100%;
  }

  .tips-card {
    position: static;
    top: auto;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .cookie-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px) + 0.5rem);
  }

  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-inner p {
    min-width: 0;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions .btn {
    width: 100%;
  }

  .site-popup {
    align-items: flex-end;
    padding: 0;
  }

  .popup-dialog {
    padding: 1.35rem 1.15rem 1.15rem;
    width: 100%;
    max-width: 100%;
    max-height: min(88dvh, calc(100dvh - env(safe-area-inset-top, 0px)));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .popup-actions {
    flex-direction: column;
  }

  .popup-actions .btn {
    width: 100%;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }

  .cta-band {
    padding: 2.75rem 0;
  }

  .cta-band h2 {
    font-size: clamp(1.35rem, 5vw, 1.85rem);
  }

  .home-section {
    padding: 2.75rem 0;
  }

  .conversion-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .conversion-bar-btn {
    font-size: 0.68rem;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
    padding: 0.5rem 0.25rem;
    min-width: 0;
  }

  .ebs-fab-row {
    right: 0.65rem;
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  section { padding: 3.5rem 0; }
  .hero-stats-row { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat-card { padding: 1rem; }
  .stat-card strong { font-size: 1.5rem; }
  .stat-card span { font-size: 0.75rem; }

  .hero-premium h1 {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .hero-lead {
    font-size: 0.95rem;
  }

  .hero-badge {
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
    margin-bottom: 1rem;
  }

  .section-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-section-link {
    font-size: 0.88rem;
  }

  .legal-content {
    padding: 2rem 0 3.5rem;
  }

  .confirm-box {
    margin: 3rem auto;
    padding: 2rem 1.25rem;
  }

  .file-input-wrap {
    padding: 1.25rem 1rem;
  }
}

@media (max-width: 480px) {
  :root {
    --header-h: 64px;
  }

  .container {
    width: min(100% - 1rem, var(--max-width));
  }

  .logo img {
    height: 40px;
    max-width: min(168px, 50vw);
  }

  .nav-mobile {
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .nav-mobile a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .hero-premium {
    padding: 1.65rem 0 3rem;
  }

  .hero-premium--compact {
    min-height: auto;
    padding: 1.65rem 0 3rem;
  }

  .hero-stats-row {
    margin-top: -0.35rem;
    gap: 0.5rem;
  }

  .hero-stats-row--compact {
    margin-top: -0.25rem;
  }

  .stat-card {
    padding: 0.75rem 0.55rem;
  }

  .stat-card strong {
    font-size: 1.25rem;
  }

  .stat-card span {
    font-size: 0.7rem;
  }

  .conversion-bar {
    gap: 0.3rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }

  .conversion-bar-btn {
    font-size: 0.62rem;
    min-height: 40px;
    padding: 0.4rem 0.15rem;
  }

  .section-header-row h2,
  .home-subtitle {
    font-size: 1.1rem;
  }

  .topic-tiles--home .topic-tile {
    padding: 0.85rem 1rem;
  }

  .topic-tiles--home .topic-tile-title {
    font-size: 0.85rem;
  }

  .footer-grid {
    gap: 1.75rem;
  }

  .footer-brand img {
    height: 48px;
  }

  .site-footer {
    padding: 3rem 0 1.5rem;
  }

  .popup-dialog h2 {
    font-size: 1.1rem;
    padding-right: 1.75rem;
  }

  .ebs-fab {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }
}

/* ─── Form semplificato ─── */
.form-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--gradient-soft);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--navy-mid);
}

.form-trust span::before {
  content: '✓ ';
  color: var(--turquoise);
  font-weight: 700;
}

.form-details {
  margin: 1rem 0 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.35rem 1rem 0.75rem;
  background: var(--gray-50);
}

.form-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--blue);
  padding: 0.5rem 0;
  list-style: none;
}

.form-details summary::-webkit-details-marker { display: none; }

.form-details[open] summary { margin-bottom: 0.75rem; }

.form-hint-inline {
  font-size: 0.82rem;
  color: var(--gray-600);
  margin-top: 0.25rem;
}

/* ─── FAB Assistente AI ─── */
.ebs-fab-row {
  position: fixed;
  right: 1rem;
  bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  z-index: 8500;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-end;
}

.ebs-fab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.85rem;
  border: none;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.ebs-fab:hover { transform: translateY(-2px); color: var(--white); }

.ebs-fab--ai {
  background: var(--gradient);
  color: var(--white);
}

.ebs-fab-label { display: none; }

.ebs-chat-panel {
  position: fixed;
  right: 1rem;
  bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  z-index: 8600;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(520px, calc(100dvh - 7rem));
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.ebs-chat-panel[hidden] { display: none !important; }

.ebs-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--gradient);
  color: var(--white);
}

.ebs-chat-header strong { display: block; font-size: 0.95rem; }
.ebs-chat-header span { font-size: 0.78rem; opacity: 0.92; }

.ebs-chat-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: var(--white);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.ebs-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--gray-50);
  min-height: 180px;
}

.ebs-chat-msg {
  max-width: 92%;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.ebs-chat-msg--user {
  align-self: flex-end;
  background: var(--blue);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.ebs-chat-msg--bot {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-bottom-left-radius: 4px;
}

.ebs-chat-msg--bot a { font-weight: 600; }

.ebs-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem 0;
  background: var(--white);
}

.ebs-chat-quick button {
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy-mid);
  cursor: pointer;
}

.ebs-chat-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.ebs-chat-form input {
  flex: 1;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-family: var(--font);
  font-size: 0.88rem;
}

.ebs-chat-form button {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: var(--gradient);
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
}

.ebs-chat-note {
  font-size: 0.72rem;
  color: var(--gray-600);
  text-align: center;
  padding: 0 0.75rem 0.65rem;
  background: var(--white);
}

body.has-ebs-fab.has-conversion-bar {
  padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 961px) {
  .ebs-fab-row {
    right: 1.25rem;
    bottom: 1.25rem;
  }

  .ebs-fab-label { display: inline; }

  .ebs-chat-panel {
    right: 1.25rem;
    bottom: 5.5rem;
    max-height: min(560px, calc(100dvh - 8rem));
  }

  body.has-ebs-fab.has-conversion-bar {
    padding-bottom: 0;
  }
}

@media (max-width: 960px) {
  .ebs-chat-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }

  .ebs-fab-row {
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }
}
