/* =============================================
   STUDIO DENTISTICO FERRARA — stylesheet
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --white:       #FFFFFF;
  --bg-light:    #F7F9FB;
  --bg-section:  #EDF4F9;
  --blue-deep:   #0F2A4A;
  --blue-mid:    #1A4B7A;
  --blue-accent: #2AAFE4;
  --green:       #3DB88A;
  --text-main:   #2C3E50;
  --text-muted:  #6B7C93;
  --border:      #D8E4EE;
  --shadow-sm:   0 2px 12px rgba(15,42,74,.07);
  --shadow-md:   0 8px 32px rgba(15,42,74,.12);
  --radius:      12px;
  --transition:  .3s ease;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--blue-deep);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-accent);
  margin-bottom: .75rem;
}

/* --- LAYOUT --- */
.container {
  width: 92%;
  max-width: 1140px;
  margin: 0 auto;
}

section { padding: 90px 0; }
section.tight { padding: 60px 0; }

/* --- TOP BAR --- */
.topbar {
  background: var(--blue-deep);
  color: rgba(255,255,255,.8);
  font-size: .8rem;
  padding: 8px 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar a { color: rgba(255,255,255,.8); transition: color var(--transition); }
.topbar a:hover { color: var(--white); }

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-item svg { flex-shrink: 0; }

.topbar-social { display: flex; gap: 12px; }
.topbar-social a {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.topbar-social a:hover {
  background: var(--blue-accent);
  border-color: var(--blue-accent);
}

/* --- NAVBAR --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 28px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
}

.nav-logo img {
  width: 206px;
  height: auto;
  max-height: 54px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
}

.nav-links a {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .02em;
  transition: color var(--transition);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--blue-accent);
  transition: width var(--transition);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active { color: var(--blue-deep); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--blue-accent);
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: background var(--transition) !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--blue-mid) !important; color: var(--white) !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--blue-deep); border-radius: 2px; transition: all var(--transition); }

/* --- HERO --- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 60%, #1E6FA0 100%);
  min-height: 580px;
  display: flex;
  align-items: center;
  padding: 100px 0 120px;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: .06;
  background-image: radial-gradient(circle at 25% 50%, white 1px, transparent 1px),
                    radial-gradient(circle at 75% 20%, white 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 64px;
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-media {
  position: relative;
  min-height: 420px;
}

.hero-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
}

.hero-media-card {
  position: absolute;
  left: 28px;
  bottom: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-md);
}
.hero-media-card strong { color: var(--blue-deep); font-family: var(--font-display); font-size: 1.15rem; }
.hero-media-card span { color: var(--text-muted); font-size: .86rem; line-height: 1.35; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: .8rem;
  color: rgba(255,255,255,.9);
  margin-bottom: 24px;
  letter-spacing: .05em;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--blue-accent);
}

.hero p {
  color: rgba(255,255,255,.8);
  font-size: 1.1rem;
  margin-bottom: 36px;
  max-width: 480px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--blue-accent);
  color: var(--white);
  border-color: var(--blue-accent);
}
.btn-primary:hover { background: #1A9ED2; border-color: #1A9ED2; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(42,175,228,.4); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.5);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

.btn-dark {
  background: var(--blue-deep);
  color: var(--white);
  border-color: var(--blue-deep);
}
.btn-dark:hover { background: var(--blue-mid); }

.btn-green {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-green:hover { background: #2EA876; }

/* Smile wave separator */
.smile-wave {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-top: -2px;
}
.smile-wave svg { display: block; width: 100%; }

/* --- STATS STRIP --- */
.stats-strip {
  background: var(--white);
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item { padding: 16px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--blue-accent);
  display: block;
}
.stat-label { font-size: .85rem; color: var(--text-muted); margin-top: 4px; }

/* --- SERVICES SECTION --- */
.services-section { background: var(--bg-light); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header p { color: var(--text-muted); max-width: 540px; margin: 12px auto 0; font-size: 1rem; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-accent);
}

.service-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--blue-accent), #1A9ED2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.service-icon svg { color: white; }

.service-card h3 { color: var(--blue-deep); }
.service-card p { color: var(--text-muted); font-size: .9rem; line-height: 1.6; }

.service-link {
  font-size: .85rem;
  font-weight: 600;
  color: var(--blue-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  transition: gap var(--transition);
}
.service-link:hover { gap: 8px; }

/* --- CTA BANNER --- */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-accent) 0%, #1A9ED2 100%);
  padding: 70px 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,.85); margin-bottom: 32px; font-size: 1.05rem; }

.btn-white {
  background: var(--white);
  color: var(--blue-accent);
  border-color: var(--white);
}
.btn-white:hover { background: var(--bg-light); }

/* --- INFO STRIP --- */
.info-strip {
  background: var(--white);
  padding: 52px 0;
  border-top: 1px solid var(--border);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.info-icon {
  width: 48px; height: 48px;
  background: var(--bg-section);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--blue-accent);
}

.info-item h4 { color: var(--blue-deep); margin-bottom: 4px; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.info-item p, .info-item a { color: var(--text-muted); font-size: .9rem; }
.info-item a:hover { color: var(--blue-accent); }

/* --- ABOUT PREVIEW --- */
.about-section { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.about-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.about-image > img[src$=".svg"],
.storia-intro img[src$=".svg"] {
  background: var(--bg-section);
}

.about-image img,
.storia-intro img,
.news-img img {
  object-position: center;
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(42,175,228,.1), transparent);
}

.about-accent {
  position: absolute;
  bottom: -20px; right: -20px;
  width: 140px; height: 140px;
  background: var(--blue-accent);
  border-radius: 50%;
  opacity: .12;
  z-index: -1;
}

.about-text .section-label { margin-bottom: 8px; }
.about-text h2 { margin-bottom: 20px; }
.about-text p { color: var(--text-muted); margin-bottom: 16px; }

.about-features { margin: 28px 0; display: flex; flex-direction: column; gap: 12px; }

.feature-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .9rem;
  color: var(--text-main);
}

.feature-row .check {
  width: 22px; height: 22px;
  background: rgba(61,184,138,.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--green);
}

/* --- PAGE HERO (inner pages) --- */
.page-hero {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  padding: 72px 0 60px;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,.75); font-size: 1.05rem; }

.breadcrumb {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: var(--white); }

/* --- STORIA PAGE --- */
.storia-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.storia-intro img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.storia-text p { color: var(--text-muted); margin-bottom: 16px; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}

.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}
.value-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.value-card .icon { font-size: 2rem; margin-bottom: 16px; }
.value-card h3 { margin-bottom: 10px; }
.value-card p { font-size: .9rem; color: var(--text-muted); }

/* --- SERVIZI PAGE --- */
.servizi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.servizio-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.servizio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.servizio-header {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  padding: 28px 24px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.servizio-header svg { color: var(--blue-accent); flex-shrink: 0; }
.servizio-header h3 { color: var(--white); }

.servizio-body {
  padding: 24px;
}
.servizio-body p { color: var(--text-muted); font-size: .9rem; line-height: 1.7; }

/* --- APPUNTAMENTO PAGE --- */
.appointment-section {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.appointment-info h2 { margin-bottom: 20px; }
.appointment-info p { color: var(--text-muted); margin-bottom: 24px; }

.contact-list { display: flex; flex-direction: column; gap: 18px; }

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .9rem;
}
.contact-row .c-icon {
  width: 42px; height: 42px;
  background: var(--bg-section);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-accent);
  flex-shrink: 0;
}
.contact-row strong { display: block; color: var(--blue-deep); font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 2px; }

/* --- FORM --- */
.appointment-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.appointment-form h3 { margin-bottom: 28px; }

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

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

.form-group label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--blue-deep);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text-main);
  background: var(--bg-light);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(42,175,228,.15);
  background: var(--white);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-group.full { grid-column: 1 / -1; }

.form-submit { width: 100%; padding: 14px; font-size: 1rem; margin-top: 8px; }

/* --- CONTATTI PAGE --- */
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.map-placeholder {
  background: var(--bg-section);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
}
.map-placeholder iframe {
  width: 100%; height: 100%;
  border: none;
}

.contatti-details h2 { margin-bottom: 28px; }

/* --- NEWS SECTION --- */
.news-section { background: var(--bg-light); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.news-img {
  background: var(--bg-section);
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-accent);
  font-size: 3rem;
  overflow: hidden;
}
.news-img img { width: 100%; height: 100%; object-fit: cover; }

.news-body { padding: 24px; }
.news-date { font-size: .75rem; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .08em; }
.news-body h3 { font-size: 1rem; margin-bottom: 10px; line-height: 1.4; }
.news-body p { font-size: .88rem; color: var(--text-muted); }

/* --- FOOTER --- */
footer {
  background: var(--blue-deep);
  color: rgba(255,255,255,.8);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  width: 220px;
  max-width: 100%;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
}
.footer-logo img { width: 100%; height: auto; object-fit: contain; }
.footer-brand p { font-size: .88rem; line-height: 1.7; max-width: 260px; }

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  color: rgba(255,255,255,.7);
}
.footer-social a:hover { background: var(--blue-accent); border-color: var(--blue-accent); color: white; }

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: .88rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--blue-accent); }

.footer-bottom {
  padding: 20px 0;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- WHATSAPP FLOAT --- */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  transition: transform var(--transition);
}
.whatsapp-float:hover { transform: scale(1.08); }

/* --- STICKY BOTTOM BAR (mobile) --- */
.sticky-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 150;
  background: var(--blue-deep);
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sticky-bar span { color: rgba(255,255,255,.8); font-size: .85rem; }
.sticky-bar .btn { padding: 10px 20px; font-size: .85rem; }

/* --- ANIMATIONS --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp .6s ease both;
}
.fade-up:nth-child(2) { animation-delay: .1s; }
.fade-up:nth-child(3) { animation-delay: .2s; }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-media { max-width: 560px; min-height: auto; }

  .navbar .container { min-height: 74px; }
  .nav-logo img { width: 190px; max-height: 50px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 74px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 20px; gap: 4px; box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; border-bottom: 1px solid var(--border); width: 100%; }
  .nav-links a:last-child { border-bottom: none; }
  .hamburger { display: flex; }

  .services-grid,
  .servizi-grid,
  .values-grid,
  .news-grid { grid-template-columns: repeat(2, 1fr); }

  .about-grid,
  .storia-intro,
  .appointment-section,
  .contatti-grid { grid-template-columns: 1fr; gap: 40px; }

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

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .info-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  section { padding: 60px 0; }

  .nav-logo img { width: 176px; max-height: 48px; }

  .services-grid,
  .servizi-grid,
  .values-grid,
  .news-grid { grid-template-columns: 1fr; }

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

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .form-row { grid-template-columns: 1fr; }

  .sticky-bar { display: flex; }

  body { padding-bottom: 68px; }

  .whatsapp-float { bottom: 90px; }

  .topbar-right { display: none; }

  .hero { padding: 70px 0 90px; }
  .hero-media { display: none; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .appointment-form { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


@media (max-width: 380px) {
  .nav-logo img { width: 150px; }
}


/* --- SERVICE DETAIL PAGES --- */
a.servizio-card { color: inherit; }
.servizio-body .service-link { margin-top: 18px; }
.service-page-hero { position: relative; overflow: hidden; }
.service-page-hero::after {
  content: '';
  position: absolute;
  inset: auto -10% -50% -10%;
  height: 180px;
  background: radial-gradient(circle, rgba(42,175,228,.22), transparent 62%);
  pointer-events: none;
}
.service-detail-section { background: var(--white); }
.service-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, .88fr);
  gap: 70px;
  align-items: start;
}
.service-detail-copy h2 { margin-bottom: 20px; }
.service-lead {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.85;
  margin-bottom: 28px;
}
.service-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.service-panel.light { background: var(--bg-light); box-shadow: none; }
.service-panel h3 { font-size: 1.15rem; margin-bottom: 16px; }
.service-check-list { display: grid; gap: 12px; }
.service-check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text-muted);
  font-size: .94rem;
  line-height: 1.7;
}
.service-check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(61,184,138,.14);
  color: var(--green);
  font-size: .76rem;
  font-weight: 700;
}
.service-check-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}
.service-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.service-detail-media {
  position: sticky;
  top: 108px;
}
.service-detail-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}
.service-info-card {
  width: calc(100% - 44px);
  margin: -46px auto 0;
  position: relative;
  background: rgba(255,255,255,.96);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow-md);
}
.service-info-card strong {
  display: block;
  color: var(--blue-deep);
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin-bottom: 4px;
}
.service-info-card span { color: var(--text-muted); font-size: .88rem; line-height: 1.55; }
.related-services-section { background: var(--bg-light); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.related-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-accent); }
.related-card span {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-section);
  color: var(--blue-accent);
}
.related-card strong { color: var(--blue-deep); font-family: var(--font-display); font-size: 1.1rem; }
.related-card small { color: var(--text-muted); font-size: .86rem; line-height: 1.55; }
@media (max-width: 900px) {
  .service-detail-grid { grid-template-columns: 1fr; gap: 42px; }
  .service-detail-media { position: static; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .service-check-list.compact { grid-template-columns: 1fr; }
  .service-actions .btn { width: 100%; justify-content: center; }
  .related-grid { grid-template-columns: 1fr; }
  .service-panel { padding: 22px; }
}


/* --- V8 TOPBAR MOBILE DEFINITIVA: UNA SOLA RIGA --- */
.topbar-phone a,
.topbar-hours,
.topbar-hours span,
a[href^="tel:"] {
  white-space: nowrap;
}

/* Desktop/tablet: resta normale ma pulita */
.topbar .container {
  flex-wrap: nowrap;
}

@media (max-width: 640px) {
  .topbar {
    height: 34px;
    min-height: 34px;
    padding: 0 !important;
    overflow: hidden;
    background: var(--blue-deep);
  }

  .topbar .container {
    width: 100% !important;
    max-width: none !important;
    height: 34px;
    padding: 0 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    overflow: hidden;
  }

  .topbar-left {
    width: 100% !important;
    max-width: 390px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow: hidden;
  }

  .topbar-right,
  .topbar-social {
    display: none !important;
  }

  .topbar-item {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    min-width: 0 !important;
    max-width: none !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .topbar-item svg {
    display: none !important;
  }

  .topbar-phone {
    flex: 0 0 auto !important;
  }

  .topbar-hours {
    flex: 0 1 auto !important;
    justify-content: flex-end !important;
    text-align: right !important;
    overflow: hidden !important;
  }

  .topbar-phone a,
  .topbar-hours span {
    display: inline-block !important;
    font-size: 11px !important;
    line-height: 34px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  .topbar-hours span {
    font-size: 10.5px !important;
  }
}

@media (max-width: 360px) {
  .topbar .container {
    padding: 0 8px !important;
  }

  .topbar-left {
    gap: 6px !important;
  }

  .topbar-phone a {
    font-size: 10.5px !important;
  }

  .topbar-hours span {
    font-size: 10px !important;
  }
}
