*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: #1E2A38;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
#page {
  width: 100%;
  max-width: none;
  background: #fff;
  overflow: visible;
}
#page > section {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* SS slanted 2px #A88ED6, SX-alto → DX-basso (2vw/100vw).
   Solo tra due sezioni chiare consecutive (bianco / lilla #F4F0FB #FBF8FF #F6F0FF).
   Mai dopo hero, ticker vs contrasto, navy, gallery dopo numbers. */
#page > section {
  position: relative;
}
#page > :is(
  .agnesi-about,
  .agnesi-team-staff,
  .agnesi-services-visual,
  .agnesi-kids-section,
  .agnesi-method,
  .agnesi-trust,
  .agnesi-convenzioni,
  .agnesi-bridge-pro,
  .agnesi-location,
  .agnesi-reviews-pro,
  .agnesi-studio-gallery,
  .agnesi-about-empathy,
  .agnesi-about-studio,
  .agnesi-about-service,
  .agnesi-how-treatment,
  .agnesi-sessions,
  .agnesi-when,
  .agnesi-firstvisit,
  .agnesi-target,
  .agnesi-doctor-focus,
  .agnesi-trust-boost,
  .agnesi-trust-soft,
  .agnesi-contact-info,
  .agnesi-faq,
  .agnesi-native-photos,
  .agnesi-legal
) + :is(
  .agnesi-about,
  .agnesi-team-staff,
  .agnesi-services-visual,
  .agnesi-kids-section,
  .agnesi-method,
  .agnesi-trust,
  .agnesi-convenzioni,
  .agnesi-bridge-pro,
  .agnesi-location,
  .agnesi-reviews-pro,
  .agnesi-studio-gallery,
  .agnesi-about-empathy,
  .agnesi-about-studio,
  .agnesi-about-service,
  .agnesi-how-treatment,
  .agnesi-sessions,
  .agnesi-when,
  .agnesi-firstvisit,
  .agnesi-target,
  .agnesi-doctor-focus,
  .agnesi-trust-boost,
  .agnesi-trust-soft,
  .agnesi-contact-info,
  .agnesi-faq,
  .agnesi-native-photos,
  .agnesi-legal
) {
  /* 10px tipici della sezione + clearance della diagonale 2vw */
  padding-top: calc(10px + clamp(16px, 2vw, 24px));
}
#page > :is(
  .agnesi-about,
  .agnesi-team-staff,
  .agnesi-services-visual,
  .agnesi-kids-section,
  .agnesi-method,
  .agnesi-trust,
  .agnesi-convenzioni,
  .agnesi-bridge-pro,
  .agnesi-location,
  .agnesi-reviews-pro,
  .agnesi-studio-gallery,
  .agnesi-about-empathy,
  .agnesi-about-studio,
  .agnesi-about-service,
  .agnesi-how-treatment,
  .agnesi-sessions,
  .agnesi-when,
  .agnesi-firstvisit,
  .agnesi-target,
  .agnesi-doctor-focus,
  .agnesi-trust-boost,
  .agnesi-trust-soft,
  .agnesi-contact-info,
  .agnesi-faq,
  .agnesi-native-photos,
  .agnesi-legal
) + :is(
  .agnesi-about,
  .agnesi-team-staff,
  .agnesi-services-visual,
  .agnesi-kids-section,
  .agnesi-method,
  .agnesi-trust,
  .agnesi-convenzioni,
  .agnesi-bridge-pro,
  .agnesi-location,
  .agnesi-reviews-pro,
  .agnesi-studio-gallery,
  .agnesi-about-empathy,
  .agnesi-about-studio,
  .agnesi-about-service,
  .agnesi-how-treatment,
  .agnesi-sessions,
  .agnesi-when,
  .agnesi-firstvisit,
  .agnesi-target,
  .agnesi-doctor-focus,
  .agnesi-trust-boost,
  .agnesi-trust-soft,
  .agnesi-contact-info,
  .agnesi-faq,
  .agnesi-native-photos,
  .agnesi-legal
)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: #A88ED6;
  transform: rotate(atan(2 / 100));
  transform-origin: left center;
  pointer-events: none;
  z-index: 6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 12px; top: 12px; z-index: 80; background: #fff; padding: 8px 12px; }

/* Header */
.ag-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px 20px;
}
.ag-header.is-inner {
  position: sticky;
  background: #FBF8FF;
  border-bottom: 1px solid rgba(167,140,214,.2);
}
.ag-nav {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ag-logo img {
  height: 64px;
  width: auto;
}
.ag-header.is-inner .ag-logo img {
  mix-blend-mode: multiply;
}
.ag-menu {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ag-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.ag-header.is-inner .ag-menu a { color: #1E2A38; }
.ag-menu a:hover,
.ag-menu a[aria-current="page"] { color: #C7B3E5; }
.ag-header.is-inner .ag-menu a:hover,
.ag-header.is-inner .ag-menu a[aria-current="page"] { color: #A88ED6; }
.ag-drop { position: relative; }
.ag-drop-list {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(30,42,56,.15);
  list-style: none;
  margin: 0;
}
.ag-drop-list a { color: #1E2A38 !important; width: 100%; padding: 10px 12px; }
.ag-drop:hover .ag-drop-list,
.ag-drop:focus-within .ag-drop-list { display: grid; }
.ag-burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
}
.ag-header.is-inner .ag-burger { color: #1E2A38; }
@media (max-width: 900px) {
  .ag-logo img { height: 52px; }
  .ag-burger { display: inline-flex; align-items: center; justify-content: center; }
  .ag-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 12px;
    right: 12px;
    background: #1E2A38;
    border-radius: 12px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
  }
  .ag-header.is-inner .ag-menu { background: #fff; box-shadow: 0 12px 30px rgba(30,42,56,.12); }
  .ag-menu.open { display: flex; }
  .ag-drop-list { position: static; box-shadow: none; background: transparent; display: grid; padding: 0 0 0 12px; }
  .ag-drop-list a { color: #fff !important; }
  .ag-header.is-inner .ag-drop-list a { color: #1E2A38 !important; }
}

/* Hero foto tua (era background di sezione Squarespace).
   Home: coppia full-bleed. Navy solo fallback sotto la foto, mai bande laterali. */
.agnesi-hero-v2 {
  min-height: 100vh;
  width: 100%;
  max-width: none;
}
main.is-home .agnesi-hero-v2 {
  background-color: #1E2A38;
  background-image: url("../images/hero.jpg");
  background-position: 70% 43%;
  background-size: cover;
  background-repeat: no-repeat;
}
#page > .agnesi-kids-section,
#page > .agnesi-method,
#page > .agnesi-convenzioni,
#page > .agnesi-location {
  background: #fff;
}
#page > .agnesi-empathy,
#page > .agnesi-numbers-pro {
  width: 100%;
  max-width: none;
  background: #1E2A38;
}
.agnesi-hero-v2 .agnesi-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,28,38,.42), rgba(20,28,38,.28) 45%, rgba(20,28,38,.4));
  z-index: 1;
  pointer-events: none;
}
.page-hero-pad { padding-top: 110px; }

/* Foto dottore accanto al blocco about (come in Squarespace) */
.agnesi-about {
  position: relative;
}
@media (min-width: 900px) {
  .agnesi-about-shell {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 36px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px;
  }
  .agnesi-about-shell .agnesi-wrap { padding-left: 0; padding-right: 0; }
}
.agnesi-about-photo {
  margin: 0 20px 40px;
  border-radius: 16px;
  overflow: hidden;
}
.agnesi-about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 640px;
}

/* Chip indirizzo hero: come SS — vetro sul foto, testo bianco.
   La sezione CTA .agnesi-location ha background #fff e altrimenti copre il chip. */
.agnesi-hero-v2 .agnesi-location {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff;
}
.agnesi-hero-v2 .agnesi-location a {
  color: #fff !important;
}

/* Clone SS gallery-grid: 6 colonne, gutter 3, aspect four-three, full-bleed. */
.agnesi-studio-gallery {
  padding: 0;
  background: #fff;
}
.agnesi-studio-gallery .agnesi-studio-gallery__grid,
.agnesi-studio-gallery .g {
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
}
.agnesi-studio-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: 0;
}
@media (max-width: 768px) {
  .agnesi-studio-gallery .agnesi-studio-gallery__grid,
  .agnesi-studio-gallery .g { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 576px) {
  .agnesi-studio-gallery .agnesi-studio-gallery__grid,
  .agnesi-studio-gallery .g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Foto native Squarespace (tra i code block, come in pagina) */
.agnesi-native-photos {
  padding: 12px 20px 40px;
  background: #fff;
}
.agnesi-native-photos .g {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.agnesi-native-photos.is-pair .g {
  grid-template-columns: 1fr 1fr;
}
.agnesi-native-photos.is-single .g {
  grid-template-columns: 1fr;
  max-width: 760px;
}
.agnesi-native-photos img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}
.agnesi-native-photos.is-pair img {
  aspect-ratio: 4/5;
}
.agnesi-native-photos .is-doctor {
  object-position: 58% 9%;
}
@media (max-width: 700px) {
  .agnesi-native-photos.is-pair .g { grid-template-columns: 1fr; }
}

/* Cookie + float */
.vg-cookie {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  max-width: 420px;
  background: #1E2A38;
  color: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
}
.vg-cookie[hidden] { display: none !important; }
.vg-cookie h2 { font-size: 16px; margin: 0 0 10px; }
.vg-cookie p { font-size: 13px; line-height: 1.5; margin: 0 0 10px; color: #d7dde3; }
.vg-cookie a { color: #C7B3E5; }
.vg-cookie__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.vg-cookie button {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
}
.vg-cookie [data-vg-cookie-accept] { background: linear-gradient(135deg,#C7B3E5,#A88ED6); color: #fff; }
.vg-cookie [data-vg-cookie-reject],
.vg-cookie [data-vg-cookie-customize],
.vg-cookie [data-vg-cookie-save] { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); }
.ag-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #A88ED6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(168,142,214,.4);
}
.ag-float svg { width: 26px; height: 26px; fill: #fff; }
body.has-cookie .ag-float { bottom: 220px; }
@media (max-width: 600px) {
  .vg-cookie { left: 12px; right: 12px; max-width: none; }
}
