/* Modern responsive CSS Grid Gallery with Glassmorphism Lightbox */

:root {
    --wa-gallery-gap: 20px;
    --wa-gallery-cols: 3;
    --wa-transition-speed: 0.4s;
    --wa-glass-bg: rgba(255, 255, 255, 0.1);
    --wa-glass-border: rgba(255, 255, 255, 0.2);
    --wa-glass-hover-bg: rgba(255, 255, 255, 0.2);
}

.wa-gallery-wrap {
    margin: 30px 0;
    width: 100%;
}

/* Grid Layout */
.wa-gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--wa-gallery-cols), 1fr);
    gap: var(--wa-gallery-gap);
    width: 100%;
}

/* Responsive Grid columns */
@media (max-width: 991px) {
    .wa-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 575px) {
    .wa-gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

/* Base Gallery Item */
.wa-gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background-color: #0c0c0c;
    aspect-ratio: 4 / 3;
    transform: translate3d(0,0,0); /* hardware acceleration */
    transition: transform var(--wa-transition-speed) cubic-bezier(0.25, 1, 0.5, 1), 
                box-shadow var(--wa-transition-speed) ease;
}

.wa-gallery-item-inner {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.wa-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--wa-transition-speed) cubic-bezier(0.25, 1, 0.5, 1),
                filter var(--wa-transition-speed) ease;
}

/* No thumbnail video placeholder */
.wa-gallery-no-thumb-video {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f1f1f, #0d0d0d);
    color: #fff;
    padding: 20px;
    text-align: center;
}

.wa-gallery-no-thumb-video span.dashicons {
    font-size: 50px;
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    color: #ff3366;
}

.wa-vid-title {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
}

/* Hover Overlay Styles */
.wa-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.45); /* Subtle dark overlay */
    display: flex;
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    box-sizing: border-box;
    opacity: 0;
    transition: opacity var(--wa-transition-speed) ease;
    z-index: 2;
}

.wa-gallery-overlay-content {
    width: auto;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform var(--wa-transition-speed) cubic-bezier(0.25, 1, 0.5, 1);
}

.wa-gallery-title,
.wa-gallery-desc {
    display: none !important; /* Hide image names/titles and captions on the grid hover */
}

.wa-gallery-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    margin: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.wa-gallery-item:hover .wa-gallery-icon {
    background: #ff3366; /* Vibrant branding accent color */
    border-color: #ff3366;
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(255, 51, 102, 0.45);
}

/* Hover Effect: Zoom & Blur (Premium Default) */
.wa-hover-zoom-blur .wa-gallery-item:hover img {
    transform: scale(1.12);
    filter: blur(2px) brightness(0.9);
}

.wa-hover-zoom-blur .wa-gallery-item:hover .wa-gallery-overlay {
    opacity: 1;
}

.wa-hover-zoom-blur .wa-gallery-item:hover .wa-gallery-overlay-content {
    transform: scale(1);
}

/* Hover Effect: Zoom Only */
.wa-hover-zoom-only .wa-gallery-item:hover img {
    transform: scale(1.08);
}

.wa-hover-zoom-only .wa-gallery-item:hover .wa-gallery-overlay {
    opacity: 1;
}

.wa-hover-zoom-only .wa-gallery-item:hover .wa-gallery-overlay-content {
    transform: scale(1);
}

/* Hover Effect: Grayscale */
.wa-hover-grayscale .wa-gallery-item img {
    filter: grayscale(100%);
}

.wa-hover-grayscale .wa-gallery-item:hover img {
    filter: grayscale(0%) scale(1.05);
}

.wa-hover-grayscale .wa-gallery-item:hover .wa-gallery-overlay {
    opacity: 1;
}

.wa-hover-grayscale .wa-gallery-item:hover .wa-gallery-overlay-content {
    transform: scale(1);
}

/* Hover Effect: Overlay (Slide up) */
.wa-hover-overlay .wa-gallery-overlay {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    opacity: 1;
    transition: transform var(--wa-transition-speed) cubic-bezier(0.25, 1, 0.5, 1),
                opacity var(--wa-transition-speed) ease;
}

.wa-hover-overlay .wa-gallery-item:hover .wa-gallery-overlay {
    transform: translateY(0);
}

.wa-hover-overlay .wa-gallery-item:hover .wa-gallery-overlay-content {
    transform: scale(1);
}

/* Hover Lift Effect */
.wa-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}


/* ==========================================================================
   Premium Lightbox (Glassmorphism Modal)
   ========================================================================== */
.wa-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.wa-lightbox.wa-active {
    opacity: 1;
    visibility: visible;
}

/* Deep blur overlay */
.wa-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.82);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: -1;
}

/* Lightbox Content Area */
.wa-lightbox-content {
    max-width: 85%;
    max-height: 75vh;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    transform: scale(0.92);
}

.wa-lightbox.wa-active .wa-lightbox-content {
    transform: scale(1);
}

.wa-lightbox-content img,
.wa-lightbox-content video {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: block;
}

/* Controls style (Glassmorphism) */
.wa-lightbox-close,
.wa-lightbox-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.wa-lightbox-close:hover,
.wa-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.wa-lightbox-close:active,
.wa-lightbox-nav:active {
    transform: scale(0.95);
}

.wa-lightbox-close {
    top: 30px;
    right: 30px;
}

.wa-lightbox-prev {
    left: 40px;
}

.wa-lightbox-next {
    right: 40px;
}

/* Lightbox Meta Area (Titles, Cap, Indicators) */
.wa-lightbox-meta {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-sizing: border-box;
    padding: 0 40px;
    pointer-events: none;
}

.wa-lightbox-meta-inner {
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 30px;
    border-radius: 30px;
    max-width: 600px;
    text-align: center;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
    pointer-events: auto;
}

.wa-lightbox-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
}

.wa-lightbox-caption {
    margin: 0;
    font-size: 13px;
    opacity: 0.75;
    font-weight: 300;
}

/* Bullet Indicators */
.wa-lightbox-bullets {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.wa-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wa-bullet:hover {
    background: rgba(255, 255, 255, 0.6);
}

.wa-bullet.wa-bullet-active {
    background: #ff3366;
    width: 24px;
    border-radius: 4px;
}

/* Hide navigation controls on smaller mobile devices and improve swipe layout */
@media (max-width: 767px) {
    .wa-lightbox-nav {
        display: none !important; /* Users will swipe */
    }
    
    .wa-lightbox-close {
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
    
    .wa-lightbox-content {
        max-width: 92%;
        max-height: 60vh;
    }

    .wa-lightbox-content img,
    .wa-lightbox-content video {
        max-height: 60vh;
    }

    .wa-lightbox-meta {
        bottom: 20px;
        padding: 0 15px;
    }

    .wa-lightbox-meta-inner {
        padding: 10px 20px;
        border-radius: 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .wa-lightbox-title {
        font-size: 14px;
    }

    .wa-lightbox-caption {
        font-size: 11px;
    }
}
