/* features-section.css - Responsive features section with RTL support */

/* Base styles for features section */
.section-features {
    padding: 80px 0;
    background-color: #fff;
}

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

.section-header h2 {
    font-size: 36px;
    font-weight: 600;
    color: #3A5657;
    margin-bottom: 20px;
}

/* Feature item */
.feature-item {
    margin-bottom: 120px;
}

.feature-item:last-child {
    margin-bottom: 0;
}

/* Feature image */
.feature-image {
    padding: 20px;
    text-align: center;
}

.feature-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature-image img:hover {
    transform: translateY(-5px);
}

/* Feature content */
.feature-content {
    padding: 20px 40px;
}

.feature-content h3 {
    font-size: 28px;
    font-weight: 600;
    color: #3A5657;
    margin-bottom: 20px;
    line-height: 1.3;
}

.feature-content p {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-features {
        padding: 40px 0;
    }
    
    .feature-item {
        margin-bottom: 60px;
    }
    
    .feature-content {
        padding: 20px;
        text-align: center;
    }
    
    .feature-content h3 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .feature-content p {
        font-size: 15px;
    }
}

/* =========================================== */
/* RTL SUPPORT - This will override above styles */
/* =========================================== */

/* RTL base styles */
html[dir="rtl"] .section-features .container,
html[dir="rtl"] .feature-item,
html[dir="rtl"] .feature-content {
    direction: rtl;
    text-align: right;
}

/* RTL feature content alignment */
html[dir="rtl"] .feature-content {
    text-align: right;
}

/* RTL for even-numbered features (where image is on right in LTR) */
html[dir="rtl"] .feature-item[data-feature="2"] .col-md-6.order-md-2 {
    order: 1 !important;
}

html[dir="rtl"] .feature-item[data-feature="2"] .col-md-6.order-md-1 {
    order: 2 !important;
}

html[dir="rtl"] .feature-item[data-feature="4"] .col-md-6.order-md-2 {
    order: 1 !important;
}

html[dir="rtl"] .feature-item[data-feature="4"] .col-md-6.order-md-1 {
    order: 2 !important;
}

html[dir="rtl"] .feature-item[data-feature="6"] .col-md-6.order-md-2 {
    order: 1 !important;
}

html[dir="rtl"] .feature-item[data-feature="6"] .col-md-6.order-md-1 {
    order: 2 !important;
}

html[dir="rtl"] .feature-item[data-feature="8"] .col-md-6.order-md-2 {
    order: 1 !important;
}

html[dir="rtl"] .feature-item[data-feature="8"] .col-md-6.order-md-1 {
    order: 2 !important;
}

html[dir="rtl"] .feature-item[data-feature="10"] .col-md-6.order-md-2 {
    order: 1 !important;
}

html[dir="rtl"] .feature-item[data-feature="10"] .col-md-6.order-md-1 {
    order: 2 !important;
}

/* RTL responsive adjustments */
@media (max-width: 768px) {
    html[dir="rtl"] .feature-content {
        text-align: center;
    }
    
    /* Reset orders on mobile for RTL */
    html[dir="rtl"] .col-md-6.order-md-1,
    html[dir="rtl"] .col-md-6.order-md-2 {
        order: 0 !important;
    }
}

/* Animation classes for both LTR and RTL */
.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

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

/* Animation delays */
.feature-item:nth-child(1) .animate-fade-in {
    animation-delay: 0.1s;
}

.feature-item:nth-child(2) .animate-fade-in {
    animation-delay: 0.2s;
}

.feature-item:nth-child(3) .animate-fade-in {
    animation-delay: 0.3s;
}

.feature-item:nth-child(4) .animate-fade-in {
    animation-delay: 0.4s;
}

.feature-item:nth-child(5) .animate-fade-in {
    animation-delay: 0.5s;
}