.features-section {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.features-container {
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.features-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #1e2b58;
    margin: 30px;
    animation: fadeInUp 0.8s ease;
}

.features-subtitle {
    font-size: 1.1rem;
    color: #5f5f5f;
    max-width: 700px;
    margin: 0 auto 60px;
    line-height: 1.6;
    animation: fadeInUp 1s ease;
}

/* Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
}

/* Cards */
.feature-card {
    background: #fff;
    border-radius: 15px;
    padding: 35px 30px;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 15px 40px rgba(37, 95, 241, 0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    transition: transform 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: rotate(10deg) scale(1.1);
}

.feature-card h3 {
    font-size: 1.4rem;
    color: #1e2b58;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-card p {
    color: #555;
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.6;
}

.feature-card ul {
    list-style: none;
    padding-left: 0;
}

.feature-card ul li {
    position: relative;
    padding-left: 28px;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.feature-card ul li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

.feature-bottom {
    margin-top: 15px;
    font-weight: 500;
    color: #1e3a8a;
}

/* Truncate paragraph in card */
.feature-card p,
.feature-card ul {
    display: block;
    max-height: 4.8em;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hide feature-bottom in card view */
.feature-card .feature-bottom {
    display: none;
}


/* Animation */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .features-title {
        font-size: 2.3rem;
    }
}

@media (max-width: 600px) {
    .features-title {
        font-size: 1.9rem;
    }

    .feature-card {
        padding: 25px 20px;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
    }
}

/* FIX for extra small screens (under 400px) */
@media (max-width: 400px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .feature-card {
        padding: 20px 16px;
    }

    .features-section {
        padding: 60px 15px;
    }

    .features-title {
        font-size: 1.6rem;
    }
}


/* Modal backdrop */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px;
}

/* Modal box */
.modal-content {
    background: #fff;
    border-radius: 15px;
    padding: 30px 25px;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeInUp 0.5s ease;
}

/* Close button */
.modal .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.modal .close:hover {
    color: #2563eb;
}

/* Modal icon */
.modal-content .feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

/* Modal h3 */
.modal-content h3 {
    color: #1e2b58;
    margin-bottom: 15px;
}

/* Modal paragraph */
.modal-content p {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Modal list */
.modal-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
}

.modal-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
    color: #333;
}

.modal-content ul li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

/* feature-bottom in modal */
.modal-content .feature-bottom {
    font-weight: 500;
    margin-top: 15px;
}
