/* ====== GALLERY PAGE CSS ====== */
body {
    font-family: 'Segoe UI', sans-serif;
    background: #f3f4f6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Wrapper */
.gallery-wrapper {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.gallery-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
}

/* Masonry Grid using column-count */
.masonry-grid {
    column-count: 3;
    column-gap: 1rem;
}

@media (max-width: 992px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .masonry-grid {
        column-count: 2;
    }
}

.media-card {
    break-inside: avoid;
    margin-bottom: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s;
}

.media-card:hover {
    transform: translateY(-4px);
}

.media-card img,
.media-card video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 6px;
}

/* Modal Viewer */
/* Modal Viewer */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 10px;
}

.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: 90%;
    height: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}


.modal-content img,
.modal-content video {
    max-width: 90%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}


.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

/* Video card default style */
.media-card video {
    background: #000;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    width: 100%;
    height: auto;
}

.media-title {
    padding: 8px 12px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    color: #333;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}


/* Responsive tweaks */
@media (max-width: 768px) {
    .modal-content img,
    .modal-content video {
        max-height: 70vh;
    }

    .close-btn {
        font-size: 1.8rem;
    }
}
