/*
Theme Name: Mobility Lab PA V10.0 PRO Final
Theme URI: https://example.com/
Author: OpenAI
Description: Tema classico WordPress per progetto PA/Green Communities con editor nativo Gutenberg, contenuti dinamici e Customizer.
Version: 10.0.0
Text Domain: mobility-lab-pa-v4
*/

:root{
  --ml-primary:#0066cc;
  --ml-primary-dark:#0d47a1;
  --ml-accent:#70e000;
  --ml-accent-dark:#008000;
  --ml-accent-soft:#eff9e7;
  --ml-text:#212529;
  /*--ml-muted:#6c757d;*/
  --ml-muted:#6a737a;
  --ml-border:#dbe3ea;
  --ml-bg:#ffffff;
  --ml-soft:#f7f9fb;
  --ml-soft-2:#f3f8fd;
  --ml-gradient:linear-gradient(120deg,#f7fbff 0%,#eff9e7 100%);
  --ml-container:1200px;
  --ml-radius:18px;
  --ml-radius-lg:26px;
  --ml-shadow:0 18px 45px rgba(13,71,161,.08);
  --ml-shadow-sm:0 8px 20px rgba(13,71,161,.06);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:"Titillium Web",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ml-text);background:var(--ml-bg);line-height:1.65}
a{color:var(--ml-primary);text-decoration:none}a:hover,a:focus{text-decoration:underline}
img{max-width:100%;height:auto;display:block}
iframe{max-width:100%}
.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{left:1rem;top:1rem;width:auto;height:auto;background:#fff;padding:.75rem 1rem;z-index:10000;border:2px solid var(--ml-primary); overflow:visible}
.container{width:min(100% - 2rem, var(--ml-container));margin-inline:auto}

.site-header{border-bottom:1px solid var(--ml-border);background:rgba(255,255,255,.96);backdrop-filter:saturate(160%) blur(10px);position:sticky;top:0;z-index:1000}
.site-branding{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 0}
.brand-wrap{display:flex;align-items:center;gap:1rem}
.custom-logo-link img{max-height:62px;width:auto}
.site-title{font-size:1.55rem;font-weight:700;margin:0;line-height:1.1}
.site-description{margin:.2rem 0 0;color:var(--ml-muted);font-size:.98rem}
.main-nav ul{display:flex;flex-wrap:wrap;gap:.55rem;list-style:none;padding:0;margin:0}
.main-nav a{display:inline-block;padding:.7rem .95rem;border-radius:999px;font-weight:600;color:var(--ml-text);transition:all .2s ease}
.main-nav .current-menu-item>a,.main-nav a:hover,.main-nav a:focus{background:var(--ml-soft-2);color:var(--ml-primary);text-decoration:none}

.hero{padding:4rem 0;background:var(--ml-gradient);border-bottom:1px solid var(--ml-border)}
.hero-grid{display:grid;grid-template-columns:1.08fr .92fr;gap:2rem;align-items:center}
.hero-card,.hero-media,.card,.entry-shell,.page-shell,.archive-intro,.news-card,.teaser{background:#fff;border:1px solid var(--ml-border);border-radius:var(--ml-radius-lg);box-shadow:var(--ml-shadow)}
.hero-card{padding:2.15rem}
.hero h1{font-size:clamp(2.15rem,5vw,3.8rem);line-height:1.02;margin:0 0 1rem}
.hero p{font-size:1.08rem;color:#343a40;max-width:62ch}
.hero-actions{display:flex;flex-wrap:wrap;gap:.85rem;margin-top:1.25rem}
.hero-media{overflow:hidden}
.hero-media img{width:100%;aspect-ratio:16/10;object-fit:cover}
.button,.wp-block-button__link{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;background:var(--ml-primary);color:#fff;border-radius:999px;padding:.88rem 1.2rem;font-weight:700;border:none;transition:transform .2s ease, box-shadow .2s ease, background .2s ease;box-shadow:var(--ml-shadow-sm)}
.button:hover,.button:focus,.wp-block-button__link:hover,.wp-block-button__link:focus{transform:translateY(-1px);text-decoration:none;background:var(--ml-primary-dark)}
.button.secondary{background:#fff;color:var(--ml-primary);border:2px solid var(--ml-primary)}
.button.secondary:hover,.button.secondary:focus{background:var(--ml-soft-2)}
.chip,.term-chip{display:inline-flex;align-items:center;gap:.35rem;background:var(--ml-accent-soft);color:#155724;border-radius:999px;padding:.38rem .75rem;font-weight:700;font-size:.84rem;border:1px solid #d6efc8}
.notice-box{border-left:4px solid var(--ml-accent);padding:1rem 1rem 1rem 1.25rem;background:#f9fff4;border-radius:0 12px 12px 0;margin-top:1rem}

.section{padding:3.8rem 0}.section.alt{background:var(--ml-soft)}
.section-header{max-width:72ch;margin-bottom:1.6rem}.section-header h2{font-size:2rem;line-height:1.08;margin:0 0 .55rem}
.section-eyebrow{display:inline-block;margin-bottom:.75rem;padding:.28rem .65rem;border-radius:999px;background:var(--ml-soft-2);color:var(--ml-primary);font-weight:700;font-size:.82rem;text-transform:uppercase;letter-spacing:.04em}
.grid{display:grid;gap:1.5rem}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.card{padding:0;overflow:hidden;height:100%;display:flex;flex-direction:column;transition:transform .18s ease, box-shadow .18s ease}
.card:hover{transform:translateY(-2px);box-shadow:0 24px 52px rgba(13,71,161,.12)}
.card-media{aspect-ratio:16/10;background:var(--ml-gradient);position:relative;overflow:hidden}
.card-media img{width:100%;height:100%;object-fit:cover}
.card-media-placeholder{width:100%;height:100%;display:flex;align-items:flex-end;padding:1rem;background:linear-gradient(140deg,#e3f2fd,#eff9e7)}
.card-media-placeholder span{display:inline-flex;align-items:center;padding:.35rem .7rem;border-radius:999px;background:#fff;font-weight:700;color:var(--ml-primary)}
.card-body{padding:1.25rem 1.25rem 1.35rem;display:flex;flex-direction:column;gap:.85rem;flex:1}
.card-title{margin:0;font-size:1.3rem;line-height:1.15}
.card-title a{color:var(--ml-text)}
.card-title a:hover,.card-title a:focus{color:var(--ml-primary)}
.meta{display:flex;flex-wrap:wrap;gap:.65rem;font-size:.95rem;color:var(--ml-muted)}
.meta span{display:inline-flex;align-items:center;gap:.3rem;padding:.28rem .62rem;background:var(--ml-soft);border:1px solid var(--ml-border);border-radius:999px}
.card-excerpt{margin:0;color:#495057}
.card-footer{margin-top:auto;display:flex;justify-content:space-between;align-items:center;padding-top:.2rem}
.link-inline{font-weight:700}

.site-content{padding:0 0 4rem}
.page-banner{padding:2.25rem 0 1.4rem;background:linear-gradient(180deg,#ffffff 0%,#f8fcf4 100%);border-bottom:1px solid var(--ml-border)}
.page-banner-inner{position:relative;padding:0 0 1rem}
.page-banner-inner:before{content:"";display:block;width:96px;height:6px;background:linear-gradient(90deg,var(--ml-accent) 0%,var(--ml-primary) 100%);border-radius:999px;margin-bottom:1rem}
.breadcrumbs{font-size:.95rem;color:var(--ml-muted);margin-bottom:.3rem}
.entry-title{font-size:clamp(2rem,4.3vw,3.1rem);line-height:1.06;margin:.2rem 0 .55rem}
.entry-subtitle,.archive-description{max-width:68ch;color:#495057;font-size:1.06rem}
.entry-shell,.page-shell{padding:2rem;margin-top:2rem}
.entry-header{margin-bottom:1.4rem}
.entry-content{font-size:1.05rem}
.entry-content > * + *{margin-top:1rem}
.entry-content h2,.entry-content h3,.entry-content h4{line-height:1.12;margin:1.75rem 0 .7rem;color:#16335b}
.entry-content h2{font-size:1.85rem}.entry-content h3{font-size:1.45rem}.entry-content h4{font-size:1.2rem}
.entry-content p,.entry-content li{max-width:74ch}
.entry-content ul,.entry-content ol{padding-left:1.35rem}
.entry-content blockquote{margin:1.5rem 0;padding:1rem 1.2rem;border-left:4px solid var(--ml-primary);background:var(--ml-soft-2);border-radius:0 12px 12px 0;font-family:"Lora",serif;color:#16335b}
.entry-content .wp-block-cover,.entry-content .wp-block-image img,.entry-content .wp-block-gallery img{border-radius:18px}
.entry-content .wp-block-columns{gap:1.4rem}
.entry-content .wp-block-group{border-radius:20px}
.entry-content .wp-block-file,.entry-content .wp-block-table,.entry-content .wp-block-media-text{margin-top:1.2rem}
.entry-content .wp-block-table table{border-collapse:collapse;width:100%}
.entry-content .wp-block-table td,.entry-content .wp-block-table th{border:1px solid var(--ml-border);padding:.75rem;background:#fff}
.entry-content .wp-block-separator{border-color:var(--ml-border);margin:2rem 0}

.archive-wrap{padding-top:1.3rem}
.archive-intro{padding:1.65rem 1.6rem;background:linear-gradient(120deg,#ffffff 0%,#f7fbff 68%,#eff9e7 100%)}
.archive-actions{margin-top:.9rem;display:flex;flex-wrap:wrap;gap:.6rem}
.archive-loop{margin-top:1.6rem}
.archive-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem}
.archive-grid.posts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.archive-empty{padding:2rem;border:1px dashed var(--ml-border);border-radius:18px;background:#fff}

.post-feature{margin:1.25rem 0 1.5rem;overflow:hidden;border-radius:22px;border:1px solid var(--ml-border);box-shadow:var(--ml-shadow)}
.post-feature img{width:100%;max-height:520px;object-fit:cover}
.single-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:1.8rem;margin-top:2rem}
.entry-sidebar{position:sticky;top:98px;align-self:start;background:#fff;border:1px solid var(--ml-border);box-shadow:var(--ml-shadow-sm);border-radius:22px;padding:1.25rem}
.sidebar-title{font-size:1rem;font-weight:700;color:#16335b;margin:0 0 .7rem}
.info-list{display:grid;gap:.7rem;margin:0;padding:0;list-style:none}
.info-list li{padding:.8rem .9rem;background:#f9fbfd;border-radius:14px;border:1px solid var(--ml-border)}
.map-embed{margin-top:1.8rem}.map-embed h2{margin:0 0 .8rem}.map-embed iframe{width:100%;min-height:380px;border:0;border-radius:20px}
.related-strip{margin-top:2rem;padding-top:1.4rem;border-top:1px solid var(--ml-border)}

.post-listing-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.1rem}
.news-card .card-title{font-size:1.2rem}
.news-card .meta{margin-top:.1rem}

.footer{background:#212529;color:#fff;padding:3rem 0 2rem;margin-top:3rem}
.footer a{color:#fff}.footer a:hover,.footer a:focus{color:#fff}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:2rem}
.footer h2,.footer h3{margin-top:0}.footer small{color:#ced4da}
.logo-band{margin-top:2rem;border-top:1px solid rgba(255,255,255,.16);padding-top:1.5rem}
.logo-band-inner{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;align-items:center}
.logo-slot{background:#fff;border-radius:16px;min-height:82px;display:flex;align-items:center;justify-content:center;padding:1rem}
.logo-slot img{max-height:54px;width:auto}.logo-placeholder{font-size:.9rem;font-weight:700;color:#495057}

.front-page-content{padding-top:0}.entry-content .section:first-child{padding-top:1rem}

@media (max-width: 1024px){
  .hero-grid,.single-layout,.footer-grid{grid-template-columns:1fr}
  .entry-sidebar{position:static}
}
@media (max-width: 900px){
  .grid-3,.grid-2,.archive-grid,.logo-band-inner{grid-template-columns:1fr}
  .site-branding{align-items:flex-start;flex-direction:column}
  .main-nav ul{gap:.35rem}
}
@media (max-width: 640px){
  .hero{padding:2.8rem 0}
  .hero-card,.entry-shell,.page-shell,.archive-intro{padding:1.35rem}
  .entry-title{font-size:2rem}
  .page-banner{padding:1.7rem 0 1.1rem}
  .footer{padding:2.25rem 0 1.5rem}
}

.footer-widget p,.footer-widget li,.footer-widget a{color:#fff}
.footer-widget ul{margin:0;padding-left:1.1rem}
.footer-widget .textwidget a{text-decoration:underline}
.footer-widget ul {
  list-style: none;
  padding-inline: 0;
}

/* V4.5 home and editable blocks */
.hero-overlay{padding:2.2rem 0 1.2rem}
.hero-stage{position:relative;min-height:540px;border-radius:30px;overflow:hidden;border:1px solid var(--ml-border);box-shadow:var(--ml-shadow);background:#dfead6}
.hero-stage-media img{width:100%;height:540px;object-fit:cover;object-position:center}
.hero-floating-card{position:absolute;left:2rem;bottom:2rem;max-width:520px;background:rgba(255,255,255,.93);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.7);border-radius:28px;padding:2rem;box-shadow:var(--ml-shadow)}
.hero-floating-card h1{margin:.9rem 0 .8rem}
.hero-floating-card p{margin:0;color:#344054}
.mlpa-home-section{padding:1.6rem 0;border-top:1px solid var(--ml-border)}
.mlpa-home-section:first-child{border-top:0;padding-top:.2rem}
.mlpa-editor-card{height:100%;padding:1.3rem;border:1px solid var(--ml-border);border-radius:22px;background:#fff;box-shadow:var(--ml-shadow-sm)}
.mlpa-editor-card h3{margin-top:0;line-height:1.15;color:#16335b}
.entry-content .wp-block-columns{margin-top:1rem;margin-bottom:1rem}
.entry-content .wp-block-column{display:flex}
.entry-content .wp-block-column>.wp-block-group{width:100%}
.entry-content .wp-block-buttons{margin-top:1rem}
.page-shell{padding:2.1rem}
@media (max-width: 900px){
  .hero-stage{min-height:auto}
  .hero-stage-media img{height:420px}
  .hero-floating-card{position:relative;left:auto;bottom:auto;max-width:none;margin:1rem}
}

/* V4.6 slider */
.mlpa-slider{position:relative;border-radius:30px;overflow:hidden;border:1px solid var(--ml-border);box-shadow:var(--ml-shadow);background:#dfead6;min-height:580px}
.mlpa-slide{display:none;position:relative;min-height:580px}
.mlpa-slide.is-active{display:block}
.mlpa-slide-media img{width:100%;height:580px;object-fit:cover;object-position:center}
.mlpa-slide-overlay{position:absolute;inset:0;background:linear-gradient(90deg, rgba(17,24,39,.52) 0%, rgba(17,24,39,.18) 38%, rgba(17,24,39,.08) 100%)}
.mlpa-slide-card{position:absolute;left:2rem;bottom:2rem;max-width:540px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.75);border-radius:28px;padding:2rem;box-shadow:var(--ml-shadow)}
.mlpa-slide-card h1{margin:.9rem 0 .8rem;color:#16335b}
.mlpa-slide-card p{margin:0;color:#344054;font-size:1.05rem}
.mlpa-slider-controls{position:absolute;left:0;right:0;bottom:1rem;display:flex;align-items:center;justify-content:center;gap:1rem;z-index:4}
.mlpa-slider-arrow{width:48px;height:48px;border-radius:999px;border:1px solid rgba(255,255,255,.7);background:rgba(255,255,255,.92);color:#16335b;font-size:2rem;line-height:1;cursor:pointer;box-shadow:var(--ml-shadow-sm)}
.mlpa-slider-bullets{display:flex;align-items:center;gap:.55rem}
.mlpa-slider-bullet{width:14px;height:14px;border-radius:999px;border:0;background:rgba(255,255,255,.6);cursor:pointer}
.mlpa-slider-bullet.is-active{background:#70e000;box-shadow:0 0 0 3px rgba(255,255,255,.3)}
/* Customizations: */
.mlpa-slider-bullet {
  min-height: unset;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  padding: 6px;
  cursor: pointer;
  border: 3px solid transparent;
  box-shadow: unset;
}
.mlpa-slider-bullet.is-active {
  background: #70e000;
  border-color: rgba(255, 255, 255, .6);
  padding: 0;
  background-clip: content-box;
  box-shadow: unset;
}

/* light iconography */
.section-eyebrow:before,.chip:before,.term-chip:before{content:"";display:inline-block;width:10px;height:10px;border-radius:999px;background:var(--ml-accent);margin-right:.2rem;vertical-align:middle}
.card-title:before,.entry-content h2:before,.entry-content h3:before,.sidebar-title:before,.footer-widget h3:before{
  content:"";
  display:inline-block;
  width:18px;height:18px;
  margin-right:.45rem;
  vertical-align:-2px;
  border-radius:999px 999px 999px 0;
  background:linear-gradient(135deg,var(--ml-accent) 0%, var(--ml-primary) 100%);
}
.meta span:before{
  content:"";
  display:inline-block;
  width:8px;height:8px;
  min-width: 8px;
  border-radius:999px;
  background:var(--ml-accent-dark);
}
.entry-content h2,.entry-content h3{display:flex;align-items:center}
.card-title{display:flex;align-items:flex-start}
.footer-bottom-bar{margin-top:1.4rem;border-top:1px solid rgba(255,255,255,.14);padding:1rem 0 0}
.footer-bottom-bar p{margin:0;color:#ced4da;font-size:.95rem}

@media (max-width: 900px){
  .mlpa-slider,.mlpa-slide{min-height:auto}
  .mlpa-slide-media img{height:420px}
  .mlpa-slide-card{left:1rem;right:1rem;bottom:3.5rem;max-width:none}
}

/* V4.7 responsive menu, archive intro and material files */
.screen-reader-text, .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.menu-toggle{display:none;align-items:center;justify-content:center;width:48px;height:48px;border:1px solid var(--ml-border);border-radius:999px;background:#fff;cursor:pointer;box-shadow:var(--ml-shadow-sm)}
.menu-toggle-bars,.menu-toggle-bars:before,.menu-toggle-bars:after{display:block;width:22px;height:2px;background:#16335b;border-radius:999px;position:relative;transition:transform .2s ease, opacity .2s ease}
.menu-toggle-bars:before,.menu-toggle-bars:after{content:"";position:absolute;left:0}.menu-toggle-bars:before{top:-7px}.menu-toggle-bars:after{top:7px}
.menu-toggle[aria-expanded="true"] .menu-toggle-bars{background:transparent}.menu-toggle[aria-expanded="true"] .menu-toggle-bars:before{transform:translateY(7px) rotate(45deg)}.menu-toggle[aria-expanded="true"] .menu-toggle-bars:after{transform:translateY(-7px) rotate(-45deg)}
.mlpa-slider{width:100%}.mlpa-slide-card{z-index:3}.mlpa-slide-card h1{font-size:clamp(2rem,4vw,3.4rem);line-height:1.04}
.archive-editable-intro{margin:1.4rem 0 1.6rem;padding:1.2rem 1.25rem;background:linear-gradient(120deg,#ffffff 0%,#f8fcf4 100%);border:1px solid var(--ml-border);border-radius:24px;box-shadow:var(--ml-shadow-sm)}
.archive-editable-intro .entry-content,.archive-editable-intro p{max-width:100%}
.archive-editable-intro .mlpa-home-section{padding:1rem 0}
.archive-editable-intro .mlpa-home-section + .mlpa-home-section{display:none}
.archive-editable-intro h2:first-child{margin-top:0}
.file-badge{display:inline-flex;align-items:center;gap:.65rem;padding:.6rem .8rem;border-radius:14px;background:#fff;border:1px solid var(--ml-border);box-shadow:var(--ml-shadow-sm);font-weight:700;color:#16335b;text-decoration:none;width:fit-content}
.file-badge:hover,.file-badge:focus{text-decoration:none;border-color:var(--ml-primary);color:var(--ml-primary)}
.file-icon{display:inline-flex;align-items:center;justify-content:center;min-width:46px;height:32px;padding:0 .45rem;border-radius:8px;color:#fff;background:#6c757d;font-size:.78rem;line-height:1;font-family:"Roboto Mono",monospace}
.file-badge-pdf .file-icon{background:#c62828}.file-badge-image .file-icon{background:#008000}.file-badge-word .file-icon{background:var(--ml-primary-dark,#0d47a1)}.file-badge-excel .file-icon{background:#2e7d32}.file-badge-powerpoint .file-icon{background:#d84315}.file-badge-zip .file-icon{background:#6d4c41}.file-badge-xml .file-icon{background:#455a64}
.material-file-download{margin-top:1.4rem}.card-body .file-badge{margin-top:.2rem}
@media (max-width: 1024px){
  .site-branding{position:relative}.menu-toggle{display:inline-flex;margin-left:auto}
  .main-nav{display:none;position:absolute;top:calc(100% + .7rem);left:0;right:0;background:#fff;border:1px solid var(--ml-border);border-radius:22px;box-shadow:var(--ml-shadow);padding:.9rem;z-index:1200}
  .main-nav.is-open{display:block}.main-nav ul{display:grid;gap:.35rem}.main-nav a{display:block;padding:.85rem 1rem}
}
@media (max-width: 768px){
  .hero-overlay{padding:1rem 0}.mlpa-slider,.mlpa-slide{min-height:520px}.mlpa-slide-media img{height:520px}
  .mlpa-slide-overlay{background:linear-gradient(180deg, rgba(17,24,39,.15) 0%, rgba(17,24,39,.58) 100%)}
  .mlpa-slide-card{left:1rem;right:1rem;bottom:4.2rem;padding:1.2rem;border-radius:22px;max-width:none}
  .mlpa-slide-card h1{font-size:2rem}.mlpa-slide-card p{font-size:1rem}.hero-actions{gap:.55rem}.button,.wp-block-button__link{padding:.76rem .9rem}.mlpa-slider-arrow{width:42px;height:42px}
}
@media (max-width: 520px){
  .site-title{font-size:1.25rem}.site-description{font-size:.9rem}.mlpa-slider,.mlpa-slide{min-height:560px}.mlpa-slide-media img{height:560px}.mlpa-slide-card{bottom:4rem}.archive-actions{display:none}
}

/* V4.8 fixes: aligned hamburger and reliable slider controls */
.site-branding{display:flex;align-items:center;justify-content:space-between;gap:1rem}
.brand-wrap{min-width:0}
.menu-toggle{flex:0 0 auto}
.mlpa-slider{position:relative}
.mlpa-slide{display:block;position:absolute;inset:0;opacity:0;visibility:hidden;transition:opacity .35s ease, visibility .35s ease;min-height:580px}
.mlpa-slide.is-active{opacity:1;visibility:visible;z-index:2}
.mlpa-slide:first-child{position:relative}
.mlpa-slider-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:6}
.mlpa-slider-prev{left:1rem}
.mlpa-slider-next{right:1rem}
.mlpa-slider-bullets{position:absolute;left:50%;bottom:1.1rem;transform:translateX(-50%);z-index:7;display:flex;align-items:center;gap:.55rem;padding:.45rem .65rem;border-radius:999px;background:rgba(17,24,39,.32);backdrop-filter:blur(6px)}
.mlpa-slider-controls{display:none}
@media (max-width:1024px){
  .site-branding{flex-direction:row!important;align-items:center!important}
  .brand-wrap{flex:1}
  .menu-toggle{display:inline-flex;margin-left:auto}
  .main-nav{display:none;position:absolute;top:calc(100% + .7rem);left:1rem;right:1rem;background:#fff;border:1px solid var(--ml-border);border-radius:22px;box-shadow:var(--ml-shadow);padding:.9rem;z-index:1200}
  .main-nav.is-open{display:block}
  .main-nav ul{display:grid;gap:.35rem}
  .main-nav a{display:block;padding:.85rem 1rem}
}
@media (max-width:768px){
  .mlpa-slider,.mlpa-slide{min-height:560px}
  .mlpa-slide-media img{height:560px}
  .mlpa-slider-arrow{width:40px;height:40px}
  .mlpa-slider-prev{left:.45rem}
  .mlpa-slider-next{right:.45rem}
  .mlpa-slide-card{left:1rem;right:1rem;bottom:4.5rem}
}

/* V4.9 editable home blocks and spacing fixes */
.front-page-content .page-shell{margin-top:2rem}
.entry-content .mlpa-editable-section{
  padding:2.2rem 0;
  border-top:1px solid var(--ml-border);
}
.entry-content .mlpa-editable-section:first-child{border-top:0;padding-top:.25rem}
.entry-content .mlpa-editable-section-soft{
  margin-left:-1.2rem;
  margin-right:-1.2rem;
  padding:2rem 1.2rem;
  border-radius:26px;
  background:linear-gradient(120deg,#ffffff 0%,#f8fcf4 100%);
  border:1px solid var(--ml-border);
}
.entry-content .mlpa-editable-columns{
  align-items:stretch;
  gap:1.5rem;
  margin-top:1.25rem;
}
.entry-content .mlpa-editable-columns .wp-block-column{
  display:flex;
  min-width:0;
}
.mlpa-editable-card{
  width:100%;
  padding:1.35rem 1.35rem 1.45rem;
  border:1px solid var(--ml-border);
  border-radius:24px;
  background:#fff;
  box-shadow:var(--ml-shadow-sm);
}
.mlpa-editable-card h3{
  margin:0 0 .8rem!important;
  color:#16335b;
  font-size:1.35rem;
  line-height:1.15;
  display:flex;
  align-items:flex-start;
}
.mlpa-editable-card p{
  margin:0;
  color:#343a40;
  line-height:1.65;
}
.entry-content .mlpa-editable-section h2{
  margin-top:0;
}
.entry-content .mlpa-editable-section > p{
  font-size:1.05rem;
  max-width:72ch;
}
.entry-content .mlpa-editable-card h3:before,
.entry-content .mlpa-editable-section h2:before{
  flex:0 0 auto;
}
@media (max-width: 900px){
  .entry-content .mlpa-editable-columns{display:block}
  .entry-content .mlpa-editable-columns .wp-block-column{display:block;margin-bottom:1rem}
  .entry-content .mlpa-editable-section-soft{margin-left:0;margin-right:0}
}


/* V5.0 Green Communities refinements */
:root{
  --ml-green-deep:#004B23;
  --ml-green:#70E000;
  --ml-green-mid:#38B000;
  --ml-blue:#0066CC;
  --ml-blue-dark:#0D47A1;
}
.page-banner{background:linear-gradient(135deg,#ffffff 0%,#f5fbff 52%,#f0ffe4 100%)}
.page-banner-inner:before{height:7px;width:130px;background:linear-gradient(90deg,var(--ml-green) 0%,var(--ml-blue) 100%)}
.training-loop{margin-top:1.6rem}
.training-loop .card{border-top:5px solid var(--ml-green)}
.formation-feature{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;margin:1.5rem 0}
.formation-feature .mlpa-editable-card{background:linear-gradient(135deg,#fff 0%,#f8fcf4 100%)}
.logo-band-inner.logo-band-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.footer-legal-menu{margin-top:1rem;padding-top:1rem;border-top:1px solid rgba(255,255,255,.14)}
.footer-legal-menu ul{display:flex;flex-wrap:wrap;gap:1rem;list-style:none;margin:0;padding:0}
.footer-legal-menu a{font-size:.95rem;color:#ced4da}
.policy-box{border-left:5px solid var(--ml-green);background:#f9fff4;border-radius:0 16px 16px 0;padding:1rem 1.2rem;margin:1rem 0}
.card-title:before,.entry-content h2:before,.entry-content h3:before,.sidebar-title:before,.footer-widget h3:before{
  background:linear-gradient(135deg,var(--ml-green) 0%,var(--ml-blue) 100%);
}
@media (max-width:900px){
  .logo-band-inner.logo-band-5{grid-template-columns:1fr 1fr}
  .formation-feature{grid-template-columns:1fr}
}
@media (max-width:520px){
  .logo-band-inner.logo-band-5{grid-template-columns:1fr}
}


/* V5.1 News/Eventi split */
.news-events-helper{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;margin:1.5rem 0}
@media (max-width:900px){.news-events-helper{grid-template-columns:1fr}}


/* V5.2 logo sito + loghi istituzionali più grandi */
.site-logo-custom img{
  max-height:76px;
  width:auto;
  object-fit:contain;
}
.brand-wrap{
  align-items:center;
}
.site-title-wrap{
  min-width:0;
}
.logo-band{
  margin-top:2.4rem;
}
.logo-slot{
  min-height:112px;
  padding:1.25rem 1rem;
}
.logo-slot img,
.logo-slot .institutional-logo{
  max-width:200px;
  max-height:60px;
  width:auto;
  height:auto;
  object-fit:contain;
}
.logo-band-inner.logo-band-5{
  gap:1.15rem;
}
@media (max-width:900px){
  .site-logo-custom img{
    max-height:60px;
  }
  .brand-wrap{
    gap:.75rem;
  }
  .site-title{
    font-size:1.25rem;
  }
  .site-description{
    font-size:.9rem;
  }
  .logo-slot{
    min-height:96px;
  }
  .logo-slot img,
  .logo-slot .institutional-logo{
    max-width:180px;
    max-height:58px;
  }
}
@media (max-width:520px){
  .site-logo-custom img{
    max-height:52px;
  }
  .site-title{
    font-size:1.08rem;
  }
  .site-description{
    display:none;
  }
  .logo-slot img,
  .logo-slot .institutional-logo{
    max-width:200px;
    max-height:60px;
  }
}


/* V5.3 Home carousels + Percorsi filter */
.home-dynamic-section{
  margin:2.2rem 0;
  padding:2rem;
  border:1px solid var(--ml-border);
  border-radius:28px;
  background:linear-gradient(120deg,#ffffff 0%,#f8fcf4 100%);
  box-shadow:var(--ml-shadow-sm);
}
.home-dynamic-section:nth-of-type(even){
  background:linear-gradient(120deg,#ffffff 0%,#f7fbff 100%);
}
.dynamic-carousel-wrap{
  position:relative;
  margin-top:1.2rem;
}
.dynamic-carousel{
  display:flex;
  gap:1.25rem;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  padding:.25rem .2rem 1rem;
  scrollbar-width:thin;
}
.dynamic-carousel .card{
  flex:0 0 calc(33.333% - .9rem);
  scroll-snap-align:start;
  min-width:280px;
}
.carousel-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:4;
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid var(--ml-border);
  background:#fff;
  box-shadow:var(--ml-shadow-sm);
  color:#16335b;
  font-size:1.7rem;
  line-height:1;
  cursor:pointer;
}
.carousel-arrow.prev{left:-.85rem}
.carousel-arrow.next{right:-.85rem}
.paths-filter-box{
  margin:1.5rem 0 1.8rem;
  padding:1.4rem;
  border:1px solid var(--ml-border);
  border-radius:24px;
  background:linear-gradient(120deg,#fff 0%,#f8fcf4 100%);
  box-shadow:var(--ml-shadow-sm);
}
.paths-filter-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1rem;
  align-items:end;
}
.paths-filter-box label{
  display:block;
  font-weight:700;
  margin-bottom:.35rem;
  color:#16335b;
}
.paths-filter-box input,
.paths-filter-box select{
  width:100%;
  padding:.75rem .85rem;
  border:1px solid var(--ml-border);
  border-radius:14px;
  font:inherit;
  background:#fff;
}
.paths-filter-actions{
  display:flex;
  gap:.65rem;
  flex-wrap:wrap;
}
.path-details{
  display:flex;
  flex-wrap:wrap;
  gap:.55rem;
  margin:.4rem 0;
}
.path-details span{
  display:inline-flex;
  padding:.28rem .62rem;
  background:#f7f9fb;
  border:1px solid var(--ml-border);
  border-radius:999px;
  font-size:.92rem;
  color:#495057;
}
@media (max-width:1000px){
  .dynamic-carousel .card{flex-basis:calc(50% - .75rem)}
  .paths-filter-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
  .home-dynamic-section{padding:1.25rem}
  .dynamic-carousel .card{flex-basis:88%}
  .carousel-arrow{display:none}
  .paths-filter-grid{grid-template-columns:1fr}
}


/* V5.4 fixes: hide native carousel scrollbar and fix events display */
.dynamic-carousel{
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.dynamic-carousel::-webkit-scrollbar{
  display:none;
}
.dynamic-carousel-wrap{
  overflow:visible;
}
.event-archive-helper{
  margin:1.4rem 0 1.6rem;
  padding:1.2rem 1.25rem;
  background:linear-gradient(120deg,#ffffff 0%,#f7fbff 100%);
  border:1px solid var(--ml-border);
  border-radius:24px;
  box-shadow:var(--ml-shadow-sm);
}


/* V5.5 share buttons + paths page fix */
.share-block{
  margin-top:2rem;
  padding:1.2rem;
  border:1px solid var(--ml-border);
  border-radius:22px;
  background:linear-gradient(120deg,#fff 0%,#f8fcf4 100%);
  box-shadow:var(--ml-shadow-sm);
}
.share-block h2{
  margin:0 0 .75rem;
  font-size:1.15rem;
  color:#16335b;
}
.share-links{
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
}

.share-links ul {
  list-style: none;
  display: flex;
  padding-inline: 0;
  margin: 0;
  gap: .4rem;
  flex-wrap: wrap;
}

.share-links ul {
  list-style: none;
  display: flex;
  padding-inline: 0;
  margin: 0;
  gap: .4rem;
  flex-wrap: wrap;
}

.share-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.55rem .85rem;
  border:1px solid var(--ml-border);
  border-radius:999px;
  background:#fff;
  font-weight:700;
  color:#16335b;
  text-decoration:none;
}
.share-links a:hover,
.share-links a:focus{
  border-color:var(--ml-primary);
  color:var(--ml-primary);
  text-decoration:none;
}
.card-share{
  margin-top:.4rem;
}
.card-share .share-links{
  gap:.4rem;
}
.card-share .share-links a{
  font-size:.9rem;
  padding:.4rem .65rem;
}
.paths-page-note{
  margin:1rem 0 0;
  color:#495057;
}

/* V5.6 test */


/* V5.6 Percorsi: filtro km min/max e dettagli visibili */
.km-range-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}
.path-info-panel{margin:1.5rem 0;padding:1.25rem;border:1px solid var(--ml-border);border-radius:22px;background:linear-gradient(120deg,#ffffff 0%,#f8fcf4 100%);box-shadow:var(--ml-shadow-sm)}
.path-info-panel h2{margin:0 0 .85rem;font-size:1.25rem;color:#16335b}
.path-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.path-info-item{padding:.8rem .9rem;border:1px solid var(--ml-border);border-radius:16px;background:#fff}
.path-info-item strong{display:block;color:#16335b;margin-bottom:.25rem}
@media (max-width:640px){.km-range-grid,.path-info-grid{grid-template-columns:1fr}}


/* V5.7 fix responsive caroselli Home News/Eventi */
.home-dynamic-section{
  overflow:hidden;
}
.dynamic-carousel-wrap{
  width:100%;
  max-width:100%;
  overflow:hidden;
  padding:0 .15rem;
}
.dynamic-carousel{
  display:flex;
  gap:1.25rem;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  padding:.25rem .15rem 1rem;
}
.dynamic-carousel .card{
  flex:0 0 calc((100% - 2.5rem) / 3);
  min-width:0;
  max-width:none;
  scroll-snap-align:start;
}
.dynamic-carousel .card-title{
  overflow-wrap:anywhere;
}
.dynamic-carousel .card-excerpt{
  overflow-wrap:anywhere;
}
@media (max-width: 1100px){
  .dynamic-carousel .card{
    flex-basis:calc((100% - 1.25rem) / 2);
  }
}
@media (max-width: 700px){
  .home-dynamic-section{
    padding:1.2rem;
    margin:1.6rem 0;
  }
  .dynamic-carousel{
    gap:1rem;
    padding-bottom:.6rem;
  }
  .dynamic-carousel .card{
    flex:0 0 88%;
  }
  .dynamic-carousel .card-media{
    aspect-ratio:16/9;
  }
  .carousel-arrow{
    display:none !important;
  }
}
@media (max-width: 420px){
  .dynamic-carousel .card{
    flex:0 0 94%;
  }
  .home-dynamic-section{
    padding:1rem;
  }
}


/* V5.8 cromia più viva coerente con Green Communities + Blu Italia */
:root{
  --ml-primary:#0066CC;
  --ml-primary-dark:#004C99;
  --ml-accent:#70E000;
  --ml-accent-dark:#38B000;
  --ml-green-deep:#004B23;
  --ml-green-soft:#E9FFD8;
  --ml-cyan:#00A6D6;
  --ml-yellow:#FFD166;
  --ml-orange:#F28C28;
  --ml-purple:#7B61FF;
  --ml-soft:#F4FAFF;
  --ml-soft-2:#F1FFE8;
  --ml-gradient:linear-gradient(120deg,#EAF6FF 0%,#F1FFE8 52%,#E9FFD8 100%);
}

body{
  background:
    radial-gradient(circle at 8% 10%, rgba(112,224,0,.08) 0, transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(0,102,204,.08) 0, transparent 30%),
    #ffffff;
}

.site-header{
  border-bottom:3px solid transparent;
  border-image:linear-gradient(90deg,var(--ml-accent),var(--ml-primary),var(--ml-cyan)) 1;
}

.main-nav a{
  color:#16335b;
}
.main-nav .current-menu-item>a,
.main-nav a:hover,
.main-nav a:focus{
  background:linear-gradient(135deg,#E9FFD8 0%,#EAF6FF 100%);
  color:var(--ml-primary-dark);
  box-shadow:0 8px 18px rgba(0,102,204,.08);
}

.hero,
.page-banner{
  background:
    radial-gradient(circle at 14% 16%, rgba(112,224,0,.20) 0, transparent 26%),
    radial-gradient(circle at 84% 22%, rgba(0,166,214,.18) 0, transparent 30%),
    linear-gradient(135deg,#F7FCFF 0%,#F2FFE9 100%);
}

.mlpa-slider{
  border:2px solid rgba(112,224,0,.22);
  box-shadow:0 24px 70px rgba(0,102,204,.14);
}

.mlpa-slide-card{
  border-top:6px solid var(--ml-accent);
  box-shadow:0 24px 60px rgba(0,75,35,.18);
}

.chip,
.term-chip,
.section-eyebrow{
  background:linear-gradient(135deg,#E9FFD8 0%,#DDF4FF 100%);
  color:#004B23;
  border:1px solid rgba(56,176,0,.28);
}

.section-eyebrow{
  box-shadow:0 8px 16px rgba(112,224,0,.14);
}

.button,
.wp-block-button__link{
  background:linear-gradient(135deg,var(--ml-primary) 0%,#0087E0 100%);
  box-shadow:0 14px 28px rgba(0,102,204,.20);
}

.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus{
  background:linear-gradient(135deg,var(--ml-primary-dark) 0%,var(--ml-cyan) 100%);
}

.button.secondary{
  background:#fff;
  color:var(--ml-primary-dark);
  border:2px solid var(--ml-primary);
}

.button.secondary:hover,
.button.secondary:focus{
  background:linear-gradient(135deg,#EAF6FF 0%,#E9FFD8 100%);
  color:var(--ml-primary-dark);
}

.card,
.mlpa-editable-card,
.page-shell,
.entry-shell,
.archive-intro,
.archive-editable-intro,
.paths-filter-box,
.path-info-panel,
.home-dynamic-section{
  border-color:rgba(0,102,204,.18);
  box-shadow:0 18px 44px rgba(13,71,161,.10);
}

.card{
  position:relative;
}

.card:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:6px;
  background:linear-gradient(90deg,var(--ml-accent),var(--ml-primary),var(--ml-cyan));
  border-radius:22px 22px 0 0;
  opacity:.9;
}

.card:hover{
  box-shadow:0 28px 64px rgba(0,102,204,.16);
  border-color:rgba(112,224,0,.45);
}

.card-media-placeholder{
  background:
    radial-gradient(circle at 20% 20%, rgba(112,224,0,.28) 0, transparent 34%),
    linear-gradient(140deg,#EAF6FF 0%,#E9FFD8 100%);
}

.card-title a{
  color:#123766;
}

.card-title a:hover,
.card-title a:focus{
  color:var(--ml-primary);
}

.meta span,
.path-details span{
  background:linear-gradient(135deg,#ffffff 0%,#F1FFE8 100%);
  border-color:rgba(112,224,0,.28);
}

.entry-content h2,
.entry-content h3,
.section-header h2,
.entry-title{
  color:#123766;
}

.entry-content h2:before,
.entry-content h3:before,
.card-title:before,
.sidebar-title:before,
.footer-widget h3:before{
  background:linear-gradient(135deg,var(--ml-accent) 0%,var(--ml-cyan) 45%,var(--ml-primary) 100%);
  box-shadow:0 6px 14px rgba(112,224,0,.18);
}

.home-dynamic-section:nth-of-type(odd){
  background:
    radial-gradient(circle at 95% 8%, rgba(112,224,0,.16) 0, transparent 30%),
    linear-gradient(135deg,#ffffff 0%,#F2FFE9 100%);
}

.home-dynamic-section:nth-of-type(even){
  background:
    radial-gradient(circle at 0% 8%, rgba(0,166,214,.14) 0, transparent 32%),
    linear-gradient(135deg,#ffffff 0%,#EDF8FF 100%);
}

.paths-filter-box input,
.paths-filter-box select{
  border:2px solid rgba(0,102,204,.14);
}

.paths-filter-box input:focus,
.paths-filter-box select:focus{
  outline:3px solid rgba(112,224,0,.28);
  border-color:var(--ml-primary);
}

.file-badge{
  background:linear-gradient(135deg,#ffffff 0%,#F4FAFF 100%);
}

.footer{
  background:
    radial-gradient(circle at 10% 0%, rgba(112,224,0,.14) 0, transparent 30%),
    linear-gradient(135deg,#16202A 0%,#0F253F 100%);
}

.logo-slot{
  border:1px solid rgba(112,224,0,.24);
  box-shadow:0 12px 26px rgba(0,0,0,.10);
}

.footer-bottom-bar{
  border-top:1px solid rgba(112,224,0,.22);
}

.share-block{
  background:linear-gradient(135deg,#ffffff 0%,#F1FFE8 100%);
}

.share-links a:hover,
.share-links a:focus{
  background:linear-gradient(135deg,#E9FFD8 0%,#EAF6FF 100%);
}

.menu-toggle{
  border:2px solid rgba(0,102,204,.20);
}

.menu-toggle:hover,
.menu-toggle:focus{
  background:linear-gradient(135deg,#E9FFD8 0%,#EAF6FF 100%);
}

@media (max-width:700px){
  .home-dynamic-section{
    background:linear-gradient(135deg,#ffffff 0%,#F4FAFF 60%,#F1FFE8 100%);
  }
}


/* V5.9 Design PA premium: colori pieni, no gradient marcati */
:root{
  --ml-primary:#0066CC;
  --ml-primary-dark:#0D47A1;
  --ml-accent:#70E000;
  --ml-accent-dark:#008000;
  --ml-green-deep:#004B23;
  --ml-text:#212529;
  --ml-muted:#687178;
  --ml-border:#D7DEE6;
  --ml-bg:#FFFFFF;
  --ml-soft:#F7F9FB;
  --ml-soft-2:#EAF3FF;
  --ml-green-soft:#F0F9EA;
  --ml-shadow:0 14px 34px rgba(13,71,161,.08);
  --ml-shadow-sm:0 8px 18px rgba(13,71,161,.06);
}

body{
  background:#FFFFFF !important;
  color:var(--ml-text);
}

.site-header{
  background:#FFFFFF !important;
  border-bottom:1px solid var(--ml-border) !important;
  border-image:none !important;
  box-shadow:0 4px 14px rgba(33,37,41,.04);
}

.hero,
.page-banner{
  background:#F7F9FB !important;
  border-bottom:1px solid var(--ml-border);
}

.mlpa-slider{
  border:1px solid var(--ml-border) !important;
  box-shadow:var(--ml-shadow) !important;
  background:#FFFFFF !important;
}

.mlpa-slide-overlay{
  background:rgba(0,0,0,.18) !important;
}

.mlpa-slide-card{
  background:#FFFFFF !important;
  border:1px solid var(--ml-border) !important;
  border-top:6px solid var(--ml-primary) !important;
  box-shadow:var(--ml-shadow) !important;
}

.mlpa-slide-card h1{
  color:var(--ml-primary-dark) !important;
}

.button,
.wp-block-button__link{
  background:var(--ml-primary) !important;
  color:#FFFFFF !important;
  box-shadow:none !important;
}

.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus{
  background:var(--ml-primary-dark) !important;
  color:#FFFFFF !important;
}

.button.secondary{
  background:#FFFFFF !important;
  color:var(--ml-primary) !important;
  border:2px solid var(--ml-primary) !important;
}

.button.secondary:hover,
.button.secondary:focus{
  background:var(--ml-soft-2) !important;
  color:var(--ml-primary-dark) !important;
}

.main-nav a{
  color:var(--ml-text) !important;
}

.main-nav .current-menu-item>a,
.main-nav a:hover,
.main-nav a:focus{
  background:var(--ml-soft-2) !important;
  color:var(--ml-primary-dark) !important;
  box-shadow:none !important;
}

.chip,
.term-chip,
.section-eyebrow{
  background:var(--ml-green-soft) !important;
  color:var(--ml-green-deep) !important;
  border:1px solid #CFE9C5 !important;
  box-shadow:none !important;
}

.card,
.mlpa-editable-card,
.page-shell,
.entry-shell,
.archive-intro,
.archive-editable-intro,
.paths-filter-box,
.path-info-panel,
.home-dynamic-section,
.share-block{
  background:#FFFFFF !important;
  border:1px solid var(--ml-border) !important;
  box-shadow:var(--ml-shadow-sm) !important;
}

.home-dynamic-section:nth-of-type(odd),
.home-dynamic-section:nth-of-type(even),
.mlpa-editable-section-soft,
.policy-box,
.event-archive-helper{
  background:#FFFFFF !important;
}

.card:before{
  background:var(--ml-primary) !important;
  height:5px !important;
  opacity:1 !important;
}

.card:hover{
  border-color:var(--ml-primary) !important;
  box-shadow:var(--ml-shadow) !important;
}

.card-media-placeholder{
  background:var(--ml-soft) !important;
}

.card-title a,
.entry-content h2,
.entry-content h3,
.section-header h2,
.entry-title{
  color:var(--ml-primary-dark) !important;
}

.entry-content h2:before,
.entry-content h3:before,
.card-title:before,
.sidebar-title:before,
.footer-widget h3:before{
  background:var(--ml-accent-dark) !important;
  box-shadow:none !important;
}

.meta span,
.path-details span{
  background:var(--ml-soft) !important;
  border-color:var(--ml-border) !important;
}

.paths-filter-box input,
.paths-filter-box select{
  border:1px solid var(--ml-border) !important;
  background:#FFFFFF !important;
}

.paths-filter-box input:focus,
.paths-filter-box select:focus{
  outline:3px solid rgba(0,102,204,.20) !important;
  border-color:var(--ml-primary) !important;
}

.file-badge{
  background:#FFFFFF !important;
}

.footer{
  background:#212529 !important;
}

.footer a{
  color:#FFFFFF !important;
}

.logo-slot{
  background:#FFFFFF !important;
  border:1px solid var(--ml-border) !important;
  box-shadow:none !important;
}

.footer-bottom-bar{
  border-top:1px solid rgba(255,255,255,.16) !important;
}

.share-links a:hover,
.share-links a:focus{
  background:var(--ml-soft-2) !important;
  color:var(--ml-primary-dark) !important;
}

.menu-toggle{
  background:#FFFFFF !important;
  border:1px solid var(--ml-border) !important;
}

.menu-toggle:hover,
.menu-toggle:focus{
  background:var(--ml-soft-2) !important;
}

/* Accenti PA eleganti */
.page-banner-inner:before{
  background:var(--ml-primary) !important;
  height:6px;
  width:112px;
}

.notice-box,
.policy-box{
  border-left-color:var(--ml-primary) !important;
  background:#F7F9FB !important;
}

.path-info-item{
  background:#FFFFFF !important;
}

/* Spaziature più istituzionali */
.home-dynamic-section{
  padding:2.1rem !important;
}

.section-header{
  margin-bottom:1.4rem;
}

.card-body{
  padding:1.35rem 1.35rem 1.45rem !important;
}

.footer{
  margin-top:4rem;
}

@media (max-width:700px){
  .home-dynamic-section{
    background:#FFFFFF !important;
    padding:1.25rem !important;
  }
}


/* V6.0 PRO - Accessibilità WCAG 2.2 AA, UX PA, Core Web Vitals */
:root{
  /*--ml-focus:#FFB703;*/
  --ml-focus: var(--ml-blue);
  --ml-error:#B00020;
  --ml-success:#1B7F3A;
}

/* Focus visibile e coerente */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.wp-block-button__link:focus-visible{
  outline:4px solid var(--ml-focus) !important;
  outline-offset:3px !important;
  box-shadow:0 0 0 6px rgba(255,183,3,.20) !important;
}

/* Area cliccabile e leggibilità */
button,
.button,
.wp-block-button__link,
.main-nav a,
.share-links a,
.file-badge{
  min-height:44px;
}

.entry-content p,
.card-excerpt,
.entry-subtitle{
  line-height:1.72;
}

.entry-content a:not(.wp-block-button__link),
.card-body a,
.footer a{
  text-decoration-thickness:.08em;
  text-underline-offset:.18em;
  text-decoration: underline;
}

.meta span,
.path-details span,
.term-chip{
  line-height:1.35;
}

/* Slider accessibile */
.mlpa-slider{
  isolation:isolate;
}

.mlpa-slider-pause{
  position:absolute;
  right:1rem;
  bottom:1.1rem;
  z-index:8;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:.55rem .85rem;
  border:1px solid var(--ml-border);
  border-radius:999px;
  background:#fff;
  color:var(--ml-primary-dark);
  font-weight:700;
  cursor:pointer;
  box-shadow:var(--ml-shadow-sm);
}

.mlpa-slider-bullets{
  padding-right:5.9rem;
}

.mlpa-slide[aria-hidden="true"] a,
.mlpa-slide[aria-hidden="true"] button{
  visibility:hidden;
}
.mlpa-slider-status,
.mlpa-sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Skip link già presente: rinforzo visuale */
.skip-link:focus{
  background:#fff;
  color:#000;
  outline:4px solid var(--ml-focus);
  border:2px solid var(--ml-primary);
  border-radius:8px;
}

/* Breadcrumb / titoli istituzionali */
.breadcrumbs{
  color:#4A5568;
}

/* Tabelle e contenuti editoriali più robusti */
.entry-content table{
  border-collapse:collapse;
  width:100%;
}

.entry-content th{
  background:#F7F9FB;
}

.entry-content th,
.entry-content td{
  border:1px solid var(--ml-border);
  padding:.75rem;
  text-align:left;
}

/* Riduzione movimento */
@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    scroll-behavior:auto !important;
    transition-duration:.01ms !important;
  }
  .mlpa-slide{
    transition:none !important;
  }
}

/* Contrasto e modalità alto contrasto */
@media (prefers-contrast: more){
  :root{
    --ml-border:#56616D;
  }
  .card,
  .page-shell,
  .entry-shell,
  .home-dynamic-section,
  .paths-filter-box,
  .share-block{
    border-width:2px !important;
  }
  .button,
  .wp-block-button__link{
    border:2px solid #000 !important;
  }
}

/* Mobile UX istituzionale */
@media (max-width:700px){
  .entry-content p,
  .card-excerpt{
    font-size:1rem;
  }
  .mlpa-slider-bullets{
    padding-right:0;
    bottom:.7rem;
  }
  .mlpa-slider-pause{
    right:.8rem;
    top:.8rem;
    bottom:auto;
  }
}


/* V6.1 PRO MIX - istituzionale + territoriale, stile PNRR/PA */
:root{
  --ml-blue:#0066CC;
  --ml-blue-dark:#0D47A1;
  --ml-green:#70E000;
  --ml-green-dark:#008000;
  --ml-forest:#004B23;
  --ml-paper:#FFFFFF;
  --ml-ice:#F4F8FB;
  --ml-mint:#F3FAEF;
  --ml-stroke:#D9E2EA;
  --ml-dark:#212529;
}
.container{width:min(100% - 2.25rem,1180px)}
.site-content{padding-bottom:5rem}
.site-header{min-height:78px;background:#fff!important;border-bottom:1px solid var(--ml-stroke)!important;box-shadow:0 4px 14px rgba(33,37,41,.04)}
.site-branding{padding:1.05rem 0}
.main-nav a{border-radius:6px!important;padding:.7rem .85rem}
.main-nav .current-menu-item>a{border-bottom:3px solid var(--ml-blue)}
.mlpa-slider{border-radius:10px!important;overflow:hidden;border:1px solid var(--ml-stroke)!important;box-shadow:0 16px 42px rgba(13,71,161,.10)!important}
.mlpa-slide-media img{height:620px}
.mlpa-slide-overlay{background:rgba(0,0,0,.28)!important}
.mlpa-slide-card{max-width:620px;left:3rem;bottom:3rem;border-radius:8px!important;border-top:8px solid var(--ml-green)!important;padding:2.35rem;background:#fff!important}
.mlpa-slide-card h1{font-size:clamp(2.4rem,4.8vw,4.4rem);line-height:1;letter-spacing:-.03em;color:var(--ml-blue-dark)!important}
.mlpa-slide-card p{font-size:1.16rem;max-width:58ch}
.front-page-content .page-shell{box-shadow:none!important;border:0!important;padding:0!important;background:transparent!important}
.entry-content .mlpa-editable-section,.home-dynamic-section{margin:3rem 0;padding:3rem 0!important;border-top:1px solid var(--ml-stroke);border-radius:0!important;background:transparent!important;box-shadow:none!important}
.entry-content .mlpa-editable-section-soft,.home-dynamic-section:nth-of-type(even){margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);padding:3.4rem max(1.125rem,calc((100vw - 1180px)/2))!important;background:var(--ml-ice)!important;border-top:1px solid var(--ml-stroke);border-bottom:1px solid var(--ml-stroke);border-left:0!important;border-right:0!important}
.section-header h2,.entry-content h2{font-size:clamp(2rem,3.2vw,3rem);line-height:1.05;letter-spacing:-.025em;color:var(--ml-blue-dark)!important}
.section-header p,.entry-content .mlpa-editable-section>p{font-size:1.13rem;color:#495057}
.card,.mlpa-editable-card{border-radius:8px!important;box-shadow:none!important;border:1px solid var(--ml-stroke)!important;background:#fff!important}
.card:before{height:0!important}
.card:hover{transform:none!important;border-color:var(--ml-blue)!important;box-shadow:0 10px 24px rgba(13,71,161,.08)!important}
.card-media{border-bottom:1px solid var(--ml-stroke)}
.card-title{font-size:1.28rem}
.card-title:before,.entry-content h2:before,.entry-content h3:before{width:14px;height:14px;border-radius:50%;background:var(--ml-green-dark)!important;margin-top:.18rem}
.home-dynamic-section{background:#fff!important}
.dynamic-carousel .card{background:#fff!important}
.carousel-arrow{border-radius:6px;color:var(--ml-blue-dark)}
.paths-filter-box{border-radius:8px!important;background:var(--ml-mint)!important;box-shadow:none!important}
.paths-filter-box label{color:var(--ml-forest)}
.paths-filter-box input,.paths-filter-box select{border-radius:6px!important}
.chip,.term-chip,.section-eyebrow,.meta span,.path-details span{border-radius:6px!important}
.section-eyebrow{text-transform:uppercase;letter-spacing:.05em;background:#F0F9EA!important;color:var(--ml-forest)!important}
.footer{background:#1F2933!important}
.logo-band-inner.logo-band-5{background:#fff;padding:1rem;border-radius:8px}
.logo-slot{border:0!important;min-height:96px}
.page-banner{background:#F7F9FB!important;padding:3.2rem 0 2.2rem}
.page-banner-inner:before{width:148px;background:var(--ml-green-dark)!important}
.page-shell,.entry-shell{border-radius:8px!important;box-shadow:none!important}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:4px solid var(--ml-focus) !important;outline-offset:3px}
@media (max-width:900px){
  .mlpa-slide-media img{height:560px}
  .mlpa-slide-card{left:1rem;right:1rem;bottom:4.5rem;padding:1.4rem}
  .entry-content .mlpa-editable-section-soft,.home-dynamic-section:nth-of-type(even){margin-left:-1.125rem;margin-right:-1.125rem;padding:2rem 1.125rem!important}
}
@media (max-width:520px){
  .mlpa-slide-card h1{font-size:2.1rem}
  .mlpa-slide-card p{font-size:1rem}
}


/* V6.2 PRO Mix - fix overflow, frecce caroselli, hero full width */
html,
body{
  max-width:100%;
  overflow-x:hidden;
}

/* Hero full width, immagine da destra a sinistra */
.hero.hero-overlay{
  padding:0 !important;
  background:#F7F9FB !important;
}

.hero.hero-overlay > .container{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
}

.mlpa-slider{
  border-radius:0 !important;
  border-left:0 !important;
  border-right:0 !important;
  border-top:0 !important;
  min-height:640px;
}

.mlpa-slide{
  min-height:640px;
}

.mlpa-slide-media img{
  height:640px !important;
  object-fit:cover;
  object-position:right center;
}

.mlpa-slide-overlay{
  background:linear-gradient(90deg,rgba(0,0,0,.58) 0%,rgba(0,0,0,.36) 38%,rgba(0,0,0,.06) 100%) !important;
}

.mlpa-slide-card{
  left:max(2rem,calc((100vw - 1180px)/2)) !important;
  bottom:4rem !important;
  max-width:620px;
  background:rgba(255,255,255,.96) !important;
}

/* Correzione sezioni full bleed senza barra orizzontale */
.entry-content .mlpa-editable-section-soft,
.home-dynamic-section:nth-of-type(even){
  width:100vw;
  max-width:100vw;
  margin-left:calc(50% - 50vw) !important;
  margin-right:calc(50% - 50vw) !important;
  padding-left:max(1.125rem,calc((100vw - 1180px)/2)) !important;
  padding-right:max(1.125rem,calc((100vw - 1180px)/2)) !important;
  box-sizing:border-box;
}

/* Caroselli home: frecce più visibili e fuori dallo scroll */
.dynamic-carousel-wrap{
  overflow:visible !important;
  padding-inline:0 !important;
}

.dynamic-carousel{
  overflow-x:auto;
  overflow-y:hidden;
  padding:0 0 1rem !important;
}

.carousel-arrow{
  width:52px !important;
  height:52px !important;
  border:2px solid var(--ml-blue) !important;
  background:#FFFFFF !important;
  color:var(--ml-blue-dark) !important;
  font-size:2.2rem !important;
  line-height:1 !important;
  box-shadow:0 12px 28px rgba(13,71,161,.18) !important;
  opacity:1 !important;
  z-index:20 !important;
}

.carousel-arrow.prev{
  left:-1.45rem !important;
}

.carousel-arrow.next{
  right:-1.45rem !important;
}

.carousel-arrow:hover,
.carousel-arrow:focus{
  background:var(--ml-blue) !important;
  color:#fff !important;
}

/* Evita che le card causino overflow */
.dynamic-carousel .card{
  min-width:0 !important;
}

.card,
.card-body,
.entry-content,
.page-shell{
  min-width:0;
}

/* Slider principale: frecce più visibili */
.mlpa-slider-arrow{
  width:54px !important;
  height:54px !important;
  border:2px solid #fff !important;
  background:rgba(255,255,255,.94) !important;
  color:var(--ml-blue-dark) !important;
  box-shadow:0 12px 30px rgba(0,0,0,.22) !important;
}

.mlpa-slider-arrow:hover,
.mlpa-slider-arrow:focus{
  background:var(--ml-blue) !important;
  color:#fff !important;
}

/* Mobile */
@media (max-width:900px){
  .mlpa-slider,
  .mlpa-slide{
    min-height:590px;
  }

  .mlpa-slide-media img{
    height:590px !important;
    object-position:center;
  }

  .mlpa-slide-overlay{
    background:linear-gradient(180deg,rgba(0,0,0,.10) 0%,rgba(0,0,0,.62) 100%) !important;
  }

  .mlpa-slide-card{
    left:1rem !important;
    right:1rem !important;
    bottom:4.8rem !important;
    max-width:none;
  }

  .carousel-arrow{
    display:none !important;
  }

  .dynamic-carousel-wrap{
    overflow:hidden !important;
  }

  .entry-content .mlpa-editable-section-soft,
  .home-dynamic-section:nth-of-type(even){
    width:auto;
    max-width:none;
    margin-left:-1.125rem !important;
    margin-right:-1.125rem !important;
    padding-left:1.125rem !important;
    padding-right:1.125rem !important;
  }
}

@media (max-width:520px){
  .mlpa-slider,
  .mlpa-slide{
    min-height:620px;
  }

  .mlpa-slide-media img{
    height:620px !important;
  }
}


/* V6.3 Fix caroselli Home: visibilità, accavallamenti e frecce */
.home-dynamic-section{
  overflow:hidden !important;
}

.dynamic-carousel-wrap{
  position:relative;
  overflow:hidden !important;
  width:100%;
  max-width:100%;
  padding:0 3.6rem !important;
  box-sizing:border-box;
}

.dynamic-carousel{
  display:flex;
  align-items:stretch;
  gap:1.25rem;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  padding:.25rem 0 1rem !important;
}

.dynamic-carousel .card{
  flex:0 0 calc((100% - 2.5rem) / 3) !important;
  min-width:0 !important;
  max-width:none !important;
  scroll-snap-align:start;
  display:flex !important;
  flex-direction:column;
  height:auto !important;
  overflow:hidden !important;
}

.dynamic-carousel .card-media{
  flex:0 0 auto;
  aspect-ratio:16/9 !important;
  min-height:0 !important;
}

.dynamic-carousel .card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.dynamic-carousel .card-body{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  gap:.75rem;
  min-height:0;
}

.dynamic-carousel .card-title{
  font-size:1.18rem !important;
  line-height:1.2 !important;
  margin:0 !important;
  overflow-wrap:anywhere;
}

.dynamic-carousel .card-title:before{
  margin-top:.18rem;
  flex:0 0 auto;
}

.dynamic-carousel .card-excerpt{
  font-size:1rem;
  line-height:1.55;
  overflow-wrap:anywhere;
}

.dynamic-carousel .card-footer{
  margin-top:auto;
  color: var(--ml-primary);
}

.dynamic-carousel .card-footer p{
  margin: 0;
}

.carousel-arrow{
  top:50% !important;
  transform:translateY(-50%) !important;
  width:46px !important;
  height:46px !important;
  border:2px solid var(--ml-blue) !important;
  background:#fff !important;
  color:var(--ml-blue-dark) !important;
  border-radius:999px !important;
  font-size:1.8rem !important;
  line-height:1 !important;
  box-shadow:0 8px 20px rgba(13,71,161,.18) !important;
  z-index:12 !important;
}

.carousel-arrow.prev{
  left:.35rem !important;
}

.carousel-arrow.next{
  right:.35rem !important;
}

.carousel-arrow:hover,
.carousel-arrow:focus{
  background:var(--ml-blue) !important;
  color:#fff !important;
}
.carousel-arrow[aria-disabled="true"]{
  opacity:.35 !important;
  cursor:default !important;
  box-shadow:none !important;
  pointer-events:none;
}
.carousel-arrow[aria-disabled="true"]:focus{
  background:#fff !important;
  color:var(--ml-blue-dark) !important;
}

@media (max-width:1100px){
  .dynamic-carousel-wrap{
    padding:0 3.1rem !important;
  }

  .dynamic-carousel .card{
    flex-basis:calc((100% - 1.25rem) / 2) !important;
  }
}

@media (max-width:700px){
  .dynamic-carousel-wrap{
    padding:0 !important;
    overflow:hidden !important;
  }

  .dynamic-carousel{
    gap:1rem;
    padding:.25rem 0 .7rem !important;
  }

  .dynamic-carousel .card{
    flex:0 0 88% !important;
  }

  .carousel-arrow{
    display:none !important;
  }

  .dynamic-carousel .card-title{
    font-size:1.08rem !important;
  }

  .dynamic-carousel .card-excerpt{
    font-size:.98rem;
  }
}

@media (max-width:420px){
  .dynamic-carousel .card{
    flex:0 0 94% !important;
  }
}


/* V6.4 PRO - News come Eventi, con fondo verde istituzionale */
.home-dynamic-section{
  position:relative;
}

/* Prima sezione dinamica in home = News */
.front-page-content .home-dynamic-section:first-of-type{
  background:#F0F9EA !important;
  border-top:1px solid #CFE5D6 !important;
  border-bottom:1px solid #CFE5D6 !important;
}

/* Layout news coerente con eventi */
.front-page-content .home-dynamic-section:first-of-type .card{
  background:#FFFFFF !important;
  border:1px solid #CFE5D6 !important;
  box-shadow:none !important;
}

.front-page-content .home-dynamic-section:first-of-type .card:hover{
  border-color:#2D6A4F !important;
  box-shadow:0 10px 24px rgba(45,106,79,.12) !important;
}

.front-page-content .home-dynamic-section:first-of-type .section-eyebrow{
  background:#D8F3DC !important;
  color:#1B4332 !important;
  border:1px solid #B7E4C7 !important;
}

.front-page-content .home-dynamic-section:first-of-type .section-header h2{
  color:#1B4332 !important;
}

.front-page-content .home-dynamic-section:first-of-type .section-header p{
  color:#3B4A40 !important;
}

.front-page-content .home-dynamic-section:first-of-type .card-title a{
  color:#1B4332 !important;
}

.front-page-content .home-dynamic-section:first-of-type .card-title a:hover,
.front-page-content .home-dynamic-section:first-of-type .card-title a:focus{
  color:var(--ml-primary, #0066CC) !important;
}

.front-page-content .home-dynamic-section:first-of-type .card-title:before{
  background:#2D6A4F !important;
}

.front-page-content .home-dynamic-section:first-of-type .meta span{
  background:#E9F7EF !important;
  border:1px solid #CDE7D4 !important;
}

.front-page-content .home-dynamic-section:first-of-type .term-chip,
.front-page-content .home-dynamic-section:first-of-type .chip{
  background:#D8F3DC !important;
  color:#1B4332 !important;
  border:1px solid #B7E4C7 !important;
}

/* Frecce carosello News in verde */
.front-page-content .home-dynamic-section:first-of-type .carousel-arrow{
  border-color:#2D6A4F !important;
  color:#2D6A4F !important;
  background:#FFFFFF !important;
}

.front-page-content .home-dynamic-section:first-of-type .carousel-arrow:hover,
.front-page-content .home-dynamic-section:first-of-type .carousel-arrow:focus{
  background:#2D6A4F !important;
  color:#FFFFFF !important;
}

/* Share links news più coerenti */
.front-page-content .home-dynamic-section:first-of-type .share-links a{
  border-color:#CDE7D4 !important;
  color:#1B4332 !important;
}

.front-page-content .home-dynamic-section:first-of-type .share-links a:hover,
.front-page-content .home-dynamic-section:first-of-type .share-links a:focus{
  background:#E9F7EF !important;
  color:#1B4332 !important;
}

/* Seconda sezione dinamica = Eventi, accento blu */
.front-page-content .home-dynamic-section:nth-of-type(2){
  background:#F4F8FB !important;
  border-top:1px solid var(--ml-stroke, #D9E2EA) !important;
  border-bottom:1px solid var(--ml-stroke, #D9E2EA) !important;
}

.front-page-content .home-dynamic-section:nth-of-type(2) .section-header h2{
  color: var(--ml-blue-dark, #0D47A1) !important;
}

.front-page-content .home-dynamic-section:nth-of-type(2) .card{
  border-color:var(--ml-stroke, #D9E2EA) !important;
}

.front-page-content .home-dynamic-section:nth-of-type(2) .card:hover, .front-page-content .home-dynamic-section:nth-of-type(2) .card:has(.card-title a:focus){
  border-color:var(--ml-primary, #0066CC) !important;
}

/* Mantiene il full-bleed senza generare overflow */
.front-page-content .home-dynamic-section:first-of-type,
.front-page-content .home-dynamic-section:nth-of-type(2){
  width:100vw;
  max-width:100vw;
  margin-left:calc(50% - 50vw) !important;
  margin-right:calc(50% - 50vw) !important;
  padding-left:max(1.125rem,calc((100vw - 1180px)/2)) !important;
  padding-right:max(1.125rem,calc((100vw - 1180px)/2)) !important;
  box-sizing:border-box;
  border-left:0 !important;
  border-right:0 !important;
}

/* Miglioria generale card caroselli */
.dynamic-carousel .card{
  min-height:100%;
  position: relative;
}

.dynamic-carousel .card-media-placeholder{
  background:#F7F9FB !important;
}

.card-title a:after {
  content: '';
  position: absolute;
  inset: 0;
}

.card-share .share-links {
  z-index: 1;
  position: relative;
}

.front-page-content .home-dynamic-section:first-of-type .card-media-placeholder{
  background:#E9F7EF !important;
}

/* Mobile */
@media (max-width:900px){
  .front-page-content .home-dynamic-section:first-of-type,
  .front-page-content .home-dynamic-section:nth-of-type(2){
    width:auto;
    max-width:none;
    margin-left:-1.125rem !important;
    margin-right:-1.125rem !important;
    padding-left:1.125rem !important;
    padding-right:1.125rem !important;
  }
}


/* V6.5 PRO - Footer istituzionale a 4 widget */
.footer-grid,
.footer-widgets{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:2rem !important;
  align-items:start;
}

.footer-widget,
.footer-grid > div{
  min-width:0;
}

.footer ul, .footer-widget ul {
  list-style: none;
  padding: 0;
}

/* Rimuove il menu orizzontale sopra i loghi istituzionali */
.footer-legal-menu{
  display:none !important;
}

/* Banda loghi più ordinata dopo i widget */
.logo-band{
  margin-top:2.4rem !important;
  padding-top:1.6rem !important;
  border-top:1px solid rgba(255,255,255,.16);
}

/* Riga finale footer = nota istituzionale/PNRR */
.footer-bottom-bar{
  margin-top:1.6rem !important;
  padding:1rem 0 0 !important;
  border-top:1px solid rgba(255,255,255,.18) !important;
}

.footer-bottom-bar p{
  max-width:1180px;
  margin:0;
  color:#DDE3EA !important;
  font-size:.95rem;
  line-height:1.55;
}

/* Responsive footer */
@media (max-width:1100px){
  .footer-grid,
  .footer-widgets{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width:640px){
  .footer-grid,
  .footer-widgets{
    grid-template-columns:1fr !important;
  }
}

/* Subfooter */
.subfooter a {
  text-decoration: underline;
}

/* V6.7 PRO - Banner home opzionale e contatti 2 box */
.mlpa-home-banner-section{margin:2.4rem 0;padding:2rem;background:#F0F9EA;border-top:1px solid #CFE5D6;border-bottom:1px solid #CFE5D6}
.mlpa-home-banner{display:block;width:100%;max-width:1200px;margin:0 auto;border-radius:10px;overflow:hidden;border:1px solid #CFE5D6;background:#fff;box-shadow:0 12px 28px rgba(45,106,79,.10)}
.mlpa-home-banner img{display:block;width:100%;height:auto;max-height:240px;object-fit:cover}
.mlpa-home-banner:focus-visible{outline:4px solid #FFB703;outline-offset:4px}
.contatti-box-grid,.wp-block-columns.contatti-box-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem;margin-top:1.5rem}
.contatti-box-grid .wp-block-column{min-width:0}
.contatti-info-box{height:100%;padding:1.5rem;border:1px solid var(--ml-border);border-radius:10px;background:#fff;box-shadow:var(--ml-shadow-sm)}
.contatti-info-box h3{margin-top:0;color:var(--ml-primary-dark)}
.contatti-info-box p{margin-bottom:0}
@media (max-width:760px){.mlpa-home-banner-section{padding:1.25rem}.mlpa-home-banner img{max-height:none}.contatti-box-grid,.wp-block-columns.contatti-box-grid{grid-template-columns:1fr}}


/* V6.8 PRO - Banner home tra progetto e materiali, verde full width */
.mlpa-home-banner-section{
  width:100vw !important;
  max-width:100vw !important;
  margin:3rem calc(50% - 50vw) !important;
  padding:2.2rem max(1.125rem, calc((100vw - 1200px)/2)) !important;
  background:#F0F9EA !important;
  border-top:1px solid #CFE5D6 !important;
  border-bottom:1px solid #CFE5D6 !important;
  box-sizing:border-box !important;
}

.mlpa-home-banner-section > .container{
  width:100% !important;
  max-width:1200px !important;
  margin:0 auto !important;
  padding:0 !important;
}

.mlpa-home-banner{
  display:block;
  width:100% !important;
  max-width:1200px !important;
  margin:0 auto !important;
  border-radius:10px;
  overflow:hidden;
  border:1px solid #CFE5D6;
  background:#fff;
  box-shadow:0 12px 28px rgba(45,106,79,.10);
}

.mlpa-home-banner img{
  display:block;
  width:100% !important;
  height:auto;
  max-height:240px;
  object-fit:cover;
}

@media (max-width:760px){
  .mlpa-home-banner-section{
    margin:2rem calc(50% - 50vw) !important;
    padding:1.25rem !important;
  }

  .mlpa-home-banner img{
    max-height:none;
  }
}


/* V6.9 PRO - Ricerca globale accessibile */
.site-search-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:.55rem .8rem;
  border:1px solid var(--ml-border);
  border-radius:999px;
  background:#fff;
  color:var(--ml-primary-dark);
  font-weight:700;
  cursor:pointer;
}

.site-search-toggle:hover,
.site-search-toggle:focus{
  background:#EAF3FF;
}

.site-search-panel{
  display:none;
  border-top:1px solid var(--ml-border);
  background:#F7F9FB;
  padding:1rem 0;
}

.site-search-panel.is-open{
  display:block;
}

.site-search-form{
  display:flex;
  gap:.75rem;
  align-items:center;
  max-width:920px;
}

.site-search-form label{
  font-weight:700;
  color:var(--ml-primary-dark);
}

.site-search-form input[type="search"]{
  flex:1;
  min-height:48px;
  padding:.75rem 1rem;
  border:1px solid var(--ml-border);
  border-radius:8px;
  font:inherit;
  background:#fff;
}

.site-search-form button{
  min-height:48px;
  padding:.75rem 1.1rem;
  border:0;
  border-radius:8px;
  background:var(--ml-primary);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.site-search-form button:hover,
.site-search-form button:focus{
  background:var(--ml-primary-dark);
}

.search-results-layout{
  margin:2.5rem 0 4rem;
}

.search-type-section{
  margin:2rem 0;
  padding:1.5rem;
  border:1px solid var(--ml-border);
  border-radius:10px;
  background:#fff;
}

.search-type-section h2{
  margin-top:0;
  color:var(--ml-primary-dark);
}

.search-result-list{
  display:grid;
  gap:1rem;
}

.search-result-item{
  padding:1rem;
  border:1px solid var(--ml-border);
  border-radius:8px;
  background:#F7F9FB;
}

.search-result-item h3{
  margin:.1rem 0 .45rem;
}

.search-result-item p{
  margin:.35rem 0 0;
}

.search-type-badge{
  display:inline-flex;
  align-items:center;
  padding:.25rem .55rem;
  border-radius:999px;
  background:#F0F9EA;
  color:#004B23;
  border:1px solid #CFE5D6;
  font-size:.9rem;
  font-weight:700;
}

@media (max-width:900px){
  .site-search-toggle{
    margin-left:auto;
  }

  .site-search-form{
    display:grid;
    grid-template-columns:1fr;
  }
}


/* V7.0 PRO - Cerca funzionante con icona e pannello stabile */
.site-search-toggle{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  min-height:44px;
  padding:.55rem .9rem;
  border:1px solid var(--ml-border);
  border-radius:999px;
  background:#fff;
  color:var(--ml-primary-dark);
  font-weight:700;
  cursor:pointer;
  line-height:1;
}

.site-search-toggle:before{
  content:"";
  display:inline-block;
  width:18px;
  height:18px;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.5 3a6.5 6.5 0 0 1 5.17 10.45l5.44 5.44-1.42 1.42-5.44-5.44A6.5 6.5 0 1 1 9.5 3m0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.5 3a6.5 6.5 0 0 1 5.17 10.45l5.44 5.44-1.42 1.42-5.44-5.44A6.5 6.5 0 1 1 9.5 3m0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9'/%3E%3C/svg%3E") center / contain no-repeat;
}

.site-search-toggle:hover,
.site-search-toggle:focus{
  background:#EAF3FF;
}

.site-search-panel{
  display:block !important;
  max-height:0;
  overflow:hidden;
  opacity:0;
  visibility:hidden;
  border-top:1px solid var(--ml-border);
  background:#F7F9FB;
  transition:max-height .25s ease, opacity .2s ease, visibility .2s ease;
}

.site-search-panel.is-open{
  max-height:180px;
  opacity:1;
  visibility:visible;
  padding:1rem 0;
}

.site-search-form{
  display:flex;
  gap:.75rem;
  align-items:center;
  max-width:920px;
}

.site-search-form input[type="search"]{
  flex:1;
  min-height:48px;
  padding:.75rem 1rem;
  border:1px solid var(--ml-border);
  border-radius:8px;
  font:inherit;
  background:#fff;
}

.site-search-form button{
  min-height:48px;
  padding:.75rem 1.1rem;
  border:0;
  border-radius:8px;
  background:var(--ml-primary);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.site-search-form button:hover,
.site-search-form button:focus{
  background:var(--ml-primary-dark);
}

@media (max-width:900px){
  .site-search-form{
    display:grid;
    grid-template-columns:1fr;
  }

  .site-search-panel.is-open{
    max-height:260px;
  }
}


/* V7.1 PRO - ricerca reale senza dipendere da toggle JS */
.header-search-form{
  display:flex;
  align-items:center;
  gap:.35rem;
  min-width:230px;
}

.header-search-form label{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
}

.header-search-form input[type="search"]{
  width:180px;
  min-height:44px;
  padding:.55rem .75rem;
  border:1px solid var(--ml-border);
  border-radius:999px;
  font:inherit;
  background:#fff;
}

.header-search-form button{
  width:44px;
  height:44px;
  border:1px solid var(--ml-border);
  border-radius:999px;
  background:#fff;
  color:var(--ml-primary-dark);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.header-search-form button:before{
  content:"";
  width:19px;
  height:19px;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.5 3a6.5 6.5 0 0 1 5.17 10.45l5.44 5.44-1.42 1.42-5.44-5.44A6.5 6.5 0 1 1 9.5 3m0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9.5 3a6.5 6.5 0 0 1 5.17 10.45l5.44 5.44-1.42 1.42-5.44-5.44A6.5 6.5 0 1 1 9.5 3m0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9'/%3E%3C/svg%3E") center / contain no-repeat;
}

.header-search-form button span{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
}

.header-search-form input[type="search"]:focus,
.header-search-form button:focus{
  outline:4px solid var(--ml-focus) !important;
  outline-offset:3px;
}

.site-search-toggle,
.site-search-panel{
  display:none !important;
}

@media (max-width:1100px){
  .header-search-form{
    order:3;
    grid-column:1 / -1;
    width:100%;
    margin-top:.75rem;
  }

  .header-search-form input[type="search"]{
    width:100%;
  }
}


/* V7.2 PRO - Ricerca header forzata */
.mlpa-header-search{
  display:flex !important;
  align-items:center;
  gap:.35rem;
  margin-left:1rem;
  flex:0 0 auto;
}

.mlpa-header-search label{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
}

.mlpa-header-search input[type="search"]{
  width:190px;
  min-height:44px;
  padding:.55rem .8rem;
  border:1px solid var(--ml-border);
  border-radius:999px;
  font:inherit;
  background:#fff;
}

.mlpa-header-search button{
  width:44px;
  height:44px;
  border:1px solid var(--ml-border);
  border-radius:999px;
  background:#fff;
  color:var(--ml-primary-dark);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:0;
}

.mlpa-header-search button::before{
  content:"🔍";
  font-size:1.05rem;
  line-height:1;
}

.mlpa-header-search input[type="search"]:focus,
.mlpa-header-search button:focus{
  outline:4px solid var(--ml-focus) !important;
  outline-offset:3px;
}

@media (max-width:1150px){
  .mlpa-header-search{
    order:10;
    width:100%;
    margin-left:0;
    margin-top:.75rem;
  }

  .mlpa-header-search input[type="search"]{
    width:100%;
    flex:1;
  }
}


/* V7.3 PRO - Smart sticky header accessibile */
.site-header{
  position:sticky !important;
  top:0;
  z-index:3000;
  transform:translateY(0);
  transition:transform .24s ease, box-shadow .24s ease;
  will-change:transform;
}

.site-header.is-hidden{
  transform:translateY(-110%);
}

.site-header.is-scrolled{
  box-shadow:0 8px 22px rgba(13,71,161,.10);
}

body.has-smart-header{
  scroll-padding-top:110px;
}

/* Non nascondere mai durante focus/uso tastiera */
.site-header:focus-within{
  transform:translateY(0) !important;
}

/* Stato menu mobile aperto */
body.menu-open .site-header{
  transform:translateY(0) !important;
}

/* Ricerca aperta o in focus */
body.search-active .site-header{
  transform:translateY(0) !important;
}

/* Accessibilità: riduzione movimento */
@media (prefers-reduced-motion: reduce){
  .site-header{
    transition:none !important;
  }
}


/* V7.4 PRO - risultati ricerca impaginati + sticky header corretto */

/* Sticky header più robusto */
.site-header{
  position:fixed !important;
  top:0 !important;
  left:0;
  right:0;
  z-index:9999 !important;
  width:100%;
  transform:translateY(0);
  transition:transform .24s ease, box-shadow .24s ease;
  will-change:transform;
}

body.admin-bar .site-header{
  top:32px !important;
}

.site-header.is-hidden{
  transform:translateY(-115%) !important;
}

.site-header.is-scrolled{
  box-shadow:0 8px 22px rgba(13,71,161,.14) !important;
}

body.has-smart-header{
  padding-top:var(--ml-header-height, 96px);
  scroll-padding-top:calc(var(--ml-header-height, 96px) + 16px);
}

.site-header:focus-within,
body.menu-open .site-header,
body.search-active .site-header{
  transform:translateY(0) !important;
}

@media (max-width:782px){
  body.admin-bar .site-header{
    top:46px !important;
  }
}

@media (prefers-reduced-motion: reduce){
  .site-header{
    transition:none !important;
  }
}

/* Ricerca header resta visibile e ordinata */
.mlpa-header-search{
  display:flex !important;
}

/* Pagina risultati ricerca */
.search-results-layout{
  margin:2rem auto 4rem !important;
}

.search-results-layout .page-shell{
  margin-bottom:1.5rem;
  padding:1.25rem !important;
}

.search-type-section{
  margin:1.6rem 0 !important;
  padding:1.5rem !important;
  border:1px solid var(--ml-border) !important;
  border-radius:10px !important;
  background:#FFFFFF !important;
  box-shadow:var(--ml-shadow-sm) !important;
}

.search-type-section h2{
  margin:0 0 1rem !important;
  color:var(--ml-primary-dark) !important;
  font-size:clamp(1.55rem, 2.4vw, 2.15rem);
}

.search-result-list{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:1rem !important;
}

.search-result-item{
  padding:1.1rem !important;
  border:1px solid var(--ml-border) !important;
  border-radius:10px !important;
  background:#F7F9FB !important;
  min-width:0;
}

.search-result-item h3{
  margin:.55rem 0 .45rem !important;
  font-size:1.18rem;
  line-height:1.25;
}

.search-result-item h3 a{
  color:var(--ml-primary-dark);
}

.search-result-item p{
  margin:0 !important;
  color:#495057;
  line-height:1.6;
}

.search-type-badge{
  display:inline-flex !important;
  align-items:center;
  width:max-content;
  padding:.28rem .65rem !important;
  border-radius:999px !important;
  background:#F0F9EA !important;
  color:#004B23 !important;
  border:1px solid #CFE5D6 !important;
  font-size:.9rem !important;
  font-weight:700 !important;
}

@media (max-width:900px){
  .search-result-list{
    grid-template-columns:1fr;
  }
}


/* V7.5 PRO - mobile pulito: no cerca, no sticky */
@media (max-width: 1024px){
  .mlpa-header-search,
  .header-search-form,
  .site-search-toggle,
  .site-search-panel{
    display:none !important;
  }

  .site-header{
    position:relative !important;
    top:auto !important;
    transform:none !important;
    transition:none !important;
    z-index:1000 !important;
  }

  .site-header.is-hidden{
    transform:none !important;
  }

  body.has-smart-header{
    padding-top:0 !important;
    scroll-padding-top:0 !important;
  }

  body.admin-bar .site-header{
    top:auto !important;
  }

  .site-branding{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:1rem !important;
    flex-wrap:nowrap !important;
  }

  .brand-wrap{
    display:flex !important;
    align-items:center !important;
    gap:.75rem !important;
    min-width:0 !important;
    flex:1 1 auto !important;
  }

  .site-logo-custom,
  .custom-logo-link{
    flex:0 0 auto !important;
    display:inline-flex !important;
    align-items:center !important;
  }

  .site-logo-custom img,
  .custom-logo{
    max-width:150px !important;
    max-height:58px !important;
    width:auto !important;
    height:auto !important;
    display:block !important;
  }

  .site-title-wrap{
    min-width:0 !important;
  }

  .menu-toggle{
    flex:0 0 auto !important;
    margin-left:auto !important;
  }
}

@media (max-width: 520px){
  .site-logo-custom img,
  .custom-logo{
    max-width:128px !important;
    max-height:52px !important;
  }
}


/* V8.7 PRO Restore - ripristino armonia V7.5 + funzioni V8 selezionate */

/* Mantiene breadcrumbs/page banner della V7: nessun hide globale */
.page-banner{
  display:block !important;
}

/* Uniformazione SOLO sotto il breadcrumbs */
.page-shell,
.entry-shell,
.archive-editable-intro{
  max-width:1180px;
  margin:2.6rem auto !important;
  padding:2.2rem !important;
  border:1px solid var(--ml-border) !important;
  border-radius:18px !important;
  background:#fff !important;
  box-shadow:var(--ml-shadow-sm) !important;
  box-sizing:border-box;
}

/* Evita forzature aggressive su Gutenberg */
.entry-content .wp-block-columns{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:1.5rem !important;
  align-items:stretch !important;
  margin:1.5rem 0 !important;
}

.entry-content .wp-block-columns > .wp-block-column{
  flex:1 1 280px !important;
  min-width:280px !important;
  margin-left:0 !important;
}

/* Card solo dove presenti, con proporzioni controllate */
.entry-content .mlpa-editable-card,
.entry-content .contatti-info-box,
.entry-content .mlpa-content-box,
.entry-content .wp-block-column > .wp-block-group{
  min-height:0 !important;
  height:auto !important;
  padding:1.45rem !important;
  border:1px solid var(--ml-border) !important;
  border-radius:12px !important;
  background:#fff !important;
  box-shadow:0 8px 18px rgba(13,71,161,.05) !important;
  box-sizing:border-box !important;
  overflow-wrap:anywhere !important;
}

.entry-content .mlpa-editable-card h3,
.entry-content .contatti-info-box h3,
.entry-content .mlpa-content-box h3,
.entry-content .wp-block-column > .wp-block-group h3{
  margin-top:0 !important;
  color:var(--ml-primary-dark) !important;
  font-size:1.35rem !important;
  line-height:1.22 !important;
}

.entry-content .mlpa-editable-card p,
.entry-content .contatti-info-box p,
.entry-content .mlpa-content-box p,
.entry-content .wp-block-column > .wp-block-group p{
  line-height:1.65 !important;
}

/* Loop dinamici sempre separati dall'intro */
.training-loop,
.archive-loop,
.posts-grid,
.archive-grid,
.materials-grid,
.events-grid,
.paths-grid{
  clear:both !important;
  margin-top:2.4rem !important;
  position:relative !important;
  z-index:1 !important;
}

/* Gallerie fotografiche */
.mlpa-gallery-section{
  margin:2rem 0;
  padding:1.4rem;
  border:1px solid var(--ml-border);
  border-radius:10px;
  background:#fff;
  box-shadow:var(--ml-shadow-sm);
}

.mlpa-gallery-section h2{
  margin:0 0 1rem;
  color:var(--ml-primary-dark);
}

.mlpa-gallery-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1rem;
}

.mlpa-gallery-item{
  display:block;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--ml-border);
  background:#F7F9FB;
  aspect-ratio:4/3;
  cursor:pointer;
}

.mlpa-gallery-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .2s ease;
}

.mlpa-gallery-item:hover img,
.mlpa-gallery-item:focus img{
  transform:scale(1.03);
}

.mlpa-gallery-item:focus-visible{
  outline:4px solid var(--ml-focus);
  outline-offset:4px;
}

/* Lightbox accessibile */
.mlpa-lightbox{
  position:fixed;
  inset:0;
  z-index:20000;
  display:none;
  align-items:center;
  justify-content:center;
  padding:1.25rem;
  background:rgba(0,0,0,.82);
}

.mlpa-lightbox.is-open{
  display:flex;
}

.mlpa-lightbox-dialog{
  position:relative;
  width:min(100%,1080px);
  max-height:calc(100vh - 2.5rem);
  background:#111827;
  border-radius:12px;
  padding:1rem;
  color:#fff;
  box-shadow:0 22px 80px rgba(0,0,0,.45);
}

.mlpa-lightbox-figure{
  margin:0;
  display:grid;
  gap:.85rem;
}

.mlpa-lightbox-image{
  display:block;
  width:100%;
  max-height:calc(100vh - 170px);
  object-fit:contain;
  border-radius:8px;
  background:#000;
}

.mlpa-lightbox-caption{
  margin:0;
  color:#F4F8FB;
  line-height:1.5;
  font-size:1rem;
}

.mlpa-lightbox-close,
.mlpa-lightbox-prev,
.mlpa-lightbox-next{
  position:absolute;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  min-height:44px;
  border:2px solid #fff;
  border-radius:999px;
  background:#fff;
  color:#0D47A1;
  font-weight:700;
  cursor:pointer;
  z-index:2;
}

.mlpa-lightbox-close{top:.75rem;right:.75rem}
.mlpa-lightbox-prev,.mlpa-lightbox-next{top:50%;transform:translateY(-50%);font-size:1.6rem}
.mlpa-lightbox-prev{left:.75rem}
.mlpa-lightbox-next{right:.75rem}

.mlpa-lightbox-close:hover,
.mlpa-lightbox-close:focus,
.mlpa-lightbox-prev:hover,
.mlpa-lightbox-prev:focus,
.mlpa-lightbox-next:hover,
.mlpa-lightbox-next:focus{
  background:#FFB703;
  color:#000;
}

body.mlpa-lightbox-open{overflow:hidden}

/* Cookie notice */
.mlpa-cookie-notice{
  position:fixed;
  left:1rem;
  right:1rem;
  bottom:1rem;
  z-index:10000;
  display:none;
  max-width:980px;
  margin:0 auto;
  padding:1rem;
  border:1px solid var(--ml-border);
  border-radius:10px;
  background:#fff;
  color:#212529;
  box-shadow:0 18px 48px rgba(0,0,0,.18);
}

.mlpa-cookie-notice.is-visible{display:block}
.mlpa-cookie-notice-inner{display:flex;align-items:center;gap:1rem;justify-content:space-between}
.mlpa-cookie-notice p{margin:0;line-height:1.55}
.mlpa-cookie-actions{display:flex;flex-wrap:wrap;gap:.5rem;flex:0 0 auto}
.mlpa-cookie-actions button,.mlpa-cookie-actions a{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.55rem .85rem;
  border-radius:8px;
  font-weight:700;
}
.mlpa-cookie-actions button{border:0;background:var(--ml-primary);color:#fff;cursor:pointer}
.mlpa-cookie-actions a{border:1px solid var(--ml-primary);color:var(--ml-primary);background:#fff;text-decoration:none}

/* Mobile */
@media (max-width:900px){
  .mlpa-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:760px){
  .page-shell,
  .entry-shell,
  .archive-editable-intro{
    margin:1.4rem auto !important;
    padding:1.25rem !important;
    border-radius:14px !important;
  }

  .entry-content .wp-block-columns{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:1rem !important;
  }

  .entry-content .wp-block-columns > .wp-block-column{
    min-width:0 !important;
    width:100% !important;
  }

  .mlpa-gallery-grid{grid-template-columns:1fr}

  .mlpa-cookie-notice-inner{display:grid;gap:.9rem}
  .mlpa-cookie-actions{width:100%}
  .mlpa-cookie-actions button,.mlpa-cookie-actions a{flex:1 1 auto}
}

@media (prefers-reduced-motion: reduce){
  .mlpa-gallery-item img,
  .mlpa-lightbox,
  .mlpa-lightbox *,
  .mlpa-cookie-notice{
    transition:none !important;
    animation:none !important;
  }
}


/* V9.0 PRO Restore - intestazione modificabile e titoli uniformi */

/* Uniforma titoli banner/breadcrumbs */
.page-banner .entry-title,
.archive-banner .entry-title,
.archive-hero .entry-title,
.page-hero .entry-title,
.page-banner h1,
.archive-banner h1,
.archive-hero h1,
.page-hero h1{
  font-size:clamp(2.7rem,5vw,4.6rem) !important;
  line-height:1.02 !important;
  letter-spacing:-.045em !important;
  color:var(--ml-primary-dark) !important;
}

/* Uniforma riga 1 e sottotitolo */
.page-banner .breadcrumbs,
.archive-banner .breadcrumbs,
.archive-hero .breadcrumbs,
.page-hero .breadcrumbs{
  font-size:1rem !important;
  color:#586574 !important;
  margin-bottom:.55rem !important;
}

.page-banner .entry-subtitle,
.archive-banner .entry-subtitle,
.archive-hero .entry-subtitle,
.page-hero .entry-subtitle{
  max-width:780px !important;
  font-size:1.12rem !important;
  line-height:1.6 !important;
  color:#4B5563 !important;
}

/* Uniforma anche i titoli dentro la shell */
.page-shell .entry-content > h1:first-child,
.page-shell .entry-content > h2:first-child,
.entry-shell .entry-content > h1:first-child,
.entry-shell .entry-content > h2:first-child{
  font-size:clamp(2.15rem,4vw,3.4rem) !important;
  line-height:1.06 !important;
  letter-spacing:-.035em !important;
  color:var(--ml-primary-dark) !important;
}

/* News/Eventi/Formazione: blocchi sotto breadcrumbs come Percorsi */
body.page-slug-news .page-shell,
body.page-slug-eventi .page-shell,
body.page-slug-formazione .page-shell{
  max-width:1180px !important;
  margin:2.6rem auto !important;
  padding:2.2rem !important;
  border:1px solid var(--ml-border) !important;
  border-radius:18px !important;
  background:#fff !important;
  box-shadow:var(--ml-shadow-sm) !important;
  box-sizing:border-box !important;
}

body.page-slug-news .page-shell .mlpa-uniform-boxes,
body.page-slug-eventi .page-shell .mlpa-uniform-boxes,
body.page-slug-formazione .page-shell .mlpa-uniform-boxes{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:1.5rem !important;
  align-items:stretch !important;
  width:100% !important;
  margin:1.5rem 0 0 !important;
}

body.page-slug-news .page-shell .mlpa-uniform-boxes > .wp-block-column,
body.page-slug-eventi .page-shell .mlpa-uniform-boxes > .wp-block-column,
body.page-slug-formazione .page-shell .mlpa-uniform-boxes > .wp-block-column{
  min-width:0 !important;
  width:auto !important;
  flex:none !important;
  margin-left:0 !important;
}

body.page-slug-news .page-shell .mlpa-uniform-boxes .mlpa-editable-card,
body.page-slug-eventi .page-shell .mlpa-uniform-boxes .mlpa-editable-card,
body.page-slug-formazione .page-shell .mlpa-uniform-boxes .mlpa-editable-card{
  height:100% !important;
  min-height:0 !important;
  padding:1.45rem !important;
  border:1px solid var(--ml-border) !important;
  border-radius:12px !important;
  background:#fff !important;
  box-shadow:0 8px 18px rgba(13,71,161,.05) !important;
  box-sizing:border-box !important;
}

body.page-slug-news .page-shell .mlpa-uniform-boxes .mlpa-editable-card h3,
body.page-slug-eventi .page-shell .mlpa-uniform-boxes .mlpa-editable-card h3,
body.page-slug-formazione .page-shell .mlpa-uniform-boxes .mlpa-editable-card h3{
  margin-top:0 !important;
  margin-bottom:.75rem !important;
  color:var(--ml-primary-dark) !important;
  font-size:1.35rem !important;
  line-height:1.22 !important;
}

/* Campi metabox */
.mlpa-admin-field{
  margin:0 0 14px;
}
.mlpa-admin-field label{
  display:block;
  font-weight:600;
  margin-bottom:5px;
}
.mlpa-admin-field input,
.mlpa-admin-field textarea{
  width:100%;
}

/* Mobile */
@media (max-width:760px){
  .page-banner .entry-title,
  .archive-banner .entry-title,
  .archive-hero .entry-title,
  .page-hero .entry-title,
  .page-banner h1,
  .archive-banner h1,
  .archive-hero h1,
  .page-hero h1{
    font-size:2.6rem !important;
  }

  body.page-slug-news .page-shell .mlpa-uniform-boxes,
  body.page-slug-eventi .page-shell .mlpa-uniform-boxes,
  body.page-slug-formazione .page-shell .mlpa-uniform-boxes{
    grid-template-columns:1fr !important;
  }
}


/* V9.1 PRO Restore - campo metabox breadcrumbs forzato */
.mlpa-v91-page-banner .breadcrumbs,
.mlpa-v91-page-banner .entry-title,
.mlpa-v91-page-banner .entry-subtitle{
  display:block;
}


/* V10.0 PRO FINAL - PA/AGID Ready */

/* Cookie bar interna disattivata: gestione affidata al plugin cookie installato */
.mlpa-cookie-notice,
#mlpa-cookie-notice{
  display:none !important;
}

/* News/Formazione responsive: su mobile una sola card per riga */
@media (max-width: 900px){
  body.page-slug-news .posts-grid,
  body.page-slug-news .archive-grid,
  body.page-slug-news .archive-loop,
  body.page-slug-news .training-loop,
  body.page-slug-formazione .posts-grid,
  body.page-slug-formazione .archive-grid,
  body.page-slug-formazione .archive-loop,
  body.page-slug-formazione .training-loop,
  body.category-news .posts-grid,
  body.category-news .archive-grid,
  body.category-formazione .posts-grid,
  body.category-formazione .archive-grid{
    display:grid !important;
    grid-template-columns:1fr !important;
  }

  body.page-slug-news .card,
  body.page-slug-formazione .card,
  body.category-news .card,
  body.category-formazione .card{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }
}

/* Caroselli news/eventi su mobile: card leggibile, non stretta */
@media (max-width: 760px){
  .dynamic-carousel,
  .mlpa-carousel,
  .home-news-carousel,
  .home-events-carousel{
    overflow:hidden !important;
  }

  .dynamic-carousel .card,
  .mlpa-carousel .card,
  .home-news-carousel .card,
  .home-events-carousel .card{
    min-width:100% !important;
    width:100% !important;
    max-width:100% !important;
  }

  .carousel-track,
  .dynamic-carousel-track,
  .mlpa-carousel-track{
    display:flex !important;
    gap:1rem !important;
  }
}

/* Rifinitura contrasto/focus PA */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible{
  outline:4px solid var(--ml-focus) !important;
  outline-offset:3px !important;
}

/* Evita overflow orizzontale in mobile */
html,
body{
  max-width:100%;
  overflow-x:hidden;
}

img,
video,
iframe{
  max-width:100%;
}
