/* General Body Styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Modern font stack */
    margin: 0;
    padding: 0;
    background-color: #f8f9fa; /* Lighter background */
    color: #343a40; /* Darker text for better contrast */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6; /* Improved readability */
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    color: #343a40;
    margin-bottom: 0.5em;
    font-weight: 600;
}

p {
    margin-bottom: 1em;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Header and Navigation (Desktop) */
header {
    background-color: #343a40;
    color: #fff;
    padding: 0.5rem 1rem;
    height: 70px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative; /* For positioning mobile menu */
    z-index: 1000;
}

header nav {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo-link {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.site-logo {
    height: 45px;
    width: auto;
    border-radius: 4px;
}

.site-title {
    color: #fff;
    text-decoration: none;
    font-size: 1.6em;
    font-weight: bold;
}

.main-nav-links {
    display: flex; /* Always flex for desktop */
    align-items: center;
}

.main-nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.main-nav-links a:hover {
    background-color: #495057;
    text-decoration: none;
}

.mobile-menu-toggle,
.mobile-menu-close {
    display: none; /* Hidden by default on desktop */
}

/* Global Sidebar Toggle Hide */
.sidebar-toggle {
    display: none;
}



/* Page Layout for Sidebar */
.page-wrapper {
    display: flex;
    flex-grow: 1;
}

.sidebar {
    width: 250px; /* Slightly wider sidebar */
    background-color: #212529; /* Even darker sidebar */
    color: #e9ecef; /* Lighter text in sidebar */
    padding: 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-nav {
    flex-grow: 1;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    color: #e9ecef;
    text-decoration: none;
    padding: 14px 25px; /* Increased padding */
    border-bottom: 1px solid #343a40; /* Darker border */
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.sidebar-nav ul li a i {
    margin-right: 12px; /* More space */
    font-size: 1.3em; /* Larger icon */
}

.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active {
    background-color: #343a40; /* Hover to match header */
}

.main-content {
    flex-grow: 1;
    padding: 30px; /* Increased padding */
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Softer shadow */
    margin: 20px;
    border-radius: 8px;
    box-sizing: border-box;
    text-align: center;
}

main {
    padding: 30px; /* Increased padding */
    max-width: 1000px; /* Slightly wider main content */
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Softer shadow */
    text-align: center;
    flex-grow: 1;
}

.container {
    width: 90%;
    margin: auto;
    overflow: hidden;
}

/* Forms */
form div {
    margin-bottom: 15px;
}

form label {
    display: block;
    margin-bottom: 8px; /* More space for labels */
    font-weight: 600; /* Slightly bolder */
    color: #495057;
}

form input[type="text"],
form input[type="password"],
form input[type="date"],
form select,
form textarea,
form input[type="file"] {
    width: 100%;
    max-width: 300px; /* Increased max-width for forms */
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding: 12px; /* More padding */
    border: 1px solid #ced4da; /* Softer border color */
    border-radius: 5px; /* Slightly more rounded */
    box-sizing: border-box;
    font-size: 1em;
}

form input[type="submit"],
form input[type="reset"] {
    background-color: #28a745; /* Green submit button */
    color: white;
    padding: 12px 25px; /* Larger buttons */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.05em;
    margin-right: 15px;
    transition: background-color 0.3s ease;
}

form input[type="submit"]:hover,
form input[type="reset"]:hover {
    background-color: #218838;
}

form span {
    color: #dc3545; /* Red for errors */
    font-size: 0.9em;
    display: block;
    margin-top: 5px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #dee2e6; /* Lighter table borders */
}

th, td {
    padding: 12px; /* More padding */
    text-align: left;
}

th {
    background-color: #e9ecef; /* Lighter header background */
    font-weight: 600;
    color: #495057;
}

/* Course Listing (Public Homepage) */
.course-list-public {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px; /* More gap */
    margin-top: 30px; /* More margin */
}

.course-item-public {
    background-color: #fff;
    padding: 25px; /* More padding */
    border-radius: 10px; /* More rounded corners */
    box-shadow: 0 5px 15px rgba(0,0,0,0.08); /* More prominent shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: auto; /* Override fixed width */
    max-width: 100%;
    height: auto;
    flex-shrink: 0;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; /* Smooth hover effect */
}

.course-item-public:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 8px 20px rgba(0,0,0,0.12); /* Stronger shadow on hover */
}

.course-item-public img {
    width: 100%;
    height: 180px; /* Adjusted image height */
    object-fit: cover;
    border-radius: 8px; /* Consistent border-radius */
    margin-bottom: 20px;
}

.course-details-public h3 {
    margin-top: 0;
    font-size: 1.6em;
    color: #343a40;
}

.course-details-public p.course-description {
    font-size: 0.95em;
    color: #6c757d; /* Softer text color */
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.course-details-public ul.course-meta {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    width: 100%;
    text-align: left;
    color: #555;
    font-size: 0.9em;
}

.course-details-public ul.course-meta li {
    margin-bottom: 8px;
    display: flex; /* Align icon and text */
    align-items: center;
}

.course-details-public ul.course-meta li i {
    margin-right: 8px;
    color: #6c757d; /* Icon color */
}

.course-details-public ul li strong {
    color: #343a40;
}

.course-details-public .course-price {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.course-details-public .current-price {
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745;
}

.course-details-public .actual-price {
    margin-left: 10px;
    color: #dc3545;
    text-decoration: line-through;
    font-size: 1.1em;
}

.course-details-public .btn-primary {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.course-details-public .btn-primary:hover {
    background-color: #0056b3;
}

/* Video Player */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-bottom: 20px;
    border-radius: 8px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #343a40; /* Darker footer */
    color: #e9ecef; /* Lighter text */
    margin-top: auto; /* Pushes footer to bottom */
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Adjusted min-width */
    gap: 25px; /* More gap */
    margin-top: 30px; /* More margin */
}

.stat-card {
    background-color: #fff; /* White background */
    padding: 25px; /* More padding */
    border-radius: 10px; /* More rounded */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); /* Softer shadow */
    text-align: center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

.stat-card h3 {
    margin-top: 0;
    color: #495057; /* Softer heading */
    font-size: 1.2em;
}

.stat-card p {
    font-size: 2.2em; /* Larger number */
    font-weight: bold;
    color: #007bff; /* Blue accent */
    margin-bottom: 0;
}

/* Sidebar Bottom Navigation */
.sidebar-bottom-nav {
    list-style: none;
    padding: 0;
    margin-top: auto; /* Push to bottom */
    border-top: 1px solid #343a40; /* Separator */
}

.sidebar-bottom-nav li a {
    border-bottom: none; /* Remove bottom border for last item */
}

/* Homepage-specific styles */
.homepage-wrapper {
    width: 100%;
}

.hero-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%); /* Gradient background */
    color: #fff;
    padding: 6rem 1rem; /* More padding */
    text-align: center;
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.05);
}

.hero-section h1 {
    font-size: 3.5em; /* Larger headline */
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.3em;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    padding: 14px 30px; /* Larger buttons */
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    display: inline-block;
    margin: 0.75rem;
    font-size: 1.1em;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: #28a745; /* Green primary button */
    color: #fff;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #218838;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
    box-shadow: none;
}

.btn-secondary:hover {
    background-color: #fff;
    color: #343a40;
    box-shadow: none;
    transform: translateY(-2px);
}

.features-section {
    padding: 5rem 1rem; /* More padding */
    background-color: #f8f9fa;
    text-align: center;
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.05);
}

.features-section .container {
    display: flex;
    justify-content: center; /* Center items if less than 3 */
    flex-wrap: wrap; /* Allow wrapping */
    gap: 3rem; /* More gap */
}

.feature-item {
    flex: 0 0 calc(33.333% - 2rem); /* 3 items per row, with gap */
    max-width: 300px;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.feature-item i {
    font-size: 3.5em; /* Larger icon */
    color: #007bff;
    margin-bottom: 1.5rem;
}

.feature-item h3 {
    font-size: 1.4em;
    margin-bottom: 0.75rem;
}

/* Target Audience Section */
.target-audience-section {
    padding: 5rem 1rem;
    background-color: #e9ecef; /* Light grey background */
    text-align: center;
}

.target-audience-section .section-title {
    margin-bottom: 3rem;
}

.audience-panels {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.panel-item {
    flex: 0 0 calc(33.333% - 2rem);
    max-width: 350px;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.panel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.panel-item i {
    font-size: 3.5em;
    color: #17a2b8; /* Info blue */
    margin-bottom: 1.5rem;
}

.panel-item h3 {
    font-size: 1.4em;
    margin-bottom: 0.75rem;
}

/* Featured Courses Section (one by one) */
.featured-courses-section {
    padding: 5rem 1rem;
    background-color: #fff;
    text-align: center;
}

.featured-courses-section .section-title {
    margin-bottom: 3rem;
}

.featured-course-item {
    display: flex;
    flex-direction: column; /* Stack image and details vertically on small screens */
    align-items: center; /* Center items */
    gap: 30px;
    background-color: #f8f9fa; /* Light background for the item */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    max-width: 800px; /* Max width for the item */
    margin: 0 auto 40px auto; /* Center and add bottom margin */
}

.featured-course-item img {
    max-width: 100%;
    height: 300px; /* Larger image height */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.featured-course-item .featured-course-details {
    text-align: left; /* Align text within details to left */
}

.featured-course-item h3 {
    font-size: 2em;
    color: #343a40;
    margin-bottom: 0.75em;
}

.featured-course-item p.course-description {
    font-size: 1.1em;
    color: #555;
    line-height: 1.8;
    margin-bottom: 1.5em;
}

.featured-course-item ul.course-meta {
    list-style: none;
    padding: 0;
    margin: 1em 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #6c757d;
    font-size: 1em;
}

.featured-course-item ul.course-meta li {
    display: flex;
    align-items: center;
}

.featured-course-item ul.course-meta li i {
    margin-right: 8px;
    color: #007bff;
}

.featured-course-item .course-price {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    display: flex;
    align-items: baseline;
    justify-content: flex-start; /* Align price to left */
}

.featured-course-item .current-price {
    font-size: 2.2em;
    font-weight: bold;
    color: #28a745;
}

.featured-course-item .actual-price {
    margin-left: 15px;
    color: #dc3545;
    text-decoration: line-through;
    font-size: 1.3em;
}

.featured-courses-section .btn-primary {
    margin-top: 1.5em;
}


/* Slider Styles */
.slider-section {
    padding: 3rem 0; /* More padding */
    background-color: #f1f1f1; /* Lighter background */
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.05);
}

.slider-container {
    max-width: 1000px; /* Wider slider */
    margin: auto;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    box-sizing: border-box;
}

.slide img {
    width: 100%;
    height: 400px; /* Fixed height for slider images */
    object-fit: cover;
    display: block;
}

.prev-slide, .next-slide {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 18px 12px; /* Adjusted padding */
    color: white;
    font-weight: bold;
    font-size: 24px; /* Larger arrows */
    background-color: rgba(0,0,0,0.6); /* Darker background */
    border: none;
    border-radius: 5px;
    user-select: none;
    transition: background-color 0.3s ease;
}

.next-slide {
    right: 10px; /* From edge */
}

.prev-slide {
    left: 10px; /* From edge */
}

.prev-slide:hover, .next-slide:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Course Detail Page Specific Layout (public_course_details.php) */
.course-detail-layout {
    display: flex;
    flex-wrap: wrap; /* Allow columns to wrap on smaller screens */
    gap: 30px; /* Spacing between columns */
    text-align: left; /* Align text within columns to left */
}

.course-detail-layout .course-info-left {
    flex: 2; /* Takes 2/3 of space */
    min-width: 300px; /* Minimum width before wrapping */
}

.course-detail-layout .course-chapters-right {
    flex: 1; /* Takes 1/3 of space */
    min-width: 250px; /* Minimum width before wrapping */
    background-color: #f2f2f2;
    padding: 20px;
    border-radius: 8px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

.course-detail-layout .course-info-left img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.course-detail-layout h1 {
    font-size: 2.2em;
    text-align: left;
}

.course-detail-layout .description {
    font-size: 1em;
    color: #6c757d;
    line-height: 1.7;
}

.course-detail-layout ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.course-detail-layout ul li {
    margin-bottom: 8px;
    color: #495057;
    font-size: 0.95em;
    display: flex;
    align-items: center;
}

.course-detail-layout ul li strong {
    color: #343a40;
}

.course-detail-layout .course-price-info {
    margin-top: 25px;
    margin-bottom: 25px;
    text-align: left;
}

.course-detail-layout .course-price-info .current-price {
    font-size: 2.1em;
    font-weight: bold;
    color: #28a745;
}

.course-detail-layout .course-price-info .actual-price {
    margin-left: 12px;
    color: #dc3545;
    text-decoration: line-through;
    font-size: 1.2em;
}

.btn-enroll {
    background-color: #007bff; /* Blue for enroll */
    color: white;
    padding: 14px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    display: inline-block;
    margin-top: 30px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-enroll:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Accordion Chapters in public_course_details.php */
.chapters-accordion {
    margin-top: 20px;
    text-align: left;
}

.accordion-item {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-header {
    background-color: #f8f9fa;
    color: #495057;
    padding: 12px 15px;
    width: 100%;
    border: none;
    text-align: left;
    font-size: 1.1em;
    cursor: pointer;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.accordion-header:hover {
    background-color: #e2e6ea;
}

.accordion-header.active {
    background-color: #e2e6ea;
    color: #343a40;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 15px;
    background-color: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.accordion-content.show {
    max-height: 500px; /* Adjust as needed */
    padding: 15px;
    border-top: 1px solid #dee2e6;
}

.accordion-content ul {
    list-style: disc;
    margin: 0;
    padding-left: 25px;
}

.accordion-content ul li {
    margin-bottom: 5px;
    color: #6c757d;
}

/* Play Video Button in Admin Panel */
.btn-play-video {
    background-color: #6c757d; /* Muted color */
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.btn-play-video i {
    margin-right: 5px;
}

.btn-play-video:hover {
    background-color: #5a6268;
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        z-index: 1020; /* Ensure sidebar is above other content */
    }

    .main-content {
        margin-left: 0;
    }
    
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    
    body.sidebar-open .page-overlay {
        display: block;
    }

    .sidebar-toggle {
        display: block !important;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 1.8em;
        cursor: pointer;
        padding: 0 15px 0 0;
    }

    .header-right .mobile-menu-toggle {
        display: block;
    }
}


@media (max-width: 768px) {
    header {
        height: auto;
        padding-bottom: 0;
        position: relative;
        z-index: 1000;
    }

    header nav {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .header-left {
       flex-grow: 1;
    }
    .header-right {
        flex-grow: 0;
    }

    .mobile-menu-toggle {
        display: block; /* Show hamburger icon */
        background: transparent;
        border: none;
        color: #fff;
        font-size: 1.8em;
        cursor: pointer;
        padding: 10px;
        z-index: 1001; /* Ensure toggle is above header content */
    }

    .mobile-menu-close {
        display: block; /* Show close button */
        position: absolute; /* Position within the menu dropdown */
        top: 20px; /* Relocated to top-right */
        right: 20px;
        background: none;
        border: 2px solid #fff; /* White border for prominence */
        color: #fff;
        font-size: 1.5em; /* Adjusted size */
        cursor: pointer;
        z-index: 100; /* Ensure close button is clickable within menu */
        padding: 5px 10px; /* More padding for a clickable area */
        font-weight: bold; /* Make 'X' more prominent */
        border-radius: 5px;
    }
    .main-nav-links {
        display: none; /* Hidden by default on mobile */
        flex-basis: 100%; /* Take full width */
        flex-direction: column; /* Stack links vertically */
        background-color: #343a40; /* Same as header background */
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        width: 100%;
        position: absolute; /* Position below the top-row */
        top: 70px; /* Adjust based on header height */
        left: 0;
        z-index: 999; /* Below header, above page content */
        overflow: hidden;
    }

    .main-nav-links.nav-open {
        display: flex; /* Show when active */
    }

    .main-nav-links a {
        color: #fff;
        font-size: 1.2em; /* Adjust font size for dropdown */
        padding: 15px 20px;
        margin: 0;
        text-align: left; /* Align text to the left */
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 100%; /* Full width links */
        box-sizing: border-box;
    }

    .main-nav-links a:last-of-type {
        border-bottom: none;
    }

    .feature-item, .panel-item {
        flex-basis: 100%; /* Full width on smaller screens */
    }

    .featured-course-item {
        flex-direction: column; /* Ensure it stacks on 768px as well */
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .site-title {
        font-size: 1.2em;
    }
    .mobile-menu-toggle {
        font-size: 1.5em;
        padding: 8px 12px;
    }
    .main-nav-links a {
        font-size: 1em; /* Further reduce font size */
    }
    .mobile-menu-close {
        font-size: 1.2em; /* Smaller close icon for very small screens */
        padding: 8px 15px;
    }
    .hero-section h1 {
        font-size: 2em;
    }
    .hero-section p {
        font-size: 1em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 1em;
    }
    .sidebar {
        /* On screens smaller than 992px, the sidebar is already fixed and transformed */
        /* No need for 100% width here anymore */
    }
    .page-wrapper {
        flex-direction: column;
    }
    .main-content {
        margin: 10px;
    }
    .featured-course-item {
        padding: 20px;
    }
    .featured-course-item img {
        height: 180px;
    }
    .featured-course-item h3 {
        font-size: 1.6em;
    }
    .featured-course-item p.course-description {
        font-size: 0.9em;
    }
    .featured-course-item ul.course-meta {
        font-size: 0.85em;
    }
    .featured-course-item .current-price {
        font-size: 1.8em;
    }
    .featured-course-item .actual-price {
        font-size: 1em;
    }
}

/* Scroll Top Button */
#scrollTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed/sticky position */
    bottom: 20px; /* Place the button at the bottom of the page */
    right: 20px; /* Place the button at the right */
    z-index: 99; /* Make sure it does not overlap */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: #28a745; /* Set a prominent background color */
    color: white; /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    width: 50px; /* Explicit width */
    height: 50px; /* Explicit height */
    border-radius: 50%; /* Rounded corners */
    font-size: 24px; /* Increase font size for better visibility */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.3s;
    display: flex; /* Use flexbox to center content */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
}

#scrollTopBtn:hover {
    background-color: #218838; /* Darker background on hover */
    transform: scale(1.1); /* Slightly enlarge on hover */
}

#scrollTopBtn i {
    margin: 0;
    padding: 0;
    line-height: 1; /* Ensure line height does not add extra space */
    display: block; /* Treat as block element within flex container */
    position: relative; /* Allow for fine-tuning positioning */
    top: 1px; /* Nudge down by 1px */
    left: 0px; /* Reset left position */
}

/* WhatsApp Floating Button */
#whatsappFloatBtn {
    display: flex; /* Use flexbox to center content */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
    position: fixed; /* Fixed/sticky position */
    bottom: 20px; /* Place the button at the bottom of the page */
    left: 20px; /* Place the button at the left */
    z-index: 99; /* Make sure it does not overlap */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: #25D366; /* WhatsApp green */
    color: white; /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    width: 50px; /* Explicit width */
    height: 50px; /* Explicit height */
    border-radius: 50%; /* Rounded corners */
    font-size: 24px; /* Increase font size */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none; /* Remove underline */
}

#whatsappFloatBtn:hover {
    background-color: #1DA851; /* Darker green on hover */
    transform: scale(1.1); /* Slightly enlarge on hover */
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

#whatsappFloatBtn.pulse-animation {
    animation: pulse 2s infinite;
}