/* Stili generali */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: #f4f4f4;
}
header {
  text-align: center;
  text-transform: uppercase;
  font-size: 3em;
  padding: 20px 0;
  background-color: #f4f4f4;
  color: #333;
  font-family: 'Playfair Display', serif;
  transition: all 0.3s ease;
}
header.shrink {
  height: 40px;
  font-size: 1.2em;
  padding: 0;
  line-height: 40px;
}

/* Navigazione */
nav {
  height: 40px;
  background: #eee;
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  pointer-events: all;
}
nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 4px;
}
nav a:hover {
  background-color: #ccc;
}

/* Sezioni */
.section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: relative;
  z-index: 0;
}
.text-block {
  flex: 1;
  min-width: 300px;
  padding: 20px;
  font-size: 1.1em;
  font-family: 'Playfair Display', serif;
  color: #333;
}
.image-block {
  flex: 1;
  min-width: 300px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.image-block img {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}
.image-block img:hover {
  transform: scale(1.02);
}

.double-images {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 40px auto;
  max-width: 1000px;
}
.double-images img {
  width: 100%;
  max-width: 450px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Frecce slider */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: white;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 10;
  transition: 0.3s ease;
}
.arrow.left {
  left: 10px;
}
.arrow.right {
  right: 10px;
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  background: url('../img/PracticeinVenice.jpg') no-repeat center center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 30%, rgba(255, 255, 255, 0) 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-left: 5%;
  box-sizing: border-box;
}
.hero-text {
  max-width: 600px;
  padding: 40px;
  font-family: 'Playfair Display', serif;
  font-size: 1.2em;
  line-height: 1;
  color: whitesmoke;
}

/* Gallery Section */
.custom-gallery {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 960px;
  margin: 60px auto;
  padding: 0 40px;
  box-sizing: border-box;
}
.gallery-track {
  display: flex;
  transition: transform 0.5s ease;
  gap: 20px;
}
.image-wrapper {
  width: 280px;
  height: 280px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.gallery-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.gallery-image:hover {
  transform: scale(1.05);
}

/* Regole per contenitori video misti dinamici (Sezione 6 e Nuova 8) */
.video-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

#evento6, #evento8 {
  align-items: center; 
  justify-content: center;
}

#mediaContainer6, #mediaContainer8 {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

#mediaContainer6 video, #mediaContainer6 img,
#mediaContainer8 video, #mediaContainer8 img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  border-radius: 8px;
}

/* Footer */
footer {
  background-color: #222;
  color: #fff;
  text-align: center;
  padding: 20px;
}
footer a {
  color: lightblue;
}

/* Media Queries */
@media (max-width: 768px) {
  .section {
    flex-direction: column;
    text-align: center;
  }
  .image-block img {
    max-width: 90%;
  }
  .double-images img {
    max-width: 90%;
  }
  .arrow {
    font-size: 1.5rem;
    padding: 0.3rem;
  }
  .hero-text {
    margin: 0 20px;
    font-size: 1em;
    padding: 20px;
  }
  .gallery-image {
    width: 90vw;
  }
  .custom-gallery {
    padding: 0 20px;
  }
}