/* ============================================================
   Bertola Studio — 2026 web design system
   Palette inherited from the original brand: teal #00A9D6 → cyan #00DBD6
   ============================================================ */

:root {
  --ink: #062630;
  --ink-2: #0b3441;
  --ink-3: #123f4d;
  --teal: #00a9d6;
  --cyan: #00dbd6;
  --accent: #00bdd6;
  --glow: #1ae4ff;
  --slate: #486066;
  --mist: #f2f8fa;
  --paper: #ffffff;
  --line: rgba(6, 38, 48, 0.12);
  --line-soft: rgba(6, 38, 48, 0.07);
  --grad: linear-gradient(105deg, var(--teal) 0%, var(--cyan) 100%);
  --grad-rev: linear-gradient(105deg, var(--cyan) 0%, var(--teal) 100%);
  --shadow-sm: 0 2px 10px rgba(6, 38, 48, 0.06);
  --shadow-md: 0 14px 40px rgba(6, 38, 48, 0.12);
  --shadow-lg: 0 30px 70px -18px rgba(0, 121, 137, 0.35);
  --radius: 24px;
  --radius-lg: 32px;
  --font-display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --nav-h: 84px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul,
ol {
  list-style: none;
}
button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

::selection {
  background: rgba(0, 189, 214, 0.28);
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* ---------- Utility ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}
.eyebrow.center::after {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}

.section {
  padding: 96px 0;
}
.section-tight {
  padding: 64px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 14px 0 12px;
}
.section-head p {
  color: var(--slate);
  font-size: 17px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 34px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 30px -8px rgba(0, 169, 214, 0.55);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -10px rgba(0, 169, 214, 0.7);
  filter: saturate(1.1);
}
.btn:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: none;
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.35);
}

.btn-dark {
  background: var(--ink);
  box-shadow: 0 10px 30px -8px rgba(6, 38, 48, 0.45);
}
.btn-dark:hover {
  box-shadow: 0 18px 40px -10px rgba(6, 38, 48, 0.55);
}

.btn-lg {
  padding: 19px 42px;
  font-size: 16px;
}
.btn-sm {
  padding: 11px 22px;
  font-size: 13.5px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  transition:
    gap 0.25s ease,
    color 0.25s ease;
}
.link-arrow svg {
  transition: transform 0.25s ease;
}
.link-arrow:hover {
  gap: 13px;
  color: var(--teal);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line-soft);
  box-shadow: 0 8px 30px rgba(6, 38, 48, 0.08);
}
.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--grad);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px -6px rgba(0, 169, 214, 0.6);
}
.brand-mark img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand-text small {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 600;
}

.site-header:not(.scrolled) .brand-text strong {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.site-header:not(.scrolled) .brand-text small {
  color: rgba(255, 255, 255, 0.75);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a:not(.btn) {
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  transition:
    background 0.25s ease,
    color 0.25s ease;
}
.site-header:not(.scrolled) .nav-links a:not(.btn) {
  color: rgba(255, 255, 255, 0.92);
}
.nav-links a:not(.btn):hover {
  background: rgba(0, 189, 214, 0.12);
  color: var(--accent);
}
.nav-links a.active:not(.btn) {
  background: var(--ink);
  color: #fff;
}
.site-header:not(.scrolled) .nav-links a.active:not(.btn) {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}
.nav-links .btn {
  padding: 12px 24px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--line);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
.site-header:not(.scrolled) .nav-toggle span {
  background: #fff;
}
.nav-toggle.open {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}
.nav-toggle.open span {
  background: #fff;
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero slider ---------- */
.hero {
  position: relative;
  height: min(92vh, 820px);
  min-height: 560px;
  overflow: hidden;
  background: var(--ink);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 1.1s ease,
    visibility 1.1s;
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
}
.hero-slide .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1);
}
.hero-slide .bg.bg-terapia {
  background-image: url("../assets/hero-terapia.jpg");
}
.hero-slide .bg.bg-visita {
  background-image: url("../assets/hero-visita.jpg");
}
.hero-slide .bg.bg-professionalita {
  background-image: url("../assets/hero-professionalita.jpg");
}
.hero-slide.active .bg {
  animation: kenburns 7s ease-out forwards;
}
@keyframes kenburns {
  from {
    transform: scale(1.12);
  }
  to {
    transform: scale(1);
  }
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 38, 48, 0.62) 0%,
    rgba(6, 38, 48, 0.28) 42%,
    rgba(6, 38, 48, 0.78) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 90px;
  max-width: 900px;
  margin-inline: auto;
}
.hero-content .hero-eyebrow {
  color: var(--glow);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 22px;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s ease 0.15s,
    transform 0.9s ease 0.15s;
}
.hero-slide.active .hero-eyebrow {
  opacity: 1;
  transform: none;
}
.hero-content h1 {
  color: #fff;
  font-size: clamp(34px, 6vw, 72px);
  font-weight: 800;
  text-wrap: balance;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.9s ease 0.3s,
    transform 0.9s ease 0.3s;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}
.hero-slide.active .hero-content h1 {
  opacity: 1;
  transform: none;
}
.hero-cta {
  margin-top: 34px;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s ease 0.5s,
    transform 0.9s ease 0.5s;
}
.hero-slide.active .hero-cta {
  opacity: 1;
  transform: none;
}

.hero-nav {
  position: absolute;
  inset-inline: 0;
  bottom: 34px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition:
    width 0.35s ease,
    background 0.35s ease;
}
.hero-dot.active {
  width: 30px;
  background: #fff;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  color: #fff;
  transition:
    background 0.25s ease,
    transform 0.25s ease;
}
.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.24);
}
.hero-arrow.prev {
  left: 26px;
}
.hero-arrow.next {
  right: 26px;
}
.hero-arrow:hover.prev {
  transform: translateY(-50%) translateX(-4px);
}
.hero-arrow:hover.next {
  transform: translateY(-50%) translateX(4px);
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  background: var(--ink);
  padding: 140px 20px 90px;
}
.page-hero .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 38, 48, 0.72),
    rgba(6, 38, 48, 0.55)
  );
}
.page-hero .inner {
  position: relative;
  z-index: 2;
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(40px, 6.5vw, 78px);
  font-weight: 800;
}
.page-hero .sub {
  margin-top: 16px;
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--glow);
}
.page-hero .sub span {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

/* ---------- Band (Medico Principale / Tutte le cure) ---------- */
.band {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 46px 20px;
  position: relative;
  overflow: hidden;
}
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      600px 220px at 20% 0%,
      rgba(0, 169, 214, 0.25),
      transparent 70%
    ),
    radial-gradient(
      600px 220px at 80% 100%,
      rgba(0, 219, 214, 0.2),
      transparent 70%
    );
}
.band h2 {
  position: relative;
  font-size: clamp(26px, 3.6vw, 40px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
}

/* ---------- Contact strip ---------- */
.contact-strip {
  background: var(--ink);
  color: #fff;
  padding: 74px 0;
  position: relative;
  overflow: hidden;
}
.contact-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      700px 300px at 10% 0%,
      rgba(0, 169, 214, 0.22),
      transparent 70%
    ),
    radial-gradient(
      700px 300px at 90% 100%,
      rgba(0, 219, 214, 0.16),
      transparent 70%
    );
}
.location-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.location-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 28px 26px;
  backdrop-filter: blur(8px);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}
.location-card:hover {
  transform: translateY(-5px);
  border-color: rgba(26, 228, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}
.location-card .stemma {
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  padding: 8px;
}
.location-card .stemma img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.location-card h3 {
  font-size: 21px;
  color: #fff;
}
.location-card a {
  color: var(--glow);
  font-weight: 600;
  transition: color 0.25s;
}
.location-card a:hover {
  color: #fff;
}
.location-card .meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14.5px;
}
.location-card .tel {
  font-size: 19px;
  font-weight: 700;
}

/* ---------- Appointment section ---------- */
.appointment {
  background: var(--mist);
  padding: 88px 0;
}
.appointment-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.appointment-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    800px 400px at 100% 0%,
    rgba(0, 219, 214, 0.28),
    transparent 60%
  );
  pointer-events: none;
}
.appt-form-wrap {
  position: relative;
  padding: 56px 56px 48px;
}
.appt-form-wrap h2 {
  color: #fff;
  font-size: clamp(26px, 3vw, 36px);
  margin-bottom: 6px;
}
.appt-form-wrap .note {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  margin-bottom: 28px;
}
.appt-form {
  display: grid;
  gap: 16px;
}
.appt-form label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.appt-form input,
.appt-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 14px;
  padding: 15px 18px;
  font: inherit;
  font-size: 15px;
  transition:
    border-color 0.25s,
    background 0.25s,
    box-shadow 0.25s;
}
.appt-form textarea {
  min-height: 110px;
  resize: vertical;
}
.appt-form input::placeholder,
.appt-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}
.appt-form input:focus,
.appt-form textarea:focus {
  outline: none;
  border-color: var(--glow);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(26, 228, 255, 0.15);
}
.appt-form input.error,
.appt-form textarea.error {
  border-color: #ff7a7a;
  box-shadow: 0 0 0 4px rgba(255, 122, 122, 0.15);
}
/* Honeypot anti-spam field: invisible to humans, tempting to bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}
.appt-form .btn {
  justify-self: start;
  margin-top: 10px;
}
.form-msg {
  display: none;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14.5px;
}
.form-msg.ok {
  display: block;
  background: rgba(26, 228, 255, 0.14);
  border: 1px solid rgba(26, 228, 255, 0.45);
  color: var(--glow);
}
.form-msg.err {
  display: block;
  background: rgba(255, 122, 122, 0.14);
  border: 1px solid rgba(255, 122, 122, 0.45);
  color: #ffb3b3;
}

.appt-hours {
  position: relative;
  background: var(--grad);
  padding: 56px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  color: #fff;
}
.appt-hours h2 {
  font-size: clamp(24px, 2.6vw, 32px);
}
.hours-table {
  display: grid;
  gap: 0;
}
.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 15.5px;
}
.hours-row:last-child {
  border-bottom: 0;
}
.hours-row .day {
  font-weight: 700;
}
.hours-row .time {
  font-weight: 600;
  opacity: 0.95;
  text-align: right;
}
.hours-extra {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 600;
}
.appt-hours .clock-icon {
  width: 84px;
  margin-top: 6px;
}

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 36px 28px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.service-card:hover::before {
  transform: scaleX(1);
}
.service-card .icon-wrap {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: linear-gradient(
    145deg,
    rgba(0, 169, 214, 0.12),
    rgba(0, 219, 214, 0.12)
  );
  border: 1px solid rgba(0, 189, 214, 0.2);
}
.service-card .icon-wrap img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.service-card h3 {
  font-size: 22px;
  letter-spacing: 0.01em;
}
.service-card p {
  color: var(--slate);
  font-size: 15px;
  flex: 1;
}
.service-card .link-arrow {
  font-size: 14px;
}

/* ---------- Studio hero band + doctor ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split > .media {
  position: relative;
}
.split > .media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  object-fit: cover;
}
.split h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin: 12px 0 18px;
}
.split h3.role {
  color: var(--accent);
  font-size: 17px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.split p {
  color: var(--slate);
}

.doctor-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 48px;
  align-items: start;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 48px;
}
.doctor-card .photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.doctor-card .photo img {
  width: 100%;
  object-fit: cover;
}
.doctor-card h2 {
  font-size: clamp(28px, 3vw, 38px);
}
.doctor-card .role {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 14px;
  margin: 10px 0 16px;
}
.doctor-card p {
  color: var(--slate);
}
.doctor-card .divider {
  height: 3px;
  width: 64px;
  background: var(--grad);
  border-radius: 3px;
  margin: 22px 0;
}

/* ---------- Accordion + gallery ---------- */
.accordion {
  display: grid;
  gap: 14px;
}
.accordion-item {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.accordion-item.open {
  border-color: rgba(0, 189, 214, 0.4);
  box-shadow: var(--shadow-sm);
}
.accordion-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.accordion-head .icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(0, 189, 214, 0.1);
  color: var(--accent);
  transition:
    transform 0.35s ease,
    background 0.35s ease,
    color 0.35s ease;
}
.accordion-item.open .accordion-head .icon {
  transform: rotate(45deg);
  background: var(--grad);
  color: #fff;
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
}
.accordion-body p {
  padding: 0 26px 24px;
  color: var(--slate);
}

/* ---------- Gallery ---------- */
.gallery-slider {
  padding: 15px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.gallery-track {
  position: relative;
  aspect-ratio: 4 / 3;
}
.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  cursor: pointer;
}
.gallery-slide.active {
  opacity: 1;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 46px 24px 18px;
  background: linear-gradient(0deg, rgba(6, 38, 48, 0.8), transparent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  z-index: 2;
  pointer-events: none;
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.gallery-thumbs button {
  width: 64px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0.55;
  border: 2px solid transparent;
  transition:
    opacity 0.3s,
    border-color 0.3s,
    transform 0.3s;
  padding: 0;
}
.gallery-thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumbs button.active {
  opacity: 1;
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 22, 28, 0.92);
  display: grid;
  place-items: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s;
  cursor: zoom-out;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: min(1000px, 92vw);
  max-height: 86vh;
  border-radius: 20px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
}
.lightbox .close-btn {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 22px;
  display: grid;
  place-items: center;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--grad-rev);
  color: #fff;
  padding: 84px 0;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px 280px at 85% 20%,
    rgba(255, 255, 255, 0.18),
    transparent 70%
  );
  pointer-events: none;
}
.cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
}
.cta-inner h2 {
  font-size: clamp(26px, 3.6vw, 42px);
  text-wrap: balance;
}

/* ---------- Checklist ---------- */
.check-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}
.check-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
}
.check-list .tick {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  margin-top: 2px;
}

/* ---------- Service detail ---------- */
.service-detail {
  padding: 84px 0;
  background: var(--mist);
}
.service-detail .split {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 52px;
  gap: 48px;
}
.service-detail .media img {
  box-shadow: var(--shadow-md);
}
.service-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 44px;
}
.service-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  transition: all 0.25s ease;
  text-align: center;
}
.service-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.service-nav a.current {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 26px -8px rgba(0, 169, 214, 0.55);
}
.service-nav a.back {
  background: var(--ink);
  color: #fff;
}

/* ---------- Map ---------- */
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line-soft);
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
}

/* ---------- Legal pages ---------- */
.legal {
  padding: 96px 0;
}
.legal .prose {
  max-width: 820px;
  margin-inline: auto;
}
.legal .prose h1 {
  font-size: clamp(30px, 4vw, 44px);
  margin: 18px 0 10px;
}
.legal .prose h2,
.legal .prose h3 {
  margin: 34px 0 10px;
  font-size: 24px;
  color: var(--ink-2);
}
.legal .prose p {
  color: var(--slate);
  margin-bottom: 14px;
}
.legal .prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal .prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 30px 0;
}

/* ---------- 404 ---------- */
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(
      900px 500px at 50% -10%,
      rgba(0, 169, 214, 0.25),
      transparent 60%
    ),
    var(--ink);
  color: #fff;
  padding: 100px 20px;
}
.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(90px, 20vw, 220px);
  font-weight: 800;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-page h1 {
  font-size: clamp(24px, 3vw, 34px);
  margin: 14px 0 12px;
}
.error-page p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 460px;
  margin: 0 auto 34px;
}
.error-page .home-link {
  color: var(--glow);
  font-weight: 700;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #fff;
  padding-top: 84px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    700px 260px at 85% 0%,
    rgba(0, 219, 214, 0.12),
    transparent 70%
  );
  pointer-events: none;
}
.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
}
.footer-grid h3 {
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 18px;
}
.footer-grid .rule {
  height: 2px;
  width: 44px;
  background: var(--grad);
  border-radius: 2px;
  margin-bottom: 22px;
}
.footer-brand p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 14.5px;
  margin-top: 14px;
}
.footer-loc {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.footer-loc a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14.5px;
  transition: color 0.25s;
  display: flex;
  gap: 8px;
}
.footer-loc a:hover {
  color: var(--glow);
}
.footer-links {
  display: grid;
  gap: 12px;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  transition:
    color 0.25s,
    transform 0.25s;
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.footer-links a:hover {
  color: var(--glow);
  transform: translateX(4px);
}
.footer-links a .chev {
  color: var(--accent);
  font-weight: 700;
}
.footer-contact {
  display: grid;
  gap: 14px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.78);
}
.footer-contact a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.25s;
}
.footer-contact a:hover {
  color: var(--glow);
}
.footer-contact .piva {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
}

.footer-bottom {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.6);
}
.footer-bottom a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.25s;
}
.footer-bottom a:hover {
  color: var(--glow);
}
.footer-bottom .legal-links {
  display: flex;
  gap: 22px;
}
.footer-bottom .credit a {
  color: var(--glow);
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 140%);
  z-index: 150;
  width: min(760px, calc(100vw - 32px));
  background: rgba(11, 52, 65, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 22px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.cookie-banner.show {
  transform: translate(-50%, 0);
}
.cookie-banner p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}
.cookie-banner p a {
  color: var(--glow);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-banner .btn {
  flex: none;
}

/* ---------- Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: all 0.35s ease;
}
.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  background: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-nav {
    grid-template-columns: repeat(2, 1fr);
  }
  .location-grid {
    grid-template-columns: 1fr;
  }
  .appointment-panel {
    grid-template-columns: 1fr;
  }
  .doctor-card {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 34px;
  }
  .doctor-card .photo {
    max-width: 420px;
  }
  .split {
    gap: 40px;
  }
}

@media (max-width: 860px) {
  :root {
    --nav-h: 72px;
  }
  .nav-links {
    position: fixed;
    inset: 0;
    background: #06303c;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav-links.open {
    transform: none;
  }
  .nav-links a:not(.btn) {
    font-size: 22px;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.92);
  }
  .nav-links a.active:not(.btn) {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }
  .nav-toggle {
    display: flex;
  }
  .hero {
    min-height: 480px;
  }
  .hero-arrow {
    display: none;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .service-detail .split {
    padding: 30px;
  }
  .section {
    padding: 70px 0;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .cta-inner {
    flex-direction: column;
    text-align: center;
    align-items: stretch;
  }
  .cta-inner .btn {
    justify-content: center;
  }
  .appt-form-wrap,
  .appt-hours {
    padding: 36px 26px;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .hero-slide .bg.bg-terapia {
    background-image: url("../assets/hero-terapia-phone.jpg");
  }
  .hero-slide .bg.bg-visita {
    background-image: url("../assets/hero-visita-phone.jpg");
  }
  .hero-slide .bg.bg-professionalita {
    background-image: url("../assets/hero-professionalita-phone.jpg");
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .service-nav {
    grid-template-columns: 1fr;
  }
  .page-hero {
    min-height: 340px;
    padding-top: 110px;
  }
  .gallery-thumbs button {
    width: 48px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  html {
    scroll-behavior: auto;
  }
}
