/* --- MASONRY GRID (Pinterest-style) --- */
.image-grid {
    column-count: 4;
    column-gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Cards flow naturally in columns */
.image-card {
    position: relative;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    break-inside: avoid;
}

/* Images + Videos keep natural aspect ratio */
.image-card img,
.image-card video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* --- ZOOM BUTTON (TOP RIGHT, RESPONSIVE) --- */
.zoom-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.65);
    border: none;
    color: white;
    padding: clamp(4px, 0.6vw, 8px) clamp(6px, 0.9vw, 12px);
    border-radius: 999px;
    cursor: pointer;
    font-size: clamp(12px, 1.4vw, 16px);
    line-height: 1;
    z-index: 5;
}

/* --- FULLSCREEN VIEWER --- */
.viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 999;
    animation: fadeIn 0.25s ease-out;
}

.viewer-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.viewer-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
}

/* Viewer supports images + videos */
.viewer-content img,
.viewer-content video {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
}

/* Close button */
.close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: white;
    border: none;
    padding: 6px 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

/* --- RESPONSIVE MASONRY BREAKPOINTS --- */
@media (max-width: 1200px) {
    .image-grid { column-count: 3; }
}

@media (max-width: 900px) {
    .image-grid { column-count: 2; }
}

@media (max-width: 600px) {
    .image-grid { 
        column-count: 1; 
        padding: 10px; 
    }
}
