.hamburger {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: #2c3e50;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Mobile Sidebar State */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .course-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 280px;
        margin: 0;
        transition: all 0.3s ease;
        z-index: 999;
        border-radius: 0;
    }
    .course-sidebar.active {
left: 0;
z-index: 1002; /* Higher than header */
background: #ffffff;
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}


    .main-content {
        margin-left: 0;
        transition: all 0.3s ease;
    }

    .course-header {
position: relative; /* Ensure it's below sidebar */
z-index: 1000; /* Lower than sidebar */
}
.main-content {
transition: margin-left 0.3s ease;
}

.course-sidebar.active ~ .main-content {
margin-left: 280px; /* Same width as sidebar */
}


    /* Hamburger Animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

.close-btn {
position: absolute;
top: 15px;
right: 15px; /* Keep it inside */
background: none;
border: none;
font-size: 24px;
font-weight: bold;
cursor: pointer;
color: #333;
z-index: 1005; /* Ensure it's on top */
}

.close-btn:hover {
color: red;
}
/* course_dts.css - Enhanced Responsive Styles */
:root {
--primary-color: #2c3e50;
--secondary-color: #3498db;
--background-light: #f9f9f9;
--text-dark: #2c3e50;
--text-light: #ecf0f1;
--shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
--sidebar-colors: #FF6B6B, #4ECDC4, #45B7D1, #96CEB4, #FFEEAD, #FF9F68, #D4A5A5, #77DD77, #C23B22, #B19CD9, #FF6961, #AEC6CF;
}

body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background-color: var(--background-light);
}

.container {
max-width: 1600px;
margin: 0 auto;
padding: 0 15px;
}

/* Header Styles */
.course-header {
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
color: white;
padding: 2rem;
border-radius: 10px;
margin: 1rem 0;
box-shadow: var(--shadow);
}

.course-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
}

/* Main Container Layout */
.main-container {
display: grid;
gap: 2rem;
grid-template-columns: 280px 1fr;
position: relative;
}

/* Enhanced Sidebar Styles */
.course-sidebar {
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
padding: 1.5rem;
border-radius: 15px;
box-shadow: var(--shadow);
height: fit-content;
max-height: 90vh;
overflow-y: auto;
}

.program-list {
list-style: none;
padding-left: 0;
}

.program-item {
position: relative;
margin-bottom: 2rem;
padding-left: 2rem;
border-left: 4px solid;
transition: var(--transition);
}

/* Assign different colors to program items */
.program-item:nth-child(6n+1) { border-color: #ff6b6b; }
.program-item:nth-child(6n+2) { border-color: #4ecdc4; }
.program-item:nth-child(6n+3) { border-color: #45b7d1; }
.program-item:nth-child(6n+4) { border-color: #96ceb4; }
.program-item:nth-child(6n+5) { border-color: #ff9f68; }
.program-item:nth-child(6n+6) { border-color: #b19cd9; }

.program-title {
color: var(--text-dark);
padding: 0.75rem 1rem;
margin: 0 -1rem;
background: rgba(255,255,255,0.9);
font-weight: 700;
border-bottom: 2px solid #eee;
}

.course-list {
list-style: none;
padding-left: 1.5rem;
}

.course-item {
position: relative;
margin-bottom: 0.8rem;
}

.course-link {
display: block;
padding: 0.8rem 1rem;
color: var(--text-dark);
text-decoration: none;
border-radius: 6px;
transition: var(--transition);
}

.course-link:hover {
background: #f0f4f8;
transform: translateX(10px);
}

/* Add custom bullet points */
.course-item::before {
content: "•";
position: absolute;
left: -1rem;
color: var(--secondary-color);
font-size: 1.5rem;
line-height: 1;
}

/* Main Content Styles */
.main-content {
background: white;
padding: 2rem;
border-radius: 10px;
box-shadow: var(--shadow);
}

/* Filter Bar */
.filter-bar {
display: flex;
gap: 1rem;
margin-bottom: 2rem;
flex-wrap: wrap;
}

.filter-bar select {
flex: 1;
min-width: 200px;
padding: 0.8rem;
border: 2px solid #eee;
border-radius: 8px;
transition: var(--transition);
}

.filter-bar select:focus {
border-color: var(--secondary-color);
outline: none;
}

/* Enhanced Unit Grid */
.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.unit-card {
    position: relative;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    /* Initial subtle shadow */
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    /* Smooth transition for transform and shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid;
    overflow: hidden; /* Ensure overlay stays within the card */
}

/* Cycle border colors for a dynamic look */
.unit-card:nth-child(12n+1)  { border-color: #FF6B6B; }
.unit-card:nth-child(12n+2)  { border-color: #4ECDC4; }
.unit-card:nth-child(12n+3)  { border-color: #45B7D1; }
.unit-card:nth-child(12n+4)  { border-color: #96CEB4; }
.unit-card:nth-child(12n+5)  { border-color: #FFEEAD; }
.unit-card:nth-child(12n+6)  { border-color: #FF9F68; }
.unit-card:nth-child(12n+7)  { border-color: #D4A5A5; }
.unit-card:nth-child(12n+8)  { border-color: #77DD77; }
.unit-card:nth-child(12n+9)  { border-color: #C23B22; }
.unit-card:nth-child(12n+10) { border-color: #B19CD9; }
.unit-card:nth-child(12n+11) { border-color: #FF6961; }
.unit-card:nth-child(12n+12) { border-color: #AEC6CF; }

/* Create a subtle overlay effect with a pseudo-element */
.unit-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* A gentle gradient overlay */
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(0,0,0,0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Enhanced hover effect: scale, elevate, and reveal overlay */
.unit-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.unit-card:hover::after {
    opacity: 1;
}

/* Link styles within the card */
.unit-card a {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    font-size: 18px;
}

.unit-card a:hover {
    color: var(--secondary-color);
}

.unit-card a:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .unit-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .unit-grid {
        grid-template-columns: 1fr;
    }

    .unit-card {
        padding: 1rem;
    }

    .unit-card::after {
        /* Optionally adjust the overlay for smaller screens */
    }
}


/* Enhanced Content Grid */
.content-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
margin-top: 2rem;
}

.content-card {
position: relative;
background: white;
border-radius: 10px;
padding: 1.5rem;
box-shadow: var(--shadow);
transition: var(--transition);
overflow: hidden;
}

.content-card::before {
content: attr(data-type);
position: absolute;
top: 15px;
right: -25px;
background: #fff;
color: #fff;
padding: 0.5rem 2rem;
font-size: 0.8em;
font-weight: 600;
transform: rotate(45deg);
box-shadow: var(--shadow);
z-index: 1;
}

[data-type="video"]::before { background: #FF4757; }
[data-type="pdf"]::before { background: #2ED573; }
[data-type="ppt"]::before { background: #FFA502; }
[data-type="doc"]::before { background: #3742FA; }

.content-type {
position: relative;
padding-left: 35px;
}

.content-type i {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
font-size: 1.4em;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 6px;
}

.view-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.8rem 1.5rem;
background: var(--secondary-color);
color: white;
border-radius: 6px;
text-decoration: none;
margin-top: 1rem;
transition: var(--transition);
}

.view-button:hover {
background: var(--primary-color);
}

/* Interactive Elements */
.back-button-container {
margin-top: 2rem;
text-align: center;
}

.back-button {
padding: 1rem 2rem;
background: var(--primary-color);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
transition: var(--transition);
}

#scrollToTopBtn {
position: fixed;
bottom: 30px;
right: 30px;
width: 50px;
height: 50px;
border: none;
border-radius: 50%;
background: var(--secondary-color);
color: white;
cursor: pointer;
box-shadow: var(--shadow);
transition: var(--transition);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
.main-container {
    grid-template-columns: 1fr;
}

.course-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    width: 280px;
    z-index: 1000;
    transition: var(--transition);
}

.course-sidebar.active {
    left: 0;
}
}

@media (max-width: 768px) {
.course-header h1 {
    font-size: 2rem;
}

.unit-grid,
.content-grid {
    grid-template-columns: 1fr;
}

#scrollToTopBtn {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
}
}

@media (max-width: 480px) {
.course-header {
    padding: 1.5rem;
}

.main-content {
    padding: 1rem;
}
}

/* Animations */
@keyframes slideIn {
from { transform: translateX(-100%); }
to { transform: translateX(0); }
}

.content-card {
animation: slideIn 0.5s ease forwards;
}

/* Accessibility */
button:focus,
select:focus,
a:focus {
outline: 3px solid var(--secondary-color);
outline-offset: 2px;
}
