/* Abilita lo scrolling liscio */
html {
  scroll-behavior: smooth;
}

@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) */
/* ================================================ */
.hero {
  position: relative;
  height: 70dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.testo-rettangolo {
  position: relative;
  font-family: 'Akira Expanded', Arial, sans-serif;
  /* Su mobile, una dimensione contenuta; verremo ad aumentarla in desktop */
  font-size: 6.25rem; /* ~100px */
  line-height: 1.15;
  text-align: center;
  letter-spacing: 0.4rem; /* -4px */
}

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

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

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

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

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

.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; /* 30px */
}

.storia-outline {
  position: absolute;
  font-family: 'Akira Expanded', Arial, sans-serif;
  font-size: 4rem; /* 120px */
  line-height: 0.9;
  padding-top: 1.875rem; /* 30px */
  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; /* 120px */
  margin: 0 0 1.25rem 0;
  padding-top: 1.875rem; /* 30px */
  color: #000066;
  line-height: 1;
  text-align: center;
}

.storia-abstract {
  font-family: Arial, sans-serif;
  font-size: 1.5rem; /* 30px */
  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; /* 20px */
  font-weight: bold;
  color: #000066;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* 8px */
  margin-top: 1.25rem;
}

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

.storia-arrow {
  font-size: 1.125rem; /* 18px */
  transform: translateY(0.0625rem); /* 1px */
}

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

@media (min-width: 1024px) {
  body {
      margin: 0;
      padding: 0;
      font-family: 'Akira Expanded', Arial, sans-serif;
      background-color: #e9e9e9;
  }

@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: 70vh;
      display: flex;
      justify-content: right;
      padding-right: 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: unset;
  }

  .testo-rettangolo .pieno {
      color: #000066;
      position: absolute;
      top: 50px;
      left: 0;
      text-align: left;
      transform: translate(-109px, 40px); /* Regola l'offset per ottenere l'effetto desiderato */
  }

  /* Sezioni aggiuntive */
  .content-section {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 60px;
  }

  /* Per alternare i background fra sezioni (opzionale) */
  .content-section:nth-of-type(even) {
      background-color: #f0f0f0;
  }

  .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: struttura generale */
  .storia-section {
    position: relative;
    min-height: 100vh; /* occupa almeno l’intera altezza dello schermo */
    background-color: #fff; /* o #e9e9e9, se preferisci */
    display: flex;
    padding-top: 50px;
    box-sizing: border-box; 
    justify-content: center;
  }

  /* Wrapper interno con griglia per dividere sinistra (testo) e destra (box) */
  .storia-wrapper {
    position: relative;       /* per contenere l’outline assoluta */
    width: 90%;
    height: 90vh;
    display: grid;
    grid-template-columns: 1fr 1fr; /* due colonne di uguale larghezza */
    gap: 30px;                     /* spazio tra colonne */
  }

  /* Testo outline di sfondo */
  .storia-outline {
    position: absolute;
    font-family: 'Akira Expanded', Arial, sans-serif; /* stesso font */
    font-size: 120px;
    line-height: 0.9;
    padding-top: 30px;
    padding-left: 50px;
    color: transparent;
    -webkit-text-stroke: 1px #000066;
    opacity: 0.15;   /* riduci opacità per l’effetto “acqua” sullo sfondo */
    white-space: pre-line;
  }

  /* Colonna sinistra: titolo, testo, link */
  .storia-left {
    display: flex;
    height: 60%;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    position: relative;
    z-index: 1; /* sopra l'outline di sfondo */
  }

  /* Titolo STORIA grande e nero */
  .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;
  }

  /* Testo descrittivo */
  .storia-abstract {
    font-family: Arial, sans-serif; /* o usa lo stesso font, a tua scelta */
    font-size: 30px;
    line-height: 1.5;
    margin-bottom: 30px;
    color: #000066;
    max-width: 500px; /* limita la larghezza se vuoi */
  }

  /* Link \"Scopri di più\" con freccia */
  .storia-link {
    position: absolute;
    right: -50px; /* Regola questo valore per definire l'overlap sul box grigio */
    bottom: 20px; /* Posizionamento verticale, modificabile a piacimento */
    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; /* Effetto hover */
  }

  /* Freccia (puoi sostituire con un'icona se preferisci) */
  .storia-arrow {
    font-size: 18px;
    transform: translateY(1px); /* piccola correzione di allineamento */
  }

  /* Box grigio a destra (colonna 2) */
  .storia-box {
    background-color: #ccc;
    width: 100%;
    height: 80%; /* regola l’altezza a piacere */
    /* Puoi sostituirlo con un'immagine:
       background: url('immagine.jpg') center/cover no-repeat; */
  }


  @media (max-width: 768px) {
    
    body {
      width:100%;
    }
    /* HEADER */
    .header {
      flex-direction: column;
      padding: 15px 20px;
    }
    .logo {
      position: static;
      font-size: 20px;
      margin-bottom: 10px;
    }
    nav ul {
      flex-direction: column;
      gap: 10px;
      justify-content: center;
      align-items: center;
    }
    nav ul li a {
      font-size: 16px;
    }
    
    /* HERO */
    .hero {
      padding: 0 20px;
      justify-content: center;
      text-align: center;
    }
    .testo-rettangolo {
      font-size: 100px;
      letter-spacing: -2px;
      text-align: center;
    }
    .testo-rettangolo .vuoto,
    .testo-rettangolo .pieno {
      position: static;
      transform: none;
      display: block;
      text-align: center;
    }
    
    /* SEZIONI GENERICHE */
    .content-section,
    .storia-section,
    .archivio-section,
    .contatti-section {
      padding: 30px 10px;
      min-height: auto;
    }
    
    /* GRIGLIE: passa a una colonna sola */
    .storia-wrapper,
    .archivio-wrapper {
      grid-template-columns: 1fr;
      gap: 20px;
    }
    
    /* CONTENUTO TESTUALE */
    .storia-left,
    .archivio-content,
    .contatti-content {
      text-align: center;
      padding: 0 10px;
    }
    .storia-title,
    .archivio-title,
    .contatti-title {
      font-size: 80px;
    }
    .storia-abstract,
    .archivio-abstract,
    .contatti-info {
      font-size: 18px;
      max-width: 100%;
      margin: 0 auto;
    }
    
    /* LINK "SCOPRI DI PIÙ": rimuovi posizionamenti assoluti */
    .storia-link,
    .archivio-link {
      position: static;
      margin-top: 10px;
      display: inline-block;
    }
    
    /* OUTLINE DI SFONDO: riduci dimensione e opacità */
    .storia-outline,
    .archivio-outline,
    .contatti-outline {
      font-size: 60px;
      opacity: 0.05;
      position: static;
      margin: 0 auto;
      text-align: center;
      white-space: normal;
    }
    
    /* BOX (immagini o grigio) */
    .storia-box,
    .archivio-box {
      width: 100%;
      height: auto;
    }
  }
}
