/* ================================================ */
/* RESET & GLOBAL SETTINGS */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px; /* 1rem = 16px */
}

@font-face {
    font-family: 'Akira Expanded';
    src: url('fonts/Akira Expanded Demo.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Akira Expanded', Arial, sans-serif;
  background-color: #e9e9e9;
}

/* ================================================ */
/* HEADER E NAVIGAZIONE (MOBILE-FIRST) */
/* ================================================ */
.header {
  position: relative;
  width: 100%;
  display: flex;
  z-index: 1000; /* sopra tutto */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 1rem;
}

.logo {
  position: static;
  font-size: 1.5rem; /* 24px */
  font-weight: bold;
  color: #000066;
  display: flex;
  align-items: center;
  gap: 0.625rem; /* 10px */
}

.logo-img {
  height: 2.5rem; /* 40px */
  width: auto;
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1rem;
  background-color: #000066ba;
  padding: 0;
  font-weight: 600;
  align-items: center;
}

nav ul li a {
  text-decoration: none;
  color: #c3f924  ;
  font-size: 1rem; /* 16px */
  transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
  color: #c3f924;
  /*-webkit-text-stroke: 0.03125rem #000066; /* 0.5px */*/
}

/* ——————————————— MOBILE BURGER MENU ——————————————— */
/* ————— BURGER MENU (MOBILE) ————— */
.nav-toggle {
  position: absolute;
  left: 1rem;
  width: 2rem;
  height: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle .hamburger {
  position: relative;
  display: block;
  width: 1.75rem;
  height: 0.2rem;
  background-color: #000066;
  border-radius: 2px;
  transition: background 0.3s;
}

/* le due barre sopra e sotto, distanziate con top */
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 0.2rem;
  background-color: #000066;
  border-radius: 2px;
  transition: transform 0.3s, top 0.3s, opacity 0.3s;
}

/* Nav di default nascosto */
.header nav {
  display: none;
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background-color: #000066;
  z-index: 999;
}

.nav-toggle .hamburger::before {
  top: -0.6rem;  /* regola questo per aumentare/diminuire spazio */
}
.nav-toggle .hamburger::after {
  top:  0.6rem;
}

/* nav di default nascosto */
.header nav {
  display: none;
}

/* quando apro: */
.header.nav-open nav {
  display: block;
}

/* trasformo il burger in X */
.header.nav-open .hamburger {
  background: transparent;       /* nasconde bastone centrale */
}
.header.nav-open .hamburger::before {
  top: 0;                        /* tutte e tre partecipano */
  transform: rotate(45deg);
}
.header.nav-open .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ================================================ */
/* SEZIONE HERO (MOBILE-FIRST) */
/* L'altezza della hero è calcolata come 70% del viewport dinamico meno l'altezza della navbar */
.hero {
  position: relative;
  height: 70dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.testo-rettangolo {
  position: relative;
  font-family: 'Akira Expanded', Arial, sans-serif;
  font-size: 6.25rem; /* circa 100px */
  line-height: 1.15;
  text-align: center;
  letter-spacing: -0.25rem;
}

.testo-rettangolo .vuoto {
  color: transparent;
  -webkit-text-stroke: 0.0625rem #000066; /* 1px */
  display: block;
  /* Sfalsamento su mobile: puoi regolare se necessario */
  transform: translate(8%, 0);
}

.testo-rettangolo .pieno {
  color: #000066;
  position: absolute;
  transform: translate(-9%, -86%);
  display: block;
}

/* ================================================ */
/* SEZIONI GENERICHE (MOBILE-FIRST) */
.content-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.75rem; /* 60px */
  min-height: auto;
}

.content-wrapper {
  max-width: 50rem; /* 800px */
  text-align: center;
}

.content-wrapper h2 {
  font-size: 3rem; /* 48px */
  margin-bottom: 1.25rem;
}

.content-wrapper p {
  font-size: 1.25rem; /* 20px */
  line-height: 1.5;
}

/* ================================================ */
/* SEZIONE STORIA (MOBILE-FIRST) */
.storia-section {
  position: relative;
  background-color: #fff;
  padding-top: 3.125rem; /* 50px */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100dvh;
}

.storia-wrapper {
  position: relative;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 1.875rem;
}

.storia-outline {
  position: absolute;
  font-family: 'Akira Expanded', Arial, sans-serif;
  font-size: 4rem; /* 120px su desktop; su mobile potrebbe essere ridotto */
  line-height: 0.9;
  padding-top: 1.875rem;
  color: transparent;
  -webkit-text-stroke: 0.0625rem #000066;
  opacity: 0.15;
  white-space: pre-line;
}

.storia-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.storia-title {
  font-family: 'Akira Expanded', Arial, sans-serif;
  font-size: 4rem;
  margin: 0 0 1.25rem 0;
  padding-top: 1.875rem;
  color: #000066;
  line-height: 1;
  text-align: center;
}

.storia-abstract {
  font-family: Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  margin-bottom: 1.875rem;
  color: #000066;
  max-width: 31.25rem; /* 500px */
}

.storia-link {
  position: static;
  font-family: Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: bold;
  color: #000066;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.storia-link:hover {
  border-bottom: 0.125rem solid #000;
}

.storia-arrow {
  font-size: 1.125rem;
  transform: translateY(0.0625rem);
}

.storia-box {
  background-color: #ccc;
  width: 100%;
  height: auto;
}

/* ================================================ */
/* SEZIONE ARCHIVIO (MOBILE-FIRST) */
.archivio-section {
  position: relative;
  height: 100dvh;
  background-color: #e9e9e9;
  padding-top: 3.125rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.archivio-wrapper {
  position: relative;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 1.875rem;
}

.archivio-box {
  background-color: #ccc;
  width: 100%;
  height: auto;
}

.archivio-content {
  position: relative;
}

.archivio-outline {
  position: absolute;
  padding-top: 1.875rem;
  padding-right: 50px;
  box-sizing: border-box;
  font-family: 'Akira Expanded', Arial, sans-serif;
  font-size: 3.5rem;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 0.0625rem #000066;
  opacity: 0.15;
  white-space: pre-line;
  width: 100%;
  text-align: right;
}

.archivio-left {
  position: relative;
  z-index: 1;
  padding-top: 1.875rem;
}

.archivio-title {
  font-family: 'Akira Expanded', Arial, sans-serif;
  font-size: 3.5rem;
  margin: 0 0 1.25rem 0;
  color: #000066;
  line-height: 1;
  padding-right: 50px;
  text-align: right;
}

.archivio-abstract {
  font-family: Arial, sans-serif;
  font-size: 1.5rem;
  display: block;
  margin-left: auto;
  line-height: 1.5;
  margin-bottom: 1.875rem;
  color: #333;
  max-width: 31.25rem;
}

.archivio-link {
  position: static;
  left: -50px;
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: bold;
  color: #000066;
}

.archivio-link:hover {
  border-bottom: 2px solid #000;
}

.archivio-arrow {
  font-size: 1.125rem;
  transform: translateY(0.0625rem);
}

/* ================================================ */
/* SEZIONE CONTATTI (MOBILE-FIRST) */
.contatti-section {
  position: relative;
  height: 100dvh;
  background-color: #fff;
  padding-top: 3.125rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contatti-wrapper {
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contatti-content {
  position: relative;
}

.contatti-outline {
  position: absolute;
  padding-top: 1.875rem;
  box-sizing: border-box;
  font-family: 'Akira Expanded', Arial, sans-serif;
  font-size: 2.5rem;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 0.0625rem #000066;
  opacity: 0.15;
  pointer-events: none;
  white-space: pre-line;
  width: 100%;
  text-align: center;
}

.contatti-title {
  font-family: 'Akira Expanded', Arial, sans-serif;
  font-size: 2.5rem;
  text-transform: uppercase;
  color: #000066;
  line-height: 1;
  text-align: center;
}

.contatti-info {
  font-family: Arial, sans-serif;
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  color: #000066;
  text-align: center;
}

.contatti-info a {
  color: #000066;
  text-decoration: none;
}

.contatti-info a:hover {
  text-decoration: underline;
}

.contatti-txt-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 50vh;
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
}

.social-icons a img {
  width: 5rem;
  height: auto;
  transition: transform 0.3s;
}

.social-icons a:hover img {
  transform: scale(1.1);
}

/* ================================================ */
/* FILTRO ANNI */
.year-filter {
  text-align: center;
  padding: 3.5rem 0;
}

.year-filter ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: inline-flex;
  gap: 1rem;
}

.year-filter li a {
  text-decoration: none;
  font-size: 1rem;
  color: #000066;
  border: 1px solid #000066;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: background 0.3s, color 0.3s;
}

.year-filter li a.active,
.year-filter li a:hover {
  background: #000066;
  color: #fff;
}

.carousel-track {
  scroll-behavior: smooth;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overflow-y: hidden;
  white-space: nowrap;
  animation: none !important; 
}

.carousel-track .carousel-clone {
  display: none !important; /* Nasconde i duplicati */
}

.carousel-track .clone {
  display: inline-block;
}

.carousel-item {
  display: inline-block;
  margin-right: 0.5rem;
}

.carousel-item img {
  height: 100%  ;
  width: auto;
  border-radius: 30px;
  max-width: 90vw;
}

.carousel-container {
  margin: 1rem 0;
}


/* ================================================ */
/* LIGHTBOX / MODAL PER INGRANDIRE LE IMMAGINI */
.lightbox {
  display: none; /* Nascosto di default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgb(0 0 0 / 54%);
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #000066;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.lightbox .prev,
.lightbox .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -40px;
  color: #000066;
  font-weight: bold;
  font-size: 40px;
  user-select: none;
  padding: 16px;
}

.lightbox .prev {
  left: 0;
}

.lightbox .next {
  right: 0;
}

/* ================================================ */
/* MEDIA QUERY PER SCHERMI AMPI (min-width: 1024px) */
@media (min-width: 1024px) {
  /* HEADER e NAVIGAZIONE */
/* Header e Navigazione */
  .header {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 10;
      display: flex;
      justify-content: center;
      flex-direction: row;
      align-items: center;
      padding: 30px 60px;
      background: transparent; /* nessun colore di sfondo */
  }
  
  .header nav {
    display: flex !important;    /* forza il block dello mobile */
    position: static;            /* rimuove l’assoluto */
    background: transparent;     /* nessuno sfondo */
    justify-content: center;     /* centra i link orizzontalmente */
  }

  .logo {
      position: absolute;
      left: 60px; /* Logo a sinistra */
      font-size: 24px;
      font-weight: bold;
      color: #000066;
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom:0px;
  }

  .logo-img {
      height: 40px;
      width: auto;
  }
  
  nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    gap: 25px;
    margin: 0;
    background-color: transparent;
    padding: 0;
    font-weight: 600;
    align-items: center;
    justify-content: center;
  }
  
  nav ul li a {
      text-decoration: none;
      color: #000066;
      transition: color 0.3s;
  }

  nav ul li a:hover,
  nav ul li a.active {
      background-color: #c3f924;
      color: #000066;
      /*-webkit-text-stroke: 0.5px #000066;*/
  }
  
  .nav-toggle {
    display: none;
  }
  
  /* SEZIONE HERO */
  .hero {
      position: relative;
      height: 80vh;
      display: flex;
      justify-content: left;
      padding-left: 50px;
  }
  .testo-rettangolo {
      position: relative;
      font-family: 'Akira Expanded', Arial, sans-serif;
      font-size: 180px;
      line-height: 1.15;
      text-align: right;
      letter-spacing: -4px;
  }
  .testo-rettangolo .vuoto {
      color: transparent;
      -webkit-text-stroke: 1px #000066;
      display: block;
      text-align: left;
      transform: translate(109px, 0px);
  }
  .testo-rettangolo .pieno {
      color: #000066;
      position: absolute;
      top: 50px;
      left: 0;
      text-align: left;
      transform: translate(0px, 40px);
  }
  
  .content-section {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 60px;
  }
  .content-wrapper {
      max-width: 800px;
      text-align: center;
  }
  .content-wrapper h2 {
      font-size: 48px;
      margin-bottom: 20px;
  }
  .content-wrapper p {
      font-size: 20px;
      line-height: 1.5;
  }
  
  /* SEZIONE STORIA */
  .storia-section {
    position: relative;
    min-height: 100vh;
    background-color: #fff;
    display: flex;
    padding-top: 50px;
    box-sizing: border-box; 
    justify-content: center;
  }
  .storia-wrapper {
    position: relative;
    width: 90%;
    height: 90vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .storia-outline {
    position: absolute;
    font-family: 'Akira Expanded', Arial, sans-serif;
    font-size: 120px;
    line-height: 0.9;
    padding-top: 30px;
    padding-left: 50px;
    color: transparent;
    -webkit-text-stroke: 1px #000066;
    opacity: 0.15;
    white-space: pre-line;
  }
  .storia-left {
    display: flex;
    height: 60%;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    position: relative;
    z-index: 1;
  }
  .storia-title {
    font-family: 'Akira Expanded', Arial, sans-serif;
    font-size: 120px;
    margin: 0 0 20px 0;
    padding-top:30px;
    padding-left: 50px;
    color: #000066;
    line-height: 1;
  }
  .storia-abstract {
    font-family: Arial, sans-serif;
    font-size: 30px;
    line-height: 1.5;
    margin-bottom: 30px;
    color: #000066;
    max-width: 500px;
  }
  .storia-link {
    position: absolute;
    right: -50px;
    bottom: 20px;
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: #000066;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .storia-link:hover {
    border-bottom: 2px solid #000;
  }
  .storia-arrow {
    font-size: 18px;
    transform: translateY(1px);
  }
  .storia-box {
    background-color: #ccc;
    width: 100%;
    height: 80%;
  }
  
  /* SEZIONE ARCHIVIO */
  .archivio-section {
    position: relative;
    min-height: 100vh;
    background-color: #e9e9e9;
    padding-top: 50px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
  }
  .archivio-wrapper {
    position: relative;
    width: 90%;
    height: 90vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  .archivio-box {
    background-color: #ccc;
    width: 100%;
    height: 80%;
  }
  .archivio-content {
    position: relative;
  }
  .archivio-outline {
    position: absolute;
    padding-top: 30px;
    padding-right: 50px;
    box-sizing: border-box;
    font-family: 'Akira Expanded', Arial, sans-serif;
    font-size: 120px;
    line-height: 0.9;
    color: transparent;
    -webkit-text-stroke: 1px #000066;
    opacity: 0.15;
    white-space: pre-line;
    width: 100%;
    text-align: right;
  }
  .archivio-left {
    position: relative;
    z-index: 1;
    padding-top: 30px;
  }
  .archivio-title {
    font-family: 'Akira Expanded', Arial, sans-serif;
    font-size: 120px;
    margin: 0 0 20px 0;
    color: #000066;
    line-height: 1;
    padding-right: 50px;
    text-align: right;
  }
  .archivio-abstract {
    font-family: Arial, sans-serif;
    font-size: 30px;
    display: block;
    margin-left: auto;
    line-height: 1.5;
    margin-bottom: 30px;
    color: #333;
    max-width: 500px;
  }
  .archivio-link {
    position: relative;
    left: -50px;
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: Arial, sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: #000066;
  }
  .archivio-link:hover {
    border-bottom: 2px solid #000;
  }
  .archivio-arrow {
    font-size: 18px;
    transform: translateY(1px);
  }
  
  /* SEZIONE CONTATTI */
  .contatti-section {
    position: relative;
    min-height: 100vh;
    background-color: #fff;
    padding-top: 50px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
  }
  .contatti-wrapper {
    width: 90%;
    display: flex;
    justify-content: center;
  }
  .contatti-content {
    position: relative;
  }
  .contatti-outline {
    position: absolute;
    padding-top: 30px;
    box-sizing: border-box;
    font-family: 'Akira Expanded', Arial, sans-serif;
    font-size: 120px;
    line-height: 0.9;
    color: transparent;
    -webkit-text-stroke: 1px #000066;
    opacity: 0.15;
    pointer-events: none;
    white-space: pre-line;
  }
  .contatti-title {
    font-family: 'Akira Expanded', Arial, sans-serif;
    font-size: 120px;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    color: #000066;
    line-height: 1;
  }
  .contatti-info {
    font-family: Arial, sans-serif;
    font-size: 18px;
    margin-bottom: 20px;
    color: #000066;
    text-align: center;
  }
  .contatti-info a {
    color: #000066;
    text-decoration: none;
  }
  .contatti-info a:hover {
    text-decoration: underline;
  }
  .contatti-txt-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50vh;
    flex-direction: column;
  }
  .social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
  }
  .social-icons a img {
    width: 80px;
    height: auto;
    transition: transform 0.3s;
  }
  .social-icons a:hover img {
    transform: scale(1.1);
  }
  
  /* ================================================ */
  /* FILTRO ANNI */
  .year-filter {
    text-align: center;
    padding: 1rem 0;
    margin-top: 4rem;
  }

  .year-filter ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: inline-flex;
    gap: 1rem;
  }

  .year-filter li a {
    text-decoration: none;
    font-size: 1rem;
    color: #000066;
    border: 1px solid #000066;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
  }

  .year-filter li a.active,
  .year-filter li a:hover {
    background: #000066;
    color: #fff;
  }
  
  /* ================================================ */
  /* CAROSELLO */
  .carousel-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    margin: 2rem 0;
  }

  .carousel-track {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    scroll-behavior: auto;
  }

  .carousel-container:hover .carousel-track {
    animation-play-state: paused;
  }

  .carousel {
    display: flex;
  }
  
  .carousel-wrapper {
    overflow: visible; /* Questo permette lo "zoom" delle immagini */
    position: relative;
  }

  .carousel-item {
    flex: 0 0 auto;
    margin-right: 1rem;
  }

  .carousel-item img {
    height: 25rem;
    width: auto;
    border-radius: 50px;
    display: block;
    cursor: pointer;
  }
  
  .carousel-item:hover {
    transform: scale(1.1);
    margin: 0 1.5rem; /* Spinge le immagini vicine */
    z-index: 10;
  }

  @keyframes scrollLinear {
  from { transform: translateX(0%); }
  to   { transform: translateX(-50%); }
  } 
 

  /* ================================================ */
  /* LIGHTBOX / MODAL PER INGRANDIRE LE IMMAGINI */
  .lightbox {
    display: none; /* Nascosto di default */
    position: fixed;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    left: 50%;
    top: 50%;
    width: 70%;
    height: 70%;
    overflow: hidden;
    transform: translate(-50%, -50%);
    background-color: rgb(0 0 0 / 13%);
  }

  .lightbox-content {
    margin: auto;
    border-radius: 50px;
    display: block;
    max-width: 90%;
    max-height: 90%;
  }

  .lightbox .close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #000066;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
  }

  .lightbox .prev,
  .lightbox .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -40px;
    color: #000066;
    font-weight: bold;
    font-size: 40px;
    user-select: none;
    padding: 16px;
  }

  .lightbox .prev {
    left: 0;
  }

  .lightbox .next {
    right: 0;
  }

}

@media (max-width: 1023px) {
  .carousel-track {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    scroll-behavior: auto;
  }

  .carousel-item {
    flex: 0 0 auto;
    margin-right: 1rem;
  }

  /* Non nascondere i cloni, servono per il loop */
  .carousel-track .clone {
    display: block !important;
  }
}
