﻿.filter-btns {
    margin-bottom: 2rem;
}

    .filter-btns .btn {
        margin: 0.25rem;
        transition: all 0.3s ease;
    }

        .filter-btns .btn.active {
            background-color: #212529;
            color: white;
            border-color: #212529;
        }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
    opacity: 1;
    transform: scale(1);
}

    .gallery-item.hidden {
        opacity: 0;
        transform: scale(0.8);
        pointer-events: none;
    }

    .gallery-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

    .gallery-item img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    .gallery-item:hover img {
        transform: scale(1.05);
    }

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(33, 37, 41, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.no-images {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
}

    .image-modal.show {
        display: flex;
        opacity: 1;
    }

.modal-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

    .modal-container::-webkit-scrollbar {
        width: 8px;
    }

    .modal-container::-webkit-scrollbar-track {
        background: transparent;
    }

    .modal-container::-webkit-scrollbar-thumb {
        background-color: rgba(255,255,255,0.3);
        border-radius: 4px;
    }

        .modal-container::-webkit-scrollbar-thumb:hover {
            background-color: rgba(255,255,255,0.5);
        }

.modal-content-image {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
}

    .close:hover {
        background: rgba(255,255,255,0.1);
        transform: scale(1.1);
    }

.modal-open {
    overflow: hidden;
    height: 100vh;
}

.modal-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.7);
    color: #fff !important;
    padding: 15px 20px;
    font-size: 1rem;
    text-align: left;
    box-sizing: border-box;
    line-height: 1.4;
    border-radius: 0 0 8px 8px;
}

    .modal-caption * {
        color: inherit !important;
    }

    .modal-caption h5 {
        margin: 0 0 5px 0;
        font-size: 1.2rem;
        font-weight: 600;
    }

    .modal-caption p {
        margin: 0 0 3px 0;
        font-size: 0.95rem;
        opacity: 0.9;
    }

    .modal-caption small {
        font-size: 0.8rem;
        opacity: 0.7;
    }


@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .gallery-item img {
        height: 150px;
    }

    .filter-btns .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .gallery-overlay {
        padding: 0.5rem;
    }

        .gallery-overlay h5 {
            font-size: 1rem;
        }

    .close {
        top: 15px;
        right: 15px;
        font-size: 30px;
        width: 45px;
        height: 45px;
    }

    .modal-container {
        padding: 10px;
    }

    .modal-content {
        max-width: 98%;
    }

    .modal-caption {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

        .modal-caption h5 {
            font-size: 1rem;
        }

        .modal-caption p {
            font-size: 0.85rem;
        }

        .modal-caption small {
            font-size: 0.75rem;
        }
}
