/* Workflow Section Styles */

.workflow-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #f5f9f7 0%, #e8f3f0 100%);
    position: relative;
    overflow: hidden;
}

.workflow-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(34, 139, 34, 0.05);
    border-radius: 50%;
    animation: floatAnimation 6s ease-in-out infinite;
}

.workflow-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.workflow-title {
    font-size: 2.5rem;
    color: #1a5f3f;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 800;
}

.workflow-description {
    text-align: center;
    color: #555;
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.workflow-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.workflow-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(34, 139, 34, 0.2);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f0f8f5, #e0f0eb);
    min-height: 300px;
}

.workflow-image-wrapper:hover {
    box-shadow: 0 20px 50px rgba(34, 139, 34, 0.35);
    transform: translateY(-5px);
}

.workflow-image {
    width: 100%;
    height: auto;
    display: none;
    border-radius: 15px;
}

.workflow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 95, 63, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

.workflow-image-wrapper:hover .workflow-overlay {
    opacity: 1;
}

.workflow-view-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: #228b22;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(34, 139, 34, 0.4);
    margin-top: 15px;
}

.workflow-view-btn:hover {
    background: #2eac2e;
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(34, 139, 34, 0.6);
}

.workflow-view-btn:active {
    transform: scale(0.98);
}

.workflow-view-btn i {
    font-size: 1.2rem;
}

/* Workflow description text in overlay */
.workflow-overlay::before {
    content: 'Click to View Workflow';
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

/* Workflow Modal Styles */
.workflow-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    overflow: auto;
    padding: 30px 20px;
}

.workflow-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.workflow-modal-content {
    position: relative;
    max-width: 75vw;
    max-height: 80vh;
    margin: auto;
    animation: slideUp 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-workflow-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #228b22;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.close-workflow-btn:hover {
    background: #228b22;
    color: white;
    transform: scale(1.1);
}

.workflow-modal-image {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

/* Floating animation */
@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-30px);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .workflow-section {
        padding: 40px 15px;
    }

    .workflow-title {
        font-size: 1.8rem;
    }

    .workflow-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .workflow-image-wrapper {
        max-width: 100%;
    }

    .close-workflow-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* RTL Support for Arabic */
body.rtl .workflow-section::before {
    left: -10%;
    right: auto;
}

body.rtl .close-workflow-btn {
    right: auto;
    left: 0;
}
