/* --- Course Management Layout --- */
.edutech-course-section {
    padding: 60px 0;
    background-color: #f8fafc;
    font-family: 'Poppins', sans-serif !important;
}

/* Centering the Heading */
.edutech-blog-section-header-center {
    text-align: center;
    margin-bottom: 40px;
}

.edutech-blog-section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    display: inline-block;
    position: relative;
    padding-bottom: 10px;
}

/* Optional: Underline for the heading */
.edutech-blog-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 4px;
    background: #ea580c; /* Orange underline */
    border-radius: 2px;
}

/* Row & Card Alignment */
.edutech-course-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.edutech-course-row {
    display: flex;
    justify-content: center; /* Centers the 3 cards in the middle row */
    gap: 20px;
    flex-wrap: wrap;
}

/* --- Card Styling --- */
.edutech-course-card {
    background: #1e3a8a; /* Navy Blue */
    border-radius: 12px;
    padding: 20px;
    flex: 0 1 calc(25% - 20px); /* Default for 4 cards */
    min-width: 250px;
    transition: all 0.3s ease;
    border-left: 5px solid #ea580c;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Adjusting the middle row cards to be slightly wider if needed */
.edutech-course-row:nth-child(2) .edutech-course-card {
    flex: 0 1 calc(30% - 20px); 
}

.edutech-course-card:hover {
    transform: translateY(-5px);
    background: #1e40af;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.edutech-course-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edutech-course-name {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.edutech-course-redirect {
    background: #ea580c;
    color: #ffffff;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.2s;
}

.edutech-course-redirect:hover {
    background: #ffffff;
    color: #ea580c;
}

/* --- Responsive for Mobile --- */
@media (max-width: 1024px) {
    .edutech-course-card {
        flex: 1 1 calc(45% - 20px); /* 2 cards per row on tablets */
    }
}

@media (max-width: 600px) {
    .edutech-course-card {
        flex: 1 1 100%; /* 1 card per row on mobile */
    }
}




/* --- Final Optimized Mobile View for EDUTECH (Max 768px) --- */
@media (max-width: 768px) {
    
    /* 1. Heading Alignment */
    .edutech-blog-section-header-center {
        margin-top: 30px !important;
        margin-bottom: 25px !important;
        text-align: center !important;
    }

    .edutech-blog-section-title {
        font-size: 1.5rem !important;
    }

    /* 2. MAIN LAYOUT */
    .edutech-course-layout {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 0 10px !important;
    }

    /* 3. REMOVE ROW EFFECT */
    .edutech-course-row {
        display: contents !important; 
    }

    /* 4. CARD DESIGN */
    .edutech-course-card {
        flex: 0 0 calc(50% - 10px) !important; 
        max-width: calc(50% - 10px) !important;
        height: auto !important;

        display: flex !important;
        align-items: center !important;

        padding: 12px 38px 12px 12px !important; /* balanced spacing */
        margin-bottom: 8px !important;
        box-sizing: border-box !important;

        border-radius: 10px !important;
        background-color: #1e3a8a !important;

        border-left: 5px solid #ff6a00 !important;
        position: relative !important;
    }

    /* Reset old width rules */
    .edutech-course-row:nth-child(2) .edutech-course-card {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }

    /* 5. COURSE NAME */
    .edutech-course-name {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        margin: 0 !important;

        text-align: left !important;
        padding-left: 0 !important;
        line-height: 1.2 !important;
    }

    /* 6. ICON BOX (RIGHT SIDE FIXED) */
    .edutech-course-redirect {
        position: absolute !important;
        right: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;

        width: 28px !important;
        height: 28px !important;

        background-color: #ff6a00 !important;
        border-radius: 6px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 7. ICON INSIDE */
    .edutech-course-redirect i {
        font-size: 13px !important;
        color: #ffffff !important;
    }
}

/* --- EXTRA SMALL DEVICES --- */
@media (max-width: 340px) {
    .edutech-course-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}