/* ==========================================================================
   Stili Generali e Layout
   ========================================================================== */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #333;
}

header {
  background: url('../images/PT50.webp') no-repeat center center/cover;
  color: white;
  padding: 50px 20px;
  text-align: center;
}

header h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
}

section {
  padding: 40px 20px;
  max-width: 1000px;
  margin: auto;
}

.highlight {
  background-color: #f1f1f1;
  padding: 20px;
  border-left: 5px solid #007BFF;
  margin: 30px 0;
}

img.full {
  display: block;      /* Permette il centraggio tramite margin auto */
  width: 100%;
  max-width: 650px;    /* Limita la grandezza massima dell'immagine */
  height: auto;
  margin: 20px auto;   /* Centra l'immagine nella pagina */
  border-radius: 8px;
}

footer {
  background-color: #222;
  color: white;
  text-align: center;
  padding: 20px 10px;
}

#esempi-uso h2 {
  margin-top: 0;
}

/* ==========================================================================
   Componente: Carosello / Galleria
   ========================================================================== */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 600px; /* Ridotto da 800px a 600px per rendere tutto il blocco più compatto */
  margin: auto;
}

.carousel figure {
  flex: 0 0 50%;
  box-sizing: border-box;
  padding: 10px;
  text-align: center;
  margin: 0;
}

.carousel img {
  width: 100%;
  max-width: 220px; /* Forza l'immagine WebP a non superare questa larghezza all'interno del suo frame */
  height: auto;
  border-radius: 6px;
  display: inline-block; /* Garantisce che l'immagine rispetti il text-align: center del parent */
}

.carousel {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel figcaption {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #555;
  text-align: center;
  margin-top: 12px;
  line-height: 1.2;
}

/* Frecce di navigazione */
.carousel-btn {
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.3em 0.6em;
  cursor: pointer;
  z-index: 2;
  transition: background-color 0.2s ease;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

.carousel-btn.left {
  margin-right: 10px;
}

.carousel-btn.right {
  margin-left: 10px;
}

/* Indicatori a punti (Dots) */
.carousel-dots {
  text-align: center;
  margin-top: 12px;
}

.carousel-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 6px;
  border: none;
  background-color: #bbb;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-dots button.active {
  background-color: #007BFF;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 600px) {
  .carousel figure {
    flex: 0 0 100%;
  }
}