/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CHE PALLE DI NATALE - FOGLIO DI STILE PRINCIPALE
   Notte d'inverno: cielo profondo con neve e stelle (disegnati da js/script.js),
   contenuti su carta avorio, luce calda dorata come quella della pallina accesa.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ━━━ VARIABILI ━━━ */
:root {
  /* notte */
  --notte-0: #050f0c;
  --notte-1: #08191a;
  --notte-2: #0d2620;
  --notte-3: #123528;
  /* marchio */
  --rosso: #c41e3a;
  --rosso-vivo: #e23452;
  --rosso-scuro: #8a0f25;
  --pino: #165b33;
  --pino-chiaro: #1f7a47;
  --pino-scuro: #0d3d22;
  /* luce */
  --oro: #f3c969;
  --oro-chiaro: #ffe3a3;
  --oro-scuro: #8a5d0c; /* oro leggibile su carta */
  --luce: #ffcf7a;
  /* carta e inchiostro */
  --carta: #fffaf3;
  --carta-2: #f6ede0;
  --carta-bordo: rgba(176, 128, 48, 0.28);
  --inchiostro: #2a211d;
  --inchiostro-2: #5d5149;
  /* testo sulla notte */
  --neve: #f6f1e8;
  --neve-2: #d9d1c4;

  --font-titoli: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-heading: 'Montserrat', 'Segoe UI', sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', sans-serif;

  --raggio: 18px;
  --raggio-sm: 12px;
  --ombra-carta: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.55), 0 4px 12px rgba(0, 0, 0, 0.18);
  --ombra-calda: 0 0 0 1px rgba(243, 201, 105, 0.35), 0 22px 50px -16px rgba(255, 190, 90, 0.45);
  --transition: all 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  --altezza-header: 84px;

  /* nomi storici, usati anche da stili in linea e dalla pagina dell'anteprima */
  --red-christmas: var(--rosso);
  --green-dark: var(--pino);
  --green-medium: var(--pino-chiaro);
  --green-darker: var(--pino-scuro);
  --gold: var(--oro);
  --white: #ffffff;
  --gray-light: var(--carta-2);
  --gray-medium: #d8cdbd;
  --gray-dark: var(--inchiostro);
  --gray: var(--neve-2);
  --black: #000000;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.4);
}

/* ━━━ BASE ━━━ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--altezza-header) + 16px);
  font-size: 16px;
  background: var(--notte-0);
}

body {
  font-family: var(--font-body);
  color: var(--neve);
  line-height: 1.65;
  min-height: 100vh;
  /* cielo d'inverno: aurora verde in alto, bagliore caldo in basso */
  background:
    radial-gradient(120% 60% at 15% -10%, rgba(38, 140, 104, 0.32), transparent 60%),
    radial-gradient(90% 50% at 90% 0%, rgba(40, 92, 140, 0.22), transparent 65%),
    radial-gradient(120% 70% at 50% 115%, rgba(196, 30, 58, 0.18), transparent 60%),
    linear-gradient(180deg, var(--notte-1) 0%, var(--notte-2) 45%, var(--notte-1) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* cielo con neve e stelle, disegnato da js/script.js dietro ai contenuti */
.cielo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.cielo--vicino {
  z-index: 900; /* qualche fiocco grande passa davanti, sotto l'intestazione */
}

body > header,
body > section,
body > main,
body > footer {
  position: relative;
  z-index: 1;
}

body > header {
  z-index: 1000;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

::selection {
  background: var(--oro);
  color: var(--inchiostro);
}

:focus-visible {
  outline: 3px solid var(--oro);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ━━━ TIPOGRAFIA ━━━ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1,
h2 {
  font-family: var(--font-titoli);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* parole lunghe (es. "Agente/Procacciatore") vanno a capo invece di uscire dallo schermo */
h1,
h2,
h3,
h4 {
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 {
  font-size: clamp(1.8rem, 4.5vw + 0.6rem, 3.4rem);
}

h2 {
  font-size: clamp(1.55rem, 3.2vw + 0.5rem, 2.5rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin-bottom: 1rem;
}

strong {
  font-weight: 700;
}

/* titoli di sezione: ornamento dorato con una stellina */
.section h2.text-center::after,
.cta-section h2::after,
.crea-intro h1::after {
  content: '';
  display: block;
  width: 150px;
  height: 14px;
  margin: 0.9rem auto 0;
  background:
    radial-gradient(circle, var(--oro) 0 2.5px, transparent 3px) center / 14px 14px no-repeat,
    linear-gradient(90deg, transparent, var(--oro) 45%, transparent 47%, transparent 53%, var(--oro) 55%, transparent) center / 100% 1px no-repeat;
  opacity: 0.9;
}

/* ━━━ LAYOUT ━━━ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
  background: transparent;
  color: var(--neve);
}

/* fascia alternata: un velo più chiaro e luminoso, con bordi di luce */
.section-alt {
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(243, 201, 105, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(22, 91, 51, 0.32), rgba(13, 38, 32, 0.55));
  border-top: 1px solid rgba(243, 201, 105, 0.16);
  border-bottom: 1px solid rgba(243, 201, 105, 0.1);
  box-shadow: inset 0 40px 80px -60px rgba(255, 207, 122, 0.25);
}

/* il colore del testo si eredita: chiaro sul cielo, inchiostro su carta (card, riquadri, tabelle) */
.section > .container > h2,
.section > .container > h1 {
  color: var(--neve);
  text-shadow: 0 2px 24px rgba(255, 207, 122, 0.18);
}

.section a:not(.btn) {
  color: var(--oro);
}

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

/* ━━━ INTESTAZIONE ━━━ */
.header {
  position: sticky;
  top: 0;
  background: rgba(6, 20, 16, 0.72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(243, 201, 105, 0.18);
  z-index: 1000;
  padding: 0.85rem 0 1.15rem;
  transition: padding 0.35s ease, background 0.35s ease;
}

/* ghirlanda di lucine sotto l'intestazione: due serie che si accendono a turno */
.header::before,
.header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 22px;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: 180px 22px;
}

.header::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='22'%3E%3Cpath d='M0 3 Q22.5 13 45 3 T90 3 T135 3 T180 3' fill='none' stroke='%233d6150' stroke-width='1.3'/%3E%3Cg%3E%3Crect x='20.5' y='7' width='4' height='3' rx='1' fill='%23c9a45a'/%3E%3Cellipse cx='22.5' cy='14' rx='3.6' ry='4.8' fill='%23ff5a6e'/%3E%3Crect x='65.5' y='7' width='4' height='3' rx='1' fill='%23c9a45a'/%3E%3Cellipse cx='67.5' cy='14' rx='3.6' ry='4.8' fill='%23ffd36b'/%3E%3Crect x='110.5' y='7' width='4' height='3' rx='1' fill='%23c9a45a'/%3E%3Cellipse cx='112.5' cy='14' rx='3.6' ry='4.8' fill='%2368e0a0'/%3E%3Crect x='155.5' y='7' width='4' height='3' rx='1' fill='%23c9a45a'/%3E%3Cellipse cx='157.5' cy='14' rx='3.6' ry='4.8' fill='%2380c8ff'/%3E%3C/g%3E%3C/svg%3E");
  filter: drop-shadow(0 0 5px rgba(255, 220, 140, 0.95));
  animation: lucine 2.6s ease-in-out infinite;
}

.header::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='22'%3E%3Cellipse cx='22.5' cy='14' rx='3.6' ry='4.8' fill='%23ffd36b'/%3E%3Cellipse cx='67.5' cy='14' rx='3.6' ry='4.8' fill='%2368e0a0'/%3E%3Cellipse cx='112.5' cy='14' rx='3.6' ry='4.8' fill='%2380c8ff'/%3E%3Cellipse cx='157.5' cy='14' rx='3.6' ry='4.8' fill='%23ff5a6e'/%3E%3C/svg%3E");
  filter: drop-shadow(0 0 7px rgba(255, 230, 160, 1));
  animation: lucine 2.6s ease-in-out infinite reverse;
}

@keyframes lucine {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.header.header--scorrimento {
  padding: 0.5rem 0 0.85rem;
  background: rgba(5, 15, 12, 0.86);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

/* il logo rosso su un'etichetta regalo avorio: massimo contrasto e un tocco natalizio */
.logo {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 7px 16px 7px 26px;
  background: linear-gradient(180deg, #fffdf8, var(--carta-2));
  border-radius: 10px 14px 14px 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(176, 128, 48, 0.35), 0 0 22px rgba(255, 207, 122, 0.18);
  transform: rotate(-1.5deg);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}

/* foro dell'etichetta con il nastrino dorato */
.logo::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--notte-2);
  box-shadow: 0 0 0 2px var(--oro);
}

.logo:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(176, 128, 48, 0.45), 0 0 34px rgba(255, 207, 122, 0.35);
}

.logo-img {
  height: 48px;
  width: auto;
  display: block;
  transition: height 0.35s ease;
}

.header--scorrimento .logo-img {
  height: 40px;
}

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

.nav > a {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--neve);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.nav > a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--oro);
  box-shadow: 0 0 8px var(--oro);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav > a:hover,
.nav > a[aria-current='page'] {
  color: var(--oro-chiaro);
}

.nav > a:hover::after,
.nav > a[aria-current='page']::after {
  left: 0.9rem;
  width: calc(100% - 1.8rem);
}

.social-icons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: 0.5rem;
}

.social-icons a {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--neve);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(243, 201, 105, 0.22);
}

.social-icons svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-icons a:hover {
  color: var(--inchiostro);
  background: var(--oro);
  border-color: var(--oro);
  box-shadow: 0 0 18px rgba(243, 201, 105, 0.6);
  transform: translateY(-2px);
}

/* icone social su carta (card dei contatti) */
.card .social-icons {
  margin-left: 0;
}

.card .social-icons a {
  color: var(--inchiostro);
  background: #fff;
  border-color: rgba(176, 128, 48, 0.45);
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.3);
}

.card .social-icons a:hover {
  color: var(--inchiostro);
}

/* pulsante del menu su telefono */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(243, 201, 105, 0.25);
  border-radius: 12px;
  cursor: pointer;
  padding: 11px 10px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--neve);
  transition: var(--transition);
}

/* ━━━ PULSANTI ━━━ */
.btn {
  position: relative;
  display: inline-block;
  padding: 13px 30px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  text-align: center;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  overflow: hidden;
  isolation: isolate;
}

/* riflesso che attraversa il pulsante al passaggio */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  z-index: -1;
  pointer-events: none;
}

.btn:hover::before {
  left: 120%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pino-chiaro), var(--pino));
  color: var(--white);
  box-shadow: 0 8px 22px -8px rgba(31, 122, 71, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(31, 122, 71, 0.9), 0 0 0 3px rgba(104, 224, 160, 0.18);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--rosso-vivo), var(--rosso));
  color: var(--white);
  box-shadow: 0 8px 22px -8px rgba(196, 30, 58, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px rgba(196, 30, 58, 0.95), 0 0 0 3px rgba(255, 90, 110, 0.2);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--pino);
  color: var(--pino);
}

.btn-outline:hover {
  background-color: var(--pino);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
}

/* ━━━ EROE (home) ━━━ */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--neve);
  padding: clamp(90px, 14vh, 150px) 0 clamp(110px, 16vh, 170px);
  text-align: center;
  background:
    radial-gradient(60% 55% at 50% 45%, rgba(255, 190, 90, 0.28), transparent 70%),
    linear-gradient(180deg, rgba(5, 15, 12, 0.55) 0%, rgba(5, 15, 12, 0.72) 60%, var(--notte-1) 100%),
    url('../images/header.jpg') center / cover no-repeat;
}

/* lucine sfocate che fluttuano nell'eroe */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 30%, rgba(255, 207, 122, 0.55) 0 6px, transparent 22px),
    radial-gradient(circle at 85% 22%, rgba(255, 90, 110, 0.45) 0 5px, transparent 20px),
    radial-gradient(circle at 72% 70%, rgba(104, 224, 160, 0.4) 0 4px, transparent 18px),
    radial-gradient(circle at 25% 78%, rgba(128, 200, 255, 0.4) 0 5px, transparent 20px),
    radial-gradient(circle at 50% 12%, rgba(255, 227, 163, 0.5) 0 3px, transparent 14px);
  filter: blur(2px);
  animation: fluttua 14s ease-in-out infinite alternate;
}

.hero::after {
  background:
    radial-gradient(circle at 35% 40%, rgba(255, 207, 122, 0.4) 0 4px, transparent 18px),
    radial-gradient(circle at 62% 30%, rgba(255, 227, 163, 0.45) 0 6px, transparent 24px),
    radial-gradient(circle at 90% 60%, rgba(255, 207, 122, 0.35) 0 5px, transparent 22px),
    radial-gradient(circle at 8% 60%, rgba(255, 90, 110, 0.35) 0 4px, transparent 18px);
  animation-duration: 19s;
  animation-direction: alternate-reverse;
}

@keyframes fluttua {
  from {
    transform: translate3d(-2%, 2%, 0);
  }
  to {
    transform: translate3d(2%, -3%, 0);
  }
}

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

.hero h1 {
  font-size: clamp(2rem, 6vw + 0.6rem, 4.6rem);
  margin-bottom: 1.25rem;
  color: #fffaf0;
  text-shadow: 0 0 28px rgba(255, 190, 90, 0.55), 0 4px 30px rgba(0, 0, 0, 0.6);
}

.hero p {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  color: var(--neve-2);
}

.hero .hero-subtitle {
  font-family: var(--font-titoli);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  color: var(--oro-chiaro);
  margin-bottom: 0.75rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.25rem;
}

/* ━━━ EROE DELLE PAGINE INTERNE ━━━ */
.hero-internal {
  position: relative;
  overflow: hidden;
  color: var(--neve);
  padding: 78px 0 84px;
  text-align: center;
  background:
    radial-gradient(60% 90% at 50% 120%, rgba(255, 190, 90, 0.22), transparent 70%),
    radial-gradient(50% 80% at 85% -10%, rgba(196, 30, 58, 0.35), transparent 70%),
    radial-gradient(50% 80% at 10% -20%, rgba(38, 140, 104, 0.45), transparent 70%);
  border-bottom: 1px solid rgba(243, 201, 105, 0.15);
}

.hero-internal h1 {
  color: #fffaf0;
  text-shadow: 0 0 26px rgba(255, 190, 90, 0.45), 0 4px 24px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.5rem;
}

.hero-internal p {
  color: var(--neve-2);
}

.breadcrumb {
  display: inline-block;
  font-size: 0.85rem;
  margin-top: 1.25rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(243, 201, 105, 0.2);
  color: var(--neve-2);
}

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

.breadcrumb a:hover {
  color: var(--oro-chiaro);
}

/* ━━━ GRIGLIE ━━━ */
.grid {
  display: grid;
  gap: 1.75rem;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

/* ━━━ CARD: carta avorio che galleggia sul cielo ━━━ */
.card {
  position: relative;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, 0.9), transparent 60%),
    linear-gradient(180deg, var(--carta), var(--carta-2));
  border-radius: var(--raggio);
  padding: 2rem;
  box-shadow: var(--ombra-carta);
  border: 1px solid var(--carta-bordo);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.45s ease;
  text-align: center;
  color: var(--inchiostro);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ombra-carta), var(--ombra-calda);
}

/* le icone delle card in un medaglione dorato */
.card-icon {
  display: inline-grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  font-size: 2rem !important; /* normalizza le dimensioni impostate nelle pagine */
  line-height: 1;
  background: radial-gradient(circle at 35% 30%, #fffef9, #f7e7c4 70%, #ecd29a);
  box-shadow: 0 0 0 1px rgba(176, 128, 48, 0.35), 0 0 0 5px rgba(243, 201, 105, 0.16), 0 8px 18px -6px rgba(176, 128, 48, 0.55);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .card-icon {
  transform: rotate(-8deg) scale(1.08);
}

.card h3 {
  color: var(--rosso);
  margin-bottom: 0.75rem;
}

.card p,
.card li {
  color: var(--inchiostro);
}

.card a:not(.btn) {
  color: var(--rosso);
  font-weight: 600;
}

.card a:not(.btn):hover {
  color: var(--pino);
}

.card strong,
.card em {
  color: inherit;
}

.card,
.highlight-box,
.legal-content,
.footer {
  overflow-wrap: anywhere;
}

.card-horizontal {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  text-align: left;
}

.card-horizontal .card-icon {
  flex-shrink: 0;
  margin: 0;
}

/* stelline delle recensioni */
.recensione-stelle {
  font-size: 1.15rem;
  letter-spacing: 0.15em;
  margin: 0.25rem 0 0;
  filter: drop-shadow(0 0 6px rgba(243, 201, 105, 0.6));
}

/* ━━━ GALLERIA ━━━ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--raggio);
  aspect-ratio: 1;
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(243, 201, 105, 0.22);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 50% 40%, transparent, rgba(5, 15, 12, 0.35));
  pointer-events: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.6s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.75), 0 0 0 2px var(--oro), 0 0 30px rgba(255, 207, 122, 0.35);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.1) brightness(1.05);
}

/* ━━━ LIGHTBOX ━━━ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(5, 15, 12, 0.92);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--raggio-sm);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: var(--neve);
  cursor: pointer;
  font-weight: 300;
}

/* ━━━ INVITO (CTA) ━━━ */
.cta-section {
  position: relative;
  overflow: hidden;
  color: var(--neve);
  padding: 96px 0;
  text-align: center;
  background:
    radial-gradient(50% 80% at 50% 50%, rgba(255, 190, 90, 0.1), transparent 70%),
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle at 65% 80%, rgba(255, 255, 255, 0.1) 0 1.5px, transparent 2.5px),
    linear-gradient(135deg, var(--rosso-scuro), #b3172f 50%, #96112b);
  box-shadow: inset 0 1px 0 rgba(255, 227, 163, 0.35), inset 0 -1px 0 rgba(255, 227, 163, 0.25);
}

.cta-section h2 {
  color: #fffaf0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
  text-shadow: 0 0 24px rgba(255, 207, 122, 0.45);
}

.cta-section h2::after {
  margin-bottom: 0.5rem;
}

.cta-section p {
  color: #ffffff;
  font-size: 1.1rem;
  text-shadow: 0 1px 8px rgba(80, 0, 15, 0.45);
}

.cta-section .btn {
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(255, 227, 163, 0.25);
  animation: respiro 3.2s ease-in-out infinite;
}

@keyframes respiro {
  0%,
  100% {
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(255, 227, 163, 0.2);
  }
  50% {
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 9px rgba(255, 227, 163, 0.08), 0 0 34px rgba(255, 227, 163, 0.45);
  }
}

/* ━━━ TIMELINE (Come Funziona) ━━━ */
.timeline {
  position: relative;
  max-width: 820px;
  margin: 3rem auto;
}

.timeline-item {
  position: relative;
  padding-left: 92px;
  margin-bottom: 2.5rem;
}

.timeline-number {
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-titoli);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--inchiostro);
  background: radial-gradient(circle at 35% 30%, #fffdf3, var(--oro) 70%, #c99a3a);
  box-shadow: 0 0 0 5px rgba(243, 201, 105, 0.15), 0 0 26px rgba(255, 207, 122, 0.55);
}

/* filo di luce che unisce i passi */
.timeline-item::before {
  content: '';
  position: absolute;
  left: 29px;
  top: 66px;
  width: 2px;
  height: calc(100% - 26px);
  background: linear-gradient(180deg, rgba(243, 201, 105, 0.8), rgba(243, 201, 105, 0.1));
  box-shadow: 0 0 10px rgba(243, 201, 105, 0.6);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(243, 201, 105, 0.18);
  border-radius: var(--raggio);
  padding: 1.4rem 1.6rem;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.timeline-content h3 {
  color: var(--oro-chiaro);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: var(--neve-2);
  margin: 0;
}

/* ━━━ PREZZI ━━━ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0;
  align-items: stretch;
}

.price-card {
  position: relative;
  background: linear-gradient(180deg, var(--carta), var(--carta-2));
  border: 1px solid var(--carta-bordo);
  border-radius: var(--raggio);
  padding: 2.25rem 2rem;
  text-align: center;
  color: var(--inchiostro);
  box-shadow: var(--ombra-carta);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.45s ease;
}

.price-card h3 {
  color: var(--inchiostro);
}

.price-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--ombra-carta), var(--ombra-calda);
}

.price-card.featured {
  border: 2px solid var(--oro);
  box-shadow: var(--ombra-carta), 0 0 0 6px rgba(243, 201, 105, 0.15), 0 0 40px rgba(255, 207, 122, 0.35);
}

.price-card.featured::before {
  content: '★';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--oro);
  color: var(--inchiostro);
  box-shadow: 0 0 20px rgba(255, 207, 122, 0.8);
}

.price {
  font-family: var(--font-titoli);
  font-size: 2.9rem;
  font-weight: 800;
  color: var(--rosso);
  margin: 0.75rem 0;
}

.price-label {
  font-size: 0.82rem;
  color: var(--inchiostro-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.savings {
  display: inline-block;
  background: linear-gradient(135deg, var(--oro-chiaro), var(--oro));
  color: var(--inchiostro);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.25rem;
  box-shadow: 0 4px 12px -4px rgba(176, 128, 48, 0.7);
}

/* ━━━ TABELLE ━━━ */
.table-wrapper {
  overflow-x: auto;
  margin: 2.25rem 0;
  border-radius: var(--raggio);
  box-shadow: var(--ombra-carta);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--carta);
  color: var(--inchiostro);
  border-radius: var(--raggio);
  overflow: hidden;
}

thead {
  background: linear-gradient(135deg, var(--pino-scuro), var(--pino));
  color: var(--oro-chiaro);
}

th,
td {
  padding: 1rem 1.25rem;
  text-align: left;
}

th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr {
  border-top: 1px solid rgba(176, 128, 48, 0.15);
  transition: background-color 0.25s ease;
}

tbody tr:nth-child(even) {
  background-color: var(--carta-2);
}

tbody tr:hover {
  background-color: #fbe9c9;
}

tr.highlighted {
  background: linear-gradient(90deg, #fff1cf, #fde3a7) !important;
  font-weight: 700;
  box-shadow: inset 4px 0 0 var(--oro);
}

/* ━━━ DOMANDE FREQUENTI ━━━ */
.faq {
  max-width: 820px;
  margin: 2.25rem auto;
}

.faq-item {
  background: linear-gradient(180deg, var(--carta), var(--carta-2));
  border: 1px solid var(--carta-bordo);
  border-radius: var(--raggio-sm);
  margin-bottom: 0.9rem;
  overflow: hidden;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.35s ease;
}

.faq-item:hover {
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(243, 201, 105, 0.5);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1.2rem 1.4rem;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--inchiostro);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--rosso);
}

.faq-question::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--white);
  background: var(--rosso);
  box-shadow: 0 4px 10px -3px rgba(196, 30, 58, 0.7);
  transition: transform 0.35s ease, background 0.35s ease;
}

.faq-question.active::after {
  transform: rotate(45deg);
  background: var(--pino);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, padding 0.45s ease;
  padding: 0 1.4rem;
  color: var(--inchiostro-2);
}

.faq-answer.active {
  max-height: 500px;
  padding: 0 1.4rem 1.3rem;
}

/* ━━━ MODULI ━━━ */
.form {
  max-width: 600px;
  margin: 2rem auto;
  background: linear-gradient(180deg, var(--carta), var(--carta-2));
  color: var(--inchiostro);
  padding: 2rem;
  border-radius: var(--raggio);
  box-shadow: var(--ombra-carta);
}

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

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='url'],
input[type='file'],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--gray-medium);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--inchiostro);
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--pino);
  box-shadow: 0 0 0 4px rgba(22, 91, 51, 0.15);
}

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

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
}

input[type='checkbox'],
input[type='radio'] {
  width: auto;
  cursor: pointer;
  accent-color: var(--rosso);
}

.required {
  color: var(--rosso);
}

.form-note {
  font-size: 0.9rem;
  color: var(--inchiostro-2);
  font-style: italic;
  margin-top: 0.5rem;
}

/* ━━━ AVVISI ━━━ */
.alert {
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ━━━ RIQUADRO IN EVIDENZA ━━━ */
.highlight-box {
  position: relative;
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(255, 227, 163, 0.55), transparent 60%),
    linear-gradient(135deg, #fffaf0, #fbefdc);
  border: 1px solid rgba(176, 128, 48, 0.35);
  border-left: 4px solid var(--oro);
  color: var(--inchiostro);
  padding: 1.6rem 1.8rem;
  border-radius: var(--raggio-sm);
  margin: 2.25rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: var(--ombra-carta), 0 0 34px -10px rgba(255, 207, 122, 0.45);
}

.highlight-box strong {
  color: inherit;
}

.highlight-box a:not(.btn) {
  color: var(--rosso);
}

/* ━━━ ELENCHI ━━━ */
.list-styled {
  list-style: none;
  margin: 1.25rem 0;
  text-align: left;
}

.list-styled li {
  padding: 0.6rem 0 0.6rem 2.1rem;
  position: relative;
  border-bottom: 1px dashed rgba(176, 128, 48, 0.22);
}

.list-styled li:last-child {
  border-bottom: none;
}

.list-styled li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--white);
  background: linear-gradient(135deg, var(--pino-chiaro), var(--pino));
}

/* ━━━ PIÈ DI PAGINA: un cumulo di neve dove finisce il cielo ━━━ */
.footer {
  position: relative;
  color: var(--neve);
  padding: 7rem 0 1.5rem;
  margin-top: 0;
  background: linear-gradient(180deg, #0a221b 0%, var(--notte-0) 100%);
}

.footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 70px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1440v28c-60 18-120 26-190 18-90-10-130-34-230-30-110 4-150 38-260 40-100 2-140-28-240-30-110-2-160 30-260 32C160 60 80 40 0 30z' fill='%23f6f1e8' fill-opacity='0.95'/%3E%3Cpath d='M0 0h1440v16c-80 14-160 18-240 10-90-9-150-24-250-20-110 4-170 30-280 30-100 0-150-24-250-25C300 10 220 34 120 32 70 31 30 22 0 14z' fill='%23ffffff'/%3E%3C/svg%3E")
    top / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer h4 {
  font-family: var(--font-titoli);
  font-size: 1.25rem;
  color: var(--oro);
  margin-bottom: 1rem;
}

.footer p {
  color: var(--neve-2);
  margin-bottom: 0.6rem;
}

.footer a {
  color: var(--neve);
  display: block;
  margin-bottom: 0.5rem;
}

.footer-section > a:hover,
.footer p a:hover {
  color: var(--oro-chiaro);
  transform: translateX(3px);
}

.footer p a {
  display: inline;
  color: var(--oro-chiaro);
}

.footer .social-icons {
  margin-left: 0;
}

.footer .social-icons a {
  display: inline-grid;
  margin-bottom: 0;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(243, 201, 105, 0.15);
  font-size: 0.88rem;
}

.footer-bottom p {
  color: var(--neve-2);
}

.footer-bottom a {
  display: inline;
  color: var(--neve);
  text-decoration: underline;
  text-decoration-color: rgba(243, 201, 105, 0.5);
  text-underline-offset: 3px;
}

/* ━━━ COMPARSA AL SCORRIMENTO (classi aggiunte da js/script.js) ━━━ */
.js-rivela .rivela {
  opacity: 0;
  transform: translateY(26px) scale(0.985);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--ritardo, 0s);
}

.js-rivela .rivela.visibile {
  opacity: 1;
  transform: none;
}

/* ━━━ UTILITÀ ━━━ */
.mt-1 {
  margin-top: 1rem;
}
.mt-2 {
  margin-top: 2rem;
}
.mt-3 {
  margin-top: 3rem;
}
.mb-1 {
  margin-bottom: 1rem;
}
.mb-2 {
  margin-bottom: 2rem;
}
.mb-3 {
  margin-bottom: 3rem;
}

.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ━━━ RESPONSIVE ━━━ */
@media (max-width: 1140px) {
  .menu-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: auto;
    right: 12px;
    width: min(360px, calc(100% - 24px));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 0.75rem;
    margin-top: 12px;
    background: linear-gradient(180deg, #0b231c, #071713);
    border: 1px solid transparent;
    border-radius: var(--raggio);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s ease, opacity 0.35s ease, padding 0.35s ease;
  }

  .nav.active {
    max-height: 520px;
    opacity: 1;
    padding: 0.75rem;
    border-color: rgba(243, 201, 105, 0.25);
  }

  .nav:not(.active) {
    visibility: hidden;
    box-shadow: none;
    transition: max-height 0.45s ease, opacity 0.35s ease, padding 0.35s ease, visibility 0s linear 0.45s;
  }

  .nav > a {
    padding: 0.95rem 1rem;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  .nav > a::after {
    bottom: 8px;
  }

  .nav > a:hover,
  .nav > a[aria-current='page'] {
    background: rgba(243, 201, 105, 0.08);
  }

  .social-icons {
    justify-content: center;
    padding: 0.75rem 0 0.25rem;
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .hero {
    background:
      radial-gradient(70% 45% at 50% 40%, rgba(255, 190, 90, 0.2), transparent 70%),
      linear-gradient(180deg, rgba(5, 15, 12, 0.7) 0%, rgba(5, 15, 12, 0.8) 60%, var(--notte-1) 100%),
      url('../images/header.jpg') center / cover no-repeat;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .card-horizontal {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .timeline-item {
    padding-left: 70px;
  }

  .timeline-number {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
  }

  .timeline-item::before {
    left: 23px;
    top: 54px;
  }

  table {
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.8rem 0.75rem;
  }

  .form {
    padding: 1.5rem;
  }

  .logo-img {
    height: 40px;
  }

  .header--scorrimento .logo-img {
    height: 36px;
  }

  .footer {
    padding-top: 5.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .btn {
    padding: 12px 22px;
    font-size: 0.95rem;
  }

  .btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
  }

  .logo {
    padding: 6px 12px 6px 22px;
  }

  .logo::before {
    left: 7px;
  }

  .logo-img {
    height: 34px;
  }

  .card {
    padding: 1.6rem 1.35rem;
  }
}

/* chi preferisce meno movimento: niente animazioni decorative */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .header::before {
    opacity: 1;
  }

  .header::after {
    opacity: 0.6;
  }

  .js-rivela .rivela {
    opacity: 1;
    transform: none;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   COOKIE: BANNER, PREFERENZE E PAGINE LEGALI
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 1100px;
  margin: 0 auto;
  background: rgba(6, 20, 16, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--neve);
  padding: 1.4rem 1.6rem;
  border-radius: var(--raggio);
  border: 1px solid rgba(243, 201, 105, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 40px -10px rgba(255, 207, 122, 0.3);
  z-index: 10000;
  transform: translateY(calc(100% + 40px));
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

.cookie-banner-text {
  flex: 1;
  min-width: min(280px, 100%);
}

.cookie-banner-text h3 {
  color: var(--oro);
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.cookie-banner-text p {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.4rem;
  color: var(--neve-2);
}

.cookie-banner-text a {
  color: var(--oro);
  text-decoration: underline;
}

.cookie-banner-text a:hover {
  color: var(--oro-chiaro);
}

.cookie-banner-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cookie-banner button {
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.cookie-banner .btn-accept-all {
  background: linear-gradient(135deg, var(--pino-chiaro), var(--pino));
  color: var(--white);
}

.cookie-banner .btn-accept-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(31, 122, 71, 0.8);
}

.cookie-banner .btn-reject {
  background-color: transparent;
  color: var(--neve);
  border: 1.5px solid rgba(246, 241, 232, 0.6);
}

.cookie-banner .btn-reject:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.cookie-banner .btn-customize {
  background: var(--oro);
  color: var(--inchiostro);
}

.cookie-banner .btn-customize:hover {
  background: var(--oro-chiaro);
  transform: translateY(-2px);
}

.cookie-settings-modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(3, 10, 8, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 10001;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow-y: auto;
}

.cookie-settings-modal.show {
  display: flex;
}

.cookie-settings-content {
  background: linear-gradient(180deg, var(--carta), var(--carta-2));
  color: var(--inchiostro);
  border-radius: var(--raggio);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  border: 1px solid var(--carta-bordo);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.cookie-settings-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--inchiostro);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
}

.cookie-settings-close:hover {
  color: var(--rosso);
}

.cookie-settings-content h2 {
  color: var(--rosso);
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.cookie-category {
  background-color: #fff;
  border: 1px solid var(--gray-medium);
  border-radius: var(--raggio-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cookie-category h3 {
  color: var(--pino);
  font-size: 1.05rem;
  margin: 0;
}

.cookie-toggle {
  position: relative;
  width: 50px;
  height: 26px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--gray-medium);
  transition: 0.3s;
  border-radius: 26px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background-color: var(--pino);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-category-description {
  font-size: 0.95rem;
  color: var(--inchiostro-2);
  line-height: 1.5;
}

.cookie-category-required {
  display: inline-block;
  background-color: var(--carta-2);
  color: var(--inchiostro);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.cookie-settings-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cookie-settings-buttons button {
  padding: 10px 24px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.cookie-settings-buttons .btn-save {
  background: linear-gradient(135deg, var(--pino-chiaro), var(--pino));
  color: var(--white);
}

.cookie-settings-buttons .btn-save:hover {
  transform: translateY(-2px);
}

.cookie-settings-buttons .btn-cancel {
  background-color: var(--gray-medium);
  color: var(--inchiostro);
}

.cookie-settings-buttons .btn-cancel:hover {
  background-color: var(--inchiostro);
  color: var(--white);
}

/* Pagine legali: il testo su un foglio di carta, il titolo sul cielo */
.legal-content {
  line-height: 1.8;
  color: var(--inchiostro);
  background: linear-gradient(180deg, var(--carta), var(--carta-2));
  border: 1px solid var(--carta-bordo);
  border-radius: var(--raggio);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--ombra-carta);
}

.legal-content p,
.legal-content li {
  color: var(--inchiostro);
}

.legal-content h2 {
  font-size: 1.6rem;
  color: var(--rosso);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(196, 30, 58, 0.35);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  color: var(--pino);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-content ul,
.legal-content ol {
  list-style: inherit;
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.legal-content ul {
  list-style: disc;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.section .legal-content a:not(.btn),
.legal-content a {
  color: var(--pino);
  text-decoration: underline;
}

.legal-content a:hover {
  color: var(--rosso);
}

.legal-content strong {
  font-weight: 700;
  color: #000;
}

.legal-content em {
  font-style: italic;
}

.legal-content code {
  background-color: var(--carta-2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.cookie-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: var(--shadow-sm);
  border-radius: var(--raggio-sm);
  overflow: hidden;
}

.cookie-table thead {
  background: linear-gradient(135deg, var(--pino-scuro), var(--pino));
  color: var(--oro-chiaro);
}

.cookie-table th,
.cookie-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--carta-2);
}

.cookie-table tbody tr:nth-child(even) {
  background-color: var(--carta);
}

.cookie-table tbody tr:hover {
  background-color: #fbe9c9;
}

.cookie-table code {
  background-color: rgba(196, 30, 58, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.85em;
  color: var(--rosso);
  font-weight: 600;
}

.gdpr-consent {
  background-color: var(--carta-2);
  border: 1px solid var(--gray-medium);
  border-radius: 10px;
  padding: 1rem;
  margin: 1.5rem 0;
  color: var(--inchiostro);
}

.gdpr-consent label {
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.6;
}

.gdpr-consent a {
  color: var(--pino);
  text-decoration: underline;
}

.gdpr-consent a:hover {
  color: var(--rosso);
}

.gdpr-consent input[type='checkbox'] {
  margin-right: 0.5rem;
}

@media (max-width: 768px) {
  .cookie-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 1rem 1.1rem;
    max-height: 70vh;
    overflow-y: auto;
  }

  .cookie-banner-text h3 {
    font-size: 1rem;
  }

  .cookie-banner-text p {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .cookie-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cookie-banner-text {
    min-width: auto;
  }

  /* due pulsanti affiancati e "Accetta Tutti" a tutta larghezza sotto */
  .cookie-banner-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .cookie-banner-buttons button {
    min-width: 0;
    padding: 10px 8px;
    font-size: 0.85rem;
    white-space: normal;
  }

  .cookie-banner .btn-accept-all {
    grid-column: 1 / -1;
  }

  .cookie-settings-content {
    padding: 1.5rem;
  }

  .cookie-settings-buttons {
    flex-direction: column;
  }

  .cookie-settings-buttons button {
    width: 100%;
  }

  .legal-content {
    font-size: 0.95rem;
  }

  .cookie-table {
    font-size: 0.85rem;
  }

  .cookie-table th,
  .cookie-table td {
    padding: 0.5rem;
  }
}

/* mappa (Dove Siamo): una cornice di carta, anche mentre la mappa si carica */
.section div:has(> iframe) {
  border-radius: var(--raggio) !important;
  border: 1px solid var(--carta-bordo);
  box-shadow: var(--ombra-carta), 0 0 0 6px rgba(243, 201, 105, 0.1) !important;
}

.section iframe {
  display: block;
  background: linear-gradient(180deg, var(--carta), var(--carta-2));
}

/* ━━━ "PROVA TU!": voce di menu e pulsante dell'anteprima 3D ━━━ */
.nav > a.nav-prova {
  color: var(--inchiostro);
  background: linear-gradient(135deg, var(--oro-chiaro), var(--oro));
  box-shadow: 0 0 0 1px rgba(255, 227, 163, 0.6), 0 0 18px rgba(243, 201, 105, 0.45);
  margin-left: 0.25rem;
}

.nav > a.nav-prova::after {
  display: none;
}

.nav > a.nav-prova:hover,
.nav > a.nav-prova[aria-current='page'] {
  color: var(--inchiostro);
  box-shadow: 0 0 0 2px var(--oro-chiaro), 0 0 26px rgba(243, 201, 105, 0.75);
  transform: translateY(-1px);
}

.btn-magia {
  background: linear-gradient(135deg, #fff1c9, var(--oro) 55%, #e2a93e);
  color: var(--inchiostro);
  box-shadow: 0 10px 26px -8px rgba(243, 201, 105, 0.85), 0 0 0 4px rgba(255, 227, 163, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: brilla 3s ease-in-out infinite;
}

.btn-magia:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -8px rgba(243, 201, 105, 0.95), 0 0 0 6px rgba(255, 227, 163, 0.25), 0 0 40px rgba(255, 207, 122, 0.6);
}

@keyframes brilla {
  0%,
  100% {
    box-shadow: 0 10px 26px -8px rgba(243, 201, 105, 0.85), 0 0 0 4px rgba(255, 227, 163, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
  50% {
    box-shadow: 0 10px 26px -8px rgba(243, 201, 105, 0.85), 0 0 0 8px rgba(255, 227, 163, 0.08), 0 0 36px rgba(255, 207, 122, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
}

@media (max-width: 1140px) {
  .nav > a.nav-prova {
    margin: 0.35rem 0;
    text-align: center;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GRAZIE: conferma dopo il pagamento
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.grazie-box {
  color: var(--inchiostro);
  background: linear-gradient(180deg, var(--carta), var(--carta-2));
  border: 1px solid var(--carta-bordo);
  border-radius: var(--raggio);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: var(--ombra-carta);
}

.grazie-box h1 {
  color: var(--rosso);
}

.grazie-testo {
  color: var(--inchiostro);
  line-height: 1.7;
}

.grazie-palline {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  margin: 1.5rem 0;
  padding: 0;
}

.grazie-palline li {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 0.6rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--carta-bordo);
  border-radius: 14px;
}

.grazie-palline img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: #1f1513;
  flex: none;
}

.grazie-palline small {
  color: var(--inchiostro-2);
}

.grazie-scarica {
  display: block;
  width: fit-content;
  margin: 1.5rem auto;
  font-size: 1.15rem;
}

.grazie-codice {
  text-align: center;
  padding: 1.2rem;
  border: 2px dashed var(--carta-bordo);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.grazie-codice p {
  margin: 0 0 0.3rem;
}

.grazie-codice strong {
  display: block;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: clamp(1.2rem, 5vw, 1.7rem);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.grazie-codice .grazie-testo {
  margin-top: 0.8rem;
  font-size: 0.95rem;
}

.grazie-azioni {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

/* due inviti affiancati (Come Funziona: crea e ordina online / WhatsApp) */
.cta-doppia {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}
