/* ==========================================================================
   Art'image — fogli di stile principale
   Tema chiaro "Rosa Contemporaneo" / tema scuro "Atelier Noir"
   Il tema è impostato via attributo data-theme su <html> da js/theme.js
   ========================================================================== */

:root {
  /* Rosa Contemporaneo (chiaro) — default */
  --bg: #faf6f3;
  --surface: #f6ebe6;
  --surface-2: #f0dfd8;
  --text: #3d1f36;
  --muted: #7d5f75;
  --accent: #c9a66b;
  --accent-contrast: #faf6f3;
  --cta-bg: #3d1f36;
  --cta-text: #f0dfd8;
  --border: #ecd9d2;
  --shadow: 0 24px 48px -32px rgba(61, 31, 54, 0.35);

  --font-display: "Bodoni Moda", "Playfair Display", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-script: "Allura", "Segoe Script", cursive;

  --container: 1180px;
  --radius: 3px;
}

:root[data-theme="dark"] {
  /* Atelier Noir (scuro) — sfondi più distinti tra una sezione e l'altra,
     non un unico nero piatto */
  --bg: #1d1712;
  --surface: #2b2119;
  --surface-2: #392a1d;
  --text: #f2e9da;
  --muted: #baad99;
  --accent: #c99a5e;
  --accent-contrast: #1c1712;
  --cta-bg: #c99a5e;
  --cta-text: #1c1712;
  --border: #4a3a29;
  --shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.65);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Jost", "Segoe UI", sans-serif;
}

/* --- Reset di base --------------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  transition: background-color 0.5s ease, color 0.5s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.section-inner,
.header-inner,
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}

.narrow {
  max-width: 720px;
}

.center {
  text-align: center;
  margin-inline: auto;
}

/* --- Titoli in corsivo (stile logo) ----------------------------------- */
.script-title {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(34px, 5.5vw, 58px);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 22px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 16px;
}

.hero-wordmark {
  font-family: var(--font-script);
  font-size: clamp(64px, 9vw, 108px);
  line-height: 1;
  color: var(--accent);
  margin: 0 0 4px;
  text-shadow: 0 2px 30px rgba(201, 154, 94, 0.35);
}

.section-lead {
  color: var(--muted);
  font-size: 17px;
  max-width: 56ch;
  margin: -6px auto 8px;
}

/* --- Bottoni --------------------------------------------------------------
   Ogni variante ha un piccolo effetto dedicato al passaggio del mouse:
   primary = riflesso che attraversa il pulsante, outline = riempimento
   che si espande da sinistra, ghost = sottolineatura che si disegna. ------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  /* azzera sfondo e font predefiniti quando .btn è un <button> */
  font-family: inherit;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease,
    color 0.4s ease, border-color 0.4s ease;
  white-space: nowrap;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px -16px rgba(0, 0, 0, 0.4);
}

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

.btn-primary {
  background: var(--cta-bg);
  color: var(--cta-text);
}

/* riflesso che attraversa il pulsante pieno */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  transition: left 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.btn-primary:hover::after,
.btn-primary:focus-visible::after {
  left: 130%;
}

.btn-outline {
  border-color: var(--accent);
  color: var(--text);
  z-index: 0;
}

/* riempimento che si espande da sinistra */
.btn-outline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  color: var(--accent-contrast);
}

.btn-outline:hover::before,
.btn-outline:focus-visible::before {
  transform: scaleX(1);
}

.btn-ghost {
  color: var(--text);
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  padding-inline: 6px;
  overflow: visible;
}

.btn-ghost::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--accent);
  transform: none;
  box-shadow: none;
}

.btn-ghost:hover::after,
.btn-ghost:focus-visible::after {
  transform: scaleX(1);
}

.btn-lg {
  padding: 16px 34px;
  font-size: 13.5px;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-primary::after,
  .btn-outline::before,
  .btn-ghost::after {
    transition: none;
  }
}

/* --- Header --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.5s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 12px;
}

.brand {
  flex: none;
}

.brand-logo {
  height: 78px;
  width: auto;
  transition: filter 0.5s ease;
}

/* Su fondo scuro si usa la variante del logo in oro (colore brand),
   fornita dalla cliente, al posto del tratto nero */
[data-theme="dark"] .brand-logo,
[data-theme="dark"] .footer-logo {
  content: url("../img/logo_artimage_oro.png");
}

.main-nav {
  flex: 1;
}

.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 30px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  border-bottom-color: var(--accent);
}

.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 8px 10px;
  border-radius: 2px;
  font-size: 13.5px;
  border-bottom: none;
}

.dropdown a:hover {
  background: var(--surface-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: none;
}

.header-actions .btn-shop {
  padding-inline: 20px;
}

/* voce "Shop online" nel menu: serve solo su mobile, dove il pulsante in header è nascosto */
.main-nav .nav-shop {
  display: none;
}

/* con il pulsante Shop l'header non ci sta: il numero resta in footer e su WhatsApp */
@media (max-width: 1100px) {
  .header-actions .btn-ghost {
    display: none;
  }
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
  flex: none;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.nav-toggle {
  display: none;
  flex: none;
  width: 38px;
  height: 38px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease;
}

.nav-toggle span {
  top: 18px;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

/* --- Hero ------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 90px 100px;
}

.hero-deco {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 82% 18%, var(--surface-2) 0%, transparent 55%),
    radial-gradient(circle at 8% 92%, var(--surface) 0%, transparent 45%);
}

/* Decorazione floreale oro (PNG trasparente) sopra i gradienti */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* ancorata a destra: resta visibile il profilo del viso */
  background: url("../img/home_sfondo.png") right center / cover no-repeat;
  opacity: 0.32;
  pointer-events: none;
}

[data-theme="dark"] .hero-bg {
  opacity: 0.45;
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

/* Desktop: foto ridotta, a destra e in basso, per liberare il profilo del
   viso dello sfondo */
@media (min-width: 901px) {
  .hero-photo {
    width: 320px;
    justify-self: start;
    align-self: center;
    margin-left: -40px;
  }
}

.hero-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-partner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-partner-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-partner-logo {
  height: 38px;
  width: auto;
  display: block;
  transition: filter 0.5s ease, opacity 0.3s ease;
}

.hero-partner a:hover .hero-partner-logo {
  opacity: 0.75;
}

[data-theme="dark"] .hero-partner-logo {
  filter: invert(1) brightness(1.3);
}

.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  font-style: italic;
  font-weight: 500;
  line-height: 1.12;
  margin-bottom: 22px;
}

.hero-lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Sezioni generiche ------------------------------------------------- */
.section {
  padding-block: 76px;
}

.section-alt {
  background: var(--surface);
}

.mission p {
  font-size: 20px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.6;
}

/* --- Perché sceglierci -------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 44px;
}

.feature-card {
  padding: 36px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.feature-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 22px;
  color: var(--accent);
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-card h3 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent);
}

.feature-card p {
  color: var(--muted);
  font-size: 15px;
}

/* --- Trattamenti: card "catalogo boutique" -------------------------------
   Foto incorniciata + testo fuori dall'immagine, con più livelli di
   animazione al passaggio del mouse (cornice, zoom immagine, titolo,
   sottolineatura del link). --------------------------------------------- */
.treatments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 28px;
  margin-top: 48px;
}

.treatment-card {
  display: flex;
  flex-direction: column;
  color: var(--text);
}

.treatment-card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 2.9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}

.treatment-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.98);
  transform: scale(1.001);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.7s ease;
}

/* cornice sottile che compare al passaggio del mouse */
.treatment-card-media::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--accent);
  opacity: 0;
  transition: opacity 0.5s ease, inset 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.treatment-card-body {
  display: flex;
  flex-direction: column;
  padding-top: 20px;
}

.treatment-card-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  margin-bottom: 8px;
  transition: color 0.4s ease, transform 0.4s ease;
  transform-origin: left center;
}

.treatment-card-text {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.treatment-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  position: relative;
  padding-bottom: 3px;
}

.treatment-card-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0.28);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.treatment-card-link svg {
  width: 15px;
  height: 15px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.treatment-card:hover .treatment-card-media img,
.treatment-card:focus-visible .treatment-card-media img {
  transform: scale(1.1);
  filter: saturate(1.05) brightness(1.02);
}

.treatment-card:hover .treatment-card-media::after,
.treatment-card:focus-visible .treatment-card-media::after {
  opacity: 1;
  inset: 14px;
}

.treatment-card:hover .treatment-card-title,
.treatment-card:focus-visible .treatment-card-title {
  color: var(--accent);
  transform: translateX(4px);
}

.treatment-card:hover .treatment-card-link::after,
.treatment-card:focus-visible .treatment-card-link::after {
  transform: scaleX(1);
}

.treatment-card:hover .treatment-card-link svg,
.treatment-card:focus-visible .treatment-card-link svg {
  transform: translateX(4px);
}

/* --- Sezione in evidenza (novità trattamento) ---------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}

.feature-photo {
  height: 380px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-grid p {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 15.5px;
}

/* --- Parallasse leggera allo scroll (immagine più alta del contenitore,
   spostata via JS in js/main.js; disattivata se prefers-reduced-motion) --- */
.parallax-wrap {
  position: relative;
  overflow: hidden;
}

.parallax-img {
  position: absolute;
  top: -26%;
  left: 0;
  width: 100%;
  height: 152%;
  object-fit: cover;
  will-change: transform;
}

/* --- Banner atmosfera: una sola immagine elegante, a piena larghezza ----- */
.atmosphere {
  position: relative;
  height: 68vh;
  min-height: 460px;
  max-height: 680px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10, 6, 8, 0.3), rgba(10, 6, 8, 0.48));
}

.atmosphere-caption {
  position: relative;
  z-index: 1;
  text-align: center;
}

.atmosphere-caption .eyebrow {
  color: #f1e4d5;
  opacity: 0.85;
}

.atmosphere-caption .script-title {
  color: #fff;
  font-size: clamp(40px, 7vw, 72px);
  margin-bottom: 18px;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.4);
}

.atmosphere-caption .divider {
  width: 64px;
  height: 1px;
  margin: 0 auto;
  background: var(--accent);
  opacity: 0.9;
}

/* --- Comparsa graduale delle sezioni allo scroll -------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .treatment-card-media img,
  .treatment-card-media::after,
  .treatment-card-title,
  .treatment-card-link::after,
  .treatment-card-link svg {
    transition: none;
  }
}

/* --- Chi siamo: foto affiancata ------------------------------------------ */
.about-grid p {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 16px;
}

.about-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- Intestazione delle pagine interne (sfondo floreale della home) ------- */
.page-hero {
  padding-block: 110px 100px;
}

.page-hero .hero-lead {
  margin-bottom: 0;
}

.page-hero .hero-bg {
  opacity: 0.22;
}

[data-theme="dark"] .page-hero .hero-bg {
  opacity: 0.32;
}

.partner-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

.partner-logo-link:hover .hero-partner-logo {
  opacity: 0.75;
}

.page-cta {
  justify-content: center;
}

/* --- Chi siamo: il nostro team ------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 12px;
}

.team-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px 32px;
  text-align: center;
}

.team-photo {
  display: block;
  width: 150px;
  height: 150px;
  margin: 0 auto 22px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 35%;
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 6px var(--bg), 0 0 0 7px var(--border);
}

.team-card h3 {
  font-size: 24px;
  margin: 0 0 4px;
}

.team-role {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 16px;
}

.team-card p:last-child {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

/* --- Chi siamo: galleria del centro con "Mostra altri" -------------------- */
.gallery-grid.gallery-centro {
  grid-template-columns: repeat(4, 1fr);
}

.gallery-grid.gallery-centro img {
  aspect-ratio: 4 / 3;
}

.gallery-item {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: zoom-in;
}

.gallery-item img {
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.05);
}

.gallery-centro .is-extra {
  display: none;
}

.gallery-centro.is-expanded .is-extra {
  display: block;
}

.gallery-more {
  margin-top: 32px;
}

/* --- Pagina Trattamenti --------------------------------------------------- */
.treatments-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.treatments-nav a {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.treatments-nav a:hover,
.treatments-nav a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* le ancore (#viso, #corpo...) non finiscono sotto l'header fisso */
.treatment-block {
  scroll-margin-top: 90px;
}

.treatment-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.treatment-row.is-reversed .treatment-photo {
  order: 2;
}

.treatment-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.treatment-subtitle {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 22px 0 10px;
}

.treatment-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  columns: 2;
  column-gap: 32px;
}

.treatment-list-single {
  columns: 1;
}

.treatment-list li {
  position: relative;
  padding: 7px 0 7px 22px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 15.5px;
  break-inside: avoid;
}

.treatment-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--accent);
}

.treatment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

@media (max-width: 900px) {
  .treatment-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .treatment-row.is-reversed .treatment-photo {
    order: 0;
  }
}

@media (max-width: 480px) {
  .treatment-list {
    columns: 1;
  }
}

/* --- Blog: elenco articoli ------------------------------------------------ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.blog-card:hover,
.blog-card:focus-visible {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

/* le copertine sono spesso grafiche Instagram verticali (4:5) con testo */
.blog-card-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.blog-card:hover .blog-card-media img,
.blog-card:focus-visible .blog-card-media img {
  transform: scale(1.04);
}

.blog-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 24px 24px 26px;
}

.blog-date {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.blog-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
}

.blog-card-excerpt {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

.blog-card .treatment-card-link {
  margin-top: auto;
  padding-top: 8px;
}

/* --- Blog: singolo articolo ----------------------------------------------- */
.article-hero h1 {
  font-size: clamp(30px, 4.6vw, 48px);
  max-width: 22ch;
  margin-inline: auto;
}

.article-layout {
  max-width: 760px;
  margin: 0 auto;
  padding-inline: 24px;
}

/* copertina sempre intera (mai ritagliata): spesso contiene testo */
.article-cover {
  margin: 0 0 44px;
  text-align: center;
}

.article-cover img {
  display: inline-block;
  max-width: 100%;
  max-height: 640px;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}

.article-body p,
.article-body ul {
  margin: 0 0 20px;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 500;
  line-height: 1.3;
  margin: 40px 0 14px;
}

.article-body > h2:first-child {
  margin-top: 0;
}

.article-body ul {
  padding-left: 22px;
}

.article-body li {
  margin-bottom: 10px;
}

.article-body li::marker {
  color: var(--accent);
}

.article-body a {
  color: var(--accent);
}

.article-body .article-cta {
  margin-top: 32px;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.article-body .article-signature {
  font-family: var(--font-script);
  font-size: 32px;
  color: var(--accent);
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.article-back:hover,
.article-back:focus-visible {
  color: var(--accent);
}

.article-back svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .article-body {
    font-size: 16px;
  }
}

/* --- Pagina Contatti ------------------------------------------------------ */
.contact-list-icons {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  gap: 14px;
}

.contact-list-icons li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--text);
}

.contact-list-icons svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--accent);
}

.contact-list-icons a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.contact-list-icons a:hover,
.contact-list-icons a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.hours {
  width: 100%;
  max-width: 380px;
}

.contact-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 40px 36px;
  scroll-margin-top: 90px;
}

.form-intro,
.contact-text {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
}

.form-note {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 18px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 130px;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

/* errori evidenziati solo dopo il primo tentativo di invio */
.was-validated .form-field input:invalid,
.was-validated .form-field textarea:invalid {
  border-color: #b3261e;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}

.form-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.was-validated .form-check input:invalid + span {
  color: #b3261e;
}

.form-check a {
  color: var(--accent);
}

.contact-form .btn {
  margin-top: 14px;
}

.contact-form .btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 18px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14.5px;
  border-left: 3px solid var(--accent);
  background: var(--bg);
  color: var(--text);
}

.form-status.is-error {
  border-left-color: #b3261e;
}

[data-theme="dark"] .was-validated .form-field input:invalid,
[data-theme="dark"] .was-validated .form-field textarea:invalid,
[data-theme="dark"] .form-status.is-error {
  border-color: #e5877f;
}

[data-theme="dark"] .was-validated .form-check input:invalid + span {
  color: #e5877f;
}

.map-lazy {
  position: relative;
  background: var(--bg);
}

.map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  padding: 24px;
  border: 0;
  background: radial-gradient(circle at 50% 40%, var(--surface-2) 0%, var(--bg) 70%);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.map-placeholder > svg {
  width: 44px;
  height: 44px;
  color: var(--accent);
}

.map-placeholder-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
}

.map-placeholder-note {
  font-size: 12px;
  color: var(--muted);
}

.map-placeholder:hover .btn-outline::before,
.map-placeholder:focus-visible .btn-outline::before {
  transform: scaleX(1);
}

.map-placeholder:hover .btn-outline,
.map-placeholder:focus-visible .btn-outline {
  color: var(--accent-contrast);
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form-card {
    padding: 28px 20px 24px;
  }
}

/* --- Video YouTube con anteprima (il player si carica al clic) ----------- */
.video-embed {
  position: relative;
  max-width: 900px;
  margin: 12px auto 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #000;
}

.video-poster,
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  opacity: 0.85;
}

.video-poster:hover img,
.video-poster:focus-visible img {
  transform: scale(1.03);
  opacity: 1;
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--cta-bg);
  color: var(--cta-text);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.18);
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}

.video-play svg {
  width: 32px;
  height: 32px;
  margin-left: 4px;
}

.video-poster:hover .video-play,
.video-poster:focus-visible .video-play {
  transform: translate(-50%, -50%) scale(1.08);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .video-poster img,
  .video-play {
    transition: none;
  }
}

/* --- Galleria a schermo intero (creata da js/main.js) -------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 72px;
  background: rgba(12, 8, 10, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
  background: rgba(0, 0, 0, 0.6);
  border-color: var(--accent);
}

.lightbox-btn svg {
  width: 22px;
  height: 22px;
}

.lightbox-close {
  top: 16px;
  right: 16px;
}

.lightbox-prev {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  letter-spacing: 0.12em;
}

@media (max-width: 600px) {
  .lightbox {
    padding: 64px 12px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 10px;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item img {
    transition: none;
  }
}

/* --- Galleria "Il nostro centro" ------------------------------------------ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}

/* --- Chi siamo (teaser) --------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-grid p {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 16px;
}

.spec-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}


/* --- Recensioni ------------------------------------------------------------ */
.reviews p {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 30px;
}

/* --- Contatti --------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 16px;
}

.hours {
  border-collapse: collapse;
  margin-bottom: 32px;
  font-size: 14.5px;
}

.hours td {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.hours td:last-child {
  text-align: right;
  padding-left: 24px;
  color: var(--text);
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Contatti in home: testo + logo affiancati, poi tre colonne
   distribuite; nessuna mappa (resta riservata alla pagina Contatti
   dedicata) --------------------------------------------------------------- */
.contact-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 56px;
}

.contact-intro .btn {
  margin-top: 22px;
}

.contact-logo-wrap {
  display: flex;
  justify-content: center;
}

.contact-logo {
  width: 100%;
  max-width: 260px;
  height: auto;
  transition: filter 0.5s ease;
}

[data-theme="dark"] .contact-logo {
  content: url("../img/logo_artimage_oro.png");
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 920px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 40px 28px;
  border-left: 1px solid var(--border);
}

.contact-detail:first-child {
  border-left: none;
}

.contact-detail-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  color: var(--accent);
}

.contact-detail-icon svg {
  width: 100%;
  height: 100%;
}

.contact-detail-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.contact-detail-value {
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text);
}

.contact-detail-value a:hover {
  color: var(--accent);
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: 18px;
  margin-top: 20px;
}

/* Un'unica riga: logo | indirizzo e copyright | social */
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  height: 44px;
  transition: filter 0.5s ease;
}

.footer-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 10px;
  text-align: center;
}

.footer-info p {
  color: var(--muted);
  font-size: 13px;
}

.footer-info p + p::before {
  content: "·";
  margin-right: 10px;
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  background-color: var(--accent);
  color: var(--accent-contrast);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

/* Lascia spazio al pulsante WhatsApp flottante, che altrimenti copre i social */
@media (max-width: 1340px) {
  .footer-inner {
    padding-right: 88px;
  }
}

@media (max-width: 700px) {
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    padding-right: 24px;
  }

  .footer-info {
    flex-direction: column;
  }

  .footer-info p + p::before {
    content: none;
  }
}

/* --- WhatsApp flottante ------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.4);
  z-index: 90;
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
}

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--bg);
    padding: 20px 24px 40px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    overflow-y: auto;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav > ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .main-nav a {
    display: block;
    width: 100%;
    padding: 12px 0;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 12px;
    display: none;
  }

  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown {
    display: block;
  }

  .header-actions .btn-ghost {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .cards-grid,
  .treatments-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-grid,
  .contact-grid,
  .hero-grid,
  .feature-grid,
  .contact-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .contact-logo {
    max-width: 180px;
  }

  .contact-details {
    grid-template-columns: 1fr;
  }

  .contact-detail {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 32px 16px;
  }

  .contact-detail:first-child {
    border-top: none;
  }

  .hero-photo,
  .feature-photo {
    order: -1;
  }

  .hero-photo img,
  .about-photo img {
    aspect-ratio: 16 / 10;
  }

  .feature-photo {
    height: 260px;
  }

  .atmosphere {
    height: 50vh;
    min-height: 360px;
    max-height: 520px;
  }

  .gallery-grid,
  .gallery-grid.gallery-centro {
    grid-template-columns: 1fr 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }
}

@media (max-width: 600px) {
  .header-actions .btn-shop {
    display: none;
  }

  .main-nav .nav-shop {
    display: block;
  }

  .header-actions .btn-primary {
    padding: 10px 16px;
    font-size: 11.5px;
  }

  .cards-grid,
  .treatments-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-block: 64px 72px;
  }

  .section {
    padding-block: 56px;
  }
}
