/* Modern Learning Portal Styles - Enhanced Version */

:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #4895ef;
    --secondary-color: #7209b7;
    --secondary-light: #b5179e;
    --accent-color: #f72585;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #f94144;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --gray-light: #e9ecef;
    --gray-dark: #343a40;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --box-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --box-shadow-hover: 0 15px 40px rgba(67, 97, 238, 0.15);
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Poppins', var(--font-primary);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 76px;
    background-color: #f8fafc;
}

main {
    flex: 1 0 auto;
}

@media (max-width: 991.98px) {
    body {
        padding-top: 66px;
    }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

.section-title {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    position: relative;
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 60px;
        height: 3px;
        background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
        border-radius: 3px;
    }

.section-header.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-color);
    margin-top: 1rem;
}

/* ===== HEADER & NAVIGATION ===== */
.navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

    .navbar.scrolled {
        padding: 0.5rem 0;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--dark-color) !important;
    transition: var(--transition);
    position: relative;
}

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: var(--primary-color);
        transition: var(--transition);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 80%;
    }

    .nav-link:hover {
        color: var(--primary-color) !important;
    }

    .nav-link.active {
        color: var(--primary-color) !important;
        font-weight: 600;
    }

/* ===== DROPDOWN STYLES ===== */
.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow-lg);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

    .dropdown-item:hover {
        background: linear-gradient(90deg, var(--primary-light), var(--secondary-light));
        color: white !important;
        padding-left: 2rem;
    }

.dropdown-header {
    font-weight: 600;
    color: var(--gray-dark);
    padding: 0.5rem 1.5rem;
}

/* ===== AVATAR ===== */
.avatar-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(67, 97, 238, 0.3);
    transition: var(--transition);
}

    .avatar-circle:hover {
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

/* ===== SEARCH FORM ===== */
.navbar .input-group {
    min-width: 300px;
}

.navbar .form-control {
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    border: 1px solid var(--gray-light);
}

.navbar .btn-primary {
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 120px 0 100px;
    position: relative;
    margin-top: 76px;
    overflow: hidden;
}

    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('/images/pattern-dots.svg') repeat;
        opacity: 0.1;
        animation: moveBackground 20s linear infinite;
    }

@keyframes moveBackground {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 100px 100px;
    }
}

.hero-section h1 {
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-section .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
}

.hero-stats .stat-item {
    position: relative;
    padding-right: 2rem;
}

    .hero-stats .stat-item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 40px;
        background: rgba(255, 255, 255, 0.2);
    }

.hero-stats .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.hero-stats .stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-illustration {
    max-width: 90%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.trust-badge {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CIRCULAR QUICK STATS ===== */
.quick-stats {
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: white;
    border-radius: 50%; /* Makes it circular */
    width: 100%;
    aspect-ratio: 1 / 1; /* Ensures perfect circle */
    padding: 2rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(67, 97, 238, 0.15);
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    transition: transform 0.3s ease, background 0.3s ease;
    position: relative;
    z-index: 1;
}

.stat-card:hover .stat-icon-wrapper {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.stat-icon-wrapper i {
    font-size: 2.5rem;
    transition: color 0.3s ease;
}

.stat-card:nth-child(1) .stat-icon-wrapper i { color: #4361ee; }
.stat-card:nth-child(2) .stat-icon-wrapper i { color: #10b981; }
.stat-card:nth-child(3) .stat-icon-wrapper i { color: #0891b2; }
.stat-card:nth-child(4) .stat-icon-wrapper i { color: #f59e0b; }

.stat-card:hover .stat-icon-wrapper i {
    color: white !important;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

.stat-card:hover .stat-number {
    color: var(--primary-color);
}

.stat-label {
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stat-card {
        padding: 1.5rem 0.5rem;
    }
    
    .stat-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .stat-icon-wrapper i {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .stat-card {
        padding: 1.25rem 0.5rem;
    }
    
    .stat-icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .stat-icon-wrapper i {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* ===== CATEGORY CARDS ===== */
.category-card {
    transition: var(--transition);
    text-decoration: none;
}

    .category-card:hover {
        transform: translateY(-10px);
    }

    .category-card .card {
        border-radius: var(--border-radius);
        transition: var(--transition);
        overflow: hidden;
    }

    .category-card:hover .card {
        box-shadow: var(--box-shadow-lg);
    }

    .category-card .card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        opacity: 0;
        transition: var(--transition);
        z-index: 0;
    }

    .category-card:hover .card::before {
        opacity: 0.05;
    }

.category-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* ===== RESOURCE CARDS ===== */
.resource-card, .academic-card {
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .resource-card:hover, .academic-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--box-shadow-lg) !important;
    }

    .resource-card .badge,
    .academic-card .badge {
        padding: 0.35em 0.8em;
        font-size: 0.75rem;
        font-weight: 500;
    }

.resource-title {
    font-weight: 600;
    line-height: 1.4;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

    .resource-title a {
        color: var(--dark-color);
    }

        .resource-title a:hover {
            color: var(--primary-color);
        }

.resource-description {
    line-height: 1.6;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.resource-footer {
    border-top: 1px solid var(--gray-light);
    padding-top: 1rem;
}

/* ===== PROGRAMMING LANGUAGES SECTION - MODERN DESIGN ===== */
.languages-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

    .languages-section::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 100%;
        height: 100%;
        background: radial-gradient(circle, rgba(67, 97, 238, 0.03) 0%, transparent 70%);
        pointer-events: none;
    }

/* Language Card - Modern Glass Design */
.language-card {
    display: block;
    padding: 2rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

    .language-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 0;
    }

    .language-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 40px rgba(67, 97, 238, 0.15);
        border-color: transparent;
    }

        .language-card:hover::before {
            opacity: 0.05;
        }

/* Language Icon Container */
.language-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.language-card:hover .language-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(67, 97, 238, 0.2);
}

.language-icon i {
    font-size: 3rem;
    transition: transform 0.3s ease;
}

.language-card:hover .language-icon i {
    transform: scale(1.1);
}

/* Language Name */
.language-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.language-card:hover .language-name {
    color: var(--primary-color);
}

/* Resource Count */
.language-card small:first-of-type {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    display: block;
}

/* Progress Bar Container */
.language-card .progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 20px;
    overflow: hidden;
    margin: 0.75rem 0;
    position: relative;
    z-index: 1;
}

/* Progress Bar */
.language-card .progress-bar {
    border-radius: 20px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

    .language-card .progress-bar::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, rgba(255,255,255,0.2), transparent);
        animation: shimmer 2s infinite;
    }

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Resource Count Display */
.language-card small:last-of-type {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
    display: block;
    font-weight: 500;
}

/* Empty State Styling */
.empty-state {
    background: white;
    border-radius: 20px;
    padding: 4rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin: 2rem auto;
}

    .empty-state .empty-icon {
        width: 120px;
        height: 120px;
        margin: 0 auto 1.5rem;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: float 3s ease-in-out infinite;
    }

        .empty-state .empty-icon i {
            font-size: 3.5rem;
            color: #adb5bd;
        }

    .empty-state h4 {
        color: #1e293b;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .empty-state p {
        color: #64748b;
        margin-bottom: 1.5rem;
    }

    .empty-state .btn-primary {
        padding: 0.75rem 2rem;
        border-radius: 30px;
        font-weight: 500;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border: none;
        transition: all 0.3s ease;
    }

        .empty-state .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
        }

/* Animation for empty state icon */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 991px) {
    .language-icon {
        width: 90px;
        height: 90px;
    }

        .language-icon i {
            font-size: 2.5rem;
        }

    .language-name {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .language-card {
        padding: 1.5rem 0.75rem;
    }

    .language-icon {
        width: 80px;
        height: 80px;
    }

        .language-icon i {
            font-size: 2rem;
        }

    .language-name {
        font-size: 0.95rem;
    }

    .language-card small {
        font-size: 0.8rem;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }

        .empty-state .empty-icon {
            width: 100px;
            height: 100px;
        }
}

@media (max-width: 576px) {
    .language-card {
        padding: 1.25rem 0.5rem;
    }

    .language-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 1rem;
    }

        .language-icon i {
            font-size: 1.75rem;
        }

    .language-name {
        font-size: 0.9rem;
    }
}

/* Hover effect for cards */
.language-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.language-card:hover::after {
    opacity: 1;
}

/* Grid layout enhancement */
.languages-section .row {
    margin: -0.5rem;
}

.languages-section .col-md-4,
.languages-section .col-lg-2,
.languages-section .col-6 {
    padding: 0.5rem;
}

/* Section header enhancement */
.languages-section .section-header {
    margin-bottom: 3rem;
}

.languages-section .section-title {
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.languages-section .section-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    margin-top: 76px;
    position: relative;
    overflow: hidden;
}

    .page-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('/images/pattern-dots.svg') repeat;
        opacity: 0.1;
    }

    .page-header h1 {
        font-weight: 700;
        margin-bottom: 1rem;
        position: relative;
    }

    .page-header .breadcrumb {
        background: transparent;
        padding: 0;
        margin-bottom: 0;
    }

    .page-header .breadcrumb-item,
    .page-header .breadcrumb-item a {
        color: rgba(255, 255, 255, 0.8);
    }

        .page-header .breadcrumb-item.active {
            color: white;
        }

        .page-header .breadcrumb-item + .breadcrumb-item::before {
            color: rgba(255, 255, 255, 0.5);
        }

/* ===== SIDEBAR ===== */
.sidebar-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 0.5rem;
}

    .sidebar-title::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 40px;
        height: 2px;
        background: var(--primary-color);
    }

/* ===== FILTERS ===== */
.category-filter .form-check,
.difficulty-filter .form-check {
    margin-bottom: 0.5rem;
}

.category-filter .form-check-label,
.difficulty-filter .form-check-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: var(--transition);
}

    .category-filter .form-check-label:hover,
    .difficulty-filter .form-check-label:hover {
        color: var(--primary-color);
        padding-left: 5px;
    }

.category-filter .badge,
.difficulty-filter .badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.difficulty-filter .badge {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 50%;
}

    .difficulty-filter .badge.beginner {
        background-color: var(--success-color);
    }

    .difficulty-filter .badge.intermediate {
        background-color: var(--warning-color);
    }

    .difficulty-filter .badge.advanced {
        background-color: var(--danger-color);
    }

    .difficulty-filter .badge.expert {
        background-color: var(--dark-color);
    }

/* ===== FILTER BADGES ===== */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: var(--light-color);
    color: var(--dark-color);
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--gray-light);
}

    .filter-badge i {
        margin-left: 0.5rem;
        cursor: pointer;
        opacity: 0.6;
        transition: var(--transition);
    }

        .filter-badge i:hover {
            opacity: 1;
            color: var(--danger-color);
        }

/* ===== SEARCH PAGE ===== */
.search-page .filter-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.results-summary {
    background: var(--light-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 2rem;
}

.search-highlight {
    background-color: #fff3cd;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-weight: 600;
}

/* ===== AUTOCOMPLETE ===== */
.autocomplete-suggestions {
    position: absolute;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    z-index: 1050;
    max-height: 300px;
    overflow-y: auto;
    width: 100%;
    margin-top: 0.25rem;
}

.autocomplete-suggestion {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-light);
    transition: var(--transition);
}

    .autocomplete-suggestion:hover {
        background: var(--light-color);
        color: var(--primary-color);
    }

    .autocomplete-suggestion:last-child {
        border-bottom: none;
    }

    .autocomplete-suggestion i {
        margin-right: 0.5rem;
        color: var(--gray-color);
    }

/* ===== VIEW TOGGLE ===== */
.view-toggle .btn-group {
    box-shadow: var(--box-shadow);
    border-radius: 8px;
}

.view-toggle .btn {
    border-radius: 8px !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-light);
    background: white;
    color: var(--gray-color);
}

    .view-toggle .btn.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }

/* ===== RESOURCES GRID & LIST ===== */
.resources-grid {
    transition: var(--transition);
}

    .resources-grid.loading {
        opacity: 0.5;
        pointer-events: none;
        position: relative;
        min-height: 200px;
    }

        .resources-grid.loading::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 40px;
            height: 40px;
            border: 3px solid var(--gray-light);
            border-top: 3px solid var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.resources-list .list-group-item {
    border-radius: var(--border-radius) !important;
    transition: var(--transition);
    border: 1px solid var(--gray-light);
    margin-bottom: 0.5rem;
}

    .resources-list .list-group-item:hover {
        transform: translateX(5px);
        box-shadow: var(--box-shadow);
        border-color: var(--primary-color);
    }

.list-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* ===== PAGINATION ===== */
.pagination {
    margin: 2rem 0 0;
}

    .pagination .page-link {
        border: none;
        margin: 0 3px;
        border-radius: 8px !important;
        color: var(--gray-color);
        font-weight: 500;
        padding: 0.5rem 1rem;
        transition: var(--transition);
    }

        .pagination .page-link:hover {
            background: var(--light-color);
            color: var(--primary-color);
            transform: translateY(-2px);
        }

    .pagination .page-item.active .page-link {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    }

    .pagination .page-item.disabled .page-link {
        opacity: 0.5;
        pointer-events: none;
    }



/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

    .cta-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('/images/pattern-dots.svg') repeat;
        opacity: 0.1;
        animation: moveBackground 20s linear infinite;
    }

.cta-title {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.cta-section .btn-light {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

    .cta-section .btn-light:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    }

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-color);
    color: var(--gray-color);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-heading {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    padding-bottom: 0.75rem;
}

    .footer-heading::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 40px;
        height: 3px;
        background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
        border-radius: 3px;
    }

.footer-links {
    list-style: none;
    padding: 0;
}

    .footer-links li {
        margin-bottom: 0.75rem;
    }

    .footer-links a {
        color: var(--gray-color);
        text-decoration: none;
        transition: var(--transition);
        display: inline-block;
    }

        .footer-links a:hover {
            color: white;
            transform: translateX(5px);
        }

    .footer-links i {
        font-size: 0.8rem;
        margin-right: 0.5rem;
    }

/* ===== SOCIAL LINKS ===== */
.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

    .social-links a {
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        color: white;
        transition: var(--transition);
    }

        .social-links a:hover {
            background: var(--primary-color);
            transform: translateY(-3px);
        }

/* ===== NEWSLETTER ===== */
.newsletter-form .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

    .newsletter-form .form-control:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: var(--primary-color);
        box-shadow: none;
    }

.newsletter-form .btn {
    background: var(--primary-color);
    border: none;
    color: white;
}

    .newsletter-form .btn:hover {
        background: var(--primary-dark);
    }

/* ===== FOOTER BOTTOM ===== */
.footer hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer .small {
    font-size: 0.9rem;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    box-shadow: var(--box-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1040;
    cursor: pointer;
}

    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 30px rgba(67, 97, 238, 0.4);
    }

    .back-to-top:active {
        transform: scale(0.95);
    }

/* ===== LOADING SPINNER ===== */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

    .spinner-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    .spinner-overlay .spinner-border {
        width: 3rem;
        height: 3rem;
        color: var(--primary-color);
    }

/* ===== TOAST NOTIFICATIONS ===== */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    padding: 1rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9998;
}

    .toast-notification.show {
        transform: translateY(0);
        opacity: 1;
    }

    .toast-notification.success {
        border-left: 4px solid var(--success-color);
    }

    .toast-notification.error {
        border-left: 4px solid var(--danger-color);
    }

    .toast-notification.warning {
        border-left: 4px solid var(--warning-color);
    }

    .toast-notification.info {
        border-left: 4px solid var(--info-color);
    }

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .toast-content i {
        font-size: 1.25rem;
    }

.toast-notification.success i {
    color: var(--success-color);
}

.toast-notification.error i {
    color: var(--danger-color);
}

.toast-notification.warning i {
    color: var(--warning-color);
}

.toast-notification.info i {
    color: var(--info-color);
}

/* ===== FORMS ===== */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--gray-light);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 1rem;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
        outline: none;
    }

    .form-control.is-invalid {
        border-color: var(--danger-color);
    }

    .form-control.is-valid {
        border-color: var(--success-color);
    }

/* ===== FILE UPLOAD ===== */
.file-upload-area {
    border: 2px dashed var(--gray-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--light-color);
}

    .file-upload-area:hover,
    .file-upload-area.dragover {
        border-color: var(--primary-color);
        background: rgba(67, 97, 238, 0.05);
    }

    .file-upload-area i {
        font-size: 3rem;
        color: var(--primary-color);
        margin-bottom: 1rem;
    }

    .file-upload-area .file-name {
        font-weight: 600;
        color: var(--dark-color);
        margin-bottom: 0.25rem;
    }

    .file-upload-area .file-size {
        font-size: 0.9rem;
        color: var(--gray-color);
    }

    .file-upload-area .remove-file {
        margin-top: 1rem;
        padding: 0.25rem 1rem;
        font-size: 0.9rem;
    }

/* ===== BUTTONS ===== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .btn::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
    }

    .btn:active::after {
        width: 300px;
        height: 300px;
    }

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

    .btn-primary:hover {
        background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
    }

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

    .btn-outline-primary:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    }

.btn-light {
    background: white;
    color: var(--dark-color);
    border: none;
}

    .btn-light:hover {
        background: var(--light-color);
        transform: translateY(-2px);
        box-shadow: var(--box-shadow);
    }

/* ===== BADGES ===== */
.badge {
    padding: 0.5em 1em;
    font-weight: 500;
    border-radius: 20px;
}

    .badge.bg-success {
        background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
    }

    .badge.bg-warning {
        background: linear-gradient(135deg, #f39c12, #e67e22) !important;
    }

    .badge.bg-danger {
        background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
    }

    .badge.bg-info {
        background: linear-gradient(135deg, #3498db, #2980b9) !important;
    }

    .badge.bg-primary {
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    }

/* ===== PROGRESS BARS ===== */
.progress {
    border-radius: 10px;
    overflow: hidden;
    background: var(--gray-light);
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 1s ease;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1199.98px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    .hero-section {
        padding: 100px 0 80px;
    }
}

@media (max-width: 991.98px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .navbar .input-group {
        min-width: auto;
        width: 100%;
        margin: 0.5rem 0;
    }

    .hero-section {
        padding: 80px 0 60px;
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

        .hero-stats .stat-item:not(:last-child)::after {
            display: none;
        }

    .quick-stats {
        margin-top: -40px;
    }

    .stat-card {
        padding: 1.5rem 0.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .page-header {
        padding: 3rem 0;
        text-align: center;
    }

    .header-stats {
        margin-top: 2rem;
    }

    .cta-section {
        text-align: center;
    }

        .cta-section .text-lg-end {
            text-align: center !important;
            margin-top: 1.5rem;
        }
}

@media (max-width: 767.98px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero-section {
        padding: 60px 0 40px;
    }

        .hero-section .badge {
            margin-bottom: 1rem;
        }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem !important;
    }

        .hero-stats .stat-item {
            width: 100%;
            padding: 0 !important;
        }

    .quick-stats {
        margin-top: -30px;
    }

    .stat-card {
        padding: 1.25rem 0.5rem;
    }

    .section-header .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

    .section-header .btn {
        width: 100%;
    }

    .search-page .row {
        flex-direction: column-reverse;
    }

    .search-page .col-lg-3 {
        margin-bottom: 2rem;
    }

    .results-summary {
        flex-direction: column;
        gap: 1rem;
    }

    .toast-notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .category-icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .resource-card .btn,
    .academic-card .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }

    .footer {
        text-align: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links a:hover {
        transform: translateX(0);
    }

    .social-links {
        justify-content: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar, .footer, .back-to-top, .cta-section,
    .hero-actions, .hero-quick-links, .view-toggle, .pagination {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    a {
        text-decoration: underline;
        color: black;
    }

    .card {
        break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none !important;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    [data-bs-theme="dark"] {
        --light-color: #2d2d2d;
        --dark-color: #f8f9fa;
        --gray-color: #a0a0a0;
        --gray-light: #404040;
        background-color: #1a1a1a;
        color: #f8f9fa;
    }

        [data-bs-theme="dark"] .navbar {
            background: rgba(26, 26, 26, 0.95);
        }

        [data-bs-theme="dark"] .card,
        [data-bs-theme="dark"] .stat-card,
        [data-bs-theme="dark"] .sidebar-card {
            background: #2d2d2d;
            border-color: #404040;
        }

        [data-bs-theme="dark"] .text-dark {
            color: #f8f9fa !important;
        }

        [data-bs-theme="dark"] .dropdown-menu {
            background: #2d2d2d;
        }

        [data-bs-theme="dark"] .dropdown-item {
            color: #f8f9fa;
        }

            [data-bs-theme="dark"] .dropdown-item:hover {
                background: #404040;
            }
}

/* ===== PAPER CARDS ===== */
.paper-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .paper-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    }

.paper-thumbnail img {
    transition: transform 0.3s ease;
}

.paper-card:hover .paper-thumbnail img {
    transform: scale(1.05);
}

.paper-title {
    line-height: 1.4;
    min-height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.paper-description {
    min-height: 3em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.paper-tags .badge {
    font-size: 0.7rem;
}

.card {
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    background: #fff;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.btn-primary {
    background-image: linear-gradient(135deg, #4361ee, #3a0ca3);
    border: none;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.35);
}

.btn-outline-primary {
    border-color: #4361ee;
    color: #4361ee;
}

.btn-outline-primary:hover {
    background-color: #4361ee;
    color: #fff;
}

.form-control {
    border-radius: 10px;
    border: 1px solid var(--gray-light);
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .2rem rgba(67, 97, 238, .15);
}

.input-group-text {
    background: #f6f8ff;
    border: 1px solid var(--gray-light);
}

.table {
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    overflow: hidden;
    border-radius: 12px;
}

.table thead th {
    background: #f8f9fc;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.table tbody tr {
    transition: background 0.15s ease;
}

.table tbody tr:hover {
    background: #fafbff;
}

.badge-soft-primary { background: rgba(67,97,238,.12); color: #3a56d4; }
.badge-soft-success { background: rgba(16,185,129,.12); color: #0f9f6e; }
.badge-soft-info { background: rgba(23,162,184,.12); color: #0b7285; }
.badge-soft-warning { background: rgba(248,150,30,.15); color: #b45309; }
.badge-soft-danger { background: rgba(249,65,68,.12); color: #b91c1c; }

.pagination .page-link {
    border: none;
    margin: 0 4px;
    border-radius: 8px;
    color: #374151;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: #fff;
}

.alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.section {
    padding: 60px 0;
}

.section-sm {
    padding: 40px 0;
}

/* Admin Auth Page */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    padding: 2rem 1rem;
}

.auth-page .card {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
}

/* Admin Layout */
.admin-wrapper {
    --sidebar-width: 280px;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f0f7ff;
    --sidebar-active: #4361ee;
    --sidebar-text: #4a5568;
    --sidebar-text-hover: #1e293b;
    --sidebar-border: #e9ecef;
    --sidebar-shadow: rgba(0, 0, 0, 0.05);
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px var(--sidebar-shadow);
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--sidebar-border);
}

.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: #f1f1f1; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb:hover { background: #a0aec0; }

.sidebar-logo {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--sidebar-border);
    background: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.sidebar-logo .brand-icon {
    width: 40px;
    height: 40px;
    background: #eef2ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo .brand-icon i { font-size: 1.5rem; color: #4361ee; }
.sidebar-logo .fw-bold { font-size: 1.25rem; color: #1e293b; }
.sidebar-logo .text-primary { font-size: 0.9rem; display: block; margin-top: 2px; color: #64748b !important; }

.sidebar-toggle {
    position: absolute;
    top: 1.25rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid var(--sidebar-border);
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.sidebar-nav { flex: 1; padding: 1.25rem 0; overflow-y: auto; }
.nav-section { margin-bottom: 1.5rem; }
.nav-section small {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #94a3b8 !important;
    padding: 0 1rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}
.nav-item { margin: 2px 0.5rem; position: relative; }
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}
.nav-link:hover { color: #4361ee; background: #f8fafc; transform: translateX(5px); }
.nav-link.active { background: #eef2ff; color: #4361ee; font-weight: 500; }

.nav-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    border-radius: 8px;
    background: #f1f5f9;
    color: #4a5568;
    transition: all 0.3s ease;
}
.nav-link:hover .nav-icon { background: #e2e8f0; transform: scale(1.1); }
.nav-link.active .nav-icon { background: #4361ee; color: white; }
.nav-text { flex: 1; font-size: 0.95rem; font-weight: 500; }
.nav-badge {
    background: #ef4444;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    margin-left: 0.5rem;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.user-profile {
    padding: 1.25rem;
    border-top: 1px solid var(--sidebar-border);
    background: white;
    position: sticky;
    bottom: 0;
}
.user-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
    margin-right: 1rem;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}
.user-info { flex: 1; }
.user-info .fw-bold { font-size: 0.95rem; color: #1e293b; line-height: 1.2; }
.user-info small { font-size: 0.75rem; color: #64748b; }
.user-profile .btn-outline-light {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    transition: all 0.3s ease;
    background: white;
}
.user-profile .btn-outline-light:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
    transform: scale(1.1);
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    background-color: #f8fafc;
    min-height: 100vh;
}
.admin-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 900;
}
.admin-content { padding: 1.5rem; }

@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); box-shadow: none; }
    .admin-sidebar.show { transform: translateX(0); box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1); }
    .sidebar-toggle { display: flex; }
    .sidebar-logo { padding-right: 4rem; }
    .admin-main { margin-left: 0; }
    .admin-header { padding: 1rem; }
    .admin-content { padding: 1rem; }
}

/* ===== Page Headers & Breadcrumbs ===== */
.page-header {
    margin-top: 76px;
}
.bg-gradient-primary {
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
}
.bg-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}
.bg-gradient-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}
.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}
.breadcrumb-light .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
}
.breadcrumb-light .breadcrumb-item.active {
    color: #ffffff;
}
.header-stats .stat-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

/* ===== Technical ===== */
.tech-category-card {
    transition: transform 0.3s ease;
}
.tech-category-card:hover {
    transform: translateY(-5px);
}
.tech-category-card .icon-wrapper {
    transition: transform 0.3s ease;
}
.tech-category-card:hover .icon-wrapper {
    transform: scale(1.1);
}
.subject-icon {
    width: 30px;
    text-align: center;
}

/* ===== Academic ===== */
.class-card, .subject-card, .type-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    padding: 0.75rem;
    border-radius: 10px;
    background: #ffffff;
}

.class-card {
    padding: 0.75rem 0.35rem;
}

    .class-card .icon-wrapper {
        width: 45px !important;
        height: 45px !important;
        margin-bottom: 0.35rem !important;
    }

    .class-card .class-icon i {
        font-size: 1.1rem !important;
    }

    .class-card h6 {
        font-size: 0.8rem;
        margin-bottom: 0.15rem;
    }

    .class-card small {
        font-size: 0.65rem;
    }

    .class-card:hover, .subject-card:hover, .type-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    }

.subject-card {
    transition: all 0.3s ease;
    background: #ffffff;
    padding: 0.6rem !important;
}

    .subject-card:hover {
        background-color: #f8f9fa;
        border-color: #28a745 !important;
    }

.academic-paper-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .academic-paper-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
    }

.icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.class-card:hover .icon-wrapper {
    transform: scale(1.1);
}

.type-card {
    padding: 0.75rem 0.5rem !important;
}

    .type-card .icon-wrapper {
        width: 50px;
        height: 50px;
        margin-bottom: 0.5rem !important;
    }

    .type-card .type-name {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .type-card small {
        font-size: 0.7rem;
    }

.list-group-item {
    transition: background-color 0.3s ease;
}

    .list-group-item:hover {
        background-color: #f8f9fa;
    }

.empty-state {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 4rem 2rem;
}

/* ===== Contact ===== */
.info-card { transition: transform 0.3s ease; }
.info-card:hover { transform: translateY(-5px); }
.icon-wrapper {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-circle {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.accordion-button:not(.collapsed) {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
}
.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(67, 97, 238, 0.2);
}
.map-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toast-notification .toast-content i { font-size: 1.1rem; }
.toast-notification.danger .toast-content i { color: #dc3545; }
.toast-notification.success .toast-content i { color: #198754; }
