:root {
    --primary-color: #40801b;
    --primary-hover: #2d5c14;
    --accent-color: #11B67A;
    --accent-hover: #0d8f5f;
    --accent-blue: #42a4ff;
    --secondary-color: #64748b;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Navbar */
.navbar {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.navbar-left,
.navbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    /* Slightly reduced gap for better fit on small desktops */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 1rem;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 1rem;
    white-space: nowrap;
    align-items: center;
}

.nav-links a {
    font-size: 0.938rem;
    font-weight: 500;
    color: var(--text-color);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 15%;
    width: 70%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.header-search {
    position: relative;
    width: 240px;
    /* Constrain width to prevent pushing links */
    display: flex;
    align-items: center;
}

.header-search input {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    background: #f1f5f9;
    font-size: 0.875rem;
    width: 100%;
    outline: none;
    height: 40px;
    /* Exact match with buttons */
}

.header-search button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    height: 100%;
}

/* Ensure form doesn't add extra space */
.header-search form {
    display: flex;
    align-items: center;
    margin: 0;
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    line-height: 1.2;
    font-size: 0.875rem;
    white-space: nowrap;
    height: 40px;
    /* Fixed height for perfect search bar syncing */
    flex-shrink: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: var(--white);
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer h3,
.footer h4 {
    margin-bottom: 1.5rem;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
    font-size: 1.25rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    text-align: center;
    font-size: 0.875rem;
    color: #94a3b8;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
}

/* Hero Section */
.hero {
    padding: 3.5rem 0;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--secondary-color);
    margin-bottom: 2.5rem;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

.text-link:hover {
    color: var(--primary-color);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    background: #f1f5f9;
}

.sidebar {
    width: 280px;
    background: var(--white);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    flex-shrink: 0;
}

.user-profile-summary {
    padding: 0 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.user-profile-summary img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info h4 {
    font-size: 1rem;
    font-weight: 600;
}

.user-info span {
    font-size: 0.813rem;
    color: var(--secondary-color);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.sidebar-nav a i {
    width: 20px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #f8fafc;
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.sidebar-nav a.logout {
    margin-top: 2rem;
    color: #ef4444;
}

.sidebar-nav a.logout:hover {
    background: #fef2f2;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-info h3 {
    font-size: 1.5rem;
}

.stat-info p {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Enrolled Courses List */
.dashboard-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.enrolled-courses-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.enrolled-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.enrolled-card img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.enrolled-info {
    flex: 1;
}

.enrolled-info h4 {
    margin-bottom: 0.25rem;
}

.enrolled-info p {
    font-size: 0.813rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.progress-container {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--secondary-color);
}

.hero-image img {
    max-width: 100%;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

/* Sections */
section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

/* Featured Courses */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.course-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.instructor {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f59e0b;
    margin-bottom: 1.5rem;
}

.enroll-btn {
    width: 100%;
    text-align: center;
    margin-top: auto;
}

/* Departments */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.dept-card {
    background: var(--white);
    padding: 2.5rem;
    text-align: center;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.dept-card:hover {
    background: var(--primary-color);
    color: var(--white);
}

.dept-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.dept-card:hover i {
    color: var(--white);
}

/* Authentication */
.auth-section {
    min-height: calc(100vh - 400px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.auth-card {
    background: var(--white);
    max-width: 450px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 0.5rem;
}

.auth-card p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
}

.auth-footer {
    margin-top: 2rem;
    font-size: 0.875rem;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@media (max-width: 768px) {

    .nav-links,
    .auth-buttons {
        display: none;
    }

    .nav-links.active,
    .auth-buttons.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-toggle {
        display: block;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.125rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Catalog Filters */
.catalog-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.search-bar {
    display: flex;
    flex: 1;
    max-width: 500px;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem 0 0 0.5rem;
    outline: none;
}

.search-bar .btn {
    border-radius: 0 0.5rem 0.5rem 0;
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-options select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    outline: none;
    background: var(--white);
}

/* UI Elements */
.badge {
    background: #f0fdf4;
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.price {
    margin-bottom: 1.5rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

.old-price {
    text-decoration: line-through;
    color: var(--secondary-color);
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.text-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Admin Specific */
.admin-sidebar .admin-avatar {
    width: 60px;
    height: 60px;
    background: #f0fdf4;
    color: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.admin-grid-two-cols {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

/* Advanced Dashboard Elements (Engineering-Level UI) */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.ai-tag {
    background: linear-gradient(135deg, #5dbb45, #5dbb45);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.rec-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rec-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.rec-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.rec-info {
    padding: 1rem;
}

.rec-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-info p {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.btn-text {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Live Classroom CTA */
.live-classroom-cta {
    background: linear-gradient(135deg, #1a4d10, #2d7a1f);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.live-classroom-cta::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.live-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.badge-live {
    background: #ef4444;
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    margin-left: 5px;
    vertical-align: middle;
}

/* Utilities */
.card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mt-4 {
    margin-top: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.btn-white {
    background: white;
    color: #1a4d10;
    border: none;
}

.btn-white:hover {
    background: #f1f5f9;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.status-badge.pending {
    background: #fef9c3;
    color: #854d0e;
}

/* Course Builder */
.builder-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.module-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.module-header {
    background: #f8fafc;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.lessons-list {
    padding: 1rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 500px;
}

.modal.active {
    display: flex;
}

/* Stats Charts placeholder */
.chart-placeholder {
    height: 250px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.bar {
    flex: 1;
    background: var(--primary-color);
    border-radius: 4px 4px 0 0;
}

/* =============================================
   COURSE DETAILS PAGE
   ============================================= */
.course-details-page {
    padding-bottom: 4rem;
}

/* Hero Banner */
.course-header-banner {
    background: linear-gradient(135deg, #1a4d10 0%, #2d7a1f 60%, #5dbb45 100%);
    color: #fff;
    padding: 2.5rem 0;
}

.course-header-banner .container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 3rem;
    align-items: start;
}

.course-main-info .badge {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.course-main-info h1 {
    font-size: 2.125rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.course-main-info .instructor {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Sticky CTA Card */
.course-cta-card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 90px;
    color: var(--text-color);
}

.course-cta-card>img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.cta-price {
    padding: 1.5rem 1.5rem 0;
}

.cta-price h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

.course-cta-card .btn-primary,
.course-cta-card .btn-outline {
    display: block;
    width: calc(100% - 3rem);
    margin: 1rem 1.5rem 0;
    text-align: center;
    padding: 0.875rem;
    font-size: 1rem;
    border-radius: 0.5rem;
}

.course-cta-card .guarantee {
    text-align: center;
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin: 0.75rem 1.5rem 0;
}

.course-includes {
    padding: 1.25rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

.course-includes p {
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.925rem;
}

.course-includes ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.course-includes ul li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

.course-includes ul li i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

/* Content Tabs Area */
.course-content-tabs {
    margin-top: 2.5rem;
}

.course-content-tabs .section {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.course-content-tabs .section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

/* Syllabus Accordion */
.syllabus-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.syllabus-module {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
}

.module-header-view {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.module-header-view h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.module-header-view span {
    font-size: 0.8rem;
    color: var(--secondary-color);
    background: #e2e8f0;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    white-space: nowrap;
}

.module-lessons {
    border-top: 1px solid var(--border-color);
}

.lesson-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.lesson-row:last-child {
    border-bottom: none;
}

.lesson-row:hover {
    background: #f8fafc;
}

.lesson-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.lesson-left i {
    color: var(--primary-color);
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

.preview-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--primary-color);
    border-radius: 0.375rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.preview-link:hover {
    background: var(--primary-color);
    color: #fff;
}

.locked {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Course Description */
.course-desc {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 0.975rem;
}

/* Responsive */
@media (max-width: 900px) {
    .course-header-banner .container {
        grid-template-columns: 1fr;
    }

    .course-cta-card {
        position: static;
    }
}

/* Success / info flash message on enroll */
.flash-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

/* ============================================================
   ADVANCED ACADEMIC FEATURES — NEW CSS (v3)
   ============================================================ */

/* Access Badges (on course CTA card) */
.access-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.access-badge.free {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.access-badge.blocked {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.access-badge.paid {
    background: #f0fdf4;
    color: #4aa334;
    border: 1px solid #86efac;
}

/* Retake label under price */
.retake-label {
    display: block;
    font-size: 0.78rem;
    color: #c2410c;
    margin-top: 2px;
    font-weight: 600;
}

/* Access info box inside CTA card */
.access-info-box {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    background: #f8faff;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #3730a3;
    margin: 8px 0;
}

.access-info-box.pending-box {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #78350f;
}

.access-info-box i {
    margin-top: 2px;
    flex-shrink: 0;
}

.access-info-box p {
    margin: 0;
}

/* Pay CTA button variant */
.btn-pay-cta {
    background: linear-gradient(135deg, #5dbb45, #4aa334);
    color: #fff;
    border: none;
    font-size: 0.95rem;
    width: 100%;
    text-align: center;
    margin-bottom: 8px;
}

.btn-pay-cta:hover {
    background: linear-gradient(135deg, #4aa334, #3d8f2a);
    color: #fff;
}

/* Alert Banners (student dashboard matric status) */
.alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
}

.alert-banner.warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #78350f;
}

.alert-banner.success {
    background: #ecfdf5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert-banner.danger {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-banner i {
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-banner strong {
    display: block;
    margin-bottom: 2px;
}

/* Programmer Sidebar special styles */
.programmer-sidebar {
    background: linear-gradient(180deg, #1a4d10 0%, #2d7a1f 100%);
}

.programmer-sidebar .user-profile-summary {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.programmer-sidebar .user-info h4 {
    color: #ffffff;
}

.programmer-sidebar .sidebar-nav a {
    color: #86efac;
}

.programmer-sidebar .sidebar-nav a:hover,
.programmer-sidebar .sidebar-nav a.active {
    background: rgba(167, 139, 250, 0.2);
    color: #c4b5fd;
    border-right-color: #a78bfa;
}

.programmer-sidebar .sidebar-nav a.logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.programmer-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.role-badge-programmer {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 2px;
    display: inline-block;
}

.badge-count-nav {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    margin-left: 4px;
}

/* Settings grid in programmer dashboard */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8faff;
    border: 1px solid #dcfce7;
    border-radius: 8px;
    gap: 16px;
}

.setting-item label {
    flex: 1;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.setting-item label small {
    display: block;
    color: #888;
    font-weight: 400;
}

.setting-item input {
    width: 200px;
    padding: 7px 12px;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Empty state (programmer queue) */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #888;
}

.empty-state i {
    display: block;
    margin-bottom: 12px;
}

/* Programmer section badges */
.prog-section {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logs table code styling */
.logs-table code.log-action {
    background: #f1f5f9;
    color: #4aa334;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.78rem;
}

/* mt-4 utility */
.mt-4 {
    margin-top: 1.5rem;
}

/* Dashboard Scroll Lock System */
html:has(.dashboard-content),
body:has(.dashboard-content) {
    height: 100vh;
    overflow: hidden;
}

body:has(.dashboard-content) {
    display: flex;
    flex-direction: column;
}

body:has(.dashboard-content) .navbar {
    flex-shrink: 0;
}

body:has(.dashboard-content) .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body:has(.dashboard-content) .dashboard-layout {
    flex: 1;
    display: flex;
    height: 100%;
    min-height: 0; /* Necessary for child flex percentage height calculation */
    overflow: hidden;
}

body:has(.dashboard-content) .sidebar {
    height: 100%;
    overflow-y: auto;
}

body:has(.dashboard-content) .dashboard-content {
    height: 100%;
    overflow-y: auto;
}

/* Hide standard footer on dashboard pages to prevent visual clutter and duplicate scrollbars */
body:has(.dashboard-content) .footer {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM REBRANDED FOOTER STYLES (INSTITUT UNIVERSITAIRE DU GOLFE DE GUINÉE - IUG)
   ═══════════════════════════════════════════════════════════════ */
.footer {
    background: #40801b;
    color: #e2e8f0;
    border-top: 4px solid #11B67A;
    padding: 4rem 0 2rem;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr 1.1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.footer-col h4 {
    color: #fbab19;
    text-transform: uppercase;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.footer-col p {
    color: #dddddd;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #F6F9FF;
    font-size: 14px;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-col ul li a:hover {
    color: #11B67A;
    transform: translateX(4px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1rem;
    color: #F6F9FF;
}

.footer-contact-item i {
    color: #11B67A;
    font-size: 1.1rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-post-box {
    margin-bottom: 1.1rem;
}

.footer-event-title {
    color: #F6F9FF;
    font-size: 14px;
    margin-bottom: 2px;
}

.footer-event-date {
    display: block;
    color: #11B67A;
    font-size: 13px;
    font-weight: 700;
}

.footer-social-desc {
    color: #dddddd;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-bottom-social {
    display: flex;
    gap: 10px;
}

.footer-bottom-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.3s ease;
}

.footer-bottom-social a:hover {
    background: #11B67A;
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-social-links {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.footer-social-links a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.footer-social-links a:hover {
    background: #ffffff;
    color: #007bff;
    transform: scale(1.1);
}

.footer-bottom-bar {
    border-top: 1px solid #444444;
    padding-top: 20px;
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    color: #F6F9FF;
    font-size: 14px;
}

.footer-bottom-bar a {
    color: #11B67A;
    transition: color 0.2s ease;
}

.footer-bottom-bar a:hover {
    text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════
   HERO SLIDER (images de fond tournantes, style identique à univ-iug.com)
   ═══════════════════════════════════════════════════════════════ */
.hero-slider-area {
    position: relative;
    height: 600px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero-slider-bg {
    position: absolute;
    inset: 0;
}

.hero-slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide-img.active {
    opacity: 1;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: #182B49;
    opacity: 0.55;
}

.hero-slider-area .slider-caption {
    position: absolute;
    inset: 0;
    display: table;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hero-slider-area .slider-tablecell {
    display: table-cell;
    vertical-align: middle;
}

.hero-slider-area .slider-title p {
    font-size: 16px;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero-slider-area .slider-desc h1 {
    font-size: 2.6rem;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    max-width: 700px;
}

.hero-slider-area .slider-desc p.slider-subtext {
    font-size: 1.05rem;
    color: #e2e8f0;
    max-width: 620px;
    margin-bottom: 2rem;
}

.hero-slider-area .slider-btn {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-slider-area .slider-btn a {
    font-size: 14px;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, background 0.3s ease;
}

.hero-slider-area .slider-btn a:hover {
    transform: translateY(-2px);
}

.hero-slider-area .slider-btn1 {
    background: #40801b;
}

.hero-slider-area .slider-btn1:hover {
    background: #2d5c14;
}

.hero-slider-area .slider-btn2 {
    background: #11B67A;
}

.hero-slider-area .slider-btn2:hover {
    background: #0d8f5f;
}

@media (max-width: 767px) {
    .hero-slider-area {
        height: 480px;
    }

    .hero-slider-area .slider-desc h1 {
        font-size: 1.8rem;
    }

    .hero-slider-area .slider-title p {
        font-size: 14px;
    }
}