  .gallery {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .gallery img {
    width: 600px;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
  }

  .gallery img:hover {
    transform: scale(1.05);
  }

  /* Modal */
  .modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
  }

  .modal-content {
    max-width: 60%; /* se cambia el % ya que imagen queda muy extendida*/
    max-height: 80vh;
    border-radius: 10px;
  }

  .close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
  }

  .close:hover {
    color: #ffeb3b;
  }

  @media (max-width: 600px) {
    .gallery img {
      height: 90px;
    }

    .close {
      top: 10px;
      right: 15px;
      font-size: 30px;
    }
  }