/* -----------------------------
   Stile base
----------------------------- */
body {
  margin: 0;
  font-family: 'Georgia', serif;
  background-color: #0d1b2a;
  color: #ffffff;
  line-height: 1.6;
}

header, footer {
  text-align: center;
  padding: 1.5rem;
  background-color: #1b263b;
  color: #ffffff;
}

h1, h2 {
  color: #e0e1dd;
}

main {
  padding: 2rem;
  max-width: 960px;
  margin: auto;
}

.opera {
  margin-bottom: 2rem;
  background-color: #1b263b;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.opera img, .foto-opera {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 5px;
  margin-bottom: 1rem;
  border: 2px solid #415a77;
  cursor: pointer;
  transition: transform 0.3s;
}

.foto-opera:hover {
  transform: scale(1.02);
}

a {
  color: #ffcc00;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  background-color: #ffffff;
  color: #001f3f;
  border: none;
  padding: 10px 15px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 5px;
}

button:hover {
  background-color: #cccccc;
}

.descrizione {
  font-size: 1.1rem;
  margin-top: 10px;
  line-height: 1.5;
}

/* -----------------------------
   Modal Lightbox
----------------------------- */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  border: 4px solid white;
  border-radius: 10px;
  animation: zoom 0.3s ease;
}

@keyframes zoom {
  from { transform: scale(0.5); }
  to { transform: scale(1); }
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* -----------------------------
   Lente zoom
----------------------------- */
.lente {
  position: absolute;
  border: 2px solid #fff;
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 10px black;
  display: none;
  z-index: 1000;
}

/* -----------------------------
   Menu laterale
----------------------------- */
.side-menu {
  position: fixed;
  top: 120px;
  left: 20px;
  background-color: #0a1a2f;
  padding: 15px;
  border-radius: 8px;
  z-index: 999;
}

.side-menu ul {
  list-style: none;
  padding: 0;
}

.side-menu li {
  margin-bottom: 10px;
}

.side-menu a {
  color: #ffcc00;
  text-decoration: none;
  font-weight: bold;
}

.side-menu a:hover {
  text-decoration: underline;
}

/* -----------------------------
   Navbar principale responsive
----------------------------- */
.main-nav {
  background-color: #122;
  overflow: hidden;
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.main-nav li {
  margin: 0 1rem;
}

.main-nav a {
  color: #d3bc28;
  text-decoration: none;
  font-weight: bold;
  display: block;
  padding: 1rem;
  transition: background-color 0.3s;
}

.main-nav a:hover {
  background-color: #1b263b;
}
@media (max-width: 768px) {
  .main-nav ul {
    display: none;
    flex-direction: column;
    background-color: #0a1a2f;
    padding: 1rem;
    border-radius: 8px;
  }

  .main-nav ul.show {
    display: flex !important;
  }

  .menu-toggle {
    display: block;
  }
}


/* -----------------------------
   Media Queries Responsive
----------------------------- */

/* -----------------------------
   Presentazione con freccia
----------------------------- */
.presentazione {
  background-color: #0c1f33;
  color: white;
  padding: 1.5rem;
  border-radius: 10px;
  margin: 1rem auto;
  max-width: 800px;
}

.toggle-btn {
  background-color: #1f4e79;
  color: #ffcc00;
  border: none;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-radius: 5px;
  font-size: 1rem;
}

.toggle-btn:hover {
  background-color: #617aaa;
}

.arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  margin-right: 8px;
}

.arrow.rotate {
  transform: rotate(90deg);
}

/* -----------------------------
   Bottone link esterno
----------------------------- */
.bottone-centro {
  text-align: center;
  margin: 2rem 0;
}

.bottone-icona {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #1f4e79;
  color: #ffcc00;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.bottone-icona:hover {
  background-color: #2d6ea3;
}

.icona-bottone {
  width: 24px;
  height: 24px;
}


/* -----------------------------
   Galleria immagini responsive
----------------------------- */
.galleria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
}

.galleria-item {
  background-color: #1b263b;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.galleria-item:hover {
  transform: scale(1.02);
}

.galleria-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  border: 2px solid #415a77;
  transition: transform 0.3s ease;
  background-color: #0d1b2a;
}


.galleria-item p {
  margin-top: 10px;
  font-weight: bold;
  color: #ffcc00;
}
.galleria-item img {
  width: 100%;
  height: auto;
  max-height: 500px;               /* limita altezza immagini orizzontali */
  object-fit: contain;             /* mostra tutta l'immagine senza tagli */
  background-color: #0d1b2a;       /* colore di sfondo per immagini più piccole */
  border-radius: 6px;
  border: 2px solid #415a77;
  transition: transform 0.3s ease;
}

/* Bottone menu mobile (solo su schermi piccoli) */
.menu-toggle {
  display: none;
  background-color: #1f4e79;
  color: #ffcc00;
  padding: 10px 15px;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  margin: 1rem auto;
  cursor: pointer;
}

/* Menu orizzontale di default */
.main-nav ul {
  display: flex;
  justify-content: center;
  background-color: #122;
  padding: 0.5rem;
  margin: 0;
  list-style: none;
}

.main-nav li {
  margin: 0 1rem;
}

.main-nav a {
  color: #d3bc28;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: #ffcc00;
}

/* --- Mobile styles --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    text-align: center;
  }

  .main-nav ul {
    flex-direction: column;
    background-color: #0a1a2f;
    padding: 1rem;
    border-radius: 8px;
    display: none;
  }

  .main-nav.show ul {
    display: flex;
  }

  .main-nav li {
    margin: 0.5rem 0;
    text-align: center;
  }
}
.header-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}
.header-gif {
  max-width: 100%;
  overflow: hidden;
}
.accordion-lingue {
  margin: 2rem auto;
  max-width: 900px;
  padding: 1rem;
  background-color: #1b263b;
  border-radius: 10px;
}

.lang-toggle {
  background-color: #0a1a2f;
  color: #ffcc00;
  font-size: 1.2rem;
  border: none;
  padding: 0.6rem 1rem;
  margin: 0.5rem 0;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.lang-toggle:hover {
  background-color: #1f4e79;
}

.lingua-box {
  display: none;
  padding: 1rem;
  background-color: #122;
  border-left: 4px solid #ffcc00;
  margin-bottom: 1rem;
  border-radius: 5px;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.bottone-link {
  display: inline-block;
  background-color: #004080;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  font-size: 1rem;
}

.bottone-link:hover {
  background-color: #0066cc;
}
.link-img {
  max-width: 100%;
  height: auto;
  border: 2px solid #415a77;
  border-radius: 8px;
  transition: transform 0.3s;
  cursor: pointer;
}

.link-img:hover {
  transform: scale(1.03);
}
img.full-width {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border: 2px solid #415a77;
  border-radius: 6px;
  background-color: #0d1b2a; /* Evita "buchi" nei bordi */
  margin: 1rem auto;
}
img.foto-pagina {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid #415a77;
  border-radius: 6px;
  margin: 1.5rem auto;
  cursor: pointer; /* se usi la lente e lightbox */
  transition: transform 0.2s ease;
}

img.foto-pagina:hover {
  transform: scale(1.02);
}
.img-center {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}

.link-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 2px solid #415a77;
}
.link-img {
  max-width: 800px;
  width: 100%;
  height: auto;
}
