/* Reset leggero */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Arial, sans-serif;
  line-height: 1.6;
  color: #222;
}

.container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1, h2, h3 {
  font-weight: 600;
}

h2 {
  margin: 2.5rem 0 1rem;
}

.intro {
  margin: 2rem 0;
  font-size: 1.1rem;
}


/* ------------------ Banner ------------------ */

.banner {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  background: linear-gradient(
    rgba(0,0,0,0.4),
    rgba(0,0,0,0.4)
  );
}


/* ------------------ Cards ------------------ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.card h3 {
  padding: .8rem 1rem 1rem;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}


/* ------------------ Footer ------------------ */

footer {
  margin-top: 3rem;
  padding: 1rem;
  text-align: center;
  font-size: .9rem;
  background: #f4f4f4;
}


/* ------------------ Layout contenuti interni ------------------ */

.content-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.content-layout img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.content-layout ul {
  margin-top: .6rem;
  padding-left: 1.2rem;
}


/* ------------------ Sezione testuale con immagine flottante ------------------ */

/* - paragrafi di testo in generale giustificati */
main p {
  text-align: justify;
  hyphens: auto;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}

/* - punti elenco giustificati e rientrati */
main li {
  text-align: justify;
  hyphens: auto;
  margin-bottom: 0.2rem;
  margin-left: 1rem;
}


.content-flow {
  margin-top: 1.5rem;
  line-height: 1.6;
}

.float-image {
  float: right;
  width: 500px;
  max-width: 50%;
  margin: 0 0 1rem 1.5rem;
  border-radius: 10px;
}


/* ------------------ Link ritorno ------------------ */

.back-link {
  margin-top: 2rem;
}


/* ------------------ Mobile ------------------ */

@media (max-width: 800px) {

  .content-layout {
    grid-template-columns: 1fr;
  }

  .float-image {
    float: none;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem 0;
  }
}
