body { font-family: sans-serif; margin: 0; padding: 0; background: #fafafa; } header { padding: 10px 15px; background: #333; color: white; } .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 10px; } .thumb { cursor: pointer; overflow: hidden; border-radius: 4px; border: 1px solid #ddd; background: white; position: relative; } .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; } /* Icona play per i video */ .video-thumb { position: relative; } .play-icon { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.6); color: white; padding: 4px 6px; border-radius: 4px; font-size: 14px; } /* Modal */ .modal { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 1000; } .modal.open { display: flex; } /* 🔥 FIX IMPORTANTE: il modal ha dimensione fissa */ .modal-content { width: 90vw; height: 90vh; position: relative; display: flex; justify-content: center; align-items: center; } /* 🔥 FIX: contenitore media sempre a dimensione piena */ #modalMediaContainer { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; } /* 🔥 FIX: preview e full-res occupano lo stesso spazio */ #modalMediaContainer img, #modalMediaContainer video { width: 100%; height: 100%; object-fit: contain; display: block; } .modal-close { position: absolute; top: -10px; right: -10px; background: #fff; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: bold; border: 1px solid #ccc; } /* Info Button */ .modal-info-btn { position: absolute; bottom: -10px; right: 40px; background: #fff; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 1px solid #ccc; font-size: 16px; z-index: 1500; } /* Info Panel */ .info-panel { position: fixed; top: 0; right: -320px; width: 320px; height: 100%; background: #fff; padding: 16px; box-shadow: -2px 0 6px rgba(0,0,0,0.25); transition: right 0.3s ease; overflow-y: auto; z-index: 2000; } .info-panel.open { right: 0; } .info-panel h3 { margin-top: 0; } .info-row { margin-bottom: 10px; } .info-row b { display: inline-block; width: 110px; } .info-map { width: 100%; height: 250px; margin-top: 15px; border-radius: 6px; overflow: hidden; border: 1px solid #ccc; } /* Leaflet */ .leaflet-container { background: #ddd; outline: none; }