/**
 * Filterable Gallery Styles
 */

/* Gallery Container */
.qr-filterable-gallery {
    width: 100%;
    margin: 40px 0;
}

/* Filter Buttons */
.qr-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
    align-items: center;
}

.qr-filter-btn {
    background: var(--gcid-primary-color);
    border: 2px solid transparent;
    color: #fff;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
}

.qr-filter-btn:hover {
    background: #000;
    color: var(--gcid-primary-color);
    transform: translateY(-2px);
}

.qr-filter-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Gallery Grid */
.qr-gallery-grid {
    display: grid;
    gap: 24px;
    margin-top: 30px;
}

/* Column Variations */
.qr-gallery-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.qr-gallery-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.qr-gallery-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.qr-gallery-grid.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Gallery Item */
.qr-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.qr-gallery-item.hidden {
    display: none;
}

.qr-gallery-item.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

.qr-gallery-item.fade-in {
    animation: fadeInScale 0.4s ease forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Image Wrapper */
.qr-gallery-image-wrap {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
}

.qr-gallery-grid.layout-masonry .qr-gallery-image-wrap {
    padding-top: 0;
    height: auto;
}

.qr-gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.qr-gallery-grid.layout-masonry .qr-gallery-image {
    position: relative;
    height: auto;
}

/* Video Styles */
.qr-gallery-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.qr-gallery-grid.layout-masonry .qr-gallery-video {
    position: relative;
    height: auto;
}

/* Video Indicator (Play Icon Badge) */
.qr-gallery-video-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
    transition: all 0.3s ease;
}

.qr-gallery-item:hover .qr-gallery-video-indicator {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.qr-gallery-video-indicator svg {
    width: 18px;
    height: 18px;
    margin-left: 2px; /* Optical centering for play icon */
}

/* Overlay Effect */
.qr-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-gallery-link:hover .qr-gallery-overlay,
.qr-gallery-item:hover .qr-gallery-overlay {
    opacity: 1;
}

.qr-gallery-link:hover .qr-gallery-image,
.qr-gallery-item:hover .qr-gallery-image,
.qr-gallery-link:hover .qr-gallery-video,
.qr-gallery-item:hover .qr-gallery-video {
    transform: scale(1.1);
}

.qr-gallery-icon {
    font-size: 48px;
    color: #fff;
    font-weight: 300;
    line-height: 1;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.qr-gallery-link:hover .qr-gallery-icon,
.qr-gallery-item:hover .qr-gallery-icon {
    transform: scale(1);
}

/* Gallery Link */
.qr-gallery-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Gallery Titles */
.qr-gallery-title {
    padding: 20px;
    background: #fff;
}

.qr-gallery-title h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.qr-gallery-title p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Lightbox Styles (Basic) */
.qr-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.qr-lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.qr-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    padding: 20px;
}

.qr-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

.qr-lightbox-video {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    background: #000;
}

.qr-lightbox-video:focus {
    outline: none;
}

.qr-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    z-index: 10000;
}

.qr-lightbox-close:hover {
    transform: scale(1.1);
}

.qr-lightbox-title {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: #fff;
    font-size: 18px;
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 1200px) {
    .qr-gallery-grid.columns-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 980px) {
    .qr-gallery-grid.columns-4,
    .qr-gallery-grid.columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .qr-gallery-filters {
        gap: 8px;
    }
    
    .qr-filter-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .qr-gallery-grid.columns-3,
    .qr-gallery-grid.columns-4,
    .qr-gallery-grid.columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .qr-gallery-grid {
        gap: 16px;
    }
    
    .qr-gallery-title h3 {
        font-size: 16px;
    }
    
    .qr-gallery-title p {
        font-size: 13px;
    }
	.qr-lightbox-title {
    	font-size: 13px;

	}
}

@media (max-width: 480px) {
    .qr-gallery-grid.columns-2,
    .qr-gallery-grid.columns-3,
    .qr-gallery-grid.columns-4,
    .qr-gallery-grid.columns-5 {
        grid-template-columns: 1fr;
    }
    
    .qr-gallery-filters {
        gap: 6px;
    }
    
    .qr-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Loading Animation */
.qr-gallery-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.qr-gallery-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

