/* =========================================
   Masonry Media Gallery Widget
   ========================================= */

.argus-mmg-grid {
    width: 100%;
}

.argus-mmg-grid.argus-mmg-layout-masonry {
    column-count: 3;
    column-gap: 15px;
}

.argus-mmg-grid.argus-mmg-layout-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.argus-mmg-item {
    break-inside: avoid;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.argus-mmg-grid.argus-mmg-layout-grid .argus-mmg-item {
    margin-bottom: 0;
    aspect-ratio: 1 / 1;
}

.argus-mmg-grid.argus-mmg-layout-grid .argus-mmg-item img,
.argus-mmg-grid.argus-mmg-layout-grid .argus-mmg-item video.argus-mmg-video-preview {
    height: 100%;
    object-fit: cover;
}

.argus-mmg-item.argus-mmg-no-link {
    cursor: default;
}

.argus-mmg-item img,
.argus-mmg-item video.argus-mmg-video-preview {
    width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
    border-style: solid;
    border-width: 0;
    border-color: transparent;
    transition: transform 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
}

.argus-mmg-item:hover img,
.argus-mmg-item:hover video.argus-mmg-video-preview {
    transform: scale(1.05);
}

.argus-mmg-video-placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.argus-mmg-placeholder-text {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.argus-mmg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.argus-mmg-item:hover .argus-mmg-overlay {
    opacity: 1;
}

.argus-mmg-overlay.argus-mmg-overlay-no-bg {
    background: transparent;
}

.argus-mmg-overlay-info {
    text-align: center;
    padding: 15px;
    color: #fff;
    transition-duration: 0.3s;
    transition-property: opacity, transform;
}

.argus-mmg-overlay-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.argus-mmg-overlay-desc {
    font-size: 13px;
    opacity: 0.9;
}

.argus-mmg-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    pointer-events: none;
    transition: transform 0.3s ease, background 0.3s ease;
}

.argus-mmg-item:hover .argus-mmg-play-btn {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(255, 255, 255, 0.45);
}

.argus-mmg-play-btn svg {
    width: 26px;
    height: 26px;
    margin-left: 3px;
    fill: #fff;
}

/* Lightbox Styles */
body.argus-mmg-lightbox-open {
    overflow: hidden;
}

.argus-mmg-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

body.admin-bar .argus-mmg-lightbox {
    top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .argus-mmg-lightbox {
        top: 46px;
    }
}

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

.argus-mmg-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
}

.argus-mmg-lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: 4px;
    margin: 0 auto;
}

.argus-mmg-lightbox-content iframe,
.argus-mmg-lightbox-content video {
    width: 80vw;
    height: 45vw;
    max-width: 960px;
    max-height: 540px;
    border: none;
}

.argus-mmg-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 4px;
    z-index: 2;
}

.argus-mmg-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    z-index: 2;
    box-shadow: none;
    outline: none;
}

.argus-mmg-lightbox-close:hover,
.argus-mmg-lightbox-close:focus,
.argus-mmg-lightbox-close:active {
    background: none;
    border: none;
    box-shadow: none;
    outline: none;
    color: #fff;
}

.argus-mmg-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s ease;
}

.argus-mmg-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.argus-mmg-lightbox-prev {
    left: 20px;
}

.argus-mmg-lightbox-next {
    right: 20px;
}

@media screen and (max-width: 600px) {
    .argus-mmg-lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .argus-mmg-lightbox-prev {
        left: 8px;
    }

    .argus-mmg-lightbox-next {
        right: 8px;
    }
}

.argus-mmg-lightbox-title {
    color: #fff;
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
}
