/* Container for the entire section */
.features-section {
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    background-color: #f4f6f9;
}

/* Header Styling */
.features-header h1 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 50px;
}

/* Grid Container (Flexbox for responsiveness) */
.features-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* Space between cards */
    justify-content: center;
    /* Key Fix: Stretch children vertically for uniform rows */
    align-items: stretch;
}

/* Wrapper for the card that ensures it takes up its grid space */
/* Applied to both the anchor tag (if linked) and a wrapper div (if unlinked) */
.card-wrapper {
    flex: 1 1 300px; /* Flex-grow, Flex-shrink, Flex-basis */
    min-width: 280px;
    max-width: 350px;
    height: 100%; /* Fill the stretched height of the row */
    display: flex;
    text-decoration: none;
    color: inherit;
}

/* Individual Card Styling */
.feature-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 30px 20px;
    text-align: center;
    width: 100%; /* Must be 100% to fill the card-wrapper */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Enable inner content layout management */
    display: flex;
    flex-direction: column;
    height: 100%; /* Must be 100% to fill the card-wrapper */
}

/* Hover effect applied to the wrapper to affect the card */
.card-wrapper:hover .feature-card {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

/* Icon Container Styling */
.icon-container {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

    /* Font Awesome Icon Styling */
    .icon-container i {
        font-size: 30px;
        color: #fff;
    }

/* Card Content Styling */
.feature-card h3 {
    font-size: 1.25em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
    /* Allow description to stretch and push footer content down */
    flex-grow: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .features-grid {
        gap: 20px;
    }

    .card-wrapper {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .features-header h1 {
        font-size: 2em;
    }
}
