/* ORIGO — Coerenza mobile di tutto il sito pubblico, 22 ottobre 2026.
   Correzioni non invasive: header/menu, ancore, accessibilità, articoli, touch e Safari.
   Nessuna modifica ai flussi di checkout, alle API o ai form server-side. */
@media (max-width: 900px) {
  /* The application CSS hides .mobile-nav with !important. Restore it only when open. */
  .header.origo-topbar { z-index: 1300 !important; }
  .header.origo-topbar .mobile-nav[hidden] { display: none !important; }
  .header.origo-topbar .mobile-nav:not([hidden]) {
    display: grid !important;
    position: fixed !important;
    inset: 58px 0 0 !important;
    top: 58px !important;
    height: calc(100dvh - 58px);
    max-height: calc(100dvh - 58px);
    overflow-y: auto !important;
    overscroll-behavior: contain;
    align-content: start;
    grid-auto-rows: minmax(48px,auto);
    padding: 16px 14px calc(24px + env(safe-area-inset-bottom)) !important;
    background: #0b0d11 !important;
    z-index: 1301;
  }
  .header.origo-topbar .mobile-nav a { min-height: 48px; display: flex; align-items: center; }
  /* The white hamburger in the white circular button was invisible on internal pages. */
  body:not(.page-demo) .origo-topbar .menu span:not(.sr-only) {
    background: #101318 !important;
  }
  body.page-demo .origo-topbar .menu span:not(.sr-only) { background: #fff !important; }
  .origo-topbar .menu { width: 44px; height: 44px; flex: 0 0 44px; }
  body.menu-open .mobile-app-nav { display: none !important; }
  body.virtual-keyboard-open .mobile-app-nav { display: none !important; }
  /* Avoid Safari blurs on every scrolling frame. Keep the visual hierarchy solid. */
  .header.origo-topbar { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #0b0d11 !important; }
  .mobile-app-nav { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #101216 !important; }
  html { scroll-padding-top: 74px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  :where(section[id], [id="metodo-passaggi"], [id="richiesta-dedicata"], [id="approccio"], [id="sessioni"], [id="chi-siamo"]) { scroll-margin-top: 76px; }
  main, .shell { min-width: 0; }
  img, picture, video, iframe { max-width: 100%; }
  :where(button, a, input, select, textarea):focus-visible { outline: 2px solid #8198a3; outline-offset: 3px; }
  /* Preserve immediate access to editorial content if scrolling animations are unavailable. */
  body.page-metodo [data-reveal], body.page-privacy [data-reveal], body.page-cookie [data-reveal], body.page-termini-e-condizioni [data-reveal] {
    opacity: 1 !important; transform: none !important;
  }
  /* Prevent iOS Safari auto-zoom on public form focus. */
  body.page-prenota :is(input:not([type="checkbox"]), select, textarea),
  body.page-demo :is(input:not([type="checkbox"]), select, textarea),
  body.page-articoli .oe-search input {
    font-size: 16px !important;
  }
}
@media (max-width: 820px) {
  /* Scroll the article listing with the page, not inside a second independent scroller. */
  body.page-articoli .oe-scroll { max-height: none !important; overflow: visible !important; }
  body.page-articoli .oe-filters { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 10px; }
  body.page-articoli .oe-filters button { min-height: 44px; }
  body.page-articoli .oe-item-link { min-height: 132px; }
  body.page-articoli .oe-cta-link { min-height: 46px; }
  body.page-prenota .booking-v11-month-nav button,
  body.page-prenota .booking-v11-calendar-nav button { min-width: 44px !important; min-height: 44px !important; }
  body.page-prenota .booking-v11-date { min-height: 48px !important; }
  body.page-prenota .booking-v13-agenda-list button { min-height: 48px !important; }
  body.page-prenota .origo-booking-aside-action { min-height: 52px !important; }
}
@media (max-width: 560px) {
  /* Editorial pages keep comfortable typography on iPhone SE-sized screens. */
  body.page-articoli .oe-archive-hero h1 { font-size: clamp(45px, 12.5vw, 60px) !important; }
  body.page-articoli .oe-article-header h1 { font-size: clamp(34px, 10vw, 41px) !important; overflow-wrap: break-word; }
  body.page-articoli .oe-item-body p { font-size: 13px; line-height: 1.5; }
  body.page-articoli .oe-item-reading { font-size: 12px; }
  body.page-metodo .editorial-hero { padding-top: 54px !important; padding-bottom: 58px !important; }
  body.page-metodo .editorial-section { padding-top: 55px !important; padding-bottom: 55px !important; }
  body.page-metodo .process-stack article { padding: 23px 0 !important; }
  body.page-metodo .editorial-cta { padding: 58px 0 !important; }
  body.page-metodo .editorial-cta h2 { font-size: clamp(35px, 10vw, 48px) !important; }
  body.page-metodo .editorial-cta .btn { min-height: 48px; }
  body.page-prenota .booking-v9-head h1 { font-size: clamp(34px, 10vw, 39px) !important; }
  body.page-prenota .booking-v9-card { min-width: 0; }
  body.page-prenota .booking-v13-agenda-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-prenota .booking-v11-month-nav button,
  body.page-prenota .booking-v11-calendar-nav button { min-width: 44px !important; min-height: 44px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
