/* Syllabus Page Styles - Premium Responsive Design */

/* CSS Variables for Theme Support (Default Dark) */
:root {
    --primary-color: #f2b915;      /* Gold as primary in dark */
    --secondary-color: #d97706;    /* Amber/Orange */
    --accent-color: #f2b915;
    --dark-color: #020617;
    --light-bg: #020617;
    --card-bg: rgba(16, 35, 90, 0.25);
    --text-primary: #f4f6fb;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.7);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --btn-active-bg: linear-gradient(135deg, #f2b915, #d97706);
    --btn-active-text: #020617;
}

/* Light Theme Variables Override */
body.theme-light {
    --primary-color: #10235a;      /* Navy as primary in light */
    --secondary-color: #1e3a8a;
    --accent-color: #f2b915;
    --dark-color: #0f172a;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --btn-active-bg: linear-gradient(135deg, #10235a, #1e3a8a);
    --btn-active-text: #ffffff;
}

/* Helper class for white text that should stay white in both themes if on dark background */
.text-white { color: #ffffff !important; }

/* Global Link/Icon Color Fixes */
.cat-icon, .info-item i, .help-item a i, .guideline-box i, .hero-icon {
    color: var(--primary-color);
}

.selector-title, .course-info h2, .sem-label, .guideline-box strong {
    color: var(--primary-color);
}

/* Syllabus Page Container */
.syllabus-page {
    min-height: 100vh;
    background: var(--light-bg);
}

/* Hero Section */
.syllabus-hero {
    background: radial-gradient(circle at 20% 20%, rgba(242, 185, 21, 0.15), transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(16, 35, 90, 0.2), transparent 40%),
                linear-gradient(135deg, var(--dark-color) 0%, #0f172a 100%);
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 500px;
}

/* Decorative elements */
.syllabus-hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    top: -150px;
    right: -50px;
    opacity: 0.1;
    filter: blur(50px);
    z-index: 1;
    animation: floatDecor 10s infinite alternate;
}

@keyframes floatDecor {
    from { transform: translate(0, 0); }
    to { transform: translate(-30px, 30px); }
}

body.theme-light .syllabus-hero {
    background: radial-gradient(circle at 20% 20%, rgba(242, 185, 21, 0.1), transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(16, 35, 90, 0.05), transparent 40%),
                linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.syllabus-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

body.theme-light .syllabus-hero::before {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(0,0,0,0.03)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1.2;
    animation: fadeInUp 1s cubic-bezier(0.22, 1, 0.36, 1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

body.theme-light .hero-content {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px rgba(16, 35, 90, 0.05);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 1rem;
}

body.theme-light .hero-title {
    color: var(--primary-color);
}

.hero-title .hero-icon {
    display: inline-flex;
    color: var(--primary-color);
    filter: drop-shadow(0 0 15px rgba(242, 185, 21, 0.4));
    animation: pulseIcon 2s infinite ease-in-out;
}

.hero-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    margin-bottom: 2rem;
    border-radius: 2px;
    position: relative;
}

.hero-divider::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 20px;
    background: #ffffff;
    filter: blur(4px);
    animation: shimmerDivider 3s infinite linear;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.hero-image {
    flex: 0.8;
    position: relative;
    animation: floatImage 6s infinite ease-in-out;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(242, 185, 21, 0.2), transparent 70%);
    z-index: -1;
    border-radius: 50%;
    filter: blur(20px);
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

body.theme-light .hero-image img {
    box-shadow: 0 25px 50px -12px rgba(16, 35, 90, 0.2);
    border: 1px solid rgba(16, 35, 90, 0.1);
}

.hero-image:hover img {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.6);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes shimmerDivider {
    0% { left: -20%; }
    100% { left: 120%; }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        justify-content: center;
    }
    
    .hero-divider {
        margin-inline: auto;
    }
    
    .hero-image {
        max-width: 500px;
    }
}

/* Main Content Wrapper */
.main-content-wrapper {
    padding: 3rem 0;
}

.syllabus-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar */
.syllabus-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.sidebar-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.card-title {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    text-align: left;
}

body.theme-light .card-title {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

body.theme-dark .card-title {
    color: var(--accent-color);
}

.category-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

body.theme-light .category-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.category-item.active {
    border-color: var(--accent-color);
    background: #000;
    box-shadow: var(--shadow-md);
    color: #fff;
}

.category-item.active .cat-text,
.category-item.active .cat-icon,
.category-item.active .arrow {
    color: #fff;
}

.cat-icon {
    width: 35px;
    height: 35px;
    background: var(--light-bg);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 15px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.category-item.active .cat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.cat-text {
    flex: 1;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.arrow {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-item:hover .arrow {
    color: var(--primary-color);
    transform: translateX(3px);
}

/* Info List */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 1.1rem;
    margin-bottom: 0.85rem;
    background: var(--light-bg);
    border-radius: 14px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.info-item:hover {
    background: var(--card-bg);
    border-color: var(--accent-color);
    transform: translateX(6px);
    box-shadow: var(--shadow-sm);
}

.info-item i {
    font-size: 1.35rem;
    margin-right: 1rem;
    width: 32px;
    text-align: center;
}

.info-item span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Help Desk Card */
.help-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-item {
    margin-bottom: 0.85rem;
}

.help-item a {
    display: flex;
    align-items: center;
    padding: 1.1rem;
    background: var(--light-bg);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.help-item a:hover {
    background: linear-gradient(135deg, #10235a, #1e3a8a);
    border-color: transparent;
    transform: translateY(-3px) translateX(5px);
    box-shadow: 0 8px 20px rgba(16, 35, 90, 0.25);
}

body.theme-light .help-item a:hover {
    background: linear-gradient(135deg, #10235a, #1e3a8a);
    box-shadow: 0 8px 20px rgba(242, 185, 21, 0.2);
}

.help-item a i {
    font-size: 1.35rem;
    margin-right: 1rem;
    width: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.help-item a:hover i {
    color: #ffffff;
}

body.theme-dark .help-item a:hover i {
    color: var(--dark-color);
}

.help-item a span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.help-item a:hover span {
    color: #ffffff;
}

body.theme-dark .help-item a:hover span {
    color: var(--dark-color);
}

/* Download All Button */
.download-all-btn {
    width: 100%;
    padding: 1.2rem 1.35rem;
    background: linear-gradient(135deg, rgba(16, 35, 90, 0.95), rgba(0, 0, 0, 0.95));
    color: #ffffff;
    border: none;
    border-radius: 26px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.32s ease, box-shadow 0.32s ease, background 0.32s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 38px rgba(16, 35, 90, 0.2);
}

.download-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 30%;
    height: 100%;
    background: rgba(255, 255, 255, 0.18);
    transform: skewX(-18deg);
    transition: left 0.45s ease;
}

.download-all-btn:hover::before {
    left: 120%;
}

.download-all-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 44px rgba(16, 35, 90, 0.25);
    background: linear-gradient(135deg, black, #6d4307);
}

.download-all-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(16, 35, 90, 0.18);
}

.download-all-btn:focus-visible {
    outline: 3px solid rgba(242, 185, 21, 0.8);
    outline-offset: 3px;
}

.download-all-btn i {
    font-size: 1.85rem;
    transition: transform 0.32s ease;
}

.download-all-btn:hover i {
    transform: translateX(4px);
}

.download-all-btn .btn-text {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.download-all-btn .btn-text span {
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.download-all-btn .btn-text small {
    font-size: 0.78rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.92);
}

/* Main Content Area */
.syllabus-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* Course Selector */
.course-selector {
    margin-bottom: 3.5rem;
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

body.theme-dark .course-selector {
    background: rgba(16, 35, 90, 0.2);
    backdrop-filter: blur(10px);
}

.selector-title {
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body.theme-dark .selector-title {
    color: var(--accent-color);
}

.tabs-wrapper {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem;
}

.tab-btn {
    padding: 0.85rem 2.25rem;
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    color: var(--primary-color);
}

body.theme-dark .tab-btn:hover {
    color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(242, 185, 21, 0.1);
}

.tab-btn.active {
    background: var(--btn-active-bg);
    color: var(--btn-active-text);
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(16, 35, 90, 0.4);
    transform: translateY(-2px);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 10px;
}

.tab-btn.active::after {
    width: 40%;
    bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
}

body.theme-light .tab-btn.active::after {
    background: rgba(255, 255, 255, 0.5);
}
.tab-btn.active::after {
    background: #f2b915;
}

/* Major/Minor Toggle */
.subcategory-selector {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0 2rem;
    padding: 0.4rem;
    background: var(--light-bg);
    border-radius: 14px;
    width: fit-content;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.sub-tab-btn {
    padding: 0.6rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 10px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sub-tab-btn.active {
    background: var(--btn-active-bg);
    color: var(--btn-active-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Subject List Styling */
.subject-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.subject-item {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    background: linear-gradient(145deg, var(--light-bg), var(--card-bg));
}

.subject-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.subject-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subject-icon {
    width: 42px;
    height: 42px;
    background: var(--card-bg);
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
}

.subject-item:hover .subject-icon {
    background: var(--primary-color);
    color: #000;
    border-color: transparent;
}
body.theme-light .subject-item:hover .subject-icon {
    color: #fff;
}

.subject-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.download-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--light-bg);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.download-icon-btn:hover {
    background: var(--btn-active-bg);
    color: var(--btn-active-text);
    border-color: transparent;
    transform: rotate(360deg);
}

/* Course Panels */
.course-panel {
    display: none;
    animation: fadeInUp 0.5s ease;
}

.course-panel.active {
    display: block;
}

.course-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(16, 35, 90, 0.08), rgba(242, 185, 21, 0.08));
    border-radius: 15px;
    border: 1px solid rgba(16, 35, 90, 0.15);
}

.course-icon-bg {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
}

.course-info h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.course-info p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

/* Semester List */
.semester-list {
    display: grid;
    gap: 1rem;
}

.semester-item {
    background: var(--light-bg);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
}

.semester-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.sem-number {
    width: 60px;
    height: 60px;
    background: var(--btn-active-bg);
    color: var(--btn-active-text);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.sem-info {
    flex: 1;
    margin-left: 1.5rem;
    transition: max-height 0.3s ease;
}

.sem-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.25rem;
}

.sem-title {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.sem-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.download-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.75rem;
    background: var(--btn-active-bg);
    color: var(--btn-active-text);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(16, 35, 90, 0.2);
}

.download-link:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.download-link:active {
    transform: translateY(-1px);
}

/* Guidelines Footer */
.syllabus-guidelines {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(16, 35, 90, 0.08), rgba(242, 185, 21, 0.08));
    border-radius: 15px;
    border: 1px solid rgba(16, 35, 90, 0.15);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.guideline-box {
    flex: 1;
    min-width: 250px;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 35, 90, 0.08), rgba(242, 185, 21, 0.08));
    border-radius: 15px;
    border: 1px solid rgba(16, 35, 90, 0.15);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

.guideline-box i {
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.guideline-box p {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Important Notes Section */
.important-notes-section {
    padding: 3rem 0;
}

.important-notes-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.note-item {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.note-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.note-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.note-icon {
    width: 70px;
    height: 70px;
    background: var(--btn-active-bg);
    color: var(--btn-active-text);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
}

.note-item p {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

/* Light Theme Specific Fixes */
body.theme-light .tab-btn.active {
    background: linear-gradient(135deg, #10235a, #1e3a8a);
    color: #ffffff;
}

body.theme-light .sem-number {
    background: linear-gradient(135deg, #10235a, #1e3a8a);
    color: #ffffff;
}

body.theme-light .category-item.active {
    background: linear-gradient(135deg, #10235a, #1e3a8a);
    color: #ffffff;
}

body.theme-light .course-icon-bg {
    background: linear-gradient(135deg, #10235a, #1e3a8a);
    color: #ffffff;
}

body.theme-light .download-link {
    background: linear-gradient(135deg, #10235a, #1e3a8a);
    color: #ffffff;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .syllabus-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        display: flex;
        flex-direction: column;
    }
    
    .syllabus-sidebar {
        display: contents; /* Allows children to be ordered relative to syllabus-content */
    }

    .categories-card {
        order: 1;
    }

    .syllabus-content {
        order: 2;
    }

    .info-card {
        order: 3;
    }

    .help-desk-card {
        order: 4;
    }
    
    .sidebar-card {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .syllabus-hero {
        padding: 2rem 1rem;
    }
    
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        justify-content: center;
    }
    
    .hero-image img {
        max-width: 280px;
    }
    
    .main-content-wrapper {
        padding: 2rem 0;
    }
    
    .syllabus-content {
        padding: 1.5rem;
    }
    
    .selector-title {
        font-size: 1.5rem;
    }
    
    .tabs-wrapper {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .course-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .semester-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .sem-info {
        margin-left: 0;
        text-align: center;
    }
    
    .sem-actions {
        justify-content: center;
    }
    
    .syllabus-guidelines {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .guideline-box {
        padding: 1rem;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .note-item {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .selector-title {
        font-size: 1.3rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .course-icon-bg {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .sem-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .syllabus-hero,
    .syllabus-sidebar,
    .syllabus-guidelines,
    .important-notes-section {
        display: none;
    }
    
    .syllabus-content {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .semester-item {
        break-inside: avoid;
    }
}

/* Download Notification */
.download-notification {
    font-family: inherit;
}

/* --- Responsive & Animation Enhancements --- */

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-content, .sidebar-card, .course-selector, .course-panel, .note-item, .guideline-box {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sidebar-card:nth-child(1) { animation-delay: 0.1s; }
.sidebar-card:nth-child(2) { animation-delay: 0.2s; }
.sidebar-card:nth-child(3) { animation-delay: 0.3s; }
.course-selector { animation-delay: 0.4s; }
.course-panel.active { animation-delay: 0.5s; }

/* Custom Animations for Semester Items */
.semester-item {
    opacity: 0;
    animation: slideInRight 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.semester-item:nth-child(1) { animation-delay: 0.6s; }
.semester-item:nth-child(2) { animation-delay: 0.7s; }
.semester-item:nth-child(3) { animation-delay: 0.8s; }
.semester-item:nth-child(4) { animation-delay: 0.9s; }
.semester-item:nth-child(5) { animation-delay: 1.0s; }
.semester-item:nth-child(6) { animation-delay: 1.1s; }

/* Responsive Fixes for 350px and below */
@media (max-width: 768px) {
    .hero-image {
        display: none; /* Hide image on mobile for better focus on text */
    }
}

@media (max-width: 380px) {
    .tabs-wrapper {
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%; /* Stack buttons on very small screens */
        justify-content: center;
    }

    .sem-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .download-link {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
    
    .sem-actions {
        width: 100%;
    }
}

@media (max-width: 350px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    .syllabus-content {
        padding: 1rem;
    }

    .course-header {
        padding: 1rem;
    }

    .course-info h2 {
        font-size: 1.4rem;
    }

    .semester-item {
        padding: 1rem;
    }

    .sidebar-card {
        padding: 1.2rem;
    }

    .category-item {
        padding: 0.8rem;
    }
    
    .cat-text {
        font-size: 0.9rem;
    }
    
    .download-all-btn {
        padding: 1rem;
    }
    
    .download-all-btn .btn-text span {
        font-size: 0.9rem;
    }
}

