/* InfoComuni · App evoluta (pilota Brindisi, 15/11/2026). Solo smartphone (<= 860px).
   Palette del sito: navy #09223a / #0b2340, azzurro #5bc4ff, filetti azzurro chiaro #cfe7f7, angoli vivi. */
.icae-cerca, .icae-testa, .icae-pn, .icae-g__t, .icae-piu { display: none; }
.icae-vh { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }

@media (max-width: 860px) {
  /* ---------- ordine della home: foto e nome, ricerca, sezioni, oggi, il resto ---------- */
  html.icae-on body #main { display: flex !important; flex-direction: column !important; }
  html.icae-on body #main > * { order: 50; min-width: 0; width: 100%; box-sizing: border-box; }
  html.icae-on body #main > .comune-hero { order: 1; }
  html.icae-on body #main > .icae-cerca { order: 2; }
  html.icae-on body #main > #ic-mini-menu { order: 3; }
  html.icae-on body #main > .icae-oggi-w { order: 4; }
  html.icae-on body #main > .ic-profilo { order: 5; }
  html.icae-on body #main > .ic-stamp { order: 6; }
  html.icae-on body #main > .comune-panels { order: 20; }
  /* "Trova cio' che ti serve" ripeteva la barra in basso (City / Visit): ora c'e' la ricerca */
  html.icae-on body #main > [class*="service-gateway"] { display: none !important; }

  /* foto piu' bassa: la griglia entra nella prima schermata */
  html.icae-on body #main > .comune-hero .icam-foto { height: 150px !important; width: 100% !important; aspect-ratio: auto !important; overflow: hidden !important; }
  html.icae-on body #main > .comune-hero .icam-foto img { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center 62% !important; }
  html.icae-on body #main > .comune-hero .comune-hero__content { padding-bottom: 14px !important; }
  html.icae-on body #main > .comune-hero .comune-hero__badges { margin-bottom: 6px !important; }

  /* "Oggi a ..." spostato sotto la griglia, sullo stesso fondo navy della testata */
  html.icae-on body .icae-oggi-w { background: #09223a !important; padding: 16px 16px 18px !important; }
  html.icae-on body .icae-oggi-w .icam-oggi { margin: 0 !important; }

  /* ---------- ricerca ---------- */
  html.icae-on:not(.icae-sez) body .icae-cerca { display: block !important; }
  html.icae-on body .icae-cerca { background: #09223a !important; padding: 0 16px 18px !important; margin: 0 !important; color: #fff !important; }
  html.icae-on body .icae-cerca__l { display: block !important; margin: 0 0 8px !important; font: 700 13px/1.2 "Titillium Web", system-ui, sans-serif !important; letter-spacing: .08em !important; text-transform: uppercase !important; color: #5bc4ff !important; -webkit-text-fill-color: #5bc4ff !important; }
  html.icae-on body .icae-cerca__box { position: relative !important; display: flex !important; align-items: center !important; background: #fff !important; border: 2px solid #5bc4ff !important; border-radius: 0 !important; min-height: 52px !important; }
  html.icae-on body .icae-cerca__box > svg { flex: 0 0 22px !important; width: 22px !important; height: 22px !important; margin: 0 0 0 14px !important; color: #0b2340 !important; }
  html.icae-on body .icae-cerca__box input { flex: 1 1 auto !important; min-width: 0 !important; height: 48px !important; margin: 0 !important; padding: 0 12px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important; font: 500 17px/1.2 "Titillium Web", system-ui, sans-serif !important; color: #0b2340 !important; -webkit-text-fill-color: #0b2340 !important; -webkit-appearance: none !important; appearance: none !important; }
  html.icae-on body .icae-cerca__box input::placeholder { color: #5d6b7c !important; -webkit-text-fill-color: #5d6b7c !important; opacity: 1 !important; }
  html.icae-on body .icae-cerca__box input::-webkit-search-cancel-button { display: none !important; }
  html.icae-on body .icae-cerca__box:focus-within { outline: 3px solid #f2b705 !important; outline-offset: 2px !important; }
  html.icae-on body .icae-cerca__x:not([hidden]) { display: flex !important; align-items: center !important; justify-content: center !important; width: 48px !important; height: 48px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: #0b2340 !important; cursor: pointer !important; }
  html.icae-on body .icae-cerca__x svg { width: 20px !important; height: 20px !important; }
  html.icae-on body .icae-cerca__stato { margin: 10px 0 0 !important; font: 500 15px/1.4 "Titillium Web", system-ui, sans-serif !important; color: #d6e6f5 !important; -webkit-text-fill-color: #d6e6f5 !important; }
  html.icae-on body .icae-cerca__stato:empty { display: none !important; }
  html.icae-on body .icae-cerca__ris { list-style: none !important; margin: 10px 0 0 !important; padding: 0 !important; display: grid !important; gap: 1px !important; background: #cfe7f7 !important; }
  html.icae-on body .icae-cerca__ris:empty { display: none !important; }
  html.icae-on body .icae-cerca__ris li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
  html.icae-on body .icae-cerca__ris li::before, html.icae-on body .icae-cerca__ris li::marker { content: none !important; display: none !important; }
  html.icae-on body .icae-r { position: relative !important; display: grid !important; gap: 2px !important; width: 100% !important; min-height: 60px !important; margin: 0 !important; padding: 11px 44px 12px 14px !important; border: 0 !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; text-align: left !important; cursor: pointer !important; color: #0b2340 !important; -webkit-text-fill-color: #0b2340 !important; }
  html.icae-on body .icae-r:active { background: #eef7fd !important; }
  html.icae-on body .icae-r:focus-visible { outline: 3px solid #f2b705 !important; outline-offset: -3px !important; }
  html.icae-on body .icae-r__k { font: 600 13px/1.25 "JetBrains Mono", ui-monospace, Menlo, monospace !important; letter-spacing: .02em !important; color: #0a5f93 !important; -webkit-text-fill-color: #0a5f93 !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
  html.icae-on body .icae-r__t { font: 700 17px/1.25 "Titillium Web", system-ui, sans-serif !important; color: #0b2340 !important; -webkit-text-fill-color: #0b2340 !important; }
  html.icae-on body .icae-r__t mark { background: #d9f0ff !important; color: inherit !important; -webkit-text-fill-color: inherit !important; padding: 0 1px !important; }
  html.icae-on body .icae-r__s { font: 400 14px/1.35 "Titillium Web", system-ui, sans-serif !important; color: #44546a !important; -webkit-text-fill-color: #44546a !important; }
  html.icae-on body .icae-r > svg { position: absolute !important; right: 14px !important; top: 50% !important; width: 18px !important; height: 18px !important; margin-top: -9px !important; color: #0a5f93 !important; }
  html.icae-on body .icae-r--sez { background: #f2f9fe !important; }
  html.icae-on body .icae-cerca__altri { display: block !important; width: 100% !important; min-height: 52px !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; background: #fff !important; color: #0a5f93 !important; -webkit-text-fill-color: #0a5f93 !important; font: 700 16px/1.2 "Titillium Web", system-ui, sans-serif !important; cursor: pointer !important; }

  /* ---------- dentro una sezione ---------- */
  html.icae-on.icae-sez body #main > .comune-hero,
  html.icae-on.icae-sez body #main > .icae-cerca,
  html.icae-on.icae-sez body #main > #ic-mini-menu,
  html.icae-on.icae-sez body #main > .icae-oggi-w,
  html.icae-on.icae-sez body #main > .ic-profilo,
  html.icae-on.icae-sez body #main > .ic-stamp,
  html.icae-on.icae-sez body .icam-barra { display: none !important; }
  html.icae-on.icae-sez body #main > .comune-panels { margin-top: var(--icae-h, 52px) !important; }

  html.icae-on.icae-sez body .icae-testa { display: block !important; position: fixed !important; top: 56px !important; left: 0 !important; right: 0 !important; z-index: 1185 !important; background: #fff !important; border-bottom: 1px solid #cfe7f7 !important; box-shadow: 0 6px 14px -12px rgba(9, 34, 58, .55) !important; }
  html.icae-on body .icae-testa__r1 { position: relative !important; display: flex !important; align-items: center !important; height: 52px !important; padding: 0 8px !important; }
  html.icae-on body .icae-indietro { position: relative !important; z-index: 1 !important; display: inline-flex !important; align-items: center !important; gap: 2px !important; height: 44px !important; min-width: 44px !important; margin: 0 !important; padding: 0 12px 0 4px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; color: #0a5f93 !important; -webkit-text-fill-color: #0a5f93 !important; font: 600 17px/1 "Titillium Web", system-ui, sans-serif !important; cursor: pointer !important; }
  html.icae-on body .icae-indietro svg { width: 24px !important; height: 24px !important; }
  html.icae-on body .icae-indietro:focus-visible { outline: 3px solid #f2b705 !important; outline-offset: -3px !important; }
  html.icae-on body .icae-testa__t { position: absolute !important; left: 120px !important; right: 120px !important; top: 0 !important; margin: 0 !important; line-height: 52px !important; text-align: center !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; font: 700 17px/52px "Titillium Web", system-ui, sans-serif !important; color: #0b2340 !important; -webkit-text-fill-color: #0b2340 !important; opacity: 0 !important; transform: translateY(6px) !important; transition: opacity .18s ease, transform .18s ease !important; }
  html.icae-on body .icae-testa.is-t .icae-testa__t { opacity: 1 !important; transform: none !important; }
  html.icae-on body .icae-gruppi[hidden] { display: none !important; }
  html.icae-on body .icae-gruppi__s { display: flex !important; gap: 8px !important; overflow-x: auto !important; overscroll-behavior-x: contain !important; scrollbar-width: none !important; padding: 0 16px 10px !important; scroll-padding: 0 16px !important; }
  html.icae-on body .icae-gruppi__s::-webkit-scrollbar { display: none !important; }
  html.icae-on body .icae-chip { flex: 0 0 auto !important; display: inline-flex !important; align-items: center !important; gap: 8px !important; height: 38px !important; margin: 0 !important; padding: 0 12px !important; border: 1px solid #b9dcf2 !important; border-radius: 0 !important; background: #f2f9fe !important; box-shadow: none !important; color: #0b2340 !important; -webkit-text-fill-color: #0b2340 !important; font: 600 15px/1 "Titillium Web", system-ui, sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; white-space: nowrap !important; cursor: pointer !important; }
  html.icae-on body .icae-chip span { max-width: 220px !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  html.icae-on body .icae-chip b { font: 700 13px/1 "JetBrains Mono", ui-monospace, Menlo, monospace !important; color: #0a5f93 !important; -webkit-text-fill-color: #0a5f93 !important; }
  html.icae-on body .icae-chip[aria-current="true"] { background: #0b2340 !important; border-color: #0b2340 !important; color: #fff !important; -webkit-text-fill-color: #fff !important; }
  html.icae-on body .icae-chip[aria-current="true"] b { color: #5bc4ff !important; -webkit-text-fill-color: #5bc4ff !important; }
  html.icae-on body .icae-chip:focus-visible { outline: 3px solid #f2b705 !important; outline-offset: 2px !important; }

  /* gruppi chiudibili: tutta la riga del titolo e' il pulsante */
  html.icae-on body .icae-g { position: relative !important; scroll-margin-top: calc(56px + var(--icae-h, 52px) + 10px) !important; }
  html.icae-on body .icae-g > .icae-g__h { padding-right: 96px !important; cursor: pointer !important; }
  html.icae-on body .icae-g > .icae-g__t { display: flex !important; align-items: center !important; justify-content: flex-end !important; gap: 12px !important; position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; height: 59px; z-index: 2 !important; margin: 0 !important; padding: 0 16px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; cursor: pointer !important; }
  html.icae-on body .icae-g > .icae-g__t:focus-visible { outline: 3px solid #f2b705 !important; outline-offset: -3px !important; }
  html.icae-on body .icae-g__n { min-width: 34px !important; height: 28px !important; padding: 0 8px !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; background: #e3f3fd !important; color: #0b2340 !important; -webkit-text-fill-color: #0b2340 !important; font: 700 14px/1 "JetBrains Mono", ui-monospace, Menlo, monospace !important; font-variant-numeric: tabular-nums !important; }
  html.icae-on body .icae-g__c { width: 12px !important; height: 12px !important; border-right: 2.5px solid #0a5f93 !important; border-bottom: 2.5px solid #0a5f93 !important; transform: rotate(45deg) translate(-3px, -3px) !important; transition: transform .2s ease !important; }
  html.icae-on body .icae-g:not(.icae-chiuso) .icae-g__c { transform: rotate(-135deg) translate(-3px, -3px) !important; }
  html.icae-on body .icae-g.icae-chiuso > :not(.icae-g__t):not(.icae-g__h) { display: none !important; }
  html.icae-on body .icae-g--tema > .icae-g__h .scuole-gruppo__count { display: none !important; }
  html.icae-on body .icae-g.icae-chiuso { padding-bottom: 0 !important; margin-bottom: 8px !important; }
  html.icae-on body .icae-g.icae-chiuso > .icae-g__h { margin-bottom: 0 !important; border-bottom: 0 !important; }

  /* elenchi lunghi: le prime 8 voci, poi "Mostra altre" */
  html.icae-on body .icae-corta > .icae-oltre { display: none !important; }
  html.icae-on body .icae-piu { display: block !important; width: 100% !important; min-height: 52px !important; margin: 12px 0 4px !important; padding: 0 16px !important; border: 2px solid #0b2340 !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; color: #0b2340 !important; -webkit-text-fill-color: #0b2340 !important; font: 700 16px/1.2 "Titillium Web", system-ui, sans-serif !important; cursor: pointer !important; }
  html.icae-on body .icae-piu:focus-visible { outline: 3px solid #f2b705 !important; outline-offset: 2px !important; }

  /* voce trovata con la ricerca */
  html.icae-on body .icae-lampo { outline: 3px solid #5bc4ff !important; outline-offset: 2px !important; animation: icae-lampo 2.4s ease-out 1 !important; }
  @keyframes icae-lampo { 0%, 30% { background-color: #e3f3fd; } 100% { background-color: transparent; } }

  /* sezione precedente / successiva */
  html.icae-on.icae-sez body .icae-pn { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 1px !important; margin: 18px 0 8px !important; background: #cfe7f7 !important; border: 1px solid #cfe7f7 !important; }
  html.icae-on body .icae-pn > span { background: #fff !important; }
  html.icae-on body .icae-pn__b { display: grid !important; align-content: center !important; gap: 4px !important; min-height: 76px !important; margin: 0 !important; padding: 12px 14px !important; border: 0 !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; cursor: pointer !important; color: #0b2340 !important; -webkit-text-fill-color: #0b2340 !important; }
  html.icae-on body .icae-pn__b--p { text-align: left !important; }
  html.icae-on body .icae-pn__b--s { text-align: right !important; }
  html.icae-on body .icae-pn__b:active { background: #eef7fd !important; }
  html.icae-on body .icae-pn__b:focus-visible { outline: 3px solid #f2b705 !important; outline-offset: -3px !important; }
  html.icae-on body .icae-pn__k { display: inline-flex !important; align-items: center !important; gap: 4px !important; font: 600 13px/1.2 "JetBrains Mono", ui-monospace, Menlo, monospace !important; letter-spacing: .04em !important; text-transform: uppercase !important; color: #0a5f93 !important; -webkit-text-fill-color: #0a5f93 !important; }
  html.icae-on body .icae-pn__b--s .icae-pn__k { justify-content: flex-end !important; }
  html.icae-on body .icae-pn__k svg { width: 16px !important; height: 16px !important; }
  html.icae-on body .icae-testa button, html.icae-on body .icae-pn button, html.icae-on body .icae-cerca button, html.icae-on body .icae-g__t, html.icae-on body .icae-piu { text-transform: none !important; letter-spacing: 0 !important; }
  html.icae-on body .icae-pn__l { font: 700 18px/1.2 "Titillium Web", system-ui, sans-serif !important; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  html.icae-on body .icae-testa__t, html.icae-on body .icae-g__c { transition: none !important; }
  html.icae-on body .icae-lampo { animation: none !important; }
}
