/* 
  Studio Commercialista Roma - Andrea Sapienza
  Keywords SEO: Commercialista Roma, Consulenza Fiscale, Partita IVA, 730, Dichiarazione Redditi, Revisione Legale, Tasse, Imposte, Finanza Aziendale.
  Design: Tema scuro, Oro, Professionale, Moderno.
*/
/* Studio commercialista — tema scuro, oro, animazioni (rispetta prefers-reduced-motion) */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Source+Sans+3:wght@400;500;600;700&display=swap");

/* 
  Studio Sapienza - CSS Style
  SEO Keywords: Commercialista Roma, Revisione Legale, Consulenza Fiscale Trastevere, 
  Partita IVA Roma, 730 Online, Dichiarazione Redditi, Contabilità Aziendale, 
  Finanza Agevolata, Assistenza Fiscale Professionisti, Revisione Conti Società.
*/
:root {
  --bg: #080a0e;
  --bg-elev: #12161f;
  --surface: #181e2a;
  --surface2: #1e2533;
  --border: rgba(212, 175, 55, 0.2);
  --text: #e8eaef;
  --muted: #8f9ab0;
  --gold: #d4af37;
  --gold-dim: #9a7b2c;
  --accent: #c9a227;
  --danger: #e85d5d;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 12px 40px rgba(212, 175, 55, 0.12);
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --maxw: 1140px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.65s;
}

/* --- MIGLIORAMENTI GRAFICI GLOBALI --- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--surface2);
  border: 2px solid var(--bg);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dim);
}

::selection {
  background: var(--gold);
  color: #1a1408;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.02rem;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(212, 175, 55, 0.09), transparent 55%),
    radial-gradient(ellipse 700px 450px at 85% 15%, rgba(100, 140, 220, 0.06), transparent 50%),
    radial-gradient(ellipse 500px 400px at 50% 100%, rgba(212, 175, 55, 0.04), transparent 45%);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 300;
  padding: 0.5rem 1rem;
  background: var(--gold);
  color: #1a1408;
  font-weight: 700;
  border-radius: 8px;
}
.skip-link:focus {
  left: 0.5rem;
}

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

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
a:hover {
  color: #e8d78a;
}

.container {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

/* ——— Header & Nav ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 10, 14, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(8, 10, 14, 0.98);
  height: 4.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Spinge tutto a destra tranne il logo col margin-right: auto */
  height: 5.5rem;
  gap: 2.5rem;
  transition: height 0.3s ease;
}

.site-header.is-scrolled .header-inner {
  height: 4.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 300;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  margin-right: auto;
  display: flex;
  align-items: baseline;
}

.logo span {
  color: var(--gold);
  font-weight: 700;
  margin-left: 0.5rem;
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}


.nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.25s var(--ease-out);
  padding: 0.5rem 0.25rem;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s var(--ease-out);
}

.nav a:hover::after,
.nav a.is-active::after {
  width: 100%;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}


/* Mobile Menu Styles (Default Hidden) */
.menu-toggle {
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 110;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--gold);
  transition: all 0.3s ease;
}

/* Responsive Header */
@media (max-width: 899px) {
  .header-inner {
    height: 4.5rem;
    gap: 1rem;
  }

  .logo {
    font-size: 1.35rem;
  }
  
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--surface);
    flex-direction: column;
    padding: 6rem 2rem;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 105;
  }
  .nav.open {
    right: 0;
  }
  .nav a {
    font-size: 1.25rem;
    color: var(--text);
  }
  .nav-mobile-btn {
    margin-top: 1rem;
  }
  
  .menu-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  
  body.menu-open {
    overflow: hidden;
  }
}



.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.68rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.04));
  color: var(--text);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: var(--shadow-gold);
}
.btn-primary {
  background: linear-gradient(145deg, var(--gold), var(--gold-dim));
  color: #1a1408;
  border-color: transparent;
}
.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.35);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 175, 55, 0.05);
}

.btn:disabled,
.btn.is-disabled-booking {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

/* Visibility Utilities */
.nav-mobile-btns {
  display: none !important;
}

.nav-desktop-btn {
  display: flex !important;
}

.menu-toggle {
  display: none !important;
}

@media (max-width: 899px) {
  .nav-mobile-btns {
    display: flex !important;
  }
  .nav-desktop-btn {
    display: none !important;
  }
  .menu-toggle {
    display: flex !important;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Hover effect on cards */
.service-card, .about-card, .contact-card, .trust-item {
  transition: all 0.4s var(--ease-out);
}

.service-card:hover, .about-card:hover, .trust-item:hover {
  transform: translateY(-8px);
  border-color: var(--gold);
  box-shadow: 0 15px 45px rgba(212, 175, 55, 0.15);
}

/* Improved lead text contrast */
.lead {
  font-size: 1.15rem;
  color: var(--text);
  opacity: 0.9;
  margin: 0 0 2rem;
  max-width: 45rem;
}

.muted {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: clamp(520px, 85vh, 900px);
  display: grid;
  align-items: center;
  padding-block: 4rem 3rem;
  overflow: hidden;
  scroll-margin-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 70% 30%, rgba(212, 175, 55, 0.07) 0%, transparent 45%),
    linear-gradient(180deg, transparent 0%, rgba(8, 10, 14, 0.4) 100%);
}

.hero-grid {
  display: grid;
  gap: 2.75rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.hero-copy {
  max-width: 38rem;
}

.hero-card {
  background: linear-gradient(145deg, var(--surface), var(--surface2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.85rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent, var(--gold-dim));
  opacity: 0.85;
}

@keyframes heroLine {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero .eyebrow {
  animation: heroLine 0.8s var(--ease-out) both;
}
.hero h1 {
  animation: heroLine 0.8s var(--ease-out) 0.08s both;
}
.hero .lead {
  animation: heroLine 0.8s var(--ease-out) 0.16s both;
}
.hero .hero-actions {
  animation: heroLine 0.8s var(--ease-out) 0.24s both;
}
.hero .hero-card {
  animation: heroLine 1s var(--ease-out) 0.2s both;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 0.75rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.18;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.15rem, 4.2vw, 3.25rem);
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.85rem, 3vw, 2.45rem);
}
h3 {
  font-size: 1.22rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

/* ——— Scroll reveal ——— */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 {
  transition-delay: 0.08s;
}
.reveal-delay-2 {
  transition-delay: 0.16s;
}
.reveal-delay-3 {
  transition-delay: 0.24s;
}

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

/* ——— Trust strip ——— */
.trust-strip {
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--border);
}
.hero .trust-strip {
  margin-top: 2.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--border);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 720px) {
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.trust-item {
  text-align: center;
  padding: 1.1rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(24, 30, 42, 0.5);
  transition: transform 0.35s var(--ease-out), border-color 0.35s, background 0.35s;
}
.trust-item:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(30, 37, 51, 0.8);
}
.trust-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.35rem;
}
.trust-label {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

/* ——— Sections: About ——— */
.about-flex {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 980px) {
  .about-flex {
    flex-direction: row;
    justify-content: space-between;
  }
  .about-content {
    flex: 1;
    max-width: 600px;
  }
  .about-visual {
    flex-shrink: 0;
    width: 320px;
  }
}
.about-text {
  margin-top: 1.5rem;
}
.clean-list {
  list-style: none;
  padding: 0;
}
.gold-bullets li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.gold-bullets li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: bold;
}
.abstract-shape {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--surface2), var(--bg));
  border: 1px solid var(--border);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  animation: morph 8s ease-in-out infinite;
}
@keyframes morph {
  0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
}
.initials {
  font-size: 5rem;
  font-weight: 900;
  color: var(--gold);
  opacity: 0.4;
  letter-spacing: -0.05em;
  position: relative;
  z-index: 1;
}

.floating-badge {
  position: absolute;
  bottom: 10%;
  right: -5%;
  background: var(--surface);
  border: 1px solid var(--gold);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-gold);
  z-index: 2;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.badge-icon {
  font-size: 1.25rem;
}

.badge-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ——— Sections: Timeline (Metodo) ——— */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 3rem auto 0;
  padding-left: 2rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}
.timeline-num {
  position: absolute;
  left: -2rem;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--bg);
  border: 2px solid var(--gold);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  z-index: 2;
}
.timeline-content h3 {
  margin-top: 0;
  color: var(--text);
}

/* ——— Trust Highlights ——— */
.trust-highlights .service-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.trust-highlights .service-card::before {
  display: none;
}
.trust-highlights .contact-icon {
  margin: 0 auto 1.25rem;
  width: 54px;
  height: 54px;
  font-size: 1.45rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-gold);
}

/* ——— Sections ——— */
.section {
  padding-block: clamp(4rem, 10vh, 7.5rem);
  border-top: 1px solid var(--border);
  scroll-margin-top: 80px; /* Offset per l'header sticky */
}
.section-head {
  margin-bottom: 2.25rem;
  max-width: 42rem;
}
.muted {
  color: var(--muted);
  font-size: 0.96rem;
}

.about-body {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 800px) {
  .about-body {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.65rem;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
.about-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow), var(--shadow-gold);
}

.card-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 980px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.5rem 1.65rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), border-color 0.4s;
}
.service-card::before {
  content: attr(data-step);
  position: absolute;
  top: 1.25rem;
  right: 1rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: rgba(212, 175, 55, 0.12);
  line-height: 1;
  pointer-events: none;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.58);
  box-shadow: var(--shadow), var(--shadow-gold);
}
.service-card h3 {
  margin-top: 0;
  color: var(--gold);
  position: relative;
  z-index: 1;
}
.service-card p {
  margin: 0;
  position: relative;
  z-index: 1;
}

.faq-grid {
  display: grid;
  gap: 0.9rem;
  max-width: 760px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--gold);
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "−";
}

.cta-strip {
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(212, 175, 55, 0.04), transparent);
}
.cta-strip .btn-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.contact-grid {
  display: grid;
  gap: 2.25rem;
}
@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1.05fr;
    align-items: start;
  }
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(24, 30, 42, 0.6);
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}
.contact-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateX(4px);
}
.contact-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold);
  font-size: 1.1rem;
}
.contact-card strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.2rem;
}
.contact-card a {
  font-weight: 600;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 280px;
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}
.map-wrap iframe {
  width: 100%;
  height: 340px;
  border: 0;
}

.site-footer {
  padding: 2.75rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
}

/* ——— Modali ——— */
body.modal-open {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 5, 8, 0.78);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
}
.modal:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}
.modal[hidden] {
  display: none !important;
}

.modal-dialog {
  width: min(100%, 520px);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem 1.75rem;
  position: relative;
  transform: scale(0.96) translateY(12px);
  transition: transform 0.4s var(--ease-out);
}
.modal:not([hidden]) .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-dialog.modal-dialog-wide {
  width: min(100%, 1120px);
  max-height: min(96vh, 980px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: min(96vh, 980px);
  padding: 1rem 1.25rem 1rem;
}

@media (max-width: 640px) {
  /* Su smartphone rendiamo la modale quasi fullscreen per vedere subito il calendario. */
  .modal {
    padding: 0;
    align-items: stretch;
  }

  .modal-dialog.modal-dialog-wide {
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 1rem 1rem 1.25rem;
  }

  .modal-dialog {
    width: 100%;
    max-height: 100vh;
  }

  .modal-close {
    top: 0.6rem !important;
    right: 0.6rem !important;
  }

  .cal-iframe-wrap {
    margin-top: 0.85rem;
    min-height: 0 !important;
    flex: 1 1 auto !important;
    height: 100% !important;
  }

  .cal-iframe-wrap iframe {
    min-height: 0 !important;
    height: 100% !important;
  }
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.2s, transform 0.2s;
}
.modal-close:hover {
  background: var(--surface2);
  transform: rotate(90deg);
}

/* Modal enhancements */
.modal-dialog {
  border-left: 2px solid var(--gold);
}

.modal-dialog h2 {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Form focus visibility */
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

/* Button glow on hover */
.btn-primary:hover {
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.3);
}

/* Responsive fixes */
@media (max-width: 768px) {
  .hero-grid {
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .about-flex {
    text-align: center;
  }
  .gold-bullets li {
    padding-left: 0;
    text-align: center;
  }
  .gold-bullets li::before {
    display: none;
  }
  .section-head {
    text-align: center;
    margin-inline: auto;
  }
}

/* Booking: più spazio all'iframe, meno spazio verticale. */
.modal#modal-booking {
  padding: 0;
  place-items: stretch;
}

.modal#modal-booking .modal-dialog h2 {
  margin-bottom: 0.2rem;
}

.modal#modal-booking .modal-dialog.modal-dialog-wide {
  /* Booking: massimizza spazio e permetti lo scroll della modale invece che dell'iframe */
  width: 100%;
  height: 100%;
  max-height: 100%;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.modal#modal-booking .modal-dialog h2 {
  margin: 0;
  padding: 0.75rem 0 0.25rem;
  text-align: center;
  font-size: 1.1rem;
  background: var(--bg-elev);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal#modal-booking .cal-iframe-wrap {
  margin-top: -10px; /* Recupera spazio verso l'alto per avvicinare l'agenda al titolo */
  width: 100%;
  min-height: 700px;
  flex: 1;
}

.modal#modal-booking .cal-iframe-wrap iframe {
  width: 100%;
  height: 700px;
  border: 0;
}

.modal#modal-booking .cal-fallback {
  display: block;
  text-align: center;
  margin: 1rem 0 2rem;
}

@media (max-width: 640px) {
  .modal#modal-booking .modal-dialog.modal-dialog-wide {
    /* In mobile la modale padding esterno è 0: usiamo tutta la viewport. */
    height: 100vh;
    max-height: 100vh;
    padding: 0.7rem 0.9rem 0.7rem;
  }
}

.form-grid {
  display: grid;
  gap: 0.85rem;
}
label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
input,
textarea,
select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}
textarea {
  min-height: 120px;
  resize: vertical;
}

.form-msg {
  margin-top: 0.75rem;
  font-size: 0.92rem;
}
.form-msg.is-error {
  color: var(--danger);
}

.checkbox-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.9rem;
}
.checkbox-row input {
  width: auto;
  margin-top: 0.25rem;
}

.cal-iframe-wrap {
  margin-top: 0.65rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 0;
  flex: 1 1 auto;
  background: #fff;
}
.cal-iframe-wrap iframe {
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
}

.cal-fallback {
  margin-top: 0.45rem;
  font-size: 0.9rem;
}

/* WhatsApp */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
  animation: waPulse 2.5s ease-in-out infinite;
}
@keyframes waPulse {
  0%,
  100% {
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 12px 36px rgba(37, 211, 102, 0.45);
  }
}
.wa-float:hover {
  transform: scale(1.08);
  text-decoration: none;
  animation: none;
}
.wa-float svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}
.wa-float .wa-tip {
  position: absolute;
  right: 64px;
  bottom: 50%;
  transform: translateY(50%);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
@media (min-width: 900px) {
  .wa-float:hover .wa-tip {
    opacity: 1;
  }
}

/* ——— Legal Pages (Privacy/Cookie) ——— */
.legal-page {
  background: var(--bg);
  color: var(--text);
  padding: 4rem 1rem;
}
.legal-header {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
}
.legal-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gold);
  margin: 1rem 0;
}
.legal-main {
  max-width: 800px;
  margin: 0 auto;
  background: var(--surface);
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.prose strong {
  color: var(--gold);
}
.legal-footer {
  max-width: 800px;
  margin: 3rem auto 0;
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Cookie */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: 1rem;
  background: rgba(8, 10, 14, 0.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transform: translateY(0);
  transition: transform 0.45s var(--ease-out);
}
.cookie-inner {
  width: min(100% - 2rem, var(--maxw));
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) {
  .cookie-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Legali */
.legal-page {
  padding: 2rem 1.25rem 4rem;
}
.legal-header {
  max-width: 720px;
  margin: 0 auto 2rem;
}
.legal-main {
  max-width: 720px;
  margin: 0 auto;
}
.prose h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}
.prose ul {
  padding-left: 1.25rem;
}
.legal-footer {
  max-width: 720px;
  margin: 3rem auto 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.booking-note {
  margin: 1rem 0 0;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(232, 93, 93, 0.35);
  background: rgba(232, 93, 93, 0.08);
  color: var(--text);
  font-size: 0.95rem;
}
