/* Default styles */

.containera {
    width: 75%;
    margin-left: auto; 
    margin-right: auto;/* Center the container */padding-top: 100px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Auto-fit the cards */
    gap: 20px;
}

.card {
    width: 100%; /* Make the card width responsive */
    max-width: 300px; /* Fixed width */
    height: 400px; /* Fixed height */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    text-align: left;
    padding: 20px;
    position: relative;
    overflow: hidden;
    margin: 10px; /* Add margin to separate cards */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensure content fits within the card */
    box-sizing: border-box;
}

.card.coding {
    background-color: #eef4ff;
}

.card.math {
    background-color: #fff7e6;
}

.card.english {
    background-color: #f5faff;
}

.card .badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

.card.coding .badge {
    background-color: #5b9cf6;
}

.card.math .badge {
    background-color: #f7c85c;
}

.card.english .badge {
    background-color: #a47df8;
}

.card h2 {
    font-size: 22px; /* Adjusted font size */
    margin: 0;
    margin-top: 50px;
    font-family: 'Montserrat', sans-serif; /* Attractive font */
    flex-shrink: 0; /* Prevent title from shrinking */
}

.card.coding h2 {
    color: #3a6cf6;
}

.card.math h2 {
    color: #f4a10a;
}

.card.english h2 {
    color: #35c9c9;
}

.card p {
    font-size: 14px; /* Adjusted font size */
    color: #555;
    text-align: justify;
    font-family: 'Open Sans', sans-serif;
    flex-shrink: 0; /* Prevent paragraph from shrinking */
}

.card .info {
    font-size: 12px;
    color: #777;
    margin-top: 10px;
    flex-shrink: 0; /* Prevent info from shrinking */
}

.card .button {
    display: inline-block;
    background-color: #f6a41c;
    color: #fff;
    text-align: center;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px; /* Adjusted font size */
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.card .button:hover {
    background-color: #e89500;
}

.icon {
    font-size: 40px; /* Adjusted icon size */
    position: absolute;
    top: 15px;
    right: 15px;
}

.coding .icon {
    color: #5b9cf6;
}

.math .icon {
    color: #f7c85c;
}

.english .icon {
    color: #a47df8;
}

#carousel {
    display: flex;
    justify-content: center; /* Center the cards */
    flex-wrap: wrap;
    margin-bottom: 20px; /* Add margin to ensure enough space */
}

/* Responsive styles */
@media (max-width: 600px) {
    .card {
        flex: 1 1 100%; /* Single card per row on mobile */
        margin-bottom: 20px; /* Add margin to ensure enough space */
    }
    .containera {
        margin-bottom: 8px;
    }
    .carousel {
        margin: auto;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .card {
        flex: 1 1 calc(50% - 20px); /* Two cards per row on tablets */
        margin-bottom: 20px; /* Add margin to ensure enough space */
    }
    .containera {
        margin-bottom: 80px !important;
    }
    .containera {
        width: 75%;
        margin-left: auto; 
        margin-right: auto;/* Center the container */
        padding-top: 70px;
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    .card {
        flex: 1 1 calc(33.33% - 20px); /* Three cards per row on medium screens */
        margin-bottom: 20px; /* Add margin to ensure enough space */
    }
}

@media (min-width: 1201px) {
    .card {
        flex: 1 1 calc(25% - 20px); /* Four cards per row on large screens */
        margin-bottom: 20px; /* Add margin to ensure enough space */
    }
}
