* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1100px;
  margin: auto;
}

body {
  background: #1b1c1e;
  line-height: 1.6;
  font-family: 'Merriweather Sans', sans-serif;
  color: #fff;
}

a {
  position: relative;
  text-decoration: none;
  color: #fff;
  transition: color 0.3s ease;
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #e63946;
  transition: width 0.3s ease;
}

a:hover {
  color: #e63946;
}

a:hover::after {
  width: 100%;
}

::selection {
  background: #e63946;
  color: #fff;
}

h1,
h2,
h3 {
  font-weight: 600;
  font-family: 'Merriweather Sans', sans-serif;
}

/* HEADER */

.header-top {
  display: flex;
  justify-content: center;
  align-content: center;
  margin-bottom: 15px;
}

.header {
  background: #000;
  text-align: center;
  padding: 40px 0 18px;
  border-bottom: 1px solid #222;
}

.logo {
  display: flex;
  justify-content: center;
  align-content: center;
}

.logo img {
  display: block;
  width: 200px;
  height: auto;
  margin: 0 auto 15px;
}

/* MENU */

.menu {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 30px;
  border-top: 1px solid #222;
  padding: 10px 0;
}

.menu > li {
  position: relative;
}

.menu a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
}

.menu a:hover {
  opacity: 1;
}

/* SOTTOMENU */

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #000;
  padding: 10px;
  min-width: 120px;
  text-align: left;
  list-style: none;
  z-index: 100;
  border-top: 2px solid #e63946;
}

.menu li:hover .submenu {
  display: block;
}

.submenu li {
  padding: 5px 0;
}

.submenu a {
  display: block;
  font-size: 11px;
  white-space: nowrap;
}

/* MENU ATTIVO */

/* MENU NOTÌTZIAS ATTIVO: TESTO BIANCO, LINEA ROSSA */

.menu > li.active > a {
  color: #fff;
  opacity: 1;
}

.menu > li.active > a::after {
  width: 100%;
  background: #e63946;
}

.menu > li.active > a:hover,
.menu > li.active > a:focus-visible {
  color: #e63946;
}

/* BREADCRUMB */

.breadcrumb {
  max-width: 900px;
  margin: 30px auto 0;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #aaa;
  font-size: 13px;
}

.breadcrumb a {
  color: #ccc;
}

.breadcrumb a:hover {
  color: #e63946;
}

/* INTRO */

.archivio-intro {
  max-width: 900px;
  margin: 45px auto 30px;
  background: #232426;
  color: #d9d2c7;
  padding: 32px 35px;
  border-left: 5px solid #e63946;
}

.archivio-intro h2 {
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.archivio-intro h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  background: #e63946;
  margin-top: 8px;
}

.archivio-intro p {
  font-size: 15px;
  line-height: 1.8;
}

/* RICERCA */

.ricerca-box {
  max-width: 900px;
  margin: 45px auto 30px;
  padding: 22px;
  background: #f4f1ea;
  border-left: 5px solid #e63946;
  color: #1b1c1e;
}

.ricerca-box label {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.ricerca-box input {
  width: 100%;
  padding: 14px;
  border: 1px solid #ccc;
  background: #fff;
  color: #1b1c1e;
  font-family: 'Merriweather Sans', sans-serif;
  font-size: 14px;
}

/* ANNO */

.anno {
  max-width: 900px;
  margin: 45px auto 20px;
  padding: 0 20px;
}

.anno h1 {
  font-size: 28px;
  border-left: 4px solid #e63946;
  padding-left: 10px;
  color: #ccc;
}

/* LISTA NOTIZIE */

.archivio-lista {
  max-width: 900px;
  margin: auto;
  padding: 0 20px;
}

.archivio-item {
  background: #f4f1ea;
  color: #1b1c1e;
  padding: 22px;
  margin-bottom: 20px;
  border-left: 5px solid #e63946;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.archivio-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.archivio-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #e63946;
  font-weight: 600;
}

.archivio-titolo {
  display: block;
  color: #1b1c1e;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
}

.archivio-titolo:hover {
  color: #e63946;
}

.archivio-descrizione {
  margin-top: 8px;
  color: #444;
  font-size: 14px;
  line-height: 1.7;
}

/* LINK ARTICOLO */

.archivio-link {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
}

.archivio-link a {
  color: #e63946;
  font-size: 13px;
  font-weight: 700;
}

.archivio-link a::after {
  background: #e63946;
}

/* NAVIGAZIONE ANNI */

.navigazione-anni {
  max-width: 900px;
  margin: 50px auto;
  padding: 25px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid #333;
}

.navigazione-anni a {
  font-size: 14px;
}

.navigazione-anni a.active {
  color: #e63946;
  font-weight: 700;
}

/* PULSANTE FINALE */

.azioni-finali {
  text-align: center;
  margin: 50px 0 20px;
}

.ritorna-archivio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.ritorna-archivio::after {
  display: none;
}

.ritorna-archivio:hover {
  background: #e63946;
  border-color: #e63946;
  color: #fff;
}

/* FOOTER */

.footer {
  text-align: center;
  color: #fff;
  padding: 40px 20px;
  font-size: 14px;
}

.footer p {
  margin-bottom: 8px;
}

.copyright {
  font-size: 13px;
  color: #aaa;
}

/* NESSUN RISULTATO */

#nessunRisultato {
  max-width: 900px;
  margin: 35px auto;
  padding: 25px;
  background: #232426;
  border-left: 5px solid #e63946;
  color: #d9d2c7;
  text-align: center;
}

[hidden] {
  display: none !important;
}

/* MIGLIORIE */

html {
  scroll-behavior: smooth;
}

/* ==================================================
   MENU HAMBURGER - BASE DESKTOP
================================================== */

.nav {
  position: relative;
}

.menu-toggle {
  display: none;
}

.submenu-toggle {
  position: relative;
  padding: 0;
  background: none;
  border: none;
  color: #fff;
  font-family: 'Merriweather Sans', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
  cursor: pointer;
}

.submenu-toggle:hover {
  color: #fff;
  opacity: 1;
}

.submenu-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #e63946;
  transition: width .3s ease;
}

.submenu-toggle:hover::before {
  width: 100%;
}

.menu > li.active > .submenu-toggle {
  color: #fff;
  opacity: 1;
}

.menu > li.active > .submenu-toggle::before {
  width: 100%;
}

/* ==================================================
   ARCHIVIO NOTIZIE
   SCROLL INTERNO DESKTOP
================================================== */

@media (min-width: 769px) {

  .archivio-lista {
    max-height: 650px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 22px;
    scrollbar-width: thin;
    scrollbar-color: #777 #232426;
  }

  /* SCROLLBAR CHROME, EDGE E SAFARI */

  .archivio-lista::-webkit-scrollbar {
    width: 8px;
  }

  .archivio-lista::-webkit-scrollbar-track {
    background: #232426;
    border-radius: 10px;
  }

  .archivio-lista::-webkit-scrollbar-thumb {
    background: #777;
    border-radius: 10px;
  }

  .archivio-lista::-webkit-scrollbar-thumb:hover {
    background: #e63946;
  }

  /* RIQUADRI LEGGERMENTE PIÙ COMPATTI */

  .archivio-item {
    padding: 18px 20px;
    margin-bottom: 14px;
  }

  .archivio-titolo {
    font-size: 15px;
    line-height: 1.6;
  }

  .archivio-link {
    margin-top: 10px;
  }

}


/* ==================================================
   ARCHIVIO NOTIZIE
   VISUALIZZAZIONE MOBILE
================================================== */

@media (max-width: 768px) {

  .archivio-lista {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

}


/* ==================================================
   PULSANTI SCROLL PAGINA
   NASCOSTI SU COMPUTER
================================================== */

.scroll-buttons {
  display: none;
}


/* ==================================================
   PULSANTI SCROLL SMARTPHONE
================================================== */

@media (max-width: 768px) {

  .scroll-buttons {
    position: fixed;
    right: 0;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 999;
  }

  .scroll-buttons button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: rgba(35, 36, 38, 0.92);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px 0 0 6px;
    color: #fff;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    transition: background 0.3s ease;
  }

  .scroll-buttons button:hover,
  .scroll-buttons button:focus-visible {
    background: #e63946;
    border-color: #e63946;
  }

}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 768px) {

  /* =========================
     STRUTTURA
  ========================= */

  .container {
    padding: 0 14px;
  }


  /* =========================
     HEADER
  ========================= */

  .header {
    padding: 14px 0 6px;
  }

  .header-top {
    margin-bottom: 4px;
  }

  .logo img {
    width: 122px;
    margin: 0 auto 3px;
  }


  /* =========================
     NAV
  ========================= */

  .nav {
    position: relative;
    min-height: 32px;
    border-top: 1px solid rgba(255,255,255,.10);
    border-bottom: 1px solid rgba(255,255,255,.06);
  }


  /* =========================
     HAMBURGER
  ========================= */

  .menu-toggle {
    display: flex;
    width: 32px;
    height: 29px;
    margin: 2px 14px 2px auto;
    padding: 6px;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    margin-left: auto;
    background: #fff;
    transition: .3s;
  }


  /* =========================
     MENU MOBILE
  ========================= */

  .menu {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0;
    border-top: 1px solid #222;
    background: #000;
  }

  .menu.menu-open {
    display: flex;
  }

  .menu > li {
    width: 100%;
    border-bottom: 1px solid #222;
  }

  .menu > li > a,
  .submenu-toggle {
    display: block;
    width: 100%;
    padding: 11px 18px;
    color: #fff;
    text-align: left;
    font-size: 11px;
    letter-spacing: 1.2px;
    opacity: .9;
  }

  .menu > li.active > a {
    color: #fff;
    font-weight: 600;
    opacity: 1;
  }

  .menu > li.active > a::after {
    left: 18px;
    right: auto;
    bottom: 6px;
    width: 66px;
    background: #e63946;
  }

  .menu > li.active > a:hover,
  .menu > li.active > a:focus-visible {
    color: #e63946;
  }

  .menu > li.active > .submenu-toggle {
    color: #e63946;
    font-weight: 600;
    opacity: 1;
  }


  /* =========================
     SOTTOMENU
  ========================= */

  .submenu-toggle {
    position: relative;
    background: transparent;
    border: 0;
    font-family: 'Merriweather Sans', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    cursor: pointer;
  }

  .submenu-toggle:hover {
    color: #fff;
  }

  .submenu-toggle::before {
    display: none;
    content: none;
  }

  .submenu-toggle::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    width: auto;
    height: auto;
    background: none;
    color: #e63946;
    font-size: 16px;
    line-height: 1;
    transform: translateY(-50%);
    transition: none;
  }

  .has-submenu.submenu-open > .submenu-toggle::after {
    content: "−";
  }

  .menu .has-submenu > .submenu {
    display: none;
    position: static;
    top: auto;
    left: auto;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    background: #111;
    border: 0;
    list-style: none;
    text-align: left;
  }

  .menu .has-submenu.submenu-open > .submenu {
    display: block;
  }

  .menu .has-submenu:hover > .submenu {
    display: none;
  }

  .menu .has-submenu.submenu-open:hover > .submenu {
    display: block;
  }

  .menu .submenu li {
    width: 100%;
    margin: 0;
    padding: 0;
    border-top: 1px solid #222;
  }

  .menu .submenu a {
    position: relative;
    display: block;
    width: 100%;
    padding: 10px 18px 10px 30px;
    color: #fff;
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    opacity: 1;
  }


  /* testo bianco + SOLO linea rossa */

  .menu .submenu a::after {
    content: "";
    position: absolute;
    left: 30px;
    bottom: 5px;
    width: 0;
    height: 1px;
    background: #e63946;
    transition: width .3s ease;
  }

  .menu .submenu a:hover {
    color: #fff;
  }

  .menu .submenu a:hover::after {
    width: calc(100% - 48px);
  }


  /* =========================
     HAMBURGER → X
  ========================= */

  .menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  .menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }


  /* =========================
     BREADCRUMB
  ========================= */

  .breadcrumb {
    margin: 14px auto 12px;
    padding: 0;
    gap: 4px;
    font-size: .72rem;
    line-height: 1.5;
  }

  .breadcrumb a {
    color: #ccc;
  }


  /* =========================
     INTRO ARCHIVIO
  ========================= */

  .archivio-intro {
    margin: 18px auto 20px;
    padding: 19px 16px;
    border-left-width: 3px;
  }

  .archivio-intro h2 {
    margin-bottom: 9px;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 1.3px;
  }

  .archivio-intro h2::after {
    width: 40px;
    margin-top: 6px;
  }

  .archivio-intro p {
    font-size: 12.5px;
    line-height: 1.7;
  }

  .archivio-intro p + p {
    margin-top: 10px;
  }


  /* =========================
     RICERCA
  ========================= */

  .ricerca-box {
    margin: 20px auto 23px;
    padding: 17px 15px;
    border-left-width: 3px;
  }

  .ricerca-box label {
    margin-bottom: 8px;
    font-size: 10.5px;
    line-height: 1.4;
    letter-spacing: 1px;
  }

  .ricerca-box input {
    padding: 11px 12px;
    font-size: 12.5px;
  }


  /* =========================
     ANNO
  ========================= */

  .anno {
    margin: 25px auto 15px;
    padding: 0;
  }

  .anno h1 {
    padding-left: 9px;
    border-left-width: 3px;
    font-size: 21px;
    line-height: 1.3;
  }


  /* =========================
     LISTA NOTIZIE
  ========================= */

  .archivio-lista {
    padding: 0;
  }

  .archivio-item {
    margin-bottom: 12px;
    padding: 16px 14px;
    border-left-width: 3px;
  }

  .archivio-item:hover {
    transform: none;
  }


  /* DATA + CATEGORIA */

  .archivio-meta {
    flex-direction: column;
    gap: 2px;
    margin-bottom: 7px;
    font-size: 9.5px;
    line-height: 1.5;
    letter-spacing: .8px;
  }


  /* TITOLO */

  .archivio-titolo {
    font-size: 13.5px;
    line-height: 1.55;
  }


  /* DESCRIZIONE */

  .archivio-descrizione {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.65;
  }


  /* LINK LEGGI ARTICOLO */

  .archivio-link {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
  }

  .archivio-link a {
    font-size: 11px;
  }


  /* =========================
     NESSUN RISULTATO
  ========================= */

  #nessunRisultato {
    margin: 23px auto;
    padding: 17px 14px;
    border-left-width: 3px;
    font-size: 12px;
  }


  /* =========================
     NAVIGAZIONE ANNI
  ========================= */

  .navigazione-anni {
    margin: 30px auto 22px;
    padding: 18px 5px;
    gap: 8px 13px;
  }

  .navigazione-anni a {
    font-size: 11.5px;
  }


  /* =========================
     PULSANTE FINALE
  ========================= */

  .azioni-finali {
    margin: 25px 0 13px;
  }

  .ritorna-archivio {
    padding: 10px 15px;
    font-size: 11.5px;
  }


  /* =========================
     FOOTER
  ========================= */

  .footer {
    padding: 26px 16px;
    font-size: 11.5px;
    line-height: 1.6;
  }

  .footer p {
    margin-bottom: 5px;
  }

  .copyright {
    font-size: 10.5px;
  }

}


/* ==================================================
   SMARTPHONE PICCOLI
================================================== */

@media (max-width: 480px) {

  .container {
    padding: 0 12px;
  }

  .archivio-intro {
    padding: 17px 14px;
  }

  .archivio-intro h2 {
    font-size: 13.5px;
  }

  .archivio-intro p {
    font-size: 12px;
  }

  .ricerca-box {
    padding: 15px 13px;
  }

  .archivio-item {
    padding: 15px 13px;
  }

  .archivio-titolo {
    font-size: 13px;
  }

  .archivio-descrizione {
    font-size: 11.5px;
  }

}

/* ==================================================
   ARCHIVIO ANNUALE — COORDINATO CON NOTIZIE INDEX
   Solo questa sezione; il resto del CSS rimane invariato.
================================================== */

.indice-anni {
  max-width: 900px;
  margin: 55px auto;
  padding: 30px 20px;
  border-top: 1px solid #333;
  text-align: center;
}

.indice-anni .titolo-anni {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.indice-anni .descrizione-anni {
  margin-bottom: 25px;
  color: #c7c0b5;
  font-size: 14px;
  line-height: 1.7;
}

.indice-anni .anni {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.indice-anni .anni a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 76px;
  min-height: 46px;
  padding: 10px 14px;
  color: #fff;
  background: #232426;
  border: 1px solid #454545;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  transition:
    border-color 0.3s ease,
    color 0.3s ease,
    background 0.3s ease;
}

.indice-anni .anni a::after {
  display: none;
}

.indice-anni .anni a:hover,
.indice-anni .anni a:focus-visible {
  color: #fff;
  border-color: #e63946;
  background: #353033;
}

.indice-anni .anni a.attiva,
.indice-anni .anni a[aria-current="page"] {
  color: #fff;
  background: #a72b36;
  border-color: #e63946;
}

@media (max-width: 768px) {
  .indice-anni {
    margin: 32px auto;
    padding: 22px 10px;
  }
  .indice-anni .titolo-anni {
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: 1.5px;
  }
  .indice-anni .descrizione-anni {
    margin-bottom: 18px;
    font-size: 12.5px;
  }
  .indice-anni .anni { gap: 9px; }
  .indice-anni .anni a {
    min-width: 72px;
    min-height: 43px;
    padding: 9px 11px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .indice-anni { padding: 20px 8px; }
  .indice-anni .titolo-anni { font-size: 14px; }
  .indice-anni .anni { gap: 8px; }
  .indice-anni .anni a {
    min-width: 68px;
    min-height: 42px;
    font-size: 12.5px;
  }
}