/**
 * Customer Gallery Styles
 * 
 * Styles for the customer gallery template with masonry layout,
 * hover zoom effects, and lightbox functionality
 */

/* ===================================
   Gallery Hero Section
   =================================== */
.customer-gallery-hero {
    padding: 80px 0 40px;
    background: linear-gradient(
        135deg,
        rgba(8, 27, 54, 0.05) 0%,
        rgba(255, 131, 0, 0.05) 100%
    );
}

.customer-gallery-hero h1 {
    color: var(--lf-text-primary);
}

.customer-gallery-hero .lead {
    color: var(--lf-text-secondary);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   Gallery Section
   =================================== */
.customer-gallery-section {
    padding: 60px 0 80px;
}

/* Filter Buttons */
.gallery-filters .btn {
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-color: var(--lf-navy);
    color: var(--lf-navy);
}

.gallery-filters .btn:hover,
.gallery-filters .btn.active {
    background-color: var(--lf-orange);
    border-color: var(--lf-orange);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 131, 0, 0.3);
}

/* ===================================
   Masonry Gallery Grid
   =================================== */
.gallery-masonry {
    margin-top: 40px;
}

.gallery-item {
    margin-bottom: 30px;
}

.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--lf-bg-light);
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Gallery Image Wrapper */
.gallery-image-wrapper {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: auto;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover .gallery-image {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(8, 27, 54, 0.8) 0%,
        rgba(255, 131, 0, 0.8) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 2.5rem;
    color: #fff;
    transform: scale(0.5);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gallery-card:hover .gallery-overlay i {
    transform: scale(1);
}

/* ===================================
   Lightbox Modal
   =================================== */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
    max-width: 800px;
}

.lightbox-counter {
    color: var(--lf-orange);
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Lightbox Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 131, 0, 0.9);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--lf-navy);
    transform: scale(1.1);
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .customer-gallery-hero {
        padding: 60px 0 30px;
    }

    .customer-gallery-hero h1 {
        font-size: 2rem;
    }

    .customer-gallery-section {
        padding: 40px 0 60px;
    }

    .gallery-filters .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption {
        font-size: 1rem;
        margin-top: 15px;
    }

    .gallery-overlay i {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .gallery-item {
        margin-bottom: 20px;
    }

    .lightbox-image {
        max-height: 70vh;
    }
}

/* ===================================
   Loading State (Optional)
   =================================== */
.gallery-item.loading .gallery-image {
    opacity: 0.3;
}

.gallery-item.loaded .gallery-image {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .lightbox-modal,
    .gallery-overlay,
    .gallery-filters {
        display: none !important;
    }

    .gallery-card {
        box-shadow: none;
        break-inside: avoid;
    }
}
