/* SFONDO GENERALE */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #5e778f; /* sfondo scuro */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
}

h2 {
  color: #0077cc; /* azzurro */
}

/* CONTENITORE COME FOGLIO A4 */
.page {
  background: #f9f9f9;
  width: 100%;
  max-width: 900px;   /* simile ad A4 in orizzontale */
  min-height: 100vh;  /* copre tutta l’altezza */
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 25px rgba(0,0,0,0.5);
  border-radius: 8px;
  overflow: hidden;
}

/* TOPBAR CON LOGO + NOME */
.topbar {
  display: flex;
  align-items: center;
  background: #313c5a;
  color: rgb(248, 247, 238);
  padding: 10px 20px;
}
.topbar .logo {
  border-radius: 50%;
  margin-right: 15px;
}
.topbar .company-name {
  font-size: 1.5em;
  margin: 0;
}

/* HEADER CON SLIDESHOW */
header {
  position: relative;
  height: 200px;
  overflow: hidden;
}
header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
header img.active {
  opacity: 1;
}

/* LAYOUT PRINCIPALE */
.container {
  flex: 1;
  display: flex;
  flex-direction: row;
  padding: 20px;
}

/* MENU LATERALE */
nav {
  width: 220px;
  background: #7187b1; /* blu scuro */
  color: white;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
nav ul li {
  border-bottom: 1px solid #2e4f8a;
}
nav ul li a {
  display: block;
  padding: 15px;
  color: white;
  text-decoration: none;
  transition: background 0.3s;
}
nav ul li a:hover {
  background: #2e4f8a;
}

/* MAIN AREA */
main {
  flex: 1;
  background: white;
  padding: 20px;
  margin-left: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* FOOTER */
footer {
  background: #313c5a;
  color: white;
  text-align: center;
  padding: 15px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  nav {
    width: 100%;
    margin-bottom: 20px;
  }
  main {
    margin-left: 0;
  }
}

/* Pulsante ovale */
.btn-oval {
  background: #24a33f;      /* blu scuro */
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 999px;     /* rende il bottone ovale */
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

.btn-oval:hover {
  background: #59d173;      /* blu più chiaro */
  transform: translateY(-2px); /* effetto sollevamento */
}

.btn-oval:active {
  transform: translateY(0); /* torna giù quando cliccato */
}



/* GALLERIA FOTOGRAFICA  ---------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery-item {
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.gallery-item .desc {
  padding: 10px 15px;
  background: white;
  font-size: 0.95em;
  color: #333;
  text-align: center;
}

/* LIGHTBOX */
.lightbox {
  display: none; /* nascosto di default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 70vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox #lightbox-desc {
  color: white;
  margin-top: 15px;
  font-size: 1.1em;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2em;
  color: white;
  cursor: pointer;
}