body {
  text-align: center;   /* centra gli elementi inline-block */
}

.photo-box {
  position: relative;   /* serve per posizionare i marker */
  display: inline-block;
  margin: 40px auto;  /* 40px sopra e sotto, auto ai lati per centrarla */
}

.photo-box img {
  width: 500px;   /* imposta la larghezza che vuoi */
  height: auto;   /* mantiene le proporzioni */
  border-radius: 8px;
}

.photo-box-long img {
  width: 850px;  /* oppure 700px, dipende quanto vuoi ingrandire */
  height: auto;  /* mantiene le proporzioni */
}

.photo-box-small img {
  width: 350px;  /* oppure 700px, dipende quanto vuoi ingrandire */
  height: auto;  /* mantiene le proporzioni */
}

.marker {
  position: absolute;
  width: 30px;    /* dimensione fissa per desktop */
  height: 30px;   
  background: #ff4757;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;  /* font fisso per desktop */
  cursor: pointer;
  transform: translate(-50%, -50%); /* centra il marker nel punto */
}

[id^="section"] {
  scroll-margin-top: 80px; /* Sostituisci 80px con l'altezza della tua barra */
}

/* Media query per tablet */
@media screen and (max-width: 768px) {
  .photo-box img {
    width: 90vw;  /* si adatta alla larghezza del viewport */
    max-width: 500px;
  }
  
  .photo-box-long img {
    width: 95vw;
    max-width: 850px;
  }
  
  .marker {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }
}

/* Media query per smartphone */
@media screen and (max-width: 480px) {
  .photo-box {
    margin: 20px auto;
  }
  
  .photo-box img {
    width: 95vw;
    max-width: 400px;
  }
  
  .photo-box-long img {
    width: 98vw;
    max-width: 600px;
  }
  
  .marker {
    width: 14px;     /* marker più piccoli per mobile */
    height: 14px;
    font-size: 8px;  /* testo più piccolo */
    font-weight: 600; /* un po' più grassetto per compensare */
  }
}

/* Media query per schermi molto piccoli */
@media screen and (max-width: 320px) {
  .marker {
    width: 12px;
    height: 12px;
    font-size: 8px;
  }
}