body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5; /* Optional background color */
}

.gallery {
    width: 80%;
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap onto new rows */
    justify-content: space-between; /* Adds space between items */
    gap: 10px; /* Adds space between rows */
    margin: 0 auto; /* Centers the gallery horizontally */
}

.gallery-item {
    width: 30%; /* Each item takes 30% of the row */
    height: 220px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-top:15px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Optional shadow for effect */
}

.gallery-item img {
    width: 100%; /* Makes the image responsive */
    height: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
}

.gallery-item:hover img {
    transform: scale(1.1); /* Zoom effect on hover */
}

.gallery-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent black background */
    color: white;
    text-align: center;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-radius: 8px 8px 0 0;
}

.gallery-item:hover .gallery-info {
    transform: translateY(0); /* Slide-up effect on hover */
}

.gallery-info h3 {
    margin: 0;
    font-size: 18px;
    color: white;
}

.gallery-info p {
    margin: 5px 0 0;
    font-size: 14px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .gallery-item {
        width: 90%; /* Two images per row on smaller screens */
    }
}
.gallery-info p {
    margin: 5px 0 0;
    font-size: 14px;
}



.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 90%;
    max-width: 700px;
    text-align: center;
}

.modal-image img {
    width: 100%;
    border-radius: 5px;
}

.modal-image p {
    color: white;
    margin-top: 10px;
    font-size: 16px;
}

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

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.prev:hover, .next:hover {
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
}

@media screen and (max-width: 768px) {
    .gallery img {
        width: 100%;
        height: 180px;
    }

    .modal-content {
        width: 95%;
    }

    .modal-image p {
        font-size: 14px;
    }
}
