/* Center Boxes CSS - Homepage Feature Boxes Centering */
/* This file centers the feature boxes horizontally on the homepage */

/* Features Section Container Centering */
.features.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.features .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Features Header Centering */
.features-header.section-header {
    text-align: center !important;
    margin-bottom: clamp(2rem, 4vw, 3rem);
    width: 100%;
}

.features-header .section-title {
    text-align: center !important;
    margin: 0 auto clamp(1rem, 2vw, 1.5rem) auto;
}

.features-header .section-paragraph {
    text-align: center !important;
    margin: 0 auto;
    max-width: 600px;
}

/* Features Wrap - Main Container for Boxes */
.features-wrap {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    align-items: stretch;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
}

/* Individual Feature Box Centering */
.feature {
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: flex-start;
    text-align: center !important;
    margin: 0;
    padding: clamp(1.2rem, 3vw, 2rem);
    box-sizing: border-box;
    flex: 1 1 clamp(250px, 30%, 320px);
    min-width: 250px;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: clamp(0.5rem, 1vw, 0.8rem);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Feature Inner Container */
.feature-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start;
    text-align: center !important;
    width: 100%;
    gap: clamp(0.8rem, 2vw, 1.2rem);
}

/* Feature Icon Centering */
.feature-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: clamp(50px, 8vw, 70px) !important;
    height: clamp(50px, 8vw, 70px) !important;
    margin: 0 auto !important;
    flex-shrink: 0;
}

.feature-icon img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
}

.feature-icon i {
    font-size: clamp(1.8rem, 4vw, 2.5rem) !important;
    color: #535FD7;
    text-align: center;
}

/* Feature Content Centering */
.feature-content {
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: flex-start;
    text-align: center !important;
    width: 100%;
    flex: 1;
}

/* Feature Title Centering */
.feature-title {
    text-align: center !important;
    margin: 0 0 clamp(0.5rem, 1.2vw, 0.8rem) 0 !important;
    font-size: clamp(1rem, 2.2vw, 1.3rem) !important;
    line-height: 1.3;
    color: #333;
    font-weight: 600;
}

/* Feature Text Centering */
.feature-text {
    text-align: center !important;
    margin: 0 !important;
    font-size: clamp(0.8rem, 1.6vw, 0.95rem) !important;
    line-height: 1.5;
    color: #666;
}

/* Responsive Design for Different Screen Sizes */
@media (max-width: 1200px) {
    .features-wrap {
        max-width: 900px;
        gap: clamp(1.2rem, 2.5vw, 2rem);
    }
    
    .feature {
        flex: 1 1 clamp(240px, 45%, 300px);
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .features-wrap {
        flex-direction: column;
        align-items: center;
        max-width: 500px;
        gap: clamp(1rem, 2vw, 1.5rem);
    }
    
    .feature {
        flex: 1 1 auto;
        width: 100%;
        max-width: 400px;
        min-width: auto;
    }
    
    .features-header .section-paragraph {
        max-width: 100%;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .features.section {
        padding: clamp(1.5rem, 4vw, 2.5rem) 0;
    }
    
    .features-wrap {
        gap: clamp(0.8rem, 1.5vw, 1.2rem);
        max-width: 100%;
    }
    
    .feature {
        padding: clamp(1rem, 2.5vw, 1.5rem);
        max-width: 100%;
    }
    
    .feature-icon {
        width: clamp(45px, 7vw, 60px) !important;
        height: clamp(45px, 7vw, 60px) !important;
    }
}

/* Ensure proper centering for RTL languages */
.rtl-layout .features-wrap {
    direction: rtl;
}

.rtl-layout .feature {
    text-align: center !important;
}

.rtl-layout .feature-inner {
    align-items: center !important;
    text-align: center !important;
}

.rtl-layout .feature-content {
    text-align: center !important;
}

.rtl-layout .feature-title {
    text-align: center !important;
}

.rtl-layout .feature-text {
    text-align: center !important;
}

/* Animation and reveal effects */
.feature.is-revealing {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure all text elements are centered */
.features .text-center {
    text-align: center !important;
}

/* Override any conflicting styles */
.features-wrap .feature.text-center {
    text-align: center !important;
}

.features-wrap .feature.text-center .feature-inner {
    text-align: center !important;
    align-items: center !important;
}

.features-wrap .feature.text-center .feature-content {
    text-align: center !important;
}

.features-wrap .feature.text-center .feature-title {
    text-align: center !important;
}

.features-wrap .feature.text-center .feature-text {
    text-align: center !important;
}