/* =========================================================
   COURSE SLIDER SECTION - FULL BLEED & RESPONSIVE
   ========================================================= */

/* Forces the slider to span the entire window width */
.mars-slider-wrapper {
    position: relative;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    overflow: hidden;
    background: transparent;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.mars-slider-section {
    position: relative;
    width: 96%;
    margin: 0 auto;
    padding: 80px 0;
    overflow: hidden;
    z-index: 4;
}

/* The Moving Track */
.mars-slider-track {
    display: flex;
    align-items: stretch;
    gap: 25px;
    width: max-content;
    will-change: transform;
    transition: none; 
    padding: 10px 0;
}

/* Individual Course Card */
.course-card {
    width: 280px;
    background: rgba(10, 12, 25, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 2px solid rgba(0, 245, 255, 0.35); /* Base subtle cyan border */
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    color: #fff;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.35s ease;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.course-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(45deg, #00f5ff, #7b5cff, #ff4a3f); 
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.course-card:hover::before {
    opacity: 1;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,245,255,0.25);
}

/* Card Image Area */
.img-box {
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
}

.img-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.course-card:hover .img-box img {
    transform: scale(1.1);
}

/* Card Content Styling */
.course-card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 17px;
    color: #ff4a3f;
    margin: 10px 0;
    font-weight: 700;
    letter-spacing: 0.5px;
    min-height: 2.5em; /* Forces all titles to take 2 lines of space */
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.course-card p {
    font-size: 13px;
    color: #dbefff;
    line-height: 1.5;
    margin: 0 0 15px 0;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.duration {
    display: block;
    color: #00f5ff;
    font-size: 15px;
    margin-bottom: 15px;
    font-weight: 700;
    margin-top: auto;
}

/* Gradient Action Button */
.course-card a {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 30px;
    background: linear-gradient(135deg, #00f5ff, #5b8def, #7b5cff);
    color: #0f061c;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.course-card a:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(135deg, #7b5cff, #ff2b2b);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(255, 43, 43, 0.5);
}

/* Manual Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 10, 23, 0.9);
    border: 1px solid rgba(0, 245, 255, 0.4);
    color: #00f5ff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: #00f5ff;
    color: #020612;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.6);
}

.slider-btn.left { left: 20px; }
.slider-btn.right { right: 20px; }

/* Desktop & Responsive Scaling - Showing exactly 4 cards on screen */
@media (min-width: 1024px) {
    .course-card {
        /* Total visible width is 96vw (padding 2% each side). 4 cards = 3 gaps (3 * 25px = 75px) */
        width: calc((96vw - 75px) / 4);
        padding: 35px;
    }
    .img-box {
        height: auto;
    }
    .course-card h2 {
        font-size: 22px;
    }
    .course-card p {
        font-size: 16px;
    }
}

/* Tablet Scaling - Showing exactly 2 cards */
@media (min-width: 769px) and (max-width: 1023px) {
    .course-card {
        width: calc((96vw - 25px) / 2); /* 2 cards = 1 gap */
        padding: 25px;
    }
    .img-box {
        height: auto;
    }
}

/* Mobile Tweaks - Showing exactly 1 card */
@media(max-width: 768px) {
    .mars-slider-section { padding: 50px 0; }
    .course-card { width: 96vw; padding: 20px; }
    .img-box { height: auto; }
    .slider-btn { width: 40px; height: 40px; font-size: 16px; }
    .slider-btn.left { left: 10px; }
    .slider-btn.right { right: 10px; }
}