﻿.gallery {
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 10px;
}

.gallery-item {
    flex: 1 1 calc(33% - 20px);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s;
    border-radius: 10px;
    box-shadow: 0px 10px 10px #c9c9c9;
}

.gallery-item p{
    font-weight: bold;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
}

.gallery-item img {
    width: 425px;
    height: 450px;
    display: block;
    object-fit: cover;
    opacity: 0.6;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item:hover img {
    opacity: 1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    display: flex;
    margin: 10% auto;
    padding: 20px;
    background: #fff;
    max-width: 44%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}


.modal-left img {
    max-width: 92%;
    height: auto;
    float: left;
    border-radius: 10px;
}

.modal-right {
    margin-left: 20px;
    margin-top: 20px;
    width: 40%;
}

.modal-right p {
    margin: 0;
}

.close {
    position: absolute;
    top: 15px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: black;
    cursor: pointer;
}

.nav-btn {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin-top: 20px;
    cursor: pointer;
    border-radius: 5px;
}

.nav-btn:hover {
    background-color: #555;
}

@media (max-width: 768px) {
    .gallery-item {
        flex: 1 1 calc(50% - 20px);
    }

    .modal-content {
        flex-direction: column;
    }

    .modal-right {
        margin-left: 0;
        margin-top: 20px;
        width: 80%;
        padding:0;
    }

    .nav-btn {
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        flex: 1 1 100%;
    }
}
