/**
 * Gallery Styles
 * Provides styling for product and company image galleries
 */

/* Gallery Container */
.gallery-container {
    padding: 40px 0;
}

.gallery-section {
    margin-bottom: 60px;
}

.gallery-section-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.gallery-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0066cc, #0052a3);
    border-radius: 2px;
}

/* Gallery Tabs */
.gallery-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-tab {
    padding: 12px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-tab:hover {
    color: #0066cc;
}

.gallery-tab.active {
    color: #0066cc;
    border-bottom: 3px solid #0066cc;
    margin-bottom: -2px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    background: #f5f5f5;
}

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

.gallery-item-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-image {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 102, 204, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-item-overlay-icon {
    color: white;
    font-size: 40px;
}

.gallery-item-caption {
    padding: 15px;
    background: white;
    font-size: 14px;
    color: #666;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.lightbox-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

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

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
    padding: 15px;
    background: #f5f5f5;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Product Gallery Specific */
.product-gallery {
    background: #f9f9f9;
    padding: 40px 0;
}

.product-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.product-gallery-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.product-gallery-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.product-gallery-info {
    padding: 15px;
    text-align: center;
}

.product-gallery-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.product-gallery-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.product-gallery-btn:hover {
    background: #0052a3;
}

/* Company Gallery Specific */
.company-gallery {
    background: white;
    padding: 40px 0;
}

.company-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.company-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #f5f5f5;
}

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

.company-gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.company-gallery-item:hover .company-gallery-image {
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }

    .product-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .company-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .gallery-item-image {
        height: 180px;
    }

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

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

    .gallery-tabs {
        gap: 5px;
    }

    .gallery-tab {
        padding: 10px 15px;
        font-size: 14px;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-gallery-grid {
        grid-template-columns: 1fr;
    }

    .company-gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-section-title {
        font-size: 22px;
    }

    .gallery-tabs {
        flex-direction: column;
        border-bottom: none;
        border-top: 2px solid #e0e0e0;
    }

    .gallery-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
    }

    .gallery-tab.active {
        border-left: 3px solid #0066cc;
        border-bottom: none;
        margin-bottom: 0;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

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

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
