@keyframes popup-fadeIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1);    }
}

@keyframes popup-fadeOut {
    from { opacity: 1; transform: scale(1);    }
    to   { opacity: 0; transform: scale(0.92); }
}

#popup5x1000 {
    padding: 0;
    border: none;
      border-radius: 10px;
      background: red;
      opacity: 0.7;
    width: 50vmin;
    max-width: 90vw;
    max-height: 90vh;
    aspect-ratio: 10 / 12;   /* aggiorna col rapporto reale dell'immagine */
    position: relative;
    overflow: hidden;
    box-shadow: 1vmin 5vmin 5vmin black;
    animation: popup-fadeIn 0.3s ease forwards;
}

#popup5x1000.closing {
    animation: popup-fadeOut 0.3s ease forwards;
}

#popup5x1000 img {
    display: block;
    width: 100%;:w

    height: 100%;
    object-fit: contain;
}

#popup5x1000 #closePopup5x1000 {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1;

    /* Dimensioni */
    width: 50px;
    height: 50px;
    
    /* Sfondo trasparente e Bordo bianco spesso */
    background-color: transparent;
    border: 3px solid white;
    
    /* Forma circolare */
    border-radius: 50%;
    
    /* Centratura della X */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Stile del testo (la X) */
    color: white;
    font-size: 24px;
    font-family: sans-serif;
    cursor: pointer;
    
    /* Rimuove outline di default */
    outline: none;
    padding: 0;
    
    /* Opzionale: transizione fluida per l'hover */
    transition: all 0.3s ease;
}

  #reopenPopup5x1000 {
      position: fixed;
      top: 1rem;
      right: 1rem;
      z-index: 9999;
      background: #c0392b;
      color: white;
      border: none;
      border-radius: 4px;
      padding: 0.5rem 1rem;
      font-size: 0.85rem;
      font-weight: bold;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(0,0,0,0.3);
      transition: background 0.2s ease;
  }

  #reopenPopup5x1000:hover {
      background: #e74c3c;
  }
