/**
 * Frontend Styles for Office Partition Showcase
 */

.ops-showcase-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ops-service-title h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1.2;
}

.ops-service-description {
    text-align: center;
    margin-bottom: 40px;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.ops-gallery-wrapper {
    position: relative;
}

.ops-gallery {
    display: grid;
    gap: 20px;
    width: 100%;
}

/* Grid Layout */
.ops-gallery.ops-layout-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Masonry Layout */
.ops-gallery.ops-layout-masonry {
    column-count: 4;
    column-gap: 20px;
}

.ops-gallery.ops-layout-masonry .ops-gallery-item {
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
}

/* Slider Layout */
.ops-gallery.ops-layout-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ops-gallery.ops-layout-slider::-webkit-scrollbar {
    display: none;
}

.ops-gallery.ops-layout-slider .ops-gallery-item {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

/* Gallery Item */
.ops-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all var(--ops-animation-speed, 0.3s) ease;
    background: #fff;
}

.ops-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ops-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
}

.ops-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--ops-animation-speed, 0.3s) ease;
}

/* Hover Effects */
.ops-gallery-item:hover .ops-image-wrapper img {
    transform: scale(1.05);
}

.ops-gallery-item[data-hover-effect="fade"]:hover .ops-image-wrapper img {
    transform: scale(1);
    opacity: 0.8;
}

.ops-gallery-item[data-hover-effect="slide"]:hover .ops-image-wrapper img {
    transform: translateX(5px) scale(1.02);
}

.ops-gallery-item[data-hover-effect="scale"]:hover .ops-image-wrapper img {
    transform: scale(1.1);
}

/* Image Overlay */
.ops-image-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: all var(--ops-animation-speed, 0.3s) ease;
    cursor: pointer;
}

.ops-gallery-item:hover .ops-image-overlay {
    opacity: 1;
}

.ops-overlay-content {
    text-align: center;
    color: white;
}

.ops-view-icon {
    font-size: 2rem;
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* No Images Message */
.ops-no-images {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.ops-no-images p {
    margin: 0;
    font-size: 1.1rem;
}

/* Lightbox Styles */
.ops-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity var(--ops-animation-speed, 0.3s) ease;
}

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

.ops-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ops-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.ops-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ops-animation-speed, 0.3s) ease;
}

.ops-lightbox-close:hover {
    background: white;
    transform: scale(1.1);
}

.ops-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ops-animation-speed, 0.3s) ease;
}

.ops-lightbox-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.ops-lightbox-prev {
    left: -60px;
}

.ops-lightbox-next {
    right: -60px;
}

.ops-lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .ops-gallery.ops-layout-masonry {
        column-count: 3;
    }
    
    .ops-gallery.ops-layout-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .ops-showcase-container {
        padding: 15px;
    }
    
    .ops-service-title h2 {
        font-size: 2rem;
    }
    
    .ops-service-description {
        font-size: 1rem;
    }
    
    .ops-gallery {
        gap: 15px;
    }
    
    .ops-gallery.ops-layout-masonry {
        column-count: 2;
    }
    
    .ops-gallery.ops-layout-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .ops-image-wrapper {
        height: 200px;
    }
    
    .ops-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .ops-lightbox-prev {
        left: -50px;
    }
    
    .ops-lightbox-next {
        right: -50px;
    }
    
    .ops-lightbox-close {
        top: -35px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .ops-gallery.ops-layout-masonry {
        column-count: 1;
    }
    
    .ops-gallery.ops-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .ops-gallery.ops-layout-slider .ops-gallery-item {
        flex: 0 0 250px;
    }
    
    .ops-image-wrapper {
        height: 180px;
    }
    
    .ops-lightbox-nav {
        display: none;
    }
}

/* Loading Animation */
.ops-gallery-item img[loading="lazy"] {
    opacity: 0;
    transition: opacity var(--ops-animation-speed, 0.3s) ease;
}

.ops-gallery-item img[loading="lazy"].loaded {
    opacity: 1;
}

/* Accessibility */
.ops-gallery-item:focus {
    outline: 3px solid #007cba;
    outline-offset: 2px;
}

.ops-lightbox-close:focus,
.ops-lightbox-nav:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .ops-image-overlay,
    .ops-lightbox {
        display: none !important;
    }
    
    .ops-gallery {
        display: block !important;
    }
    
    .ops-gallery-item {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}
