*,
*::before,
*::after {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  font-family: Verdana, Arial, sans-serif;
  background-color: #f5f5f5;
}

header {
  background-color: #f2f2f2;
  padding: 20px;
  display: flex;
  align-items: center;
}

header img {
  height: 100px;
  margin-right: 20px;
}

header h1 {
  margin: 0;
  font-size: 22px;
  color: #0056b3;
}

header p {
  margin: 3px 0;
  font-size: 13px;
}

nav {
  background-color: #0080c0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav ul li {
  padding: 15px 20px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

nav ul li:hover {
  background-color: #6495ed;
}

main {
  display: flex;
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

aside {
  width: 25%;
  padding: 15px;
  background-color: #ffffff;
}

aside h2 {
  color: #5e86c1;
  border-bottom: 2px solid #5e86c1;
  padding-bottom: 5px;
}

aside ul {
  list-style: none;
  padding: 0;
}

aside ul li {
  margin: 8px 0;
}

aside ul li a {
  text-decoration: none;
  color: #0080c0;
  font-weight: bold;
}

aside ul li a:hover {
  text-decoration: underline;
}

section {
  width: 75%;
  padding: 20px;
  background-color: #ffffff;
  margin-left: 20px;
}

section h2 {
  color: #5e86c1;
}

video {
  max-width: 100%;
  margin: 15px 0;
}

.avviso {
  background-color: #ffebcc;
  padding: 15px;
  border: 1px solid #ffa500;
  border-left: 6px solid #ff8c00;
  border-radius: 6px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.avviso:hover {
  transform: translateX(5px);
}

.avviso h3 {
  margin-top: 0;
  color: #cc6600;
}

.download-link,
.avviso a {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

.download-link:hover,
.avviso a:hover {
  background-color: #0056b3;
}

footer {
  background-color: #0080c0;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 20px;
  font-size: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

td, th {
  border: 1px solid #ccc;
  padding: 6px;
  text-align: center;
}

tr:nth-child(even) {
  background-color: #eee;
}

.avviso-warning {
  background-color: #fff4f4;
  padding: 10px;
  border-left: 4px solid #c0392b;
  margin-top: 10px;
}

.immagine-pagina {
  display: block;
  margin: auto;
  max-width: 300px;
}

.durata {
  background: #ccccff;
  padding: 6px;
  width: 150px;
  font-weight: bold;
}

.note {
  font-size: 0.9em;
  margin-top: 10px;
}

@media (max-width: 900px) {
  main {
    flex-direction: column;
  }

  aside, section {
    width: 100%;
    margin: 0;
  }

  nav ul {
    flex-direction: column;
  }

  nav ul li {
    text-align: center;
  }
}
.slider {
  position: relative;
  max-width: 100%;
  height: 400px;
  overflow: hidden;
}

.slide {
  display: none;
  position: relative;
}

.slide img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.slide.active {
  display: block;
}

/* testo sopra immagine */

.caption {
  position: absolute;
  bottom: 40px;
  left: 40px;
  color: white;
  background: rgba(0,0,0,0.5);
  padding: 15px 20px;
  border-radius: 5px;
}

/* frecce */

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  color: white;
  padding: 10px;
  cursor: pointer;
  background: rgba(0,0,0,0.4);
}

.prev { left: 10px; }
.next { right: 10px; }

/* pallini */

.dots {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 5px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
}

.dot.active {
  background-color: white;
}
#topBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #004080;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 5px;
  display: none;
}
/* =========================
   GALLERIA FOTOGRAFICA
   ========================= */

.galleria {
  max-width: 1200px;
  margin: auto;
}

.galleria h2 {
  text-align: center;
  margin-bottom: 30px;
}

/* griglia immagini */

.griglia-galleria {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

/* immagini */

.griglia-galleria img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.griglia-galleria img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

/* =========================
   LIGHTBOX
   ========================= */

#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}
/* SLIDER FULL WIDTH */
.slider {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.slide {
  position: relative;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  display: block;
}

/* OVERLAY SCURO */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.1); /* scuro semi-trasparente */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* TESTO CENTRATO */
.caption {
  color: #fff;
  text-align: center;
  padding: 0 20px;
}

.caption h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.caption p {
  font-size: 1.2rem;
}

/* FRECCE */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 2rem;
  padding: 10px;
  cursor: pointer;
  user-select: none;
}

.prev { left: 20px; }
.next { right: 20px; }

/* PALLINI */
.dots {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  display: inline-block;
  background-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dot.active, .dot:hover {
  background-color: #fff;
}
/* RESPONSIVE SLIDER */

/* =========================
   RESPONSIVE TABLET
   ========================= */

@media (max-width: 1024px) {

  .slide img {
    height: 350px;
  }

  .caption h2 {
    font-size: 2rem;
  }

  .griglia-galleria {
    grid-template-columns: repeat(2, 1fr);
  }

}


/* =========================
   RESPONSIVE SMARTPHONE
   ========================= */

@media (max-width: 768px) {

  .slide img {
    height: 250px;
  }

  .caption h2 {
    font-size: 1.5rem;
  }

  .griglia-galleria {
    grid-template-columns: 1fr;
  }

}
/* =========================
   RESPONSIVE GALLERIA
   ========================= */

@media (max-width: 900px) {

  .griglia-galleria {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 600px) {

  .griglia-galleria {
    grid-template-columns: 1fr;
  }

  .griglia-galleria img {
    height: 250px;
  }

}
/* TABLET */

@media (max-width: 900px) {
  .galleria {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* SMARTPHONE */

@media (max-width: 600px) {
  .galleria {
    grid-template-columns: 1fr;
  }

  .galleria img {
    height: 250px;
  }
}