/* CalabriaVera — responsive finale. Deve essere caricato per ultimo. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}html,body{width:100%;max-width:100%;overflow-x:clip}body{min-width:0}*,*::before,*::after{box-sizing:border-box}img,video,canvas,svg,iframe{max-width:100%}img{height:auto}button,input,select,textarea{font:inherit}input,select,textarea{max-width:100%}.container{max-width:1200px!important;margin-inline:auto!important}.card,.notice,.filter-panel,.result-list,.activity-item,.map-layout,.catalog-layout,.split,.grid-2,.grid-3,.grid-4,.card-grid,.filters-grid,.form-grid,.admin-layout{min-width:0}.grid-2>*,.grid-3>*,.grid-4>*,.card-grid>*,.filters-grid>*,.form-grid>*,.admin-layout>*,.catalog-layout>*,.map-layout>*{min-width:0}

/* Evita overflow da testi, pulsanti e tabelle. */
:where(h1,h2,h3,h4,p,a,span,strong,small,label,td,th){overflow-wrap:anywhere}.button,button{white-space:normal}.table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}table{max-width:100%}.prose{max-width:78ch}

/* Header desktop/tablet. */
.cv-header .header-inner{width:100%;min-width:0}.cv-header .brand{flex:0 1 auto;min-width:0}.cv-header .brand-logo{display:block;max-width:100%;height:auto}.cv-header .header-actions{min-width:0;flex:0 0 auto}.cv-header .cv-header-shortcuts{flex:0 0 auto}.cv-header .header-language{flex:0 0 auto}.cv-header .menu-button{flex:0 0 auto}
.cv-notification-popover{max-width:calc(100vw - 20px)!important}

/* Form, ricerca e touch target. */
.hero-search label,.filter-panel label,.filters-grid>*{min-width:0}.hero-search input,.filter-panel input,.filter-panel select,.filters-grid input,.filters-grid select,.form-grid input,.form-grid select,.form-grid textarea{width:100%!important;max-width:100%!important}.filter-actions,.form-actions{gap:8px}.result-toolbar{min-width:0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.result-toolbar>*{min-width:0}

/* Catalogo. */
body[data-page="catalog"] .catalog-layout{align-items:start!important}body[data-page="catalog"] .activity-item{max-width:100%;overflow:hidden}body[data-page="catalog"] .activity-item img{width:100%;max-width:100%;object-fit:cover}body[data-page="catalog"] #results{min-width:0}

/* Mappa: dimensione stabile, controlli utilizzabili e risultati senza overflow. */
body[data-page="map"] .map-layout{width:100%;min-width:0;align-items:stretch!important}body[data-page="map"] .map-layout>section,body[data-page="map"] .map-layout>aside{min-width:0!important;max-width:100%!important}body[data-page="map"] #map{width:100%!important;min-width:0!important;min-height:440px;isolation:isolate}body[data-page="map"] #map-results{min-width:0!important}body[data-page="map"] .cv-map-result{max-width:100%!important;min-width:0!important}body[data-page="map"] .cv-map-result__body{min-width:0!important;overflow:hidden!important}body[data-page="map"] .cv-map-result h3,body[data-page="map"] .cv-map-result p{overflow-wrap:anywhere!important}.leaflet-container{font-size:14px}.leaflet-popup-content{max-width:min(260px,72vw);margin:12px!important}.leaflet-control-zoom a{display:grid!important;place-items:center!important}

/* Pagine dati, schede e admin. */
body[data-page="activities"] .split,body[data-page="activities"] .split>*{min-width:0;max-width:100%}.admin-layout,#admin-content{min-width:0;max-width:100%}#admin-content .card,#admin-content .notice,#admin-content .table-wrap,#admin-content .result-list{max-width:100%;min-width:0}#admin-content input,#admin-content select,#admin-content textarea{max-width:100%;width:100%}

/* Tablet e schermi intermedi. */
@media(max-width:1180px){
  .cv-header .primary-nav,.cv-header .desktop-account{display:none!important}.cv-header .menu-button{display:inline-grid!important;place-items:center!important}
  .catalog-layout,.map-layout,.split{grid-template-columns:1fr!important}.filter-panel,.map-panel{position:static!important}
  .admin-layout{grid-template-columns:1fr!important}.admin-layout>aside{position:static!important;max-width:100%!important;width:100%!important;overflow-x:auto!important;display:flex!important;gap:8px!important;-webkit-overflow-scrolling:touch}.admin-layout>aside .button{flex:0 0 auto!important;width:auto!important;white-space:nowrap!important}
}

@media(max-width:900px){
  .container{width:min(calc(100% - 28px),1200px)!important}.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))!important}.grid-3,.card-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body[data-page="map"] .map-layout>section{order:1!important}body[data-page="map"] .map-layout>aside{order:2!important;max-height:none!important;overflow:visible!important}body[data-page="map"] #map{min-height:52dvh!important;max-height:620px}body[data-page="map"] #map-results{max-height:none!important}
}

/* Mobile. */
@media(max-width:760px){
  .container{width:min(calc(100% - 24px),1200px)!important}.section{padding-block:28px!important}.hero{padding-block:30px!important}.article-hero{padding-top:30px!important}h1{font-size:clamp(1.85rem,8vw,2.6rem)!important;line-height:1.05!important}h2{font-size:clamp(1.45rem,6.5vw,2rem)!important;line-height:1.12!important}
  .hero-grid,.hero-search,.grid-2,.grid-3,.grid-4,.card-grid,.filters-grid,.form-grid,.catalog-layout,.map-layout,.split,.address-map-layout{grid-template-columns:1fr!important}.hero-search,.filters-grid{gap:10px!important}.hero-search .button,.filters-grid .button,.filter-actions .button,.form-actions .button,.form-actions a.button{width:100%!important;min-height:44px!important;justify-content:center!important}.section-heading,.cta-band{align-items:flex-start!important;gap:12px!important;flex-wrap:wrap!important}
  input,select,textarea{font-size:16px!important;min-height:44px!important}.button,button,[role="button"]{min-height:44px}
  .footer-grid{grid-template-columns:1fr!important}.footer-logo{max-width:220px!important}
  body[data-page="catalog"] .filter-panel{position:static!important;padding:14px!important}body[data-page="catalog"] .filter-panel .stack{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}body[data-page="catalog"] .filter-actions{grid-column:1/-1!important;display:grid!important;grid-template-columns:1fr 1fr!important}body[data-page="catalog"] .activity-item{grid-template-columns:1fr!important}body[data-page="catalog"] .activity-item>.media-placeholder{width:100%!important;height:210px!important;min-height:210px!important}body[data-page="catalog"] .activity-item>.button{width:calc(100% - 28px)!important;max-width:none!important;align-self:stretch!important;text-align:center!important;justify-content:center!important}
  body[data-page="map"] #map{min-height:50dvh!important;max-height:560px!important;border-radius:14px!important}body[data-page="map"] .map-layout .filter-panel .stack{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}body[data-page="map"] .map-layout .filter-panel button{width:100%!important}body[data-page="map"] #map-results{overflow:visible!important;max-height:none!important;padding-inline:0!important}.leaflet-control-zoom a{width:42px!important;height:42px!important;line-height:42px!important}.leaflet-control-scale{max-width:38vw}.leaflet-control-attribution{max-width:70vw!important;font-size:9px!important;line-height:1.25!important}
  .cv-messages-shell{grid-template-columns:1fr!important;height:auto!important;min-height:0!important}.cv-conversations-panel{max-height:300px!important;border-right:0!important;border-bottom:1px solid #e2e8ee!important}.cv-thread-panel{min-height:500px!important}.cv-thread{min-height:300px!important;padding:16px 13px!important}.cv-message-bubble{max-width:90%!important}.cv-message-composer{grid-template-columns:1fr!important}.cv-send-button{width:100%!important}
}

/* Header specifico smartphone: impedisce il vero overflow a 320-390 px. */
@media(max-width:560px){
  .container{width:min(calc(100% - 20px),1200px)!important}
  .cv-header .header-inner{min-height:68px!important;gap:6px!important;padding-block:7px!important;display:flex!important;flex-wrap:nowrap!important;justify-content:space-between!important}.cv-header .brand{flex:1 1 auto!important;min-width:72px!important;max-width:112px!important}.cv-header .brand-logo{width:108px!important;max-width:100%!important}.cv-header .header-actions{gap:3px!important;margin-left:auto!important}.cv-header .cv-header-shortcuts{gap:0!important}.cv-header .cv-icon-action{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}.cv-header .header-language select{width:47px!important;min-width:47px!important;max-width:47px!important;height:40px!important;min-height:40px!important;padding:0 2px!important;font-size:10px!important}.cv-header .menu-button{width:40px!important;min-width:40px!important;height:40px!important;padding:0!important;font-size:0!important;border-radius:10px!important}.cv-header .menu-button::before{content:"☰";font-size:22px!important;line-height:1;color:currentColor}.cv-header .desktop-account{display:none!important}.cv-header .primary-mobile{width:100%!important;max-height:calc(100dvh - 68px)!important;padding:10px 12px max(16px,env(safe-area-inset-bottom))!important;overflow-y:auto!important;overscroll-behavior:contain!important;background:var(--surface,#fff)!important}.cv-header .primary-mobile>a{min-height:44px!important;display:flex!important;align-items:center!important;padding:10px!important}.cv-header .primary-mobile .guest-actions,.cv-header .primary-mobile .account-menu{width:100%!important}.cv-header .account-links{max-width:100%!important;width:100%!important}.cv-notification-popover{position:fixed!important;left:10px!important;right:10px!important;top:76px!important;width:auto!important;max-width:none!important;max-height:calc(100dvh - 90px)!important;overflow:auto!important}
  body[data-page="catalog"] .filter-panel .stack,body[data-page="map"] .map-layout .filter-panel .stack{grid-template-columns:1fr!important}body[data-page="catalog"] .filter-actions{grid-template-columns:1fr!important}.result-toolbar{display:grid!important;grid-template-columns:1fr!important;align-items:stretch!important}.result-toolbar .button{width:100%!important;justify-content:center!important}.stat-grid{grid-template-columns:1fr!important}.form-actions{display:grid!important;grid-template-columns:1fr!important}.form-actions>*{width:100%!important}
  body[data-page="map"] #map{min-height:46dvh!important;max-height:500px!important}.cv-favorites-grid{grid-template-columns:1fr!important}.cv-favorite-actions{display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}.cv-favorite-actions .button{width:100%!important}.whatsapp-float{width:52px!important;height:52px!important;right:12px!important;bottom:max(12px,env(safe-area-inset-bottom))!important}
  .cookie-banner{left:10px!important;right:10px!important;bottom:max(10px,env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important}.cookie-banner .button{width:100%!important}
}

@media(max-width:390px){
  .container{width:min(calc(100% - 16px),1200px)!important}.cv-header .brand{max-width:96px!important}.cv-header .brand-logo{width:94px!important}.cv-header .cv-icon-action{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important}.cv-header .header-language select{width:43px!important;min-width:43px!important;max-width:43px!important}.cv-header .menu-button{width:38px!important;min-width:38px!important;height:38px!important}.cv-favorite-actions{grid-template-columns:1fr!important}.cv-thread-heading{align-items:flex-start!important;flex-direction:column!important}.cv-thread-business-link{width:100%!important;text-align:center!important}
}

@media(max-width:340px){
  .cv-header .brand{max-width:82px!important}.cv-header .brand-logo{width:80px!important}.cv-header .header-actions{gap:1px!important}.cv-header .cv-icon-action{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important}.cv-header .header-language select{width:40px!important;min-width:40px!important;max-width:40px!important}.cv-header .menu-button{width:36px!important;min-width:36px!important;height:36px!important}.cv-counter-badge{transform:scale(.9);transform-origin:top right}
}

/* Landscape mobile e dispositivi bassi. */
@media(max-height:520px) and (orientation:landscape){body[data-page="map"] #map{min-height:300px!important;height:calc(100dvh - 120px)!important}.cv-header .primary-mobile{max-height:calc(100dvh - 60px)!important}.cv-notification-popover{top:64px!important;max-height:calc(100dvh - 72px)!important}}

@media(pointer:coarse){a,button,.button,input,select,textarea,summary,[role="button"]{touch-action:manipulation}.cv-heart{min-width:44px!important;min-height:44px!important}.leaflet-marker-icon{touch-action:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
