/* --- MASONRY GRID --- */
.wpmg-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.wpmg-masonry-grid {
    column-count: 3;
    column-gap: 25px;
    width: 100%;
}

@media (max-width: 992px) {
    .wpmg-masonry-grid { column-count: 2; }
}
@media (max-width: 600px) {
    .wpmg-masonry-grid { column-count: 1; }
}

/* --- GALLERY ITEMS --- */
.wpmg-masonry-item {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 25px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
    display: inline-block; /* Safari fix */
    width: 100%;
}

.wpmg-masonry-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.wpmg-masonry-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --- HOVER EFFECTS --- */
.wpmg-masonry-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 176, 239, 0.2);
}

.wpmg-masonry-item:hover img {
    transform: scale(1.06);
}

/* --- TEXT OVERLAY --- */
.wpmg-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 25px 25px 25px;
    background: linear-gradient(to top, rgba(12, 10, 32, 0.9) 0%, rgba(12, 10, 32, 0) 100%);
    color: #ffffff;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.wpmg-masonry-item:hover .wpmg-overlay {
    opacity: 1;
    transform: translateY(0);
}

.wpmg-title {
    margin: 0;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
}

.wpmg-subtitle {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 1px;
}

/* --- LIGHTBOX POLAROID STYLE FIX --- */
.ginner-container {
    background: #ffffff !important;
    border-radius: 8px;
    overflow: hidden;
    width: max-content !important; /* Prevents the white background from stretching across the screen */
    max-width: 100% !important;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Force ALL images to be exactly the same size in the lightbox */
.gslide-image img {
    width: 900px !important; /* Fixed width */
    height: 600px !important; /* Fixed height */
    max-width: 100vw !important; 
    max-height: 65vh !important;
    object-fit: cover !important; /* Crops images perfectly so they never stretch */
    box-shadow: none !important;
}

/* Clean, premium text block underneath the image */
.gslide-description {
    background: #ffffff !important;
    padding: 25px 30px !important;
    text-align: center !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
}

.gslide-title {
    color: #111111 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    letter-spacing: 3px !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    font-family: inherit !important;
}

.gslide-desc {
    color: #666666 !important;
    font-size: 14px !important;
    margin-top: 8px !important;
    font-family: inherit !important;
}
