/* Gallery Section Styles */

.mcb-section-gallery {
    background-color: #fcfbfa !important;
    padding-top: 80px;
    padding-bottom: 80px;
}

/* Force-strip BeTheme bullet points, custom list styling, margins, and padding */
.gallery-tabs,
.gallery-grid {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

.gallery-tabs li,
.gallery-item {
    list-style: none !important;
    list-style-type: none !important;
    background-image: none !important;
}

.gallery-tabs li::before,
.gallery-tabs li::after,
.gallery-item::before,
.gallery-item::after {
    display: none !important;
    content: "" !important;
}

/* Elegant Filter Tabs */
.gallery-tabs {
    display: flex;
    justify-content: center;
    padding: 0 !important;
    margin: 0 auto 40px auto !important;
    gap: 12px;
    flex-wrap: wrap;
}

.gallery-tabs li {
    padding: 8px 20px !important;
    background-color: #fff !important;
    color: #635f56 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 600 !important;
    border: 1px solid #e0deda !important;
    border-radius: 30px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none !important;
    margin: 0 !important;
    display: inline-block !important;
    line-height: 1.5 !important;
}

.gallery-tabs li:hover {
    background-color: #f7f6f2 !important;
    color: #120c0e !important;
    border-color: #c9c7c2 !important;
}

.gallery-tabs li.active {
    background-color: #e8b33d !important;
    color: #fff !important;
    border-color: #e8b33d !important;
    box-shadow: 0 4px 12px rgba(232, 179, 61, 0.25) !important;
}

/* More Compact Gallery Grid */
.gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 15px !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.gallery-item {
    position: relative !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    background-color: #fff !important;
    aspect-ratio: 4 / 3 !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.4s ease, 
                visibility 0.4s ease !important;
    opacity: 1;
    visibility: visible;
}

.gallery-item.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.gallery-item:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.gallery-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gallery-image-wrapper {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gallery-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.gallery-item:hover .gallery-image-wrapper img {
    transform: scale(1.06) !important;
}

/* Hover overlay effect with custom CSS gold plus circle */
.gallery-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(18, 12, 14, 0.6) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 15px !important;
    box-sizing: border-box !important;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1 !important;
}

/* Premium Visual Plus Icon */
.gallery-overlay::before {
    content: "+" !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    background: rgba(232, 179, 61, 0.95) !important;
    border-radius: 50% !important;
    color: #fff !important;
    font-size: 24px !important;
    font-weight: 300 !important;
    margin-bottom: 8px !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    transform: scale(0.8) translateY(10px) !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.gallery-item:hover .gallery-overlay::before {
    transform: scale(1) translateY(0) !important;
}

.gallery-overlay-text {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    transform: translateY(10px) !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    text-align: center !important;
    border-bottom: 2px solid #e8b33d !important;
    padding-bottom: 3px !important;
}

.gallery-item:hover .gallery-overlay-text {
    transform: translateY(0) !important;
}

/* Lightbox Sizing and Constraints */
.basicLightbox {
    background: rgba(18, 12, 14, 0.94) !important;
    backdrop-filter: blur(8px) !important;
    z-index: 999999 !important;
}

.basicLightbox__placeholder {
    max-width: 80vw !important;
    max-height: 80vh !important;
}

.lightbox-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

.lightbox-image {
    max-width: 100% !important;
    max-height: 75vh !important;
    border-radius: 4px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important;
    border: 3px solid #fff !important;
    object-fit: contain !important;
    display: block !important;
}

/* Modern Fixed Close Button in Top-Right Viewport */
.lightbox-close {
    position: fixed !important;
    top: 25px !important;
    right: 25px !important;
    color: #fff !important;
    font-size: 32px !important;
    font-weight: 300 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    z-index: 9999999 !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(18, 12, 14, 0.5) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    user-select: none !important;
}

.lightbox-close:hover {
    color: #fff !important;
    background-color: #e8b33d !important;
    border-color: #e8b33d !important;
    transform: scale(1.08) !important;
}

/* Fixed Navigation Arrows relative to the Viewport */
.lightbox-arrow {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 55px !important;
    font-weight: 200 !important;
    cursor: pointer !important;
    user-select: none !important;
    z-index: 9999998 !important;
    width: 50px !important;
    height: 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    background-color: rgba(18, 12, 14, 0.3) !important;
    border-radius: 4px !important;
}

.lightbox-arrow:hover {
    color: #fff !important;
    background-color: #e8b33d !important;
}

.lightbox-arrow-left {
    left: 20px !important;
}

.lightbox-arrow-right {
    right: 20px !important;
}

/* Elegant Lightbox Captions */
.lightbox-caption {
    margin-top: 15px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
    text-align: center !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        gap: 10px !important;
    }
    
    .lightbox-arrow {
        font-size: 32px !important;
        width: 36px !important;
        height: 50px !important;
    }
    
    .lightbox-arrow-left {
        left: 5px !important;
    }
    
    .lightbox-arrow-right {
        right: 5px !important;
    }
    
    .lightbox-close {
        top: 15px !important;
        right: 15px !important;
        width: 36px !important;
        height: 36px !important;
        font-size: 26px !important;
    }
    
    .lightbox-image {
        max-height: 65vh !important;
    }
}
