/* =========================================================

 THEME: SLIM LEGACY v1.2 (PA) / CATBIRD 2025/26
 WCAG/WAI ACCESSIBILITY
 CSS overrides for website accessibility
 
 ACCESSIBILITÀ WCAG/WAI
 CSS di override per l’accessibilità del sito web
  
 ========================================================= */


.visually-hidden {
  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
 ========================================= */

/*
.skiplink {
  position: absolute;
  top: 0;
  left: 10px;
  transform: translateY(-120%);
  background: var(--pa-primary);
  color: #fff;
  padding: 8px 14px;
  z-index: 10000;
  text-decoration: none;
}
.skiplink:focus {
  transform: translateY(10px);
  outline: 2px solid #fff;
  background: var(--pa-primary-dark);
  color: #fff!important;
}

.skiplink:hover {
  color: #ffffff;
}*/

/* SKIPLINK – forza contrasto (sovrascrive qualsiasi stile globale sui link) */
html body a.skiplink,
html body a.skiplink:link,
html body a.skiplink:visited,
html body a.skiplink:hover,
html body a.skiplink:focus,
html body a.skiplink:focus-visible{
  color:#fff !important;
  text-decoration: none;
}

/* Sfondo */
html body a.skiplink{
  background-color: var(--pa-primary) !important;
}

/* Stato focus */
html body a.skiplink:focus,
html body a.skiplink:focus-visible{
  background-color: var(--pa-primary-dark) !important;

  /* focus ring leggibile anche su sfondo bianco */
  outline: none;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px #0a0a0a;
}

a.skiplink:focus,
a.skiplink:focus-visible{
  left: 12px !important;
  top: 12px !important;

  max-width: calc(100vw - 24px) !important; /* non esce dai bordi */
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}


/* =========================================
ACC TOOLBAR
 ========================================= */

/* Focus visibile SOLO quando l’utente attiva "Navigazione da tastiera" nel toolbox */

body.mic-safe-keyboard-focus :focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* fallback per browser senza :focus-visible */

body.mic-safe-keyboard-focus :focus {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}


/* =========================================
    SLIDER
    ARROWS WITH CIRCULAR FOCUS
    ========================================= */

.slides-navigation a {
  width: 50px;                
  height: 50px;               
  line-height: 50px;           /* centra la freccia verticalmente */
  text-align: center;
  border-radius: 50%;          /* forma cerchio */
  display: flex;               /* per centrare il contenuto */
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
}

/* Focus circolare */

.slides-navigation a:focus {
  outline: 3px solid #fff;
  outline-offset: 4px;
  border-radius: 50%;          /* garantisce il cerchio */
}

.slides-navigation a.prev {
	left: 20px !important;     /* aumenta la distanza dal bordo sinistro */
}

.slides-navigation a.next {
	right: 20px !important;    /* aumenta la distanza dal bordo destro */
}


/* =========================================
  SMARTMENUS
  ACCESSIBLE VERSION
  ========================================= */
  
  .visually-hidden{
    position:absolute!important;
    width:1px;height:1px;
    padding:0;margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
  }
 
 /* Reset minimi necessari */
 
 #main-menu,
 #main-menu ul {
   list-style: none;
   margin: 0;
   padding: 0;
 }
 
 /* Ogni <li> è un contenitore di riferimento */
 
 #main-menu li {
   position: relative;
 }
 
 /* SOTTOMENU — stile del tema, ma con dimensione FIXATA */
 
 #main-menu li > ul {
   min-width: 100% !important;     /* porta il menu a tutta la larghezza */
   /*max-width: 100% !important; */     
   /*width: 100% !important;   */   
   /*white-space: nowrap !important; */ 
 }

 /* Apertura con TASTIERA: focus su <a> o contenuto interno */
 
 #main-menu li:focus-within > ul {
   display: block;
 }
 
 /* Focus dei link del menu */
 
 #main-menu a:focus {
   outline: 2px solid var(--pa-focus);
   outline-offset: -2px;
   border-radius: 3px;
 }
 
 /* Link interni ai submenu */
 #main-menu li > ul a {
   display: block;
   padding: 8px 12px;
 }
 
 #main-menu li {
	 position: relative;
 }

/* =========================================
    LANGUAGE SWITCHER
    ACCESSIBLE (KEYBOARD + MOUSE)
    ========================================= */

  /* Nascondi di default */
  
  .slim-language .slim-lang-submenu {
	  display: none !important;
	  position: absolute !important;
	  left: 0;
	  top: 100%;
	  background: #fff;
	  border: 1px solid var(--pa-border-dark);
	  min-width: 10em;
	  z-index: 9999;
  }
  
  /* Apri solo con hover o focus */
  
  .slim-language li:hover > ul,
  .slim-language li:focus-within > ul {
	  display: block !important;
  }
  
  /* Focus styling */
  .slim-language a:focus {
	  outline: 2px solid var(--pa-focus);
	  outline-offset: -2px;
	  border-radius: 3px;
  }


/* =========================================
    FOCUS VISIBLE
    (WCAG 2.4.7 – REQUIRED)
    ========================================= */
 
:focus {
  outline: 3px solid var(--pa-focus) !important;       /* blu accessibile */
  outline-offset: 2px !important;
}

/* Link generici */
a:focus {
  outline: 3px solid var(--pa-focus) !important;
  border-radius: 2px;
}

/* Pulsanti */
button:focus {
  outline: 3px solid var(--pa-focus) !important;
  outline-offset: 2px;
  /*background-color: inherit!important;*/
}

/* Navigazione slider */
.slides-navigation a:focus {
  outline: 3px solid #ffffff !important;
  border-radius: 50%;
}

/* Language switcher */
.slim-lang-current:focus,
.slim-lang-submenu a:focus {
  outline: 3px solid var(--pa-focus) !important;
  border-radius: 3px;
}


/* =========================================
    GENERAL CONTRAST
    (TEXT / CAPTIONS / ELEMENTS)
    ========================================= */

/* Migliora leggibilità testi generici */
p, li {
  color: #333 !important;   /* contrasto AA su sfondo chiaro */
}

/* Caption slider */
.contrast-caption {
  background-color: rgba(0, 0, 0, 0.55) !important;
  color: #ffffff !important;
}

.container-caption {
  color: #ffffff !important;
}


/* =========================================
    SLIDER – PAUSE / PLAY BUTTON
    ========================================= */


 #slider-toggle {
   position: absolute;
   bottom: 5px;
   right: 15px;
   z-index: 999;
 
   padding: 8px 20px;
   background: rgba(0,0,0,0.55);
   color: #fff;
   border: none;
   cursor: pointer;
 
   border-radius: 999px;         /* forma PILLS */
   font-size: 14px;
   font-weight: 500;
 
   display: inline-flex;
   align-items: center;
   justify-content: center;
 
   white-space: nowrap;
   transition: background 0.3s ease, outline 0.2s ease;
 }
 
 #slider-toggle:hover,
 #slider-toggle:focus {
   background: rgba(0,0,0,0.75);
   outline: 2px solid #fff;
   outline-offset: 4px;
 }
 
 .slider-toggle {
   background: var(--pa-primary) !important;
   color: #fff !important;
   border-radius: 6px !important;
   border: 0px;
   background-color: transparent;
   display: inline-block;
   font-size: 0.875rem;
   text-shadow: 0 1px rgba(255, 255, 255, 0.75);
   padding: 0px 10px 0px 3px;
   cursor: pointer;
 }
 
 .slider-toggle:hover,
 .slider-toggle:focus {
   background: var(--pa-primary-dark) !important;
 }

 
 /* =========================================
    SECONDARY NAVIGATION – FA7 ICONS (FIX)
    ========================================= */
 
 
 /* Icona base (voce normale) */
 
 aside .slim-nav li > a::before {
	 font-family: "Font Awesome 7 Free";
	 font-weight: 900; /* solid → necessario per FA7 */
	 content: "\f054"; /* chevron-right */
	 margin-right: 8px;
	 color: var(--pa-primary);
	 font-size: 0.85rem;
	 width: 1rem;
	 display: inline-block;
 }
 
 /* Icona voce attiva */
 aside .slim-nav li > a[aria-current="page"]::before {
	 font-family: "Font Awesome 7 Free";
	 font-weight: 900;
	 content: "\f111"; /* circle solid */
	 color: var(--pa-primary-light);
 }
 
 /* Submenu chiuso */
 aside .slim-nav li.has-sub > a::before {
	 font-family: "Font Awesome 7 Free";
	 font-weight: 900;
	 content: "\f054"; /* chevron-right */
	 color: var(--pa-primary-dark);
 }
 
 /* Submenu aperto */
 aside .slim-nav li.active > a::before,
 aside .slim-nav li.open > a::before {
	 font-family: "Font Awesome 7 Free";
	 font-weight: 900;
	 content: "\f078"; /* chevron-down */
	 color: var(--pa-primary);
 }
 
 /* Hover */
 aside .slim-nav li > a:hover::before {
	 color: var(--pa-primary-dark);
 }

 /* =========================================
    FOOTER – FULL ACCESSIBLE PALETTE (MiC)
    ========================================= */

 
 .slim-bg-footer,
 .slim-bg-footer * {
   color: #ffffff !important;
 }
 
 .slim-bg-footer h5 {
   color: #ffffff !important;
   font-weight: 700 !important;
   text-transform: uppercase;
   letter-spacing: 1px;
 }
 
 /* Link */
 .slim-bg-footer a {
   color: #ffffff !important;
   text-decoration: underline;
 }
 
 .slim-bg-footer a:hover {
    color: #ffffff !important;
  }
 
 .slim-bg-footer a:focus {
   color: var(--pa-primary-extra-light) !important; 
 }
 
 /* Icone freccia */
 .slim-bg-footer i {
   color: #ffffff !important;
 }
 
 /* =========================================
    FOOTER – SOCIAL
    ========================================= */
 
 .slim-bg-footer-social,
 .slim-bg-footer-social * {
   color: #ffffff !important;
 }
 
 .slim-bg-footer-social a:hover {
   text-decoration: underline!important;
 }
 
 .slim-bg-footer-social i {
   color: #ffffff !important;
 }
 
 /* =========================================
    MINI FOOTER
    ========================================= */
 
 .slim-mini-footer,
 .slim-mini-footer * {
   color: #ffffff !important;
 }
 
 .slim-mini-footer a:hover,
 .slim-mini-footer a:focus {
   color: var(--pa-primary-extra-light) !important;
 }
 
 /* Titoli */
 .slim-mini-footer strong {
   font-weight: 700 !important;
 }

 /* =========================================
    LOGOS – ACCESSIBILITY
    ========================================= */

/* Le immagini dei loghi NON devono avere bordo al focus */

.slim-logo-footer img:focus {
  outline: 3px solid var(--pa-primary-extra-light) !important;
}


 /* =========================================
    MIX
    ========================================= */

/* Migliora leggibilità testi piccoli */

small {
  color: #e7eef5 !important;
}

/* Migliora contrasto nei link dentro caption */

.container-caption a {
  color: #ffffff !important;
}

/* Evita sottolineature doppie per icone */

a i {
  pointer-events: none;
}

/* =========================================================
   More comfortable reading text + minimum size for small text
   ========================================================= */

/* 1) Aumenta SOLO il contenuto principale (non header/menu) */

#cb-main-content {
  font-size: 1.0625rem; /* 17px */
  line-height: 1.7;
}

/* opzionale: un filo più grande su schermi larghi */

@media (min-width: 1200px) {
  #cb-main-content { font-size: 1.125rem; } /* 18px */
}


/* Testi che vengono consultati dagli screenreader */

.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;
}


