/* ========================
   RESET & VARIABILI GLOBALI
=========================== */
:root {
  box-sizing: border-box;
  font-size: 16px;
  line-height: 1.6;
  scroll-padding-top: var(--navbar-height);

  --primary: #2A345B; /*rgb(0, 32, 91);*/
  --gold: #f39c12; /*#85714D;*/
  --sfondo-section: rgb(141, 216, 255, 0.01);
  --light-bg: lightgrey;
  --text: #333;
  --accent: #f39c12;
  --font: 'Brandon','Nunito', sans-serif;
  --flex-gap: 1rem;
  --gradiente: linear-gradient(90deg, #2A345B 0%, #001a33 50%, #001122 100%);
  
  --navbar-height: 120px;

  --light-blue-bg: #e3e3e3;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

/* Titoli e testo */
h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.2rem);
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  line-height: 1.25;
  font-weight: 600;
  text-align: center;
}

h3 {
  font-size: clamp(1.2rem, 2.3vw, 1.5rem);
  line-height: 1.3;
  font-weight: 600;
  text-align: center;
}

h4 {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.4;
  font-weight: 500;
  text-align: center;
}

p {
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  line-height: 1.6;
  font-weight: 400;
}


a[href^="mailto:"] {
  text-decoration: underline;
  transition: color 0.3s;
}
a[href^="mailto:"]:hover {
  color: var(--gold);
}

.corsivo {
  font-style: italic;
}

body {
  font-family: var(--font);
  background-color: whitesmoke;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ========================
   CONTAINER
=========================== */
.container {
  display: flex;
  flex-direction: column;
  gap: var(--flex-gap);
  margin: 0 auto;
  max-width: 1400px;
  padding: 0.1rem 3rem;
  justify-content: center;
  align-items: center;
}

.container > * {
  padding: 0 clamp(0, 3vw, 2rem);
  width: 100%;
}

/* ========================
   NAVBAR
=========================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem clamp(1rem, 3vw, 2rem);
  background: var(--gradiente);
  
}

.navbar img.logo {
  margin: 5px 0;
  display: block;
  height: clamp(60px, 10vw, 100px);
  width: auto;
}

/* Nav links desktop */
.nav-menu {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-menu a:hover {
  color: var(--accent);
}

/* Hamburger */
.hamburger {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* ========================
   MOBILE
=========================== */
@media (max-width: 768px) {

  /* Hamburger visibile e posizionato assolutamente a destra, centrato verticalmente */
  .hamburger {
    display: flex;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    background: #444;
    position: absolute;
    top: 100%; /* esattamente sotto la navbar */
    right: 0;
    padding: 1rem;
    gap: 1rem;
  }

  .nav-menu.show {
  display: flex;
  background: var(--gradiente);
  padding: 1rem;
  max-width: 50%;
}
}

/* Reset margini e padding per sicurezza */
.nav-menu, .nav-menu li, .nav-menu a {
  margin: 0;
  padding: 0;
}

/* ========================
   SEZIONI BASE
=========================== */
section {
  padding: 1rem 1rem;
  /*border-bottom: 1px solid var(--light-bg);*/
  text-align: center;
}

section a {
  text-decoration: none;
  color: var(--text);
  transition: color 0.3s;
}

.section-light {
  background-color: #fff;
}

/* ========================
   CARD SECTION (versione Grid + responsive finale)
=========================== */

section.card-section {
  display: grid;
  max-height: 300px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 3rem;
  justify-items: center;
  align-items: stretch; /* fornisce altezza uniforme per ogni riga */
}

/* Ogni <a> contiene la card, che riempie la cella */
section.card-section > a {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* CARD BASE */
.card {
  flex: 1 1 auto;             /* riempie tutto lo spazio dell'<a>' */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* contenuto allineato in alto */
  align-items: center;
  text-align: center;
  position: relative;

  width: 100%;
  height: 100%;

  padding: clamp(2rem, 4vw, 3rem); /* scaling proporzionale */
  border-radius: 14px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  background-color: #222;

  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.card:hover h2 {
  color: var(--accent);
  transition: color 0.3s ease;
}

/* Titoli e testo */
.card h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  z-index: 2;
}

.card p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-style: italic;
  z-index: 2;
  margin-bottom: 0; /* evita spazi extra */
}

/* Background + overlay */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.6;
  transition: transform 1.5s ease;
  border-radius: 10px;
  z-index: 0;
}

.card:hover::before {
  transform: scale(1.4);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  z-index: 1;
}

/* Specific backgrounds */
/*Mettere nel foglio di stile specifico della pagina*/

/* ========================
   RESPONSIVE
=========================== */

/* Tablet (due colonne) */
@media (max-width: 900px) {
  section.card-section {
    gap: 1rem;
    max-height: unset;
  }

  .card {
    margin: 0 auto;
  }
}

/* Mobile (una colonna) */
@media (max-width: 600px) {
  section.card-section {
    grid-template-columns: 1fr;
    justify-items: center; /* centra le celle della grid */
  }

  section.card-section > a {
    display: flex;
    justify-content: center; /* centra il contenuto dell'<a> */
    width: 100%;

  }

  .card {
    width: 100%;
    border-radius: 12px;
    margin: 0 auto;
  }

  .card:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
  }


}

/* ========================
   DESCRIZIONE
=========================== */
.descrizione {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
}

.descrizione article {
  flex: 1;
  min-width: 250px;
  text-align: left;
}

.immagine img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ========================
   FOOTER
=========================== */
.footer {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--gradiente);
  color: #fff;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 1rem;
  margin-top: auto;
}

.footer a, .footer a:any-link {
  color:white;
}
.footer a:hover{
  color: orange;
}

.footer-social {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  background-color: var(--primary);
  color: #fff;
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 1rem;
  margin-top: auto;
}

.footer-social img {
  background-color: var(--light-bg);
  border-radius: 20%;
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.footer-social a:hover img {
  transform: scale(1.2);
}

/* ========================
   ANIMAZIONI
=========================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.show {
  opacity: 1;
  transform: translateY(0);
}

/* ========================
   PARALLAX
=========================== */
.parallax {
  background-image: url('img/sfondo.jpg');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: white;
  font-size: 2.5rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.parallax-content {
  max-width: 800px;
  text-align: center;
}



/* ========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .container {
  display: flex;
  flex-direction: column;
  gap: var(--flex-gap);
  margin: 0 auto;
  max-width: 1300px;
  padding: 0.1rem 1rem;
}

  .card {
    width: 200px;
  }

  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
  }

  .descrizione {
    flex-direction: column;
    text-align: center;
  }

  .descrizione article {
    text-align: center;
  }

  .parallax {
    background-attachment: scroll;
    font-size: 1.5rem;
  }

  .container > * {
    padding: 0 1rem;
  }
}

ul.list {
  list-style: none;
  padding-left: clamp(1.5rem, 3vw, 2.5rem);  /* spazio per i bullet */
  margin: 1rem auto;      /* centra la lista come blocco */
  max-width: 600px;       /* opzionale, per non occupare tutto lo schermo */
}

/* Bullet personalizzato */
ul.list li {
  position: relative;
  margin-bottom: 0.5rem;
  color: #333;
  text-align: left;
  padding-left: clamp(1rem, 3vw, 1.8rem);     /* spazio per il bullet */
}

/* Bullet */
ul.list li::before {
  content: "•";
  position: absolute;
  left: 0;                /* allinea tutti i pallini allo stesso punto */
  color: var(--gold);
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  ul.list {
    width: 100%;
    margin: 1rem 0;
  }
}
