/*
Theme Name: Danilo Parrucchieri 2026
Theme URI: https://www.daniloparrucchieri.com
Author: Codex
Description: Tema custom leggero e mobile-first per il salone Danilo Parrucchieri di Senigallia.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: danilo-2026
*/

:root {
  --bg: #f6f2ed;
  --ink: #171312;
  --muted: #6e625d;
  --paper: #fffaf5;
  --line: #ded2c7;
  --accent: #c52f2a;
  --accent-dark: #7f1f1b;
  --gold: #be9359;
  --sage: #66756a;
  --radius: 8px;
  --shadow: 0 20px 50px rgba(23, 19, 18, 0.12);
  --container: min(1120px, calc(100vw - 32px));
  --nav-surface: rgba(246, 242, 237, 0.88);
  --nav-blur: blur(18px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  width: 100%;
  padding-top: 74px;
  overflow-x: hidden;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.error404 {
  padding-top: 0;
}

body.is-loading {
  cursor: progress;
}

body.animations-ready .site-header {
  animation: headerDrop 0.7s ease;
}

@media (min-width: 901px) {
  .site-header,
  .site-header .nav-wrap,
  .site-header .brand,
  .site-header .brand img,
  .site-header .main-nav,
  .site-header .main-nav > a,
  .site-header .main-nav > li,
  .site-header .nav-socials {
    opacity: 1;
    visibility: visible;
  }

  .site-header .brand {
    flex: 0 0 auto;
  }
}


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

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
  z-index: 20;
  border-bottom: 1px solid rgba(222, 210, 199, 0.7);
  background: var(--nav-surface);
  -webkit-backdrop-filter: var(--nav-blur);
  backdrop-filter: var(--nav-blur);
  transform: translateY(0);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.28s ease, box-shadow 0.28s ease;
}

.nav-wrap {
  width: var(--container);
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: min-height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand img {
  width: clamp(154px, 18vw, 230px);
  max-height: 46px;
  object-fit: contain;
  object-position: left center;
  transition: width 0.32s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper);
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  color: var(--ink);
  transition: width 0.28s ease, height 0.28s ease, background-color 0.28s ease;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  transition: width 0.28s ease, margin 0.28s ease;
}

.site-header.is-hidden {
  transform: translateY(calc(-100% - 2px));
}

.site-header.is-compact {
  box-shadow: 0 12px 28px rgba(23, 19, 18, 0.08);
}

.site-header.is-compact .nav-wrap {
  min-height: 58px;
}

.site-header.is-compact .brand img {
  width: clamp(132px, 15vw, 190px);
  max-height: 34px;
}

.site-header.is-compact .nav-toggle {
  width: 38px;
  height: 38px;
}

.site-header.is-compact .nav-toggle span,
.site-header.is-compact .nav-toggle::before,
.site-header.is-compact .nav-toggle::after {
  width: 16px;
  margin: 3px auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav a {
  color: var(--muted);
}

.main-nav li {
  list-style: none;
}

.main-nav li a {
  color: var(--muted);
}

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

.main-nav .button {
  color: var(--ink);
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav .nav-social {
  display: inline-grid;
  width: 42px;
  height: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(183, 123, 73, 0.26);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.38);
}

.main-nav .nav-social svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main-nav .nav-social:hover,
.main-nav .nav-social:focus {
  color: var(--accent);
  border-color: rgba(197, 47, 42, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus {
  transform: translateY(-2px);
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button.is-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.hero .button.is-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}

.button.is-ghost:hover,
.button.is-ghost:focus {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.hero {
  width: 100%;
  min-height: calc(100svh - 74px);
  display: grid;
  align-items: end;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #342822;
}

.hero-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -2;
}

.hero-cover > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transform: scale(1.08);
  filter: brightness(1.08) saturate(1.06);
  transition: opacity 1.35s ease, transform 6.4s ease;
}

.hero-cover > img.is-active {
  opacity: 1;
  transform: scale(1.12);
}

.hero-cover > img.align-bottom {
  object-position: center bottom;
}

.mobile-hero-carousel {
  display: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 8, 7, 0.58), rgba(10, 8, 7, 0.22) 48%, rgba(10, 8, 7, 0.04)),
    linear-gradient(0deg, rgba(10, 8, 7, 0.62), transparent 48%);
}

.hero-inner {
  width: var(--container);
  margin: 0 auto;
  padding: 86px 0 76px;
  color: #fff;
}

body.has-js .hero .eyebrow,
body.has-js .hero-logo,
body.has-js .hero-copy,
body.has-js .hero-actions {
  opacity: 0;
  transform: translateY(34px);
}

body.animations-ready .hero .eyebrow,
body.animations-ready .hero-logo,
body.animations-ready .hero-copy,
body.animations-ready .hero-actions {
  animation: heroText 1.05s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.animations-ready .hero .eyebrow {
  animation-delay: 0.16s;
}

body.animations-ready .hero-logo {
  animation-delay: 0.28s;
}

body.animations-ready .hero-copy {
  animation-delay: 0.46s;
}

body.animations-ready .hero-actions {
  animation-delay: 0.68s;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin-top: 14px;
  font-size: clamp(3.3rem, 9vw, 8.8rem);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.hero-logo {
  width: min(780px, 92vw);
  max-height: 230px;
  margin-top: 16px;
  object-fit: contain;
  object-position: left center;
}

.hero-copy {
  max-width: 610px;
  margin: 24px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.34rem);
  color: rgba(255, 255, 255, 0.84);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.section {
  padding: clamp(64px, 9vw, 116px) 0;
}

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

.container {
  width: var(--container);
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.6fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: end;
  margin-bottom: 34px;
}

.section-head h2 {
  font-size: clamp(2.3rem, 5.6vw, 5.4rem);
  text-transform: uppercase;
}

.section-head p,
.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service {
  min-height: 420px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #211b18;
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

.service:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 62px rgba(23, 19, 18, 0.18);
}

.service img,
.editorial-image img,
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service img {
  position: absolute;
  inset: 0;
  transition: transform 0.45s ease;
}

.service img.align-top {
  object-position: center top;
}

.gallery-card img.align-top,
.service-detail-media img.align-top {
  object-position: center top;
}

.service-detail-media img.align-left {
  object-position: 25% top;
}

.service-detail-media img.fit-contain {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
  border-radius: var(--radius);
}

.service-detail-media:has(img.fit-contain) {
  justify-self: center;
  width: min(100%, 360px);
  background: transparent;
}

.service:hover img {
  transform: scale(1.04);
}

.service-content {
  position: absolute;
  inset: auto 0 0;
  padding: 24px;
  color: #fff;
  background: linear-gradient(0deg, rgba(12, 9, 8, 0.86), rgba(12, 9, 8, 0));
}

.service-content h3 {
  font-size: 1.55rem;
}

.service-content p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.services-page {
  background: var(--paper);
}

.services-intro {
  max-width: 780px;
  margin-bottom: clamp(28px, 5vw, 52px);
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.service-detail-list {
  display: grid;
  gap: clamp(22px, 4vw, 42px);
}

.service-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(18px, 4vw, 42px);
  align-items: stretch;
  scroll-margin-top: 112px;
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid rgba(222, 210, 199, 0.7);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.4);
}

.service-detail:nth-child(even) .service-detail-media {
  order: 2;
}

.service-detail-media {
  width: 100%;
  height: clamp(340px, 34vw, 460px);
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #211b18;
}

.service-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-detail-carousel {
  position: relative;
  height: auto;
  aspect-ratio: 3 / 4;
  align-self: center;
  overflow: visible;
  background: transparent;
}

.service-carousel-track {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  border-radius: var(--radius);
  scrollbar-width: thin;
  scrollbar-color: var(--gold) rgba(222, 210, 199, 0.45);
  cursor: grab;
}

.service-carousel-track:active,
.service-carousel-track.is-dragging,
.service-carousel-track.is-animating {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.service-carousel-track::-webkit-scrollbar {
  height: 7px;
}

.service-carousel-track::-webkit-scrollbar-track {
  background: rgba(222, 210, 199, 0.45);
  border-radius: 999px;
}

.service-carousel-track::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 999px;
}

.service-carousel-track img {
  position: static;
  inset: auto;
  flex: 0 0 70%;
  width: 70%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-radius: var(--radius);
  transform: none;
  transition: filter 0.3s ease;
}

.service-carousel-track img:hover {
  filter: saturate(1.06) brightness(1.02);
  transform: none;
}

.service-carousel-progress {
  display: none;
}
.service-carousel-hint {
  position: absolute;
  right: 18%;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(23, 19, 18, 0.74);
  box-shadow: 0 8px 22px rgba(23, 19, 18, 0.2);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.22s ease, transform 0.22s ease;
}


.service-carousel-hint:hover,
.service-carousel-hint:focus-visible {
  background: rgba(23, 19, 18, 0.94);
  transform: translateX(3px);
}

.service-carousel-hint b {
  position: relative;
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 12px;
  overflow: visible;
  color: transparent;
  font-size: 0;
}

.service-carousel-hint b::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 1px;
  right: 1px;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  transform: translateY(-50%);
}

.service-carousel-hint b::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  transform: translateY(-50%) rotate(45deg);
}

.service-carousel-hint.is-returning b::after {
  right: auto;
  left: 1px;
  transform: translateY(-50%) rotate(-135deg);
}

.service-carousel-hint.is-returning:hover,
.service-carousel-hint.is-returning:focus-visible {
  transform: translateX(-3px);
}

.service-detail:hover .service-detail-media img,
.service-detail:hover .service-detail-media img.fit-contain {
  transform: none;
}

@media (max-width: 900px) {
  .service-detail-carousel {
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .service-carousel-track {
    width: calc(100% + 56px);
    margin-left: -28px;
    scroll-padding-inline: 28px;
    border-radius: 0;
  }

  .service-carousel-track::-webkit-scrollbar-track {
    margin-inline: 28px;
  }

  .service-carousel-track img {
    flex: 0 0 calc(100% - 54px);
    width: calc(100% - 54px);
  }

  .service-carousel-track img:first-child {
    margin-left: 28px;
  }

  .service-carousel-track img:last-child {
    margin-right: 28px;
  }

  .service-carousel-track {
    scrollbar-width: none;
  }

  .service-carousel-track::-webkit-scrollbar {
    display: none;
  }

  .service-carousel-progress {
    position: absolute;
    bottom: 0;
    z-index: 3;
    display: block;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(222, 210, 199, 0.7);
    pointer-events: none;
  }

  .service-carousel-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--gold);
    transform: translateX(0);
    transition: transform 0.12s linear;
  }

  .service-carousel-hint {
    right: 12%;
  }
}
.service-detail-copy {
  display: grid;
  align-content: center;
  padding: clamp(16px, 3vw, 38px);
  min-width: 0;
}

.service-detail-copy h2 {
  margin: 6px 0 0;
  font-size: clamp(2rem, 3.5vw, 3.7rem);
  line-height: 0.96;
  text-transform: uppercase;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  text-wrap: balance;
}

.service-detail-copy.has-long-title h2 {
  font-size: clamp(1.9rem, 3.2vw, 3.35rem);
}

.service-detail-copy p {
  margin: 18px 0 0;
  color: var(--muted);
}

.service-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.service-cta h2 {
  margin: 6px 0 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  text-transform: uppercase;
}

.service-cta p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
}

.service-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.not-found-hero {
  position: relative;
  min-height: min(720px, calc(100svh - 88px));
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: #191312;
}

.not-found-bg {
  position: absolute;
  inset: 0;
}

.not-found-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 11, 10, 0.94), rgba(15, 11, 10, 0.5) 52%, rgba(15, 11, 10, 0.22)),
    linear-gradient(0deg, rgba(15, 11, 10, 0.86), transparent 56%);
}

.not-found-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.04) brightness(0.9);
}

.not-found-content {
  position: relative;
  z-index: 1;
  padding: clamp(90px, 16vw, 170px) 0 clamp(54px, 9vw, 92px);
}

.not-found-content h1 {
  max-width: 820px;
  margin: 10px 0 0;
  font-size: clamp(3.4rem, 12vw, 9.4rem);
  line-height: 0.88;
  text-transform: uppercase;
}

.not-found-content .lead {
  max-width: 610px;
  color: rgba(255, 255, 255, 0.82);
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.quick-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.quick-route {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(222, 210, 199, 0.7);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.44);
  transition: transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

.quick-route:hover {
  transform: translateY(-4px);
  border-color: rgba(197, 47, 42, 0.32);
  background: rgba(255, 255, 255, 0.78);
}

.quick-route > .quick-route-image {
  width: calc(100% - 40px);
  height: 220px !important;
  min-height: 220px;
  display: block;
  flex: 0 0 220px;
  margin: 20px 20px 0;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
  transition: transform 0.45s ease;
}

.quick-route:hover .quick-route-image {
  transform: scale(1.04);
}

.quick-route-content {
  display: grid;
  align-content: end;
  flex: 1;
  padding: clamp(18px, 3vw, 28px);
}

.quick-route span {
  color: var(--gold);
  font-weight: 900;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.quick-route strong {
  margin-top: 18px;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.quick-route p {
  margin: 12px 0 0;
  color: var(--muted);
}

.button.is-ghost-dark {
  color: var(--ink);
  background: transparent;
  border-color: rgba(23, 19, 18, 0.24);
}

.editorial {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(320px, 0.56fr);
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
}

.editorial-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--line);
}

.editorial-image img {
  transform: scale(1.02);
  transition: transform 0.7s ease;
}

.editorial-image:hover img {
  transform: scale(1.06);
}

.editorial-copy h2 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  text-transform: uppercase;
}

.editorial-copy p {
  margin: 20px 0 0;
  color: var(--muted);
}

.gallery-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gallery-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gallery-page {
  padding: clamp(34px, 6vw, 66px) 0;
  background: var(--paper);
}

.gallery-jump-nav {
  position: sticky;
  top: 90px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  padding: 10px;
  border: 1px solid rgba(222, 210, 199, 0.78);
  border-radius: var(--radius);
  background: rgba(246, 242, 237, 0.88);
  -webkit-backdrop-filter: var(--nav-blur);
  backdrop-filter: var(--nav-blur);
}

.gallery-jump-nav a,
.gallery-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.52);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.22s ease, background-color 0.22s ease, transform 0.22s ease;
}

.gallery-jump-nav a:hover,
.gallery-top-link:hover {
  color: #fff;
  background: var(--accent);
  transform: translateY(-1px);
}

.gallery-card {
  position: relative;
  display: grid;
  min-height: 330px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  background: #211b18;
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

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

.gallery-card img {
  position: absolute;
  inset: 0;
  opacity: 0.86;
  transition: transform 0.45s ease;
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-card span {
  position: relative;
  align-self: end;
  padding: 22px;
  font-size: 1.42rem;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(0deg, rgba(12, 9, 8, 0.86), rgba(12, 9, 8, 0));
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gallery-grid a {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--line);
  transition: transform 0.32s ease, box-shadow 0.32s ease;
}

.gallery-grid a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.45s ease;
}

.gallery-grid a:hover img {
  transform: scale(1.04);
}

.gallery-section {
  scroll-margin-top: 96px;
}

.gallery-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.gallery-section-head h2 {
  margin: 0;
  font-size: clamp(2.3rem, 6vw, 5.6rem);
  text-transform: uppercase;
}

.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 0.55fr);
  gap: 28px;
  align-items: stretch;
}

.contact-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.contact-page {
  padding-top: clamp(24px, 5vw, 54px);
  background: var(--paper);
}

.contact-flow {
  display: grid;
  gap: clamp(22px, 4vw, 36px);
}

.contact-panel,
.hours-panel {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 250, 245, 0.98), rgba(246, 242, 237, 0.94)),
    var(--paper);
  box-shadow: 0 18px 38px rgba(23, 19, 18, 0.07);
}

body.has-js .reveal,
body.has-js .reveal-stagger > * {
  opacity: 1;
  filter: none;
  transform: none;
}

body.has-js .reveal[data-reveal="left"] {
  transform: none;
}

body.has-js .reveal[data-reveal="right"] {
  transform: none;
}

.reveal.is-visible,
.reveal-stagger.is-visible > * {
  animation: revealUp 1.05s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reveal[data-reveal="left"].is-visible {
  animation-name: revealLeft;
}

.reveal[data-reveal="right"].is-visible {
  animation-name: revealRight;
}

.reveal-stagger.is-visible > *:nth-child(2) {
  animation-delay: 0.08s;
}

.reveal-stagger.is-visible > *:nth-child(3) {
  animation-delay: 0.16s;
}

.reveal-stagger.is-visible > *:nth-child(4) {
  animation-delay: 0.24s;
}

.reveal-stagger.is-visible > *:nth-child(5) {
  animation-delay: 0.32s;
}

.reveal-stagger.is-visible > *:nth-child(6) {
  animation-delay: 0.4s;
}

.reveal-stagger.is-visible > *:nth-child(7) {
  animation-delay: 0.48s;
}

.reveal-stagger.is-visible > *:nth-child(8) {
  animation-delay: 0.56s;
}

.reveal-stagger.is-visible > *:nth-child(9) {
  animation-delay: 0.64s;
}

.reveal-stagger.is-visible > *:nth-child(10) {
  animation-delay: 0.72s;
}

.contact-panel h2,
.hours-panel h2 {
  font-size: clamp(2rem, 4.5vw, 4.2rem);
  text-transform: uppercase;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel-title h2 {
  margin: 0;
}

.contact-list {
  display: grid;
  gap: 14px;
  margin-top: 26px;
  color: var(--muted);
}

.contact-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(222, 210, 199, 0.62);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.44);
  transition: transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

.contact-item:hover {
  transform: translateY(-2px);
  border-color: rgba(197, 47, 42, 0.28);
  background: rgba(255, 255, 255, 0.72);
}

.contact-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(197, 47, 42, 0.1);
  box-shadow: inset 0 0 0 1px rgba(197, 47, 42, 0.13);
}

.contact-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-icon.social-mark svg {
  width: 22px;
  height: 22px;
}

.contact-list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.contact-list a {
  color: var(--muted);
}

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

.contact-side {
  display: grid;
  gap: 18px;
}

.contact-panel.compact {
  padding: 18px;
}

.map-frame {
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 18px 38px rgba(23, 19, 18, 0.07);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  filter: saturate(0.92) contrast(1.03);
}

.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(222, 210, 199, 0.9);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(197, 47, 42, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(197, 47, 42, 0.1);
}

.form-hp {
  position: absolute;
  left: -9999px;
}

.form-status {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-weight: 800;
}

.form-status.is-success {
  color: #24553a;
  background: rgba(102, 117, 106, 0.16);
}

.form-status.is-error {
  color: var(--accent-dark);
  background: rgba(197, 47, 42, 0.12);
}

.hours {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  color: var(--muted);
}

.hour-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.48);
}

.hour-row strong {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}

.hour-row span {
  text-align: right;
}

.hour-row.is-closed {
  color: rgba(110, 98, 93, 0.72);
  background: rgba(197, 47, 42, 0.07);
}

.hour-row.is-closed span {
  color: var(--accent-dark);
  font-weight: 800;
}

.hours-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-footer {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 7vw, 76px) 0 24px;
  color: rgba(255, 255, 255, 0.76);
  background:
    radial-gradient(circle at 18% 0, rgba(197, 47, 42, 0.22), transparent 34%),
    linear-gradient(145deg, #201817, #100d0c 72%);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(190, 147, 89, 0.2), transparent 24%, rgba(197, 47, 42, 0.18));
  opacity: 0.45;
}

.footer-inner {
  position: relative;
  width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(150px, 0.6fr) minmax(240px, 1fr) minmax(170px, 0.65fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: start;
}

.footer-brand img {
  width: min(260px, 100%);
  max-height: 82px;
  object-fit: contain;
  object-position: left center;
}

.footer-brand p {
  max-width: 360px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.02rem;
}

.footer-links,
.footer-contact,
.footer-cta {
  display: grid;
  gap: 10px;
}

.footer-links a,
.footer-contact a,
.footer-map {
  transition: color 0.22s ease, transform 0.22s ease, background-color 0.22s ease;
}

.footer-links a {
  width: fit-content;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.footer-links a:hover,
.footer-contact a:hover,
.footer-map:hover {
  color: #fff;
  transform: translateX(3px);
}

.footer-contact a {
  display: grid;
  gap: 3px;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.35;
}

.footer-contact span {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.footer-cta .button {
  min-width: 150px;
  color: #fff;
}

.footer-map {
  width: fit-content;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.footer-bottom {
  position: relative;
  width: var(--container);
  margin: clamp(30px, 5vw, 52px) auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.86rem;
}

.page-hero {
  padding: clamp(70px, 12vw, 140px) 0 46px;
  background: var(--paper);
}

.page-hero h1 {
  color: var(--ink);
  font-size: clamp(2.8rem, 8vw, 7rem);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip-link:focus {
  left: 8px;
  z-index: 100;
  background: #fff;
  padding: 8px 12px;
}

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

@keyframes headerDrop {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroImage {
  from {
    opacity: 0;
    transform: scale(1.16);
    filter: brightness(0.92) saturate(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1.08) saturate(1.06);
  }
}

@keyframes heroText {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(58px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes revealLeft {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateX(-64px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
  }
}

@keyframes revealRight {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateX(64px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
  }
}

/* Mantiene l'header uniforme in tutte le pagine. */
body .site-header.is-compact .nav-wrap {
  min-height: 74px;
}

body .site-header.is-compact .brand img {
  width: clamp(154px, 18vw, 230px);
  max-height: 46px;
}

@media (max-width: 900px) {
  body .site-header.is-compact .nav-wrap {
    min-height: 74px;
  }

  body .site-header.is-compact .brand img {
    width: min(210px, calc(100vw - 104px));
    max-height: 42px;
  }

  body .site-header.is-compact .nav-toggle {
    width: 44px;
    height: 44px;
  }

  body .site-header.is-compact .main-nav {
    top: 74px;
  }
}

@media (max-width: 900px) {

  body .site-header.is-compact .nav-wrap {
    min-height: 58px;
  }

  .nav-toggle {
    display: block;
  }

  .brand img {
    width: min(210px, calc(100vw - 104px));
    max-height: 42px;
  }

  body .site-header.is-compact .brand img {
    width: min(172px, calc(100vw - 94px));
    max-height: 32px;
  }

  .main-nav {
    position: fixed;
    top: 74px;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0 max(16px, calc((100vw - 1120px) / 2));
    border-bottom: 1px solid rgba(222, 210, 199, 0.7);
    background: var(--nav-surface);
    box-shadow: none;
    -webkit-backdrop-filter: var(--nav-blur);
    backdrop-filter: var(--nav-blur);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-14px);
    visibility: hidden;
    transition:
      max-height 0.42s cubic-bezier(0.16, 1, 0.3, 1),
      padding 0.42s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.26s ease,
      transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0s linear 0.42s;
  }

  body .site-header.is-compact .main-nav {
    top: 58px;
  }

  .gallery-jump-nav {
    top: 68px;
  }

  .main-nav a {
    grid-column: 1 / -1;
    padding: 14px 0;
  }

  .main-nav > li {
    grid-column: 1 / -1;
  }

  .main-nav > a:nth-of-type(4),
  .main-nav > li:nth-of-type(4) {
    grid-column: 1;
  }

  .nav-socials {
    grid-column: 2;
    align-self: center;
    justify-content: flex-end;
    padding: 10px 0 4px;
  }

  .main-nav .nav-social {
    grid-column: auto;
    padding: 0;
  }

  .main-nav .button {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 0 18px;
  }

  .main-nav.is-open {
    max-height: 340px;
    padding: 10px max(16px, calc((100vw - 1120px) / 2)) 18px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
    transition:
      max-height 0.46s cubic-bezier(0.16, 1, 0.3, 1),
      padding 0.46s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.24s ease,
      transform 0.46s cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0s;
  }

  .section-head,
  .editorial,
  .service-detail,
  .contact-band,
  .contact-page-grid {
    grid-template-columns: 1fr;
  }

  .service-detail:nth-child(even) .service-detail-media {
    order: 0;
  }

  .service-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-switch,
  .gallery-overview-grid,
  .quick-route-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 620px) {
  :root {
    --container: calc(100% - 24px);
  }

  .hero {
    width: 100%;
    min-height: 720px;
    background: #4a3b33;
  }

  .hero-cover {
    display: none;
  }

  .mobile-hero-carousel {
    display: block;
    inset: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    background: #171312;
    overflow: hidden;
    z-index: -2;
  }

  .mobile-hero-carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0;
    filter: brightness(1.12) saturate(1.08);
    transform: scale(1.035);
    transition: opacity 1.35s ease, transform 6.4s ease;
  }

  .mobile-hero-carousel img.is-active {
    opacity: 1;
    transform: scale(1.08);
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(10, 8, 7, 0.02), rgba(10, 8, 7, 0.14) 42%, rgba(10, 8, 7, 0.84) 73%),
      linear-gradient(0deg, rgba(10, 8, 7, 0.78), transparent 46%);
  }

  .hero-inner {
    width: min(100% - 24px, 1120px);
    padding-bottom: 40px;
    overflow: hidden;
  }

  .hero-logo {
    width: 100%;
    max-height: 150px;
    margin-top: 14px;
  }

  .hero-copy {
    max-width: 100%;
    font-size: 1rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }
  .service-grid,
  .gallery-switch,
  .gallery-overview-grid,
  .gallery-grid,
  .quick-route-grid,
  .footer-inner,
  .field-grid,
  .hours-wide {
    grid-template-columns: 1fr;
  }

  .not-found-hero {
    min-height: calc(100svh - 74px);
  }

  .not-found-content h1 {
    font-size: clamp(3rem, 18vw, 5.6rem);
  }

  .footer-brand img {
    width: min(230px, 100%);
  }

  .gallery-jump-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .gallery-jump-nav::-webkit-scrollbar {
    display: none;
  }

  .gallery-jump-nav a {
    flex: 0 0 auto;
  }

  .gallery-section-head {
    align-items: start;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .footer-contact a {
    padding: 12px 0;
  }

  .footer-cta .button {
    width: 100%;
  }

  .footer-bottom {
    display: grid;
  }

  .service,
  .gallery-card {
    min-height: 360px;
  }

  .service-detail-media {
    height: 320px;
    min-height: 0;
  }

  .service-detail-media:has(img.fit-contain) {
    width: 100%;
    height: auto;
  }

  .service-detail-media img.fit-contain {
    position: static;
    width: 100%;
    height: auto;
    display: block;
  }

  .hour-row {
    display: grid;
    gap: 4px;
  }

  .hour-row span {
    text-align: left;
  }
}
















/* Header uniforme: override finale. */
body .site-header.is-compact .nav-wrap { min-height: 74px; }
body .site-header.is-compact .brand img {
  width: clamp(154px, 18vw, 230px);
  max-height: 46px;
}

@media (max-width: 900px) {
  body .site-header.is-compact .nav-wrap { min-height: 74px; }
  body .site-header.is-compact .brand img {
    width: min(210px, calc(100vw - 104px));
    max-height: 42px;
  }
  body .site-header.is-compact .nav-toggle {
    width: 44px;
    height: 44px;
  }
  body .site-header.is-compact .main-nav { top: 74px; }
}












/* Formato verticale del carosello Cheratina su mobile. */
@media (max-width: 620px) {
  body .service-detail-carousel {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
  }
}
