﻿/* Reset and basics */
body {
    margin: 0;
    background: #ffffff; /* White background */
}

.masonry {
    column-count: 6; /* ✅ 6 columns */
    column-gap: 16px; /* ✅ spacing between columns */
    padding: 20px;
    background: transparent;
    position: relative;
    top: 0rem;
    margin-bottom: 3rem;
}

.card {
    display: inline-block; /* ✅ important for masonry layout */
    width: 100%;
    background: #ffffff;
    box-shadow: none;
    cursor: pointer;
    border-radius: 8px;
    margin: 0 0 6px; /* ✅ vertical gap between stacked cards */
    break-inside: avoid; /* ✅ prevents card breaking across columns */
}



    .card img {
        width: 100%;
        height: auto;
        max-height: 350px;
        object-fit: cover;
        border-radius: 8px;
        display: block;
        background: transparent;
        transition: transform 0.3s ease;
    }

        .card img:hover {
            transform: scale(1.03);
        }

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .modal-content img {
        max-height: 60vh;
        max-width: 55vw;
        object-fit: contain;
        border-radius: 8px;
    }

/* Navigation Buttons */
.close, .prev, .next {
    position: absolute;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.close {
    top: 100PX;
    right: 300px;
}

.prev {
    left: 270px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}


.next {
    right: 270px;
    top: 50%;
    transform: translateY(-50%);
}

    .close:hover,
    .prev:hover,
    .next:hover {
        color: #ccc;
    }

/* Skeleton shimmer effect */
.skeleton {
    width: 100%;
    height: 350px;
    border-radius: 8px;
    background: linear-gradient( 90deg, #f0f0f0 25%, #e0e0e0 37%, #f0f0f0 63% );
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -400px 0;
    }

    100% {
        background-position: 400px 0;
    }
}

/* Responsive Breakpoints */
@media (max-width: 1440px) {
    .masonry {
        column-count: 4;
    }
}

@media (max-width: 1024px) {
    .masonry {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .masonry {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .masonry {
        column-count: 1;
        padding: 10px;
    }

    .card {
        border: none;
        margin-bottom: 1rem;
    }

        /* img {
        width: 120% !important;
        height: auto;
    }*/

        .card img {
            max-height: auto;
            max-width: 65%;
            margin: auto;
        }

    .close {
        font-size: 28px;
        top: 10px;
        right: 15px;
    }

    .prev, .next {
        font-size: 24px;
        z-index: 10;
    }
}

/*.pagination {
    text-align: center;
    margin: 20px 0;
}

    .pagination button {
        margin: 0 5px;
        padding: 6px 12px;
        border: 1px solid #ccc;
        background: #f9f9f9;
        cursor: pointer;
    }

        .pagination button.active {
            background: #007bff;
            color: white;
            font-weight: bold;
        }
*/

.pagination {
    display: flex;
    gap: 5px;
    margin: 15px 0;
}

.top-pagination {
    justify-content: flex-end;
}

.bottom-pagination {
    justify-content: flex-start;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    border-radius: 4px;
}

    .pagination button.active {
        background: #198754;
        color: white;
        border-color: #198754;
    }
