.mgpg-gallery {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* Tabs */
.mgpg-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #e0e0e0;
}

.mgpg-tabs .mgpg-tab {
    padding: 12px 24px;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    margin-bottom: -2px;
    background: transparent !important;
    color: #666;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    outline: none;
    box-shadow: none;
}

.mgpg-tabs .mgpg-tab:hover,
.mgpg-tabs .mgpg-tab:focus {
    color: #1a3a5c;
    background: transparent !important;
}

.mgpg-tabs .mgpg-tab.active {
    color: #1a3a5c;
    border-bottom-color: #1a3a5c;
    background: transparent !important;
}

/* Sections */
.mgpg-section {
    display: none;
}

.mgpg-section.active {
    display: block;
}

/* Grid */
.mgpg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.mgpg-item {
    overflow: hidden;
    border-radius: 8px;
    line-height: 0;
}

.mgpg-link {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.mgpg-link picture {
    display: contents;
}

.mgpg-link img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.mgpg-link:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.mgpg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.mgpg-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.mgpg-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.mgpg-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.mgpg-lightbox-caption {
    color: #ccc;
    font-size: 14px;
    margin-top: 12px;
    line-height: 1.4;
}

.mgpg-lightbox-close,
.mgpg-lightbox-nav {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mgpg-lightbox-close:hover,
.mgpg-lightbox-nav:hover {
    color: #ccc;
}

.mgpg-lightbox-close {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 1;
}

.mgpg-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.mgpg-lightbox-prev {
    left: 16px;
}

.mgpg-lightbox-next {
    right: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .mgpg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .mgpg-link img {
        height: 200px;
    }

    .mgpg-lightbox-prev {
        left: 8px;
    }

    .mgpg-lightbox-next {
        right: 8px;
    }

    .mgpg-lightbox-nav {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .mgpg-grid {
        grid-template-columns: 1fr;
    }

    .mgpg-link img {
        height: 240px;
    }

}
