:root {
  --color-bg: #f7f7f5;
  --color-surface: #ffffff;
  --color-text: #171717;
  --color-muted: #6a6a66;
  --color-line: #e4e1db;
  --color-dark-panel: rgba(20, 20, 18, 0.58);
  --color-panel-line: rgba(255, 255, 255, 0.22);
  --shadow-menu: 0 18px 42px rgba(0, 0, 0, 0.12);
  --container: 1120px;
  --header-height: 108px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.is-menu-open {
  overflow: hidden;
}

html.show-splash,
html.show-splash body {
  overflow: hidden;
}

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

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

button {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  height: var(--header-height);
  align-items: center;
  padding: 0 24px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}

.internal-page .site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}

.internal-page .category-bar {
  top: var(--header-height);
  z-index: 50;
}

.brand {
  display: inline-grid;
  grid-column: 2;
  place-items: center;
}

.brand-logo {
  width: auto;
  max-width: min(260px, 48vw);
  max-height: 74px;
  object-fit: contain;
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  grid-column: 3;
  justify-self: end;
  padding: 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.footer-social-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px; /* Spazio tra i due bottoni */
  margin: 20px 0;
}

.social-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.social-icon {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.social-btn.instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-btn:hover {
  transform: translateY(-4px) scale(1.05); /* Si alza leggermente e si ingrandisce */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.mobile-menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--color-text);
}

.category-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 48px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-line);
}

.category-menu {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(8px, 1.7vw, 26px);
  min-height: 48px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
  list-style: none;
}

.category-item {
  position: relative;
  display: flex;
  align-items: center;
}

.category-item > button {
  height: 100%;
  padding: 0 4px;
  color: var(--color-text);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.category-item > button:hover,
.category-item > button:focus-visible {
  color: var(--color-muted);
}

.subcategory-menu {
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  display: grid;
  min-width: 220px;
  margin: 0;
  padding: 10px;
  list-style: none;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow-menu);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.category-item:hover .subcategory-menu,
.category-item:focus-within .subcategory-menu,
.category-item.is-open .subcategory-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.subcategory-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--color-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.subcategory-menu a:hover,
.subcategory-menu a:focus-visible {
  background: var(--color-bg);
  color: var(--color-text);
}

.mobile-category-toggle {
  display: none;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(23, 23, 23, 0.42);
}

.mobile-menu.is-open {
  display: grid;
}

.mobile-menu-panel {
  display: grid;
  gap: 18px;
  width: min(100%, 440px);
  max-height: min(760px, calc(100vh - 44px));
  padding: 22px;
  overflow: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  box-shadow: var(--shadow-menu);
}

.mobile-menu-close {
  justify-self: end;
  padding: 8px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  color: var(--color-text);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-link-group {
  --group-color: #171717;
  display: grid;
  gap: 8px;
  padding-left: 14px;
  border-left: 4px solid var(--group-color);
}

.mobile-link-group p {
  margin: 0 0 2px;
  color: var(--group-color);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-link-group a {
  display: block;
  padding: 8px 0;
  color: var(--color-text);
  font-size: 1.04rem;
  font-weight: 700;
}

.group-1 {
  --group-color: #9f4d3f;
}

.group-2 {
  --group-color: #2f6f64;
}

.group-3 {
  --group-color: #7b5b9d;
}

.group-4 {
  --group-color: #a6762f;
}

.group-5 {
  --group-color: #3f619f;
}

.group-6 {
  --group-color: #6f6a3a;
}

.group-7 {
  --group-color: #b24c35;
}

.group-8 {
  --group-color: #1f7a86;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  background: var(--color-surface);
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s ease, visibility 1.5s ease;
}

html.show-splash .splash-screen {
  display: grid;
  opacity: 1;
  visibility: visible;
}

.splash-screen img {
  width: min(280px, 64vw);
  max-height: 180px;
  object-fit: contain;
  animation: splash-logo-zoom 1.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html.show-splash .splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes splash-logo-zoom {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }

  36% {
    opacity: 1;
    transform: scale(1.035);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hero {
  position: relative;
  display: grid;
  min-height: clamp(520px, 72vh, 760px);
  isolation: isolate;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: rgba(0, 0, 0, 0.12);
}

.hero-overlay {
  align-self: center;
  justify-self: center;
  display: grid;
  align-content: center;
  width: min(100%, clamp(520px, 72vh, 760px));
  min-height: 100%;
  padding: clamp(28px, 5vw, 46px);
  background: var(--color-dark-panel);
  border: 1px solid var(--color-panel-line);
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
  color: #ffffff;
  text-align: center;
  backdrop-filter: blur(3px);
}

.hero-overlay h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 12px;
  color: currentColor;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.72;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-overlay p:last-child {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1rem;
}

.section {
  padding: clamp(64px, 8vw, 112px) 0;
}

.intro-section {
  background: var(--color-bg);
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 7vw, 86px);
}

.intro-text {
  display: grid;
  gap: 18px;
  color: var(--color-muted);
  font-size: 1.03rem;
}

.intro-text p {
  margin: 0;
}

.page-main {
  background: var(--color-bg);
}

.page-main > .section:first-of-type {
  padding-top: clamp(30px, 5vw, 58px);
}

.page-hero {
  padding: clamp(58px, 8vw, 104px) 0 clamp(22px, 4vw, 42px);
  background: var(--color-bg);
}

.page-hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.75fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
  padding-top: 54px;
}

.breadcrumb {
  display: inline-flex;
  position: absolute;
  top: 0;
  left: 0;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: var(--color-text);
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

.breadcrumb::before {
  content: "<";
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1;
}

.breadcrumb:hover,
.breadcrumb:focus-visible {
  border-color: var(--color-text);
}

.page-hero h1 {
  max-width: 760px;
  color: var(--color-text);
}

.page-hero p {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--color-muted);
  font-size: 1.08rem;
}

.page-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #dedad2;
  border-radius: 8px;
}

.content-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}

.content-panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.content-copy {
  display: grid;
  gap: 18px;
  color: var(--color-muted);
}

.content-copy p {
  margin: 0;
}

.service-article {
  display: grid;
  gap: clamp(44px, 6vw, 76px);
}

.service-section {
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.service-section h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.5rem);
}

.service-copy {
  display: grid;
  gap: 18px;
  color: var(--color-muted);
  font-size: 1.04rem;
}

.service-copy p {
  margin: 0;
}

.check-list,
.document-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: var(--color-muted);
}

.check-list li::marker,
.document-card li::marker {
  color: var(--color-text);
}

.document-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.steps-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.document-card {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 4vw, 30px);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 8px;
}

.document-card span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--color-text);
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
}

.document-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

.document-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.96rem;
  font-weight: 700;
}

.note-box {
  display: grid;
  gap: 10px;
  padding: clamp(24px, 4vw, 34px);
  background: #efe8dc;
  border: 1px solid #d9ccb8;
  border-radius: 8px;
}

.note-box strong {
  font-size: 1.1rem;
}

.note-box p {
  margin: 0;
  color: var(--color-muted);
}

.warning-note {
  background: #f3e5df;
  border-color: #d8b9ad;
}

.contact-note {
  background: #e7eee9;
  border-color: #c7d8ce;
}

.site-footer {
  padding: 34px 0;
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.72);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.footer-content strong {
  display: block;
  color: #ffffff;
}

.footer-content p {
  margin: 4px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: flex-end;
}

.whatsapp-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  background: #25d366;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
}

.whatsapp-button svg {
  width: 34px;
  height: 34px;
  fill: #ffffff;
}

@media (max-width: 820px) {
  :root {
    --header-height: 92px;
  }

  .site-header {
    height: var(--header-height);
    grid-template-columns: auto 1fr auto;
    padding: 0 14px;
  }

  .brand {
    grid-column: 1;
    justify-self: start;
  }

  .brand-logo {
    max-width: 190px;
    max-height: 58px;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .category-bar {
    display: none;
  }

  .hero {
    min-height: 620px;
  }

  .intro-layout {
    grid-template-columns: 1fr;
  }

  .page-hero-layout,
  .content-panel,
  .service-section,
  .document-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .page-image {
    aspect-ratio: 16 / 10;
  }

  .footer-content,
  .footer-links {
    justify-content: flex-start;
  }

  .whatsapp-button {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .hero {
    min-height: 560px;
  }

  .hero-overlay {
    width: min(84%, 390px);
    min-height: 100%;
  }
}
