/* === Matrix Static Background === */
/* === Matrix-Inspired Static Background === */
.courses-section {
    position: relative;
    margin-top: -25px;
    padding: 3.5rem 2rem;
    border-bottom: 2px solid limegreen;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
    z-index: 1;

    /* Base dark gradient */
    background:
        linear-gradient(135deg, rgba(34, 34, 34, 0.97), rgba(15, 15, 15, 0.97)),

        /* Vertical grid lines */
        linear-gradient(90deg, rgba(0, 255, 128, 0.07) 1px, transparent 1px),

        /* Horizontal grid lines */
        linear-gradient(rgba(0, 255, 128, 0.07) 1px, transparent 1px);

    background-size: auto, 40px 40px, 40px 40px;
    background-color: #1a1a1a; /* fallback solid */

    /* Subtle glow effect */
    box-shadow: inset 0 0 80px rgba(0, 255, 128, 0.08);
}


/* === CAROUSEL WRAPPER === */
.courses-carousel {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 1;
}


/* === COURSE LIST === */
.courses-list {
    display: flex;
    gap: 1.7rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.85rem 0;
    list-style: none;
    margin: 0;
    scrollbar-width: none;
    flex-wrap: nowrap; /* ✅ always in a row */
}

.courses-list::-webkit-scrollbar {
    display: none;
}


/* === CARD === */
.course-card {
    flex: 0 0 420px;
    width: 420px;
    height: 600px; /* fixed proportional height */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #fff;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    text-align: left;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.course-card:hover {
    background: #f5f5f5;
    transform: translateY(-5px);
    box-shadow: 0 0 30px 8px rgba(0, 255, 0, 0.8);
}


/* === HEADER === */
.course-card header h3 {
    font-size: 1.5rem;
    margin: 0.5rem 0;
    color: #111;
    text-align: center;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === HR === */
.course-card-hr {
    border: none;
    height: 2px;
    background: #00c853;
    margin: 0.5rem 0 1rem;
    width: 100%;
}

/* === PARAGRAPH === */
.course-card p {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    flex-grow: 1;
    min-height: 5rem;
    max-height: 8rem;
    margin-bottom: 0.5rem;
    /*overflow: hidden;*/
    text-overflow: ellipsis;
}

/* === BUTTONS === */
.course-buttons {
    margin-top: auto;
    display: flex;
    justify-content: center;
}

.course-buttons .button {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: #00c853;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 255, 0, 0.3);
    min-width: 120px;
    text-align: center;
}

.course-buttons .button:hover {
    background: limegreen;
    transform: translateY(-2px);
    box-shadow: 0 0 40px 12px rgba(0, 255, 0, 0.5);
}

/* === ARROWS === */
.arrow-course-section {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 200, 83, 0.8);
    color: #fff;
    border: none;
    font-size: 1.9rem; /* slightly smaller for balance */
    width: 55px; /* perfect circle */
    height: 55px;
    display: flex; /* flexbox for centering */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    z-index: 5;
    transition: all 0.3s ease;
    padding: 0; /* reset padding */
    line-height: 1; /* prevent vertical misalignment */
    text-align: center; /* ensure centered text */
}


.arrow-course-section:hover {
    background: limegreen;
    transform: translateY(-50%) scale(1.1);
}

.arrow-course-section.left {
    left: 10px;
}

.arrow-course-section.right {
    right: 10px;
}

.course-picture {
    display: block;
    width: 100%;
    height: 230px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    flex-shrink: 0;
}

.course-picture picture,
.course-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}


.course-video-picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    border-radius: 0;
}

.course-video-picture video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.5) blur(3px);
}


/* === RESPONSIVE SCALE === */
@media (max-width: 1200px) {
    .course-card {
        flex: 0 0 370px;
        width: 370px;
        height: 570px; /* scaled height */
    }

    .course-picture {
        height: 210px;
        margin-bottom: 0.55rem;
    }

    .course-card header h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 900px) {
    .course-card {
        flex: 0 0 330px;
        width: 330px;
        height: 540px;
    }

    .course-picture {
        height: 190px;
        margin-bottom: 0.3rem;
    }

    .course-card p {
        font-size: 0.95rem;
    }

    /* === HEADER === */
    .course-card header h3 {
        font-size: 1.25rem;
        margin: 0.4rem 0;
        min-height: 2.7rem;
    }

    /* === HR === */
    .course-card-hr {
        margin: 0.15rem 0 0.8rem;
    }

    .course-buttons .button {
        padding: 0.55rem 1.35rem;
        font-size: 1rem;
    }


}

@media (max-width: 600px) {
    .courses-section {
        margin-top: -20px;
        padding: 1.5rem 0.75rem;
    }

    .courses-list {
        gap: 1.4rem;
    }

    .course-card {
        flex: 0 0 290px;
        width: 290px;
        height: 500px; /* smaller scale but same structure */
        padding: 1rem;
    }


    .course-picture {
        height: 170px;
        margin-bottom: 0.35rem;
    }

    .course-card p {
        font-size: 0.9rem;
    }

    .arrow-course-section {
        display: none;
    }

    /* ✅ hide arrows */
    .course-card img {

        margin-bottom: 0.35rem;

    }


    /* === HEADER === */
    .course-card header h3 {
        font-size: 1.2rem;
        margin: 0.4rem 0;
        min-height: 2.7rem;
    }

    /* === HR === */
    .course-card-hr {
        margin: 0.3rem 0 0.85rem;
    }


    .course-buttons .button {
        padding: 0.55rem 1.35rem;
        font-size: 1rem;
    }
}

@media (max-width: 400px) {

    .courses-section {
        margin-top: -20px;
        padding: 1.4rem 0.6rem;
    }

    .courses-list {
        gap: 1.35rem;
    }

    .course-card {
        flex: 0 0 270px;
        width: 270px;
        height: 490px;
        padding: 0.8rem;
    }

    .course-picture {
        height: 155px;
        margin-bottom: 0.05rem;
    }

    .course-card p {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }

    .course-card img {
        margin-bottom: 0.05rem;
    }

    /* === HEADER === */
    .course-card header h3 {
        font-size: 1.2rem;
        margin: 0.3rem 0;
        min-height: 1rem;
    }

    .course-card-hr {
        margin: 0.1rem 0 0.1rem;
    }

    .course-buttons .button {
        padding: 0.5rem 1.3rem;
        font-size: 0.95rem;
    }

}

