/* ===== Studio Dentistico Davide Libro — stile minimal, pulito, elegante ===== */

:root{
  --blue: #143377;
  --blue-soft: #eef1f8;
  --grey: #A8A8A8;
  --grey-light: #f4f4f5;
  --grey-border: #e4e4e6;
  --pink: #CD72B0;
  --pink-dark: #8a3d71;
  --pink-soft: #fbeef6;
  --pink-alt-bg: #fbf3f8;
  --pink-border: #f0d9e8;
  --radius-soft: 14px;
  --coral: #CF5A24;
  --coral-dark: #9c3d16;
  --coral-soft: #fdeee6;
  --coral-alt-bg: #fdf5f0;
  --coral-border: #f6d9c8;
  --ink: #22262e;
  --ink-soft: #5b6068;
  --white: #ffffff;
  --radius: 4px;
  --maxw: 1140px;
  --transition: 0.2s ease;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4{
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 600;
  color: var(--blue);
  line-height: 1.25;
  margin: 0 0 .6em;
}

h1{ font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; letter-spacing: -0.01em; }
h2{ font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 500; }
h3{ font-size: 1.15rem; font-weight: 600; }

p{ margin: 0 0 1em; color: var(--ink-soft); }

a{ color: var(--blue); text-decoration: none; }

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

.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

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

.pink .eyebrow{ color: var(--pink); }

/* ===== Header ===== */
header.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--grey-border);
  line-height: 1.2;
}

.nav-wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
  line-height: 1.2;
}

.logo-link{ display: block; line-height: 0; }
.logo-link img{ height: 56px; width: auto; }
.logo-link .logo-compact{ display: none; }

nav.main-nav ul{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  column-gap: 30px;
  row-gap: 6px;
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

nav.main-nav a{
  display: inline-block;
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

nav.main-nav a:hover,
nav.main-nav a.active{
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.pink-page nav.main-nav a:hover,
.pink-page nav.main-nav a.active{
  color: var(--pink);
  border-bottom-color: var(--pink);
}

.nav-cta{
  background: var(--blue);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  border-bottom: none !important;
  transition: opacity var(--transition);
}
.nav-cta:hover{ opacity: .85; border-bottom: none !important; }

.menu-toggle{
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  position: relative;
  z-index: 110;
}
.menu-toggle span{
  display: block;
  width: 22px;
  height: 2px;
  background: var(--blue);
}
.pink-page .menu-toggle span{ background: var(--pink-dark); }

/* ===== Hero ===== */
.hero{
  padding: 90px 0 70px;
  background: linear-gradient(180deg, var(--blue-soft) 0%, var(--white) 100%);
}
.hero-inner{
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 60px;
  align-items: center;
}
.hero h1{ margin-bottom: .45em; }
.hero .lead{ font-size: 1.05rem; max-width: 46ch; }
.hero-visual{
  aspect-ratio: 4/3.2;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey);
  font-size: .85rem;
  text-align: center;
  padding: 20px;
}

.page-hero{
  padding: 60px 0 50px;
  background: var(--blue-soft);
  text-align: left;
}
.pink-page .page-hero{ background: var(--pink-soft); }
.page-hero .lead{ max-width: 60ch; }

/* ===== Buttons ===== */
.btn{
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.btn-primary{
  background: var(--blue);
  color: var(--white) !important;
}
.btn-primary:hover{ background: #0e2559; }
.btn-outline{
  border-color: var(--blue);
  color: var(--blue) !important;
}
.btn-outline:hover{ background: var(--blue); color: var(--white) !important; }

.pink-page .btn-primary{ background: var(--pink); }
.pink-page .btn-primary:hover{ background: #b85a97; }
.pink-page .btn-outline{ border-color: var(--pink); color: var(--pink) !important; }
.pink-page .btn-outline:hover{ background: var(--pink); color: var(--white) !important; }

.btn-row{ display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.4em; }

/* ===== Sections ===== */
section{ padding: 64px 0; }
.section-alt{ background: var(--grey-light); }
.section-head{ max-width: 640px; margin-bottom: 42px; }
.section-head.center{ margin-left: auto; margin-right: auto; text-align: center; }

/* ===== Grids / Cards ===== */
.grid{
  display: grid;
  gap: 26px;
}
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }

.card{
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover{
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(20,51,119,.08);
  border-color: var(--blue);
}
.pink-page .card:hover{
  box-shadow: 0 10px 28px rgba(205,114,176,.14);
  border-color: var(--pink);
}

.icon-badge{
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.pink-page .icon-badge{ background: var(--pink-soft); color: var(--pink); }

.card h3{ margin-bottom: .5em; }
.card p{ font-size: .93rem; margin-bottom: 0; }

.link-arrow{
  display: inline-block;
  margin-top: 14px;
  font-size: .85rem;
  font-weight: 600;
}

/* placeholder photo blocks (in attesa di foto reali) */
.photo-placeholder{
  background: var(--grey-light);
  border: 1px dashed var(--grey-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey);
  font-size: .78rem;
  text-align: center;
  padding: 14px;
  min-height: 160px;
}

/* real photo frames */
.media-frame{
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--grey-border);
  background: var(--grey-light);
}
.media-frame img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== Team ===== */
.team-card{ text-align: center; }
.team-photo{
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 50%;
  margin: 0 auto 18px;
  max-width: 160px;
}
.team-photo-icon{
  background: var(--blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.1rem;
  line-height: 1;
}
.team-card h3{ margin-bottom: 2px; }
.team-role{
  font-size: .82rem;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

/* ===== Stat strip ===== */
.stat-strip{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 1px solid var(--grey-border);
  border-bottom: 1px solid var(--grey-border);
  padding: 34px 0;
}
.stat-strip div{ text-align: center; }
.stat-num{
  font-family: 'Poppins', sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--blue);
  display: block;
}
.pink-page .stat-num{ color: var(--pink); }
.stat-label{ font-size: .8rem; color: var(--ink-soft); }

/* ===== CTA banner ===== */
.cta-banner{
  background: var(--blue);
  color: var(--white);
  border-radius: var(--radius);
  padding: 50px 40px;
  text-align: center;
}
.cta-banner h2{ color: var(--white); }
.cta-banner p{ color: #cdd6ec; }
.cta-banner .btn-primary{ background: var(--white); color: var(--blue) !important; }
.cta-banner .btn-primary:hover{ background: var(--grey-light); }

.pink-page .cta-banner{ background: var(--pink); }
.pink-page .cta-banner .btn-primary{ color: var(--pink) !important; }

/* ===== Lists ===== */
.check-list{ list-style: none; margin: 0; padding: 0; }
.check-list li{
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: .95rem;
}
.check-list li::before{
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--blue);
}
.pink-page .check-list li::before{ border-color: var(--pink); }

/* ===== Table (prezzi / orari) ===== */
table.simple-table{
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
}
table.simple-table th, table.simple-table td{
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--grey-border);
}
table.simple-table th{ color: var(--blue); font-family: 'Poppins',sans-serif; font-weight: 600; }
.pink-page table.simple-table th{ color: var(--pink); }

/* ===== Form ===== */
.contact-form{ display: grid; gap: 16px; }
.contact-form label{ font-size: .82rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; display: block; }
.contact-form input, .contact-form textarea{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .92rem;
  background: var(--white);
}
.contact-form input:focus, .contact-form textarea:focus{
  outline: none;
  border-color: var(--blue);
}
.pink-page .contact-form input:focus, .pink-page .contact-form textarea:focus{ border-color: var(--pink); }

/* ===== Footer ===== */
footer.site-footer{
  background: #10193b;
  color: #b9c1da;
  padding: 56px 0 24px;
  margin-top: 40px;
}
.pink-page footer.site-footer{ background: #3a1a30; color: #e3c8da; }

.footer-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
footer.site-footer h4{ color: var(--white); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
footer.site-footer p, footer.site-footer a{ color: #b9c1da; font-size: .88rem; }
footer.site-footer a:hover{ color: var(--white); }
footer.site-footer ul{ list-style: none; margin: 0; padding: 0; }
footer.site-footer li{ margin-bottom: 10px; }
.footer-logo .logo-plate{
  display: inline-block;
  background: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.footer-logo .logo-plate img{ height: 38px; width: auto; margin: 0; }
.footer-bottom{
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .78rem;
  color: #7c86a8;
}

/* ===== Breadcrumb-ish small note ===== */
.note{
  font-size: .8rem;
  color: var(--grey);
  border-left: 3px solid var(--grey-border);
  padding-left: 14px;
  margin-top: 30px;
}

/* ===== Review card + modal ===== */
.review-card{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 26px 30px;
  margin-top: 28px;
}
.review-card-stars{ color: #f2b100; font-size: 1.2rem; letter-spacing: 2px; }
.review-card p{ margin: 4px 0 0; }
.review-card strong{ color: var(--ink); }

.review-trigger-link{
  background: none;
  border: none;
  color: var(--ink-soft);
  text-decoration: underline;
  font-size: .82rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(16,25,59,.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.visible{ display: flex; }
.modal-box{
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 34px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  position: relative;
}
.modal-close{
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--grey);
  cursor: pointer;
  padding: 4px;
}
.modal-close:hover{ color: var(--ink); }
.modal-box h3{ margin-bottom: .3em; }
.modal-box p{ font-size: .92rem; }
.review-stars{
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 22px;
}
.review-stars button{
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: var(--grey-border);
  padding: 2px;
  transition: color .15s ease, transform .15s ease;
}
.review-stars button.filled,
.review-stars button:hover,
.review-stars button:hover ~ button{
  color: #f2b100;
}
.review-stars{ flex-direction: row-reverse; }
.review-stars button:hover ~ button{ color: #f2b100; }

/* ===== Cookie banner ===== */
.cookie-banner{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 999;
  background: var(--white);
  border-top: 1px solid var(--grey-border);
  box-shadow: 0 -8px 30px rgba(20,51,119,.12);
  padding: 20px 24px;
  transform: translateY(110%);
  transition: transform .3s ease;
}
.cookie-banner.visible{ transform: translateY(0); }
.cookie-banner-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner-text{ flex: 1 1 380px; }
.cookie-banner-text h3{ margin-bottom: .3em; font-size: 1rem; }
.cookie-banner-text p{ font-size: .85rem; margin-bottom: 0; }
.cookie-banner-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.cookie-banner-actions .btn{ padding: 11px 18px; font-size: .85rem; }
.cookie-settings-link{
  background: none;
  border: none;
  color: var(--ink-soft);
  text-decoration: underline;
  font-size: .85rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

/* ===== Map consent block ===== */
.map-consent{
  aspect-ratio: 16/7;
  background: var(--grey-light);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 30px;
}
.map-consent p{ max-width: 46ch; margin-bottom: 0; }
.map-frame{
  width: 100%;
  height: 340px;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
}

/* ===== Pagina Igiene Dentale: identità propria (rosa dominante) ===== */
.pink-page h1, .pink-page h2, .pink-page h3, .pink-page h4{ color: var(--pink-dark); }

.pink-page .nav-cta{ background: var(--pink); }

.pill-badge{
  display: inline-block;
  background: var(--pink);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.pink-page .page-hero{
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--pink-soft) 0%, var(--white) 100%);
}
.pink-page .page-hero::before{
  content: "";
  position: absolute;
  top: -140px; right: -120px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(205,114,176,.38), rgba(205,114,176,0) 70%);
  pointer-events: none;
}
.pink-page .page-hero .container{ position: relative; z-index: 1; }

.pink-page .section-alt{ background: var(--pink-alt-bg); }

.pink-page .card{ border-color: var(--pink-border); border-radius: var(--radius-soft); }
.pink-page .media-frame{ border-color: var(--pink-border); border-radius: var(--radius-soft); }
.pink-page .cta-banner{ border-radius: var(--radius-soft); }
.pink-page table.simple-table{ border-radius: var(--radius-soft); overflow: hidden; }

.pink-page .btn{ border-radius: 999px; }

.pink-page .icon-badge{
  background: var(--pink);
  color: var(--white);
  font-weight: 700;
}

.pink-page .check-list li::before{
  background: var(--pink);
  border-color: var(--pink);
}


/* ===== Pagina Impianti guidati: tema arancio corallo ===== */
.coral-page nav.main-nav a:hover,
.coral-page nav.main-nav a.active{
  color: var(--coral);
  border-bottom-color: var(--coral);
}
.coral-page .menu-toggle span{ background: var(--coral-dark); }
.coral-page .page-hero{ background: var(--coral-soft); }
.coral-page .btn-primary{ background: var(--coral); }
.coral-page .btn-primary:hover{ background: #b04a1c; }
.coral-page .btn-outline{ border-color: var(--coral); color: var(--coral) !important; }
.coral-page .btn-outline:hover{ background: var(--coral); color: var(--white) !important; }
.coral-page .card:hover{
  box-shadow: 0 10px 28px rgba(207,90,36,.14);
  border-color: var(--coral);
}
.coral-page .icon-badge{ background: var(--coral-soft); color: var(--coral); }
.coral-page .stat-num{ color: var(--coral); }
.coral-page .cta-banner{ background: var(--coral); }
.coral-page .cta-banner .btn-primary{ color: var(--coral) !important; }
.coral-page .check-list li::before{ border-color: var(--coral); }
.coral-page table.simple-table th{ color: var(--coral); }
.coral-page .contact-form input:focus, .coral-page .contact-form textarea:focus{ border-color: var(--coral); }
.coral-page footer.site-footer{ background: #3b1d10; color: #f0d3c4; }
/* ===== Pagina Igiene Dentale: identità propria (rosa dominante) ===== */
.coral-page h1, .coral-page h2, .coral-page h3, .coral-page h4{ color: var(--coral-dark); }
.coral-page .nav-cta{ background: var(--coral); }
.coral-page .page-hero{
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--coral-soft) 0%, var(--white) 100%);
}
.coral-page .page-hero::before{
  content: "";
  position: absolute;
  top: -140px; right: -120px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(207,90,36,.38), rgba(207,90,36,0) 70%);
  pointer-events: none;
}
.coral-page .page-hero .container{ position: relative; z-index: 1; }
.coral-page .section-alt{ background: var(--coral-alt-bg); }
.coral-page .card{ border-color: var(--coral-border); border-radius: var(--radius-soft); }
.coral-page .media-frame{ border-color: var(--coral-border); border-radius: var(--radius-soft); }
.coral-page .cta-banner{ border-radius: var(--radius-soft); }
.coral-page table.simple-table{ border-radius: var(--radius-soft); overflow: hidden; }
.coral-page .btn{ border-radius: 999px; }
.coral-page .icon-badge{
  background: var(--coral);
  color: var(--white);
  font-weight: 700;
}
.coral-page .check-list li::before{
  background: var(--coral);
  border-color: var(--coral);
}
.coral-page .pill-badge{ background: var(--coral); }


/* Banner finale (CTA) leggibile nei temi colorati */
.pink-page .cta-banner h2, .coral-page .cta-banner h2{ color: var(--white); }
.pink-page .cta-banner p, .coral-page .cta-banner p{ color: rgba(255,255,255,.95); }
.coral-page .cta-banner .btn-primary{ background: var(--white); color: var(--coral-dark) !important; }
.coral-page .cta-banner .btn-primary:hover{ background: var(--coral-soft); }

/* ===== Foto nelle card dei servizi ===== */
.card-photo{
  margin: -30px -26px 22px;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--grey-light);
}
.card-photo img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.card:hover .card-photo img{ transform: scale(1.03); }
.card-photo img{ transition: transform .4s ease; }

/* Menu piu' compatto sugli schermi medi (8 voci) */
@media (max-width: 1100px) and (min-width: 861px){
  nav.main-nav ul{ column-gap: 18px; }
  nav.main-nav a{ font-size: .82rem; }
  .nav-cta{ padding: 9px 14px; }
}

/* ===== Responsive ===== */
@media (max-width: 900px){
  .hero-inner{ grid-template-columns: 1fr; }
  .grid-3, .grid-4{ grid-template-columns: repeat(2, 1fr); }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .stat-strip{ grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
}
/* Logo compatto + menu ad hamburger: da tablet verticale in giù */
@media (max-width: 860px){
  .logo-link .logo-full{ display: none; }
  .logo-link .logo-compact{ display: block; height: 44px; }

  .menu-toggle{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
  }
  .menu-toggle span{ transition: transform .25s ease, opacity .2s ease; }
  .menu-toggle.active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2){ opacity: 0; }
  .menu-toggle.active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

  nav.main-nav{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--grey-border);
    box-shadow: 0 20px 34px rgba(20,51,119,.14);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height .3s ease, opacity .25s ease;
  }
  nav.main-nav.open{
    max-height: 80vh;
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }
  nav.main-nav ul{
    flex-direction: column;
    align-items: stretch;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 8px 28px 28px;
    gap: 0;
  }
  nav.main-nav li{ border-bottom: 1px solid var(--grey-border); }
  nav.main-nav li:last-child{ border-bottom: none; padding-top: 16px; }
  nav.main-nav a{ display: block; padding: 16px 2px; font-size: 1rem; }
  nav.main-nav a.nav-cta{ display: block; text-align: center; padding: 14px 20px; }

  body.nav-open{ overflow: hidden; }
}

@media (max-width: 640px){
  .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
  .stat-strip{ grid-template-columns: 1fr 1fr; }
}

/* ===== Foto reali: ritratti team, coppie di foto, galleria ===== */
img.team-photo-img{
  display: block;
  height: auto;
  object-fit: cover;
  background: var(--grey-light);
}
.photo-pair{ margin-top: 36px; }

.gallery-item{
  display: block;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--grey-border);
  background: var(--grey-light);
}
.gallery-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.gallery-item:hover img{ transform: scale(1.03); }
.gallery-item:focus-visible{ outline: 3px solid var(--blue); outline-offset: 3px; }

.lightbox{
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(92vw, 820px);
  max-height: 94vh;
  overflow: visible;
}
.lightbox::backdrop{ background: rgba(20, 24, 33, .86); }
.lightbox-figure{ margin: 0; }
.lightbox-slot img{
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 84vh;
  margin: 0 auto;
  border-radius: var(--radius);
}
.lightbox-caption{
  margin: 10px 0 0;
  color: var(--white);
  font-size: .9rem;
  text-align: center;
}
.lightbox-close{
  position: absolute;
  top: -44px; right: 0;
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:focus-visible{ outline: 3px solid var(--blue); outline-offset: 2px; }

@media (max-width: 900px){
  .page-hero .hero-inner{ gap: 32px; }
}
@media (max-width: 640px){
  .gallery-grid{ grid-template-columns: 1fr 1fr; gap: 12px; }
  .lightbox-close{ top: -48px; }
}
@media (prefers-reduced-motion: reduce){
  .gallery-item img, .card-photo img{ transition: none; }
  .gallery-item:hover img, .card:hover .card-photo img{ transform: none; }
}
