/* ==================================================
   1. RESET E IMPOSTAZIONI GENERALI
================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #1b1c1e;
  color: #fff;
  line-height: 1.6;
  font-family: 'Merriweather Sans', sans-serif;
}

.container {
  max-width: 1100px;
  margin: auto;
}

::selection {
  background: #e63946;
  color: #fff;
}

[hidden] {
  display: none !important;
}


/* ==================================================
   2. LINK E TITOLI
================================================== */

a {
  position: relative;
  color: #fff;
  text-decoration: none;
  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%;
}

h1,
h2,
h3 {
  font-weight: 600;
  font-family: 'Merriweather Sans', sans-serif;
}


/* ==================================================
   3. HEADER E LOGO
================================================== */

.header {
  background: #000;
  text-align: center;
  padding: 40px 0 18px;
  border-bottom: 1px solid #222;
}

.header-top {
  display: flex;
  justify-content: center;
  align-content: center;
  margin-bottom: 15px;
}

.logo {
  display: flex;
  justify-content: center;
  align-content: center;
}

.logo img {
  display: block;
  width: 200px;
  height: auto;
  margin: 0 auto 15px;
}


/* ==================================================
   4. MENU DESKTOP
================================================== */

.nav {
  position: relative;
}

.menu {
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 10px 0;
  border-top: 1px solid #222;
  list-style: none;
}

.menu > li {
  position: relative;
}

.menu a,
.submenu-toggle {
  font-family: 'Merriweather Sans', sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
}

.menu a:hover,
.submenu-toggle:hover {
  opacity: 1;
}

/* Hamburger nascosto su desktop */
.menu-toggle {
  display: none;
}

/* POESIAS / POETAS */
.submenu-toggle {
  position: relative;
  padding: 0;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

.submenu-toggle:hover {
  color: #e63946;
}

.submenu-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #e63946;
  transition: width 0.3s ease;
}

.submenu-toggle:hover::before {
  width: 100%;
}


/* ==================================================
   5. SOTTOMENU DESKTOP
================================================== */

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 120px;
  padding: 10px;
  background: #000;
  border-top: 2px solid #e63946;
  text-align: left;
  list-style: none;
}

.menu li:hover .submenu {
  display: block;
}

.submenu li {
  padding: 5px 0;
}

.submenu a {
  display: block;
  font-size: 11px;
}


/* ==================================================
   6. VOCE MENU ATTIVA
================================================== */

.menu > li.active > a,
.menu > li.active > .submenu-toggle {
  color: #fff;
  opacity: 1;
}

.menu > li.active > a::after,
.menu > li.active > .submenu-toggle::before {
  width: 100%;
}


/* ==================================================
   7. HERO
================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  margin: 40px auto 0;
  overflow: hidden;
  background:
    url("../loghi/hero-poesia.jpg")
    center / cover
    no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.60);
}

.hero-content {
  position: relative;
  max-width: 700px;
  padding: 20px;
  color: #fff;
  text-align: center;
}

.hero-content h1 {
  color: #fff;
  font-size: 34px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sottotitolo {
  margin-top: 10px;
  color: #ccc;
  font-size: 15px;
}


/* ==================================================
   8. BREADCRUMB
================================================== */

.breadcrumb {
  margin-top: 10px;
  margin-bottom: 25px;
  color: #c7c0b5;
  font-size: 0.9rem;
}

.breadcrumb a,
.breadcrumb span {
  margin-right: 8px;
}


/* ==================================================
   9. INTRO ARCHIVIO
================================================== */

.archivio-intro {
  max-width: 900px;
  margin: 45px auto 30px;
  padding: 32px 35px;
  background: #232426;
  color: #d9d2c7;
  border-left: 5px solid #e63946;
}

.archivio-intro h2 {
  margin-bottom: 12px;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.archivio-intro h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  margin-top: 8px;
  background: #e63946;
}

.archivio-intro p {
  font-size: 15px;
  line-height: 1.8;
}

.archivio-intro p + p {
  margin-top: 14px;
}


/* ==================================================
   10. RICERCA
================================================== */

.ricerca-box {
  max-width: 900px;
  margin: 45px auto 30px;
  padding: 22px;
  background: #f4f1ea;
  color: #1b1c1e;
  border-left: 5px solid #e63946;
}

.ricerca-box label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.ricerca-box input {
  width: 100%;
  padding: 14px;
  background: #fff;
  color: #1b1c1e;
  border: 1px solid #ccc;
  font-family: 'Merriweather Sans', sans-serif;
  font-size: 14px;
}


/* ==================================================
   11. SEZIONI PER ANNO
================================================== */

.anno-sezione {
  scroll-margin-top: 20px;
}

.anno {
  max-width: 900px;
  margin: 45px auto 20px;
  padding: 0 20px;
}

.anno h1 {
  padding-left: 10px;
  color: #ccc;
  border-left: 4px solid #e63946;
  font-size: 28px;
}


/* ==================================================
   12. LISTA ARCHIVIO
================================================== */

.archivio-lista {
  max-width: 900px;
  margin: auto;
  padding: 0 20px;
}

.archivio-item {
  margin-bottom: 20px;
  padding: 22px;
  background: #f4f1ea;
  color: #1b1c1e;
  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;
  color: #e63946;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.archivio-titolo {
  display: block;
  color: #1b1c1e;
  font-size: 15px;
  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;
}


/* ==================================================
   13. DOCUMENTI DEL CONCORSO
================================================== */

.archivio-documenti {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
}

.archivio-documenti a {
  color: #e63946;
  font-size: 13px;
  font-weight: 700;
}

.archivio-documenti a::after {
  background: #e63946;
}


/* ==================================================
   14. NESSUN RISULTATO
================================================== */

#nessunRisultato {
  max-width: 900px;
  margin: 35px auto;
  padding: 25px;

  background: #232426;
  color: #d9d2c7;
  border-left: 5px solid #e63946;
  text-align: center;
}


/* ==================================================
   15. NAVIGAZIONE ANNI
================================================== */

.navigazione-anni {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 900px;
  margin: 50px auto;
  padding: 25px 20px;
  border-top: 1px solid #333;
}

.navigazione-anni a {
  font-size: 14px;
}

.navigazione-anni a.active {
  color: #e63946;
  font-weight: 700;
}


/* ==================================================
   16. INVITO BANDI
================================================== */

.invito-bandi {
  max-width: 900px;
  margin: 45px auto 20px;
  background: #232426;
  color: #d9d2c7;
  padding: 30px 35px;
  border-left: 5px solid #e63946;
}

.invito-bandi h2 {
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.invito-bandi h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  background: #e63946;
  margin-top: 8px;
}

.invito-bandi p {
  font-size: 15px;
  line-height: 1.8;
}

.invito-bandi a {
  color: #ffff;
}


/* ==================================================
   12. CONTENUTI
================================================== */

.contenuti {
  max-width: 1100px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 40px 20px;
  border-top: 2px solid #e63946;
}

.colonna h3 {
  font-size: 14px;
  letter-spacing: 2px;
  color: #e63946;
  margin-bottom: 15px;
}

.colonna a {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.social .icone {
  display: flex;
  gap: 15px;
}

.social img {
  width: 25px;
}


/* ==================================================
   13. FOOTER
================================================== */

.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  border-top: 1px solid #333;
  text-align: center;
  color: #fff;
  font-size: 14px;
}


/* ==================================================
   18. RESPONSIVE - MOBILE
================================================== */

@media (max-width: 768px) {

  /* ==================================================
     STRUTTURA GENERALE
  ================================================== */

  .container {
    padding: 0 14px;
  }


  /* ==================================================
     HEADER
  ================================================== */

  .header {
    padding: 14px 0 6px;
  }

  .header-top {
    margin-bottom: 4px;
  }

  .logo img {
    width: 122px;
    margin: 0 auto 3px;
  }


  /* ==================================================
     FASCIA MENU
  ================================================== */

  .nav {
    min-height: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }


  /* ==================================================
     MENU 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: 0.3s;
  }


  /* ==================================================
     MENU APERTO
  ================================================== */

  .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: 0.9;
  }


  /* ==================================================
     VOCE ATTIVA
  ================================================== */

  .menu > li.active > a,
  .menu > li.active > .submenu-toggle {
    color: #e63946;
    font-weight: 600;
    opacity: 1;
  }


  /* ==================================================
     SOTTOMENU
  ================================================== */

  .submenu-toggle {
    position: relative;
  }

  .submenu-toggle::before {
    display: none;
  }

  .submenu-toggle::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 16px;
    line-height: 1;
  }

  .has-submenu.submenu-open > .submenu-toggle::after {
    content: "−";
  }

  .submenu {
    display: none;
    position: static;
    width: 100%;
    min-width: 0;
    padding: 0;
    background: #111;
    border-top: none;
    text-align: left;
  }

  .has-submenu.submenu-open > .submenu {
    display: block;
  }

  /* Neutralizza il comportamento hover desktop */
  .menu li:hover .submenu {
    display: none;
  }

  .menu li.submenu-open:hover .submenu,
  .menu li.submenu-open .submenu {
    display: block;
  }

  .submenu li {
    padding: 0;
    border-top: 1px solid #222;
  }

  .submenu a {
    display: block;
    padding: 10px 18px 10px 30px;
    color: #bbb;
    font-size: 10.5px;
  }


  /* ==================================================
     ANIMAZIONE 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);
  }


  /* ==================================================
     HERO
  ================================================== */

  .hero {
    height: 220px;
    margin: 0 auto;
  }

  .hero-content {
    max-width: 100%;
    padding: 18px;
  }

  .hero-content h1 {
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: 1.5px;
  }

  .sottotitolo {
    margin-top: 8px;
    font-size: 12.5px;
    line-height: 1.55;
  }


  /* ==================================================
     BREADCRUMB
  ================================================== */

  .breadcrumb {
    margin: 14px auto 12px;
    padding: 0;
    font-size: 0.72rem;
    line-height: 1.5;
  }

  .breadcrumb a,
  .breadcrumb span {
    margin-right: 4px;
  }


  /* ==================================================
     INTRO ARCHIVIO
  ================================================== */

  .archivio-intro {
    margin: 24px auto 22px;
    padding: 22px 18px;
    border-left-width: 4px;
  }

  .archivio-intro h2 {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 1.4px;
  }

  .archivio-intro h2::after {
    width: 42px;
    margin-top: 7px;
  }

  .archivio-intro p {
    font-size: 13px;
    line-height: 1.7;
  }

  .archivio-intro p + p {
    margin-top: 11px;
  }


  /* ==================================================
     RICERCA
  ================================================== */

  .ricerca-box {
    margin: 22px auto 27px;
    padding: 17px 15px;
    border-left-width: 4px;
  }

  .ricerca-box label {
    margin-bottom: 7px;
    font-size: 10.5px;
    letter-spacing: 1.2px;
  }

  .ricerca-box input {
    padding: 11px 12px;
    font-size: 13px;
  }


  /* ==================================================
     SEZIONI PER ANNO
  ================================================== */

  .anno {
    margin: 30px auto 14px;
    padding: 0;
  }

  .anno h1 {
    padding-left: 9px;
    font-size: 22px;
    line-height: 1.2;
    border-left-width: 3px;
  }


  /* ==================================================
     LISTA ARCHIVIO
  ================================================== */

  .archivio-lista {
    padding: 0;
  }

  .archivio-item {
    margin-bottom: 15px;
    padding: 18px 16px;
    border-left-width: 4px;
  }

  /* Su touch non serve lo spostamento della card */
  .archivio-item:hover {
    transform: none;
  }


  /* ==================================================
     META: LOCALITÀ / EDIZIONE / SCADENZA
  ================================================== */

  .archivio-meta {
    flex-direction: column;
    gap: 3px;
    margin-bottom: 8px;
    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 0.8px;
  }


  /* ==================================================
     TITOLO E DESCRIZIONE CONCORSO
  ================================================== */

  .archivio-titolo {
    font-size: 14px;
    line-height: 1.55;
  }

  .archivio-descrizione {
    margin-top: 6px;
    font-size: 12.5px;
    line-height: 1.65;
  }


  /* ==================================================
     DOCUMENTI: BANDO / PAGINA / ESITI
  ================================================== */

  .archivio-documenti {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 7px 16px;
    margin-top: 12px;
  }

  .archivio-documenti a {
    font-size: 11.5px;
  }


  /* ==================================================
     NESSUN RISULTATO
  ================================================== */

  #nessunRisultato {
    margin: 25px auto;
    padding: 18px 15px;
    font-size: 13px;
    line-height: 1.6;
    border-left-width: 4px;
  }


  /* ==================================================
     NAVIGAZIONE ANNI
  ================================================== */

  .navigazione-anni {
    gap: 9px 13px;
    margin: 32px auto;
    padding: 18px 10px;
  }

  .navigazione-anni a {
    font-size: 13px;
  }


  /* ==================================================
     INVITO BANDI
  ================================================== */

  .invito-bandi {
    margin: 28px auto 20px;
    padding: 22px 18px;
    border-left-width: 4px;
  }

  .invito-bandi h2 {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 1.3px;
  }

  .invito-bandi h2::after {
    width: 42px;
    margin-top: 7px;
  }

  .invito-bandi p {
    font-size: 13px;
    line-height: 1.7;
  }


  /* ==================================================
     CONTENUTI
  ================================================== */

  .contenuti {
    grid-template-columns: 1fr;
    gap: 22px;
    margin: 30px auto;
    padding: 27px 14px;
    text-align: center;
  }

  .colonna h3 {
    margin-bottom: 10px;
    font-size: 12px;
    letter-spacing: 1.5px;
  }

  .colonna a {
    margin-bottom: 6px;
    font-size: 12.5px;
  }

  .social .icone {
    justify-content: center;
  }

  .social img {
    width: 22px;
  }


  /* ==================================================
     FOOTER
  ================================================== */

  .footer {
    padding: 27px 16px;
    font-size: 12px;
    line-height: 1.6;
  }

  .copyright {
    font-size: 11px;
  }

}


/* ==================================================
   RESPONSIVE - SMARTPHONE PICCOLI
================================================== */

@media (max-width: 480px) {

  .hero {
    height: 200px;
  }

  .hero-content h1 {
    font-size: 20px;
  }

  .sottotitolo {
    font-size: 12px;
  }

  .archivio-intro {
    padding: 20px 16px;
  }

  .archivio-intro p {
    font-size: 12.5px;
  }

  .archivio-item {
    padding: 17px 14px;
  }

  .archivio-titolo {
    font-size: 13.5px;
  }

  .archivio-descrizione {
    font-size: 12px;
  }

  .invito-bandi {
    padding: 20px 16px;
  }

  .invito-bandi p {
    font-size: 12.5px;
  }

}