/* ---------- Course Hero Section ---------- */
.coursehero-section {
    display: flex;
    height: 580px;
    width: 100%;
    padding: 120px 64px;

    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #fff;
    align-self: stretch;
    background: 
        linear-gradient(0deg, rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.32)),
        url('/images/course-hero.png') no-repeat center center/cover;
    position: relative;
    margin-top: 84px;
}

.coursehero-container {
    max-width: 100%; 
}

.coursehero-container h2 {
    color: #FFF;
    font-family: Poppins;
    font-size: 48px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.96px;
    white-space: nowrap; /* prevent wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* optional: if screen too small */
}

.coursehero-container p {
    color: #FFF;
    font-family: Lato;
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: 34px; /* 141.667% */
    letter-spacing: 0.48px;
}

/* ---------- Course Card Section ---------- */
.coursecard-section {
    background: #000;
    color: #fff;
    padding: 80px 64px;
    text-align: center;
}

.coursecard-header {
    max-width: 800px;
    margin: 0 auto 60px;
}

.sectioncard-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.sectioncard-subtitle {
    font-size: 16px;
    color: #ccc;
    line-height: 1.6;
}

.coursescard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 16px;  /* horizontal gap */
    row-gap: 32px;     /* vertical gap */
    justify-items: center;
    align-items: stretch;
}

/* ---------- Individual Card ---------- */
.coursecard {
    background: #3A3939;          
    border: 1px solid #FBBA2C;    
    border-radius: 24px;          
    width: 100%;
    max-width: 424px;             
    height: 262px;                
    display: flex;                
    justify-content: space-between;
    align-items: center;
    padding: 32px;                
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

/* ---------- Text Content ---------- */
.coursecard-content {
    flex: 1;
    text-align: left;
}

.coursecard-text h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.coursecard-text p {
    font-size: 14px;
    color: #ccc;
    margin: 4px 0;
}

/* ---------- Button ---------- */
.course-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #FBBA2C;
    color: #000;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.32px;
    border: none;
    border-radius: 8px;
    width: 140px;
    height: 40px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.course-btn:hover {
    background-color: #ffcc4a;
    
}

.coursecard img {
    width: 170px;  
    height: 170px; 
    object-fit: contain;
    flex-shrink: 0;
    margin-left: 16px;
}

/* ---------- Tablets (≤1024px) ---------- */
@media (max-width: 1024px) {

    .coursehero-section {
        height: auto;
        padding: 100px 40px;
        background-position: center;
    }

    .coursehero-container h2 {
        font-size: 38px;
        white-space: normal; /* allow wrapping on smaller screens */
    }

    .coursehero-container p {
        font-size: 20px;
        line-height: 30px;
    }

    /* Course Cards Grid */
    .coursescard-grid {
        grid-template-columns: repeat(2, 1fr); 
        column-gap: 20px;
        row-gap: 28px;
    }

    .coursecard {
        max-width: 100%;
        height: auto;
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    .coursecard img {
        width: 140px;
        height: 140px;
        margin: 20px 0 0 0;
    }

    .coursecard-content {
        text-align: center;
    }

    .course-btn {
        width: 120px;
        height: 38px;
        font-size: 15px;
    }
}

/* ---------- Mobile (≤768px) ---------- */
@media (max-width: 768px) {

    .coursehero-section {
        padding: 80px 24px;
        margin-top: 60px;
        align-items: center;
        text-align: center;

        margin: 0;
    }

    .coursehero-container h2 {
        font-size: 30px;
        letter-spacing: 0.6px;
    }

    .coursehero-container p {
        font-size: 18px;
        line-height: 28px;
    }

    /* Course Card Section */
    .coursecard-section {
        padding: 60px 24px;
    }

    .sectioncard-title {
        font-size: 28px;
    }

    .sectioncard-subtitle {
        font-size: 14px;
    }

    .coursescard-grid {
        grid-template-columns: 1fr; 
        row-gap: 24px;
    }

    .coursecard {
        flex-direction: column;
        align-items: center;
        padding: 20px;
        height: auto;
        border-radius: 20px;
    }

    .coursecard img {
        width: 120px;
        height: 120px;
        margin: 16px 0 0 0;
    }

    .coursecard-text h3 {
        font-size: 18px;
    }

    .coursecard-text p {
        font-size: 13px;
    }

    .course-btn {
        width: 120px;
        height: 36px;
        font-size: 14px;
        margin-top: 10px;
    }
}

/* ---------- Small Mobile (≤480px) ---------- */
@media (max-width: 480px) {

    .coursehero-container h2 {
        font-size: 26px;
    }

    .coursehero-container p {
        font-size: 16px;
        line-height: 24px;
    }

    .sectioncard-title {
        font-size: 24px;
    }

    .coursecard {
        padding: 16px;
    }

    .coursecard img {
        width: 100px;
        height: 100px;
    }

    .course-btn {
        width: 100px;
        height: 34px;
        font-size: 13px;
    }
}
