/* Base styling */
body {
    font-family: Didot, serif;
    margin: 0;
    padding: 0;
    background-color: #fdfdfb;
    color: #333;
    overflow-x: hidden;
}

/* Header */
header {
    background-color: #4682b4; /* azzurro tendente al blu */
    color: white;
    text-align: center;
    padding: 0.8em 1em 1.1em 1em;
    font-size: 2em;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 100;
}

header::after {
    content: "";
    display: block;
    width: 80%;
    height: 1px;
    background-color: #ffffff;
    margin: 3px auto 0 auto; /* più vicino al titolo */
}

h1 {
    margin: 0;
    font-weight: normal;
}

/* Section titles */
.section-title {
    text-align: center;
    font-size: 2em;
    margin: 1.5em 0 1em 0;
    color: #333;
    font-weight: normal;
}

/* Hero section */
.gallery.hero {
    margin: 0;
    padding: 0;
    position: relative;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.gallery.hero .photo {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.gallery.hero .photo img {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    filter: brightness(0.85);
    display: block;
    border: none;
    border-radius: 0;
}

/* Features recap image */
.features-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 0;
    padding: .2em;
    /* background-color: #fdfdfb; stesso sfondo del sito */
}

.features-image img {
    width: 70%;
    max-width: 100%;
    height: auto;
    display: block;
    /* border-radius: 8px; */
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); */
}

/* Welcome text */
.center_text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1em 1em;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.4em;
    line-height: 1.6em;
    color: #333;
}

/* ————————————————————————————
   Spazio sotto la Description
   ———————————————————————————— */
.description-wrapper {
  margin-bottom: 5em;  /* regola a tuo piacere */
}

/* Boxes */
.box {
    flex: 1 1 45%;
    max-width: 600px;
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 2em;
    margin: 1em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    color: #333;
}

.box h2 {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 0.5em;
}

.box p, .box ul {
    font-size: 1em;
    color: #333;
}

/* Lists */
ul {
    padding-left: 1.2em;
    margin-bottom: 1.5em;
}

/* Gallery */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: .1em 1em;
    padding-bottom: 1.5em;
    background-color: #fdfdfb;
}

.photo {
    margin: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    width: 660px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: white;
}

.photo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.gallery-photo {
    margin: 0.5em;
    border: 1px solid #ccc;
    border-radius: 2px;
    overflow: hidden;
    width: 300px;
    max-width: 90vw;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: white;
}

.gallery-photo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}


/* Responsive adjustments */
@media (max-width: 700px) {
    .photo {
        width: 90%;
    }
    .gallery-photo {
        width: 90vw;
        margin: 0.5em auto;
    }
    .box {
        flex: 1 1 100%;
        max-width: 90%;
    }
    header {
        font-size: 1.5em;
    }
    .section-title {
        font-size: 1.5em;
    }
}

/* Modal Gallery */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 15, 15, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

#modal-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 2vw;
  padding: 5vh 5vw;
  max-width: 100%;
  height: 80vh;
}

#modal-track img {
  scroll-snap-align: center;
  max-height: 100%;
  max-width: 90vw;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

#close-modal {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 2em;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

#close-modal:hover {
  color: #ccc;
}

/* Shared Modal Gallery Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 15, 15, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 2vw;
  padding: 5vh 5vw;
  max-width: 100%;
  height: 80vh;
}

.modal-track img {
  scroll-snap-align: center;
  max-height: 100%;
  max-width: 90vw;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 2em;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.modal-close:hover {
  color: #ccc;
}
.box h2,
.box p,
.box ul,
.box li {
    color: #000;
}

@media (max-width: 768px) {
  .gallery.hero {
    height: auto;
  }

  .gallery.hero .photo {
    height: auto;
  }

  .gallery.hero .photo img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}

@media (max-width: 600px) {
  .features-image img {
    width: 100%;
  }
}
