.gallery {
    padding-top: 3%;
    column-count: 3;
    column-gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.3s;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    display: block;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.arrow {
  position: absolute;
  top: 50%;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  padding: 10px;
  user-select: none;
  z-index: 1001;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transform: translateY(-50%);
}

.modal .left {
  left: 20px;
}

.modal .right {
  right: 20px;
}


.modal-content {
    padding: 1rem;
    max-width: 90%;
    max-height: 80%;
    text-align: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 500px;
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 1rem;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* Responsive columns */
@media (max-width: 900px) {
    .gallery {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .gallery {
        column-count: 1;
    }
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  .arrow {
    top: 90%;
    background-color: transparent;
  }
}