/* ============================================================
   Sine Tempore — Centro Estetico
   Foglio di stile principale
   ============================================================ */

/* ------------------------------------------------------------
   1. Web fonts (Cormorant Garamond + Jost)
   ------------------------------------------------------------ */

/* Cormorant Garamond — italic 400 */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/cormorant-italic-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/cormorant-italic-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/cormorant-italic-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/cormorant-italic-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/cormorant-italic-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Cormorant Garamond — normal 400 / 500 / 600 (stessi file, pesi sintetizzati) */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/cormorant-cyrillic-ext.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/cormorant-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/cormorant-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/cormorant-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../assets/fonts/cormorant-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Jost — normal 300 / 400 / 500 (stessi file, pesi sintetizzati) */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../assets/fonts/jost-cyrillic.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../assets/fonts/jost-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../assets/fonts/jost-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------
   2. Variabili di tema e reset
   (i colori sono in colors.css)
   ------------------------------------------------------------ */
:root {
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-height: 97px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.5;
  /* L'header è position:fixed (fuori dal flusso): questo padding
     riserva lo spazio in cima così i contenuti non gli finiscono sotto. */
  padding-top: var(--header-height);
}

::selection { background: var(--accent); color: var(--white); }

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

a { color: inherit; }

section[id] { scroll-margin-top: var(--header-height); }

.container { max-width: 1240px; margin: 0 auto; }

/* ------------------------------------------------------------
   3. Header / navigazione
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--brown) 10%, transparent);
  transition: box-shadow .3s, background .3s;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  box-shadow: 0 6px 24px color-mix(in srgb, var(--brown) 8%, transparent);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img {
  height: 52px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 42px;
}

/* Le voci "Trattamenti ..." vanno su due righe (<br> nel markup): senza il
   ritorno a capo forzato la barra non entrerebbe nemmeno su schermi larghi. */
.nav-link {
  font-size: 13px;
  letter-spacing: 1.5px;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
  position: relative;   /* riferimento per il puntino divisore (::before) */
}
.nav-link:hover { color: var(--brown); }

/* Area di tocco: le voci su una riga sono alte ~20px. Lo pseudo-elemento
   (trasparente, parte del link) allarga la zona cliccabile oltre i 44px senza
   spostare nulla nel layout. Resta dentro metà del gap tra le voci, sia in
   fila (42px) sia nel pannello mobile (32px), quindi non si sovrappone. */
.nav-link::after {
  content: "";
  position: absolute;
  inset: -12px -10px;
}

/* Divisore tra le voci del menu orizzontale: un puntino di 3px in --accent
   posato a metà del gap (42px → left: -21px, poi centrato su sé stesso con
   la translate). Sta su ogni voce tranne la prima, quindi divide e non
   "chiude" la fila. È decorativo: nel pannello hamburger le voci sono in
   colonna e il puntino viene disattivato (vedi responsive.css). */
.nav-link + .nav-link::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent);
}

.btn {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn-pill {
  color: var(--white);
  background: var(--accent);
  padding: 14px 28px;
  border-radius: 30px;
  white-space: nowrap;
  transition: background .25s, transform .25s;
}
.btn-pill:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* La CTA "Prenota Ora" del menu mobile resta nascosta su desktop */
.nav-cta-mobile { display: none; }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;             /* area di tocco minima consigliata */
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--brown);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------
   4. Sezioni generiche
   ------------------------------------------------------------ */
.section { padding: 104px 56px; }
.section--bg { background: var(--bg); }
.section--alt { background: var(--bg-alt); }

.section-head {
  text-align: center;
  margin-bottom: 60px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 42px;
  color: var(--brown);
}
.section-rule {
  width: 56px;
  height: 2px;
  background: var(--accent);
  margin: 18px auto 0;
}

/* ------------------------------------------------------------
   5. Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url("../assets/images/hero.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg) 45%, transparent) 0%,
    color-mix(in srgb, var(--bg) 30%, transparent) 45%,
    color-mix(in srgb, var(--bg) 55%, transparent) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 60px 24px;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 64px;
  line-height: 1.08;
  color: var(--brown);
  letter-spacing: 0.5px;
}
.hero-sub {
  margin-top: 22px;
  font-size: 19px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.3px;
}

.hero-inner > a { display: inline-block; }

.btn-outline {
  margin-top: 36px;
  font-size: 13px;
  letter-spacing: 2.5px;
  color: var(--brown);
  border: 1px solid var(--brown);
  padding: 17px 40px;
  border-radius: 30px;
  text-decoration: none;
  transition: background .25s, color .25s;
}
.btn-outline:hover { background: var(--brown); color: var(--white); }

/* ------------------------------------------------------------
   6. Servizi
   ------------------------------------------------------------ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Griglia dei box "tipologie di trattamento" nella home. */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.service-card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 40px color-mix(in srgb, var(--brown) 6%, transparent);
  display: flex;
  flex-direction: column;
  transition: transform .3s, box-shadow .3s;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 54px color-mix(in srgb, var(--brown) 12%, transparent);
}
/* Immagine e titolo portano alla stessa pagina della freccia "Scopri di più":
   il link sull'immagine è escluso da tastiera e screen reader (tabindex/aria-hidden
   nel markup) per non ripetere tre volte la stessa destinazione. */
.service-media {
  display: block;
}
.service-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}
.service-body {
  padding: 30px 32px 34px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.service-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 25px;
  color: var(--brown);
}
.service-title a {
  color: inherit;
  text-decoration: none;
  transition: color .25s;
}
.service-title a:hover { color: var(--accent); }

.link-arrow {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: gap .25s, color .25s;
  /* Area di tocco a 44px: il padding la allarga, il margine negativo
     restituisce lo spazio, così il layout della card non cambia. */
  padding: 12px 0;
  margin: -12px 0;
}
.link-arrow:hover { gap: 16px; color: var(--accent-dark); }

/* ------------------------------------------------------------
   6b. Servizi — dettaglio (pagina /servizi)
   Ogni servizio è una sezione: immagine quadrata al 50% e testo al 50%,
   con ordine alternato (immagine-testo / testo-immagine) su desktop.
   ------------------------------------------------------------ */
.services-intro {
  padding: 96px 56px 0;
  text-align: center;
}
.services-intro .section-head { margin-bottom: 0; }

.service-row__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.service-row__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 16px 44px color-mix(in srgb, var(--brown) 10%, transparent);
}

/* Solo pagina "Trattamenti con Dispositivi Mantis": foto in formato 5:4
   invece del quadrato di default (vedi service-row__media--5x4 in
   views/parts/dispositivi-dettaglio.php). */
.service-row__media--5x4 img { aspect-ratio: 5 / 4; }

/* Solo pagina "Trattamenti Diego Dalla Palma": foto mostrate per intero, nelle
   loro proporzioni native, invece del quadrato ritagliato di default (vedi
   service-row__media--intera in views/parts/diego-dalla-palma-dettaglio.php).
   aspect-ratio: auto lascia decidere all'immagine; object-fit: contain evita
   qualsiasi ritaglio anche se in futuro si vincolasse l'altezza. */
.service-row__media--intera img {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

/* Su desktop: alterna la posizione dell'immagine spostandola dopo il testo */
.service-row--reverse .service-row__media { order: 2; }

.service-row__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 36px;
  line-height: 1.1;
  color: var(--brown);
}
.service-row__rule {
  width: 56px;
  height: 2px;
  background: var(--accent);
  margin: 18px 0 26px;
}
.service-row__subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  color: var(--accent-dark);
  margin-top: 10px;
}
.service-row__body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}
.service-row__body + .service-row__body { margin-top: 1.1em; }

/* Bottone in fondo al testo (pagina /brand: "Scopri il partner") */
.service-row__cta { margin-top: 30px; }

/* Logo del brand sotto il bottone (pagina /brand). Normalizzato per altezza:
   larghezza automatica ma limitata, così loghi di forme diverse restano
   equilibrati. object-fit lascia intatte le proporzioni. */
.service-row__logo {
  display: block;
  margin-top: 26px;
  height: auto;
  width: 200px;
  max-width: 200px;
  max-height: 90px;
  object-fit: contain;
  object-position: left center;
}

/* ------------------------------------------------------------
   6c. Trattamenti — schede con copertina (pagina /trattamenti-comfort-zone)
   Griglia di card: foto in copertina con il nome in sovrimpressione e, sotto,
   frase di sintesi + "benefici chiave" (chip). La descrizione completa si apre
   in accordion nativo (<details>/<summary>), così la pagina resta breve anche
   con molti trattamenti.
   ------------------------------------------------------------ */
.tz-groups { max-width: 1240px; margin: 0 auto; }
.tz-group + .tz-group { margin-top: 76px; }

.tz-group__head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 34px;
}
.tz-group__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 30px;
  color: var(--brown);
}
.tz-group__count {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.tz-grid {
  display: grid;
  /* min(): sotto i ~350px di schermo la colonna minima di 300px uscirebbe dal
     contenitore (overflow orizzontale); così scende al 100% disponibile. */
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 26px;
  align-items: start;      /* le card aperte non allungano le vicine */
}

.tz-card {
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--brown) 10%, transparent);
  border-radius: 14px;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--brown) 5%, transparent);
  transition: box-shadow .3s, transform .3s;
  overflow: hidden;
}
.tz-card:hover { box-shadow: 0 18px 44px color-mix(in srgb, var(--brown) 10%, transparent); }
.tz-card[open] { box-shadow: 0 18px 44px color-mix(in srgb, var(--brown) 12%, transparent); }

.tz-card__summary {
  display: block;                 /* rimuove il marker triangolo di <summary> */
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tz-card__summary::-webkit-details-marker { display: none; }
.tz-card__summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;           /* verso l'interno: la card ha overflow hidden */
  border-radius: 14px;
}

/* Copertina: foto a tutta larghezza col nome del trattamento in sovrimpressione.
   La velatura (::after) sfuma dal basso e tiene leggibile il titolo su qualsiasi
   foto, comprese quelle chiare. */
.tz-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.tz-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.tz-card:hover .tz-card__media img { transform: scale(1.04); }
.tz-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    color-mix(in srgb, var(--dark) 80%, transparent) 0%,
    color-mix(in srgb, var(--dark) 32%, transparent) 45%,
    transparent 78%);
}
.tz-card__title {
  position: absolute;
  z-index: 1;                     /* sopra la velatura */
  left: 24px;
  right: 24px;
  bottom: 18px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 23px;
  line-height: 1.2;
  color: var(--white);
  text-shadow: 0 2px 12px color-mix(in srgb, var(--dark) 35%, transparent);
}

.tz-card__body { padding: 22px 28px 24px; }

.tz-card__lead {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text);
}

/* Riga finale: invito ad aprire + freccia (che ruota a scheda aperta) */
.tz-card__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.tz-card__chevron {
  flex: none;
  margin-left: auto;              /* resta a destra anche quando l'invito sparisce */
  color: var(--accent);
  transition: transform .3s ease;
}
.tz-card[open] .tz-card__chevron { transform: rotate(180deg); }

.tz-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.tz-chip {
  font-size: 11.5px;
  letter-spacing: .3px;
  color: var(--brown);
  background: var(--bg-alt);
  border: 1px solid color-mix(in srgb, var(--brown) 10%, transparent);
  padding: 5px 12px;
  border-radius: 20px;
}

.tz-card__more {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}
.tz-card[open] .tz-card__more { display: none; }   /* a scheda aperta l'invito sparisce */

.tz-card__detail {
  padding: 4px 28px 26px;
  border-top: 1px solid color-mix(in srgb, var(--brown) 10%, transparent);
}
.tz-card__detail p {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--text);
  margin-top: 18px;
}

/* ------------------------------------------------------------
   6d. Trattamenti — righe alternate con titoletti di gruppo
   (pagina Trattamenti Diego Dalla Palma). Riusa il layout .service-row di 6b;
   aggiunge i titoletti di area ("Trattamenti Viso/Corpo").
   ------------------------------------------------------------ */
.trt-group-head {
  text-align: center;
  padding: 48px 56px 0;
}
.trt-group-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  color: var(--brown);
}
/* Avvicina il titoletto alla prima riga del suo gruppo (che ha padding-top 104) */
.trt-group-head + .service-row { padding-top: 44px; }

/* ------------------------------------------------------------
   6e. Estetica Base — elenco servizi (pagina /trattamenti-di-estetica-base)
   Layout dedicato: elenco verticale, immagine tonda a sinistra (~20% della
   larghezza del contenuto) e nome del servizio a destra.
   ------------------------------------------------------------ */
.eb-list {
  max-width: 820px;
  margin: 0 auto;
  list-style: none;
}
.eb-item {
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 22px 0;
}
.eb-item + .eb-item { border-top: 1px solid color-mix(in srgb, var(--brown) 10%, transparent); }

.eb-item__media {
  flex: 0 0 20%;              /* ~20% della larghezza del contenuto */
  max-width: 20%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;         /* immagine tonda */
  overflow: hidden;           /* ritaglia lo zoom al cerchio */
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brown) 12%, transparent);
}
.eb-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.eb-item:hover .eb-item__media img { transform: scale(1.05); }

.eb-item__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.25;
  color: var(--brown);
}

/* ------------------------------------------------------------
   7. Gallery
   ------------------------------------------------------------ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 248px;
  gap: 18px;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform .4s;
}
.gallery-grid img:hover {
  transform: scale(1.04);
}
.gallery-grid .g-tall { grid-column: 1; grid-row: 1 / span 2; }
.gallery-grid .g-1 { grid-column: 2; grid-row: 1; }
.gallery-grid .g-2 { grid-column: 3; grid-row: 1; }
.gallery-grid .g-wide { grid-column: 2 / span 2; grid-row: 2; }

/* Punto di ritaglio delle foto attuali (dipende dalla foto, non dal riquadro:
   da rivedere se la si sostituisce). Conta solo sull'asse che cover taglia,
   quindi nessuna media query: sul desktop pieno le foto sono quasi intere.
   - g-tall: sotto i 768px diventa una fascia orizzontale; 6% dall'alto tiene
     in vista la scritta [comfort zone] invece del vuoto tra due ripiani.
   - g-wide: su smartphone resta ~45% della larghezza; 65% centra il
     dispositivo Aqua Tight senza perdere il lettino. */
.gallery-grid .g-tall { object-position: 50% 6%; }
.gallery-grid .g-wide { object-position: 65% 50%; }

/* ------------------------------------------------------------
   8. Recensioni
   ------------------------------------------------------------ */
.review-card {
  background: var(--white);
  border: 1px solid color-mix(in srgb, var(--brown) 10%, transparent);
  border-radius: 14px;
  padding: 38px 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.review-stars {
  display: flex;
  gap: 6px;
  color: var(--accent);
}
.review-text {
  font-style: italic;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
}
.review-author {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brown);
}

/* ------------------------------------------------------------
   8b. Carosello loghi (brand partner)
   Striscia su fondo scuro che scorre di un logo alla volta, in loop.
   Il JS legge --logos-per-view per sapere quanti loghi sono visibili
   e misura il passo dal layout: i breakpoint restano solo nel CSS.
   ------------------------------------------------------------ */
.section--dark { background: var(--dark); }

.logos { --logos-per-view: 4; }

.logos__viewport {
  overflow: hidden;
  /* Dissolvenza ai bordi: i loghi entrano ed escono sfumando invece di
     essere tagliati di netto sul bordo del container. La fascia (2%) è
     più stretta del padding dei .logos__item, quindi non tocca il marchio.
     Il #000 non è un colore del tema: in una maschera conta solo l'opacità
     (opaco = visibile, transparent = nascosto). */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent);
}

.logos__track {
  display: flex;
  align-items: center;
  list-style: none;
  transition: transform .9s ease;
}
/* Il JS la usa per riportare il nastro a zero senza animazione dopo aver
   spostato il primo logo in coda: è il "salto" invisibile del loop. */
.logos__track.is-snapping { transition: none; }

.logos__item {
  flex: 0 0 calc(100% / var(--logos-per-view));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}
.logos__item img {
  width: 100%;
  height: auto;
  opacity: .72;
  transition: opacity .3s;
}
.logos__item img:hover { opacity: 1; }

/* Movimento ridotto: il JS non avvia lo scorrimento, quindi i loghi oltre
   quelli visibili non comparirebbero mai. Il nastro va a capo e li mostra
   tutti fermi; gli eventuali cloni del loop (aria-hidden) si nascondono. */
@media (prefers-reduced-motion: reduce) {
  .logos__track {
    transition: none;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 24px;
  }
  .logos__item[aria-hidden="true"] { display: none; }
}

/* ------------------------------------------------------------
   9. Contatti
   ------------------------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 38px;
  padding-left: 20px;
}
.contact-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.contact-item svg { flex: none; margin-top: 2px; }
.contact-label {
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--brown);
  margin-bottom: 8px;
}
.contact-value {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  font-weight: 400;
}
/* Telefono ed email: area di tocco a 44px con padding + margine negativo
   (inline-block, così l'altezza della riga di testo non cambia). */
.contact-value a {
  color: inherit;
  text-decoration: none;
  display: inline-block;
  padding: 10px 0;
  margin: -10px 0;
}
.contact-map {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  box-shadow: 0 14px 40px color-mix(in srgb, var(--brown) 8%, transparent);
  overflow: hidden;             /* ritaglia le tile agli angoli arrotondati */
  background: var(--bg-alt);    /* placeholder mentre caricano le tile */
  position: relative;
  z-index: 0;                   /* confina gli z-index di Leaflet sotto l'header */
}
/* Fallback statico (no-JS): l'immagine riempie il riquadro come prima. */
.contact-map > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Mappa Leaflet: patina grigia + marker su misura ---- */
.contact-map .leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--bg-alt);
  font-family: inherit;
}
/* "Patina grigia": desatura SOLO le tile. Il marker vive in un pane
   separato (.leaflet-marker-pane) e resta quindi a colori. */
.contact-map .leaflet-tile-pane {
  filter: grayscale(1) contrast(0.95) brightness(1.03);
}
/* Controlli e attribuzione in tono con il tema */
.contact-map .leaflet-control-attribution {
  font-size: 10px;
  background: color-mix(in srgb, var(--card) 70%, transparent);
  color: var(--muted);
}
.contact-map .leaflet-control-attribution a { color: var(--brown); }
.contact-map .leaflet-bar a {
  color: var(--brown);
  background: var(--card);
  border-bottom-color: color-mix(in srgb, var(--brown) 12%, transparent);
}
.contact-map .leaflet-bar a:hover { background: var(--bg); }

/* Pointer personalizzato (divIcon) */
.st-pin svg {
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 6px 7px color-mix(in srgb, var(--brown) 35%, transparent));
}
.st-pin__pulse {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-dark) 45%, transparent);
  z-index: 1;
  animation: st-pin-pulse 2.4s ease-out infinite;
}
@keyframes st-pin-pulse {
  0%   { transform: scale(0.6); opacity: 0.8; }
  70%  { transform: scale(3.4); opacity: 0; }
  100% { transform: scale(3.4); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .st-pin__pulse { animation: none; display: none; }
}

/* Popup in tono con il tema */
.contact-map .leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--brown) 18%, transparent);
}
.contact-map .leaflet-popup-content {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.contact-map .leaflet-popup-content strong { color: var(--brown); }
.contact-map .leaflet-popup-content a { color: var(--accent-dark); font-weight: 600; }

/* ------------------------------------------------------------
   9b. Icone social (componente 'social': contatti + footer)
   ------------------------------------------------------------ */
/* Pastiglie tonde che si riempiono all'hover/focus. Dimensione e colori
   sono variabili locali, così le varianti ridefiniscono solo quelle. */
.social {
  --social-size: 46px;
  --social-color: var(--accent-dark);   /* icona (e riempimento su hover) */
  --social-border: var(--accent);       /* bordo a riposo */
  display: flex;
  gap: 14px;
}
.social__link {
  position: relative;       /* riferimento per l'area di tocco (::after) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--social-size);
  height: var(--social-size);
  border-radius: 50%;
  border: 1px solid var(--social-border);
  color: var(--social-color);
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
/* Area di tocco di almeno 44px anche quando la pastiglia è più piccola
   (footer, 38px): lo pseudo-elemento sporge di quel che manca, senza
   cambiare il disegno. L'inset si misura dal padding box, cioè dentro il
   bordo di 1px: da qui il −1px. Con --social-size ≥ 46px l'inset vale 0. */
.social__link::after {
  content: "";
  position: absolute;
  inset: min(0px, calc((var(--social-size) - 44px) / 2 - 1px));
}
.social__link:hover,
.social__link:focus-visible {
  background: var(--social-color);
  border-color: var(--social-color);
  color: var(--card);
}
.social__link svg {
  display: block;
  width: calc(var(--social-size) * 0.46);
  height: calc(var(--social-size) * 0.46);
}

/* Nel footer sono più piccole (devono stare in riga con il logo, 44px)
   e riprendono l'arancione del logo che hanno accanto. */
.social--footer {
  --social-size: 38px;
  --social-color: var(--logo-orange);
  --social-border: var(--logo-orange);
  gap: 10px;
}

/* ------------------------------------------------------------
   10. Footer
   ------------------------------------------------------------ */
.site-footer { background: var(--bg); padding: 40px 56px; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
/* Gruppo di sinistra: logo + icone social affiancati. */
.footer-left {
  display: flex;
  align-items: center;
  gap: 22px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.footer-brand img {
  height: 44px;
  width: auto;
  display: block;
}
.footer-nav {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
  /* Area di tocco a 44px senza spostare il layout (vedi .link-arrow) */
  padding: 12px 0;
  margin: -12px 0;
}
.footer-nav a:hover { color: var(--brown); }
.footer-copy { font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------
   10b. Pagina 404 e pagine generiche
   ------------------------------------------------------------ */
.error-section {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.error-inner {
  max-width: 620px;
  padding: 40px 24px;
}
.error-code {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(96px, 18vw, 168px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: 2px;
}
.error-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 42px;
  color: var(--brown);
  margin-top: 6px;
}
.error-section .section-rule { margin: 22px auto 26px; }
.error-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 36px;
}

/* Pagine di solo testo (Privacy Policy, Cookie Policy, Dati Societari):
   il contenuto è HTML statico nella vista, qui la sua tipografia. */
.page-section { min-height: calc(100vh - var(--header-height) - 124px); }
.page-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
}
.page-body > * + * { margin-top: 1em; }
.page-body > * + h2 { margin-top: 1.8em; }
.page-body h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.25;
  color: var(--brown);
}
.page-body > * + h3 { margin-top: 1.5em; }
.page-body h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 23px;
  line-height: 1.3;
  color: var(--brown);
}
.page-body h3 + * { margin-top: .5em; }
.page-body strong { font-weight: 600; color: var(--brown); }
.page-body ul { padding-left: 1.3em; }
.page-body li + li { margin-top: .35em; }
.page-body li::marker { color: var(--accent-dark); }
.page-body a {
  color: var(--accent-dark);
  text-underline-offset: 3px;
  transition: color .2s;
}
.page-body a:hover { color: var(--brown); }
.page-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-alt);
  color: var(--brown);
  padding: 2px 7px;
  border-radius: 6px;
}
/* Data di revisione in fondo alle informative */
.page-body .page-updated {
  margin-top: 2.4em;
  font-size: 0.85em;
  font-style: italic;
}

/* ------------------------------------------------------------
   11. Animazioni di rivelazione (JS aggiunge .is-visible)
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Le regole responsive (breakpoints Bootstrap) sono in responsive.css */
