/* Mirwah Gallery Styles (Restored) */

.mirwah-gallery-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filters */
.gallery-filters {
    text-align: center;
    margin-bottom: 30px;
}

.gallery-filters .filter-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 20px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    color: #333;
}

.gallery-filters .filter-btn:hover,
.gallery-filters .filter-btn.active {
    background: #d4af37;
    color: #fff;
    border-color: #d4af37;
}

/* Grid */
.gallery-grid {
    margin: 0 auto;
}

.gallery-grid:after {
    content: '';
    display: block;
    clear: both;
}

.gallery-item {
    width: 32%;
    margin-bottom: 2%;
    padding: 5px;
    box-sizing: border-box;
    float: left;
}

@media (max-width: 767px) {
    .gallery-item {
        width: 48% !important;
        /* 2 items per row */
        margin-bottom: 4%;
    }
}

@media (max-width: 575px) {
    .gallery-item {
        width: 100% !important;
        /* 1 item per row */
        margin-bottom: 15px;
    }
}

/* Image Wrapper & Overlay */
.image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.image-wrapper:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay .title {
    color: #fff;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Play Icon */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.play-icon:hover {
    background: rgba(212, 175, 55, 0.8);
    /* Golden on hover */
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon svg {
    margin-left: 4px;
    /* Slight offset for visual centering of triangle */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Layout: Masonry (Default) - controlled by JS/Isotope */
.mirwah-layout-masonry .gallery-grid {
    /* Isotope handles layout */
}

/* Layout: Grid (Uniform) */
.mirwah-layout-grid .gallery-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1%;
}

.mirwah-layout-grid .gallery-item {
    float: none;
    /* Override default float */
    margin: 0 1% 2% 1%;
    width: 31.33%;
    /* 3 items per row */
    height: 300px;
    /* Fixed height for uniform grid */
}

.mirwah-layout-grid .image-wrapper {
    height: 100%;
}

.mirwah-layout-grid .image-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* Layout: Simple */
.mirwah-layout-simple .gallery-grid {
    display: block;
    text-align: center;
}

.mirwah-layout-simple .gallery-item {
    float: none;
    display: inline-block;
    width: 250px;
    margin: 10px;
    vertical-align: top;
}

/* Responsive Overrides for Grid/Simple */
@media (max-width: 767px) {
    .mirwah-layout-grid .gallery-item {
        width: 48% !important;
        margin-bottom: 2%;
        height: 200px;
    }

    .mirwah-layout-simple .gallery-item {
        width: 48% !important;
    }
}

@media (max-width: 575px) {
    .mirwah-layout-grid .gallery-item {
        width: 100% !important;
        margin: 0 0 15px 0;
        height: auto;
    }

    .mirwah-layout-simple .gallery-item {
        width: 100% !important;
        margin: 10px 0;
    }
}

/* Pagination */
.gallery-pagination {
    text-align: center;
    margin-top: 40px;
}

.gallery-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    /* Increased padding */
    margin: 0 4px;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    /* Soft square instead of circle for better flexibility */
    min-width: 35px;
    /* Min width for numbers */
    height: auto;
    text-align: center;
    transition: all 0.3s;
    background: #fff;
}

.gallery-pagination .page-numbers.current,
.gallery-pagination .page-numbers:hover {
    background: #d4af37;
    border-color: #d4af37;
    color: #fff;
}

.gallery-pagination .next,
.gallery-pagination .prev {
    font-weight: bold;
}

/* Load More Button */
.gallery-load-more {
    text-align: center;
    margin-top: 30px;
    padding: 20px 0;
}

#mirwah-load-more-btn {
    background: #fff;
    border: 2px solid #d4af37;
    color: #d4af37;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#mirwah-load-more-btn:hover {
    background: #d4af37;
    color: #fff;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

#mirwah-load-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#mirwah-load-more-btn.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

/* Next Gallery Button in Lightbox */
.mirwah-next-gallery-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #d4af37;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10000;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: none;
    /* Hidden by default */
}

.mirwah-next-gallery-btn:hover {
    background: #b8972f;
    transform: scale(1.05);
}

/* Ensure GLightbox thumbnails have a specific style if enabled */
.gthumbnails-container {
    background: rgba(0, 0, 0, 0.8) !important;
    padding: 10px 0 !important;
}

.gthumb {
    border: 2px solid transparent !important;
    transition: all 0.2s ease !important;
}

.gthumb.active {
    border-color: #d4af37 !important;
}