body {
    background-color: #f8f9fa;
}

/* Course Cards */
.card {
    border-radius: 5px;
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

/* Course Images */
.card-img-top {
    height: 180px;
    object-fit: cover;
}

/* Progress Bar */
.progress {
    height: 10px;
}

/* Sidebar */
.sidebar {
    height: 100vh;
    position: fixed;
    overflow-y: auto;
    border-right: 1px solid #ddd;
    padding-bottom: 20px; /* Prevent content from cutting off */
}

.sidebar h4 {
    text-align: center;
    margin-bottom: 10px;
}

/* ? Keep Navbar Always on Top */
.navbar {
    z-index: 1100;
}
/* ? Default styles for buttons */
#prev-btn, #next-btn {
    width: 120px;  /* Set button width for consistency */
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ? Disabled Button Styles (Gray) */
#prev-btn:disabled, #next-btn:disabled {
    background-color: #d6d6d6 !important;
    color: #888 !important;
    cursor: not-allowed;
    border-color: #c0c0c0;
}

/* ? Enabled Button Styles (Blue) */
#prev-btn:not(:disabled), #next-btn:not(:disabled) {
    background-color: #007bff !important;
    color: white !important;
    border-color: #007bff;
}


/* ? Prevent Sidebar from Hiding Under Navbar */
@media (max-width: 768px) {
    body {
        padding-top: 56px; /* Push everything below navbar */
    }

    .sidebar {
        position: fixed;
        top: 56px; /* Ensure it's below navbar */
        left: 0;
        width: 100%;
        height: calc(100vh - 56px); /* Full height minus navbar */
        overflow-y: auto; /* Allow scrolling */
        z-index: 1050; /* Keep it above content */
        background-color: white; /* Ensure visibility */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .navbar-toggler {
        z-index: 1100; /* Ensure button is always clickable */
    }
}

/* ? Fix slide layout */
.slide-card {
    width: 80vw;
    height: 65vh;
    max-width: 900px;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    position: relative; /* ? Ensures buttons stay inside */
}

/* ? Ensure Image Container Fills the Slide Card Without Overflow */
.slide-image-container {
    width: 100%;
    height: 70%; /* Restrict to half of the slide card */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Prevent overflow */
}

/* ? Ensure images are contained within the container */
.slide-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Prevent cropping */
    display: block;
}
.slide-text {
    flex-grow: 0; /* Prevents text from taking too much space */
    margin-bottom: 5px; /* Reduce spacing */
}


/* ? Subtitle Card - Fixed Size & Proper Wrapping */
.subtitle-card {
    width: 80vw;  /* ? Matches slide-card width */
    max-width: 700px;  /* ? Consistent max width */
    height: 70px;  /* ? Fixed height */
    margin: 5px auto;  /* ? Small gap below slide */
    padding: 5px;
    background-color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* ? Prevents text spill */
}

/* ? Subtitle Text - Proper Wrapping & Constraint */
.subtitle-text {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin: 0;
    padding: 0;
    border: 0;
    white-space: normal; /* ? Allow wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* ? Restrict to 2 lines */
    -webkit-box-orient: vertical;
    max-width: 95%; /* ? Ensures text fits inside */

}

/* ? Navigation Buttons - Always at Bottom */
.navigation-buttons {
    width: 100%;
    padding: 10px 0;
    position: absolute;
    bottom: 10px; /* ? Keep at bottom */
    left: 0;
    display: flex;
    justify-content: space-between; /* ? Buttons on far left & right */
    align-items: center;
}

/* ? Adjust Button Spacing */
.navigation-buttons button {
    min-width: 120px; /* ? Ensures uniform size */
    margin: 0 10px; /* ? Prevents buttons from touching edges */
}

/* ? Ensure Start Course button is centered */
#start-course-btn {
    margin: 0 auto;
}

/* ? Hide Previous button on first slide */
.invisible {
    visibility: hidden;
}

/* ? Hide all slides by default */
.slide {
    display: none;
}

/* ? Only show the first slide initially */
.slide:first-child {
    display: block;
}
/* ? Timer Card - Small Box to the Right */
.timer-card {
    position: absolute;
    right: 10px;  /* Adjust spacing */
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 80px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

