/* Modern, Clean, Rounded Key Features Design */
.key-features {
    padding: 90px 0;
    background-color: #f8f9fe;
    position: relative;
    overflow: hidden;
}

/* Add subtle background element */
.key-features::after {
    content: '';
    position: absolute;
    top: -150px;
    right: -150px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.03), rgba(58, 191, 248, 0.03));
    z-index: 0;
}

/* Section header */
.section-header {
    text-align: center;
    margin-bottom: 70px;
    position: relative;
    z-index: 2;
}

.section-header h2 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.section-header p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Feature container */
.features-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Vertical connection line - thinner and lighter */
.features-container::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 40px;
    width: 1px;
    height: calc(100% - 120px);
    background: linear-gradient(to bottom, rgba(67, 97, 238, 0.5), rgba(58, 191, 248, 0.5));
}

/* Feature row */
.feature-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
    align-items: center;
    position: relative;
}

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

/* Feature number - rounded with gradient */
.feature-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 700;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.2);
}

/* Feature content with subtle line */
.feature-content {
    padding: 30px;
    border-left: 1px solid rgba(67, 97, 238, 0.1);
}

.feature-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.feature-content p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

/* Feature image - clean with subtle hover */
.feature-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-img {
    max-width: 220px;
    height: auto;
    border: none;
    background: transparent;
    box-shadow: none;
    transition: transform 0.3s ease;
}

/* Subtle animation for scrolling */
.feature-row {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.feature-row.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive design - FIXED FOR MOBILE */
@media (max-width: 991px) {
    .feature-row {
        grid-template-columns: 70px 1fr 1fr;
        gap: 30px;
        margin-bottom: 60px;
    }
    
    .features-container::before {
        left: 35px;
    }
    
    .feature-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    /* Center aligned mobile design */
    .feature-row {
        display: flex;
        flex-direction: column;
        text-align: center;
        margin-bottom: 70px;
    }
    
    /* Remove desktop connector line */
    .features-container::before {
        display: none;
    }
    
    /* Add an individual connector for each feature */
    .feature-row:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 60px; /* Position below the number */
        left: 50%;
        transform: translateX(-50%);
        height: calc(100% + 10px);
        width: 1px;
        background: linear-gradient(to bottom, var(--primary-color), rgba(67, 97, 238, 0.2));
    }
    
    /* Numbers centered on top */
    .feature-number {
        margin: 0 auto 30px;
    }
    
    /* Content needs to clear the number */
    .feature-content {
        border-left: none;
        padding: 0 30px 30px;
        width: 100%;
        position: relative;
        z-index: 2;
        background-color: #f8f9fe;
    }
    
    /* Image spacing */
    .feature-image {
        width: 100%;
        position: relative;
        z-index: 2;
        background-color: #f8f9fe;
        padding: 0;
    }
    
    .feature-img {
        max-width: 200px;
    }
    
    /* Adjust section spacing */
    .key-features {
        padding: 70px 0;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
}

@media (max-width: 576px) {
    .key-features {
        padding: 60px 0;
    }
    
    .feature-row {
        margin-bottom: 60px;
    }
    
    .feature-number {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .feature-content {
        padding: 0 20px 25px;
    }
    
    .section-header h2 {
        font-size: 30px;
    }
    
    .section-header p {
        font-size: 16px;
    }
    
    .feature-content h3 {
        font-size: 20px;
    }
}