/* Factory Gallery Styles */
.factory-gallery {
    padding: 80px 0;
    background: #f8f9fa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #fff;
}

.gallery-overlay p {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

/* Modal styles for gallery */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

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

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

.modal-info {
    padding: 20px;
    background: #fff;
}

.modal-info h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #333;
}

.modal-info p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Production Process Step Images */
.step-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 3px solid #ff7a2e;
    position: relative;
}

.step-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.process-step:hover .step-image img {
    transform: scale(1.1);
}

.process-step {
    position: relative;
}

.step-icon {
    position: absolute;
    top: 45px;
    right: 10px;
    background: rgba(255, 122, 46, 0.9);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .factory-gallery {
        padding: 60px 0;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-overlay {
        padding: 20px 15px 15px;
    }
    
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 20px;
    }
    
    .modal-info {
        padding: 15px;
    }
    
    .step-image {
        width: 50px;
        height: 50px;
    }
    
    .step-icon {
        top: 35px;
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}