body {
    margin: 0;
  }
  
  .close-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
  }
  
  .gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .grid-item {
    position: relative; /* Added position relative for positioning zoom icon */
  }

  .zoom-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: none;
  }

  .grid-item:hover .zoom-icon {
    display: block;
  }
  
  .grid-item img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  .grid-item img:hover {
    transform: scale(1.1);
  }
  
  .modal {
    display: none;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px; /* Added padding for margin around the zoomed image */
    box-sizing: border-box; /* Make sure padding is included in width and height calculations */
  }
  
  .modal-content {
    display: block;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Prevent image stretching; fit within the modal */
  }
  
  .close {
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 30px;
    cursor: pointer;
  }
  