/* CSS Reset & Base Styles - Mobile First */
:root {
    /* Brand Color Palette */
    --oxford-blue: #0A2A43;        /* Brand Primary / Oxford Blue */
    --royal-blue: #103B73;        /* Deep Royal Blue - Header/Navbar */
    --fluent-blue: #2563EB;       /* Fluent Blue - Links/Active */
    --learning-blue: #E8F1FF;     /* Learning Blue Tint - Soft Background */
    --ink-grey: #1F2937;          /* Primary Text */
    --slate-grey: #6B7280;        /* Secondary Text */
    --cool-grey: #D1D5DB;         /* Dividers/Icons */
    --soft-grey: #F8FAFC;         /* Section BG */
    --mustard-gold: #F4B400;      /* Mustard Gold */
    --soft-gold: #FFD166;         /* Soft Gold */

    /* Mapped Variables */
    --primary: #2563EB;           /* Fluent Blue - Links/Active */
    --primary-dark: #103B73;      /* Deep Royal Blue */
    --primary-light: #E8F1FF;     /* Learning Blue Tint */
    --primary-extra-light: #E8F1FF;

    --secondary: #F4B400;         /* Mustard Gold */
    --secondary-dark: #D29A00;
    --secondary-light: #FFD166;   /* Soft Gold */

    --accent: #2563EB;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --text: #1F2937;              /* Ink Grey - Primary Text */
    --text-medium: #6B7280;       /* Slate Grey */
    --text-light: #6B7280;        /* Slate Grey - Secondary Text */
    --text-lighter: #9ca3af;
    --text-disabled: #D1D5DB;    /* Cool Grey */
    --light: #F8FAFC;             /* Soft Grey - Section BG */
    --light-gray: #F8FAFC;
    --white: #ffffff;
    --border: #D1D5DB;            /* Cool Grey */
    --border-light: #E5E7EB;
    --overlay: rgba(0, 0, 0, 0.5);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-primary: 0 6px 24px rgba(79, 70, 229, 0.2);
    --shadow-secondary: 0 6px 24px rgba(249, 115, 22, 0.2);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: var(--light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #F4B400, #FFD166);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-10 { margin-top: 40px; }
.mt-12 { margin-top: 48px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-10 { margin-bottom: 40px; }
.mb-12 { margin-bottom: 48px; }

.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

.hidden { display: none; }
.block { display: block; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    touch-action: manipulation;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
    box-shadow: var(--shadow-secondary);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-light {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-light:hover {
    background: var(--light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #0A2A43 0%, #103B73 50%, #0A2A43 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 212, 102, 0.15);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(10, 42, 67, 0.15);
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #F4B400, #FFD166, #F4B400, transparent);
    opacity: 0.6;
}

.navbar.scrolled {
    background: linear-gradient(135deg, #0A2A43 0%, #103B73 100%);
    box-shadow: 0 4px 24px rgba(10, 42, 67, 0.2);
}

.navbar.scrolled::after {
    opacity: 0.8;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    padding: 14px 24px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    letter-spacing: -0.02em;
}

.logo:hover {
    color: var(--white);
    transform: translateY(-1px);
}

.logo i {
    font-size: 1.6rem;
    color: #FFD166;
    filter: drop-shadow(0 0 8px rgba(255, 209, 102, 0.4));
}

.logo-img {
    height: 50px;
    width: auto;
    max-height: 44px;
    object-fit: contain;
    display: block;
}

.nav-dropdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 24px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu li {
    position: relative;
}

.navbar .nav-link {
    color: var(--white);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    position: relative;
    transition: var(--transition-fast);
}

.navbar .nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.navbar .nav-link.active {
    color: #FFD166;  /* Soft Gold - Active link */
    background: rgba(244, 180, 0, 0.15);
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #F4B400, #FFD166);  /* Mustard Gold to Soft Gold */
    border-radius: 2px;
    transition: var(--transition-fast);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    width: calc(100% - 24px);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-actions .btn-outline {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
    background: transparent;
}

.nav-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    color: var(--white);
}

.nav-actions .btn-primary {
    background: linear-gradient(135deg, #F4B400 0%, #FFD166 100%);
    color: #1f2937;
    border: none;
    box-shadow: 0 4px 14px rgba(244, 180, 0, 0.35);
}

.nav-actions .btn-primary:hover {
    background: linear-gradient(135deg, #FFD166 0%, #F4B400 100%);
    box-shadow: 0 6px 20px rgba(244, 180, 0, 0.45);
    color: #1f2937;
}

/* User Avatar and Menu */
.user-avatar {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 212, 102, 0.4);
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F4B400, #FFD166);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f2937;
    font-weight: 700;
    font-size: 0.9375rem;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(244, 180, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--white);
    font-size: 0.875rem;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.user-avatar i {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
    margin-left: 6px;
}

.user-avatar:hover i {
    transform: rotate(180deg);
    color: #FFD166;
}

.user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all var(--transition);
    z-index: 1001;
    overflow: hidden;
}

.user-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-menu-header {
    padding: 16px;
    background: linear-gradient(135deg, rgba(244, 180, 0, 0.12), rgba(255, 209, 102, 0.08));
    border-bottom: 1px solid var(--border-light);
}

.user-menu-header .user-info {
    align-items: center;
}

.user-menu-header .user-name {
    font-size: 1rem;
    color: var(--primary);
}

.user-menu-header .user-role {
    color: var(--text-medium);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.user-menu-item:hover {
    background: var(--light);
    color: var(--primary);
    transform: translateX(4px);
}

.user-menu-item i {
    font-size: 1rem;
    width: 18px;
    color: var(--text-light);
    transition: var(--transition-fast);
}

.user-menu-item:hover i {
    color: var(--primary);
}

.user-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

.user-menu-item.logout {
    color: var(--danger);
    border-top: 1px solid var(--border-light);
    margin-top: 4px;
    padding-top: 16px;
}

.user-menu-item.logout:hover {
    background: rgba(239, 68, 68, 0.05);
    color: var(--danger);
}

.user-menu-item.logout i {
    color: var(--danger);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px 12px;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, #F4B400 0%, #FFD166 100%);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(244, 180, 0, 0.3);
    transition: var(--transition-fast);
}

.mobile-menu-btn:hover {
    background: linear-gradient(135deg, #FFD166 0%, #F4B400 100%);
    box-shadow: 0 4px 12px rgba(244, 180, 0, 0.4);
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.navbar .mobile-menu-btn {
    color: var(--white);
}

.mobile-menu-btn.active {
    background: linear-gradient(135deg, #FFD166 0%, #F4B400 100%);
    box-shadow: 0 4px 12px rgba(244, 180, 0, 0.45);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== Centralized page headers (all LMS pages) ========== */
.page-header,
.profile-header,
.settings-header,
.courses-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #103B73 0%, #0A2A43 100%);
    color: var(--white);
    text-align: center;
}

.page-header h1,
.profile-header h1,
.settings-header h1,
.courses-header h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

/* Profile page */
.profile-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    margin: -60px auto 40px;
    max-width: 800px;
    box-shadow: var(--shadow-xl);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.profile-info .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-details h2 {
    margin: 0 0 8px 0;
    font-size: 1.75rem;
}

.user-details p {
    margin: 4px 0;
    color: var(--text-light);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: var(--light);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.courses-section h3 {
    margin-bottom: 20px;
}

.course-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s;
    cursor: pointer;
}

.course-item:hover {
    transform: translateY(-2px);
}

.course-item .course-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.course-item .course-content {
    padding: 16px;
}

.course-item .course-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-light);
    flex-wrap: wrap;
    gap: 8px;
}

/* My Courses page */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.course-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    cursor: pointer;
}

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

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

.course-card .course-content {
    padding: 24px;
}

.course-card .course-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.course-card .course-category {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.progress-section {
    margin: 16px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 0.875rem;
    flex-wrap: wrap;
    gap: 8px;
}

.continue-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-top: 16px;
    cursor: pointer;
    min-height: 44px;
    touch-action: manipulation;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-lighter);
    margin-bottom: 20px;
}

/* Settings page */
.settings-container {
    max-width: 800px;
    margin: -40px auto 40px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.settings-nav {
    background: var(--light);
    padding: 0;
    border-bottom: 1px solid var(--border);
}

.settings-nav ul {
    display: flex;
    margin: 0;
    padding: 0;
}

.settings-nav li {
    flex: 1;
}

.settings-nav button {
    width: 100%;
    padding: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.settings-nav button.active {
    background: var(--white);
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.settings-content {
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.danger-zone {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 32px;
}

.danger-zone h4 {
    color: var(--danger);
    margin-bottom: 12px;
}

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

.btn-danger:hover {
    background: #b91c1c;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #0A2A43 0%, #103B73 100%);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section,
.footer-contact {
    display: block;
    visibility: visible;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.125rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-lighter);
    line-height: 1.6;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: #FFD166;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: var(--white);
    transition: var(--transition);
}

.social-link:hover {
    background: #F4B400;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: var(--text-lighter);
}

.footer-link-inline {
    color: inherit;
    text-decoration: none;
    opacity: 0.85;
    transition: var(--transition-fast);
}
.footer-link-inline:hover {
    color: #FFD166;
    opacity: 1;
}

/* Mobile menu overlay */
.nav-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 42, 67, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: var(--transition);
}

.nav-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Responsive Design - Navbar: toggle only at 1089px and below */
@media (max-width: 1089px) {
    .nav-mobile-overlay {
        display: block;
    }

    .nav-dropdown {
        position: fixed;
        top: 70px;
        left: 16px;
        right: 16px;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 24px 20px;
        gap: 20px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(244, 180, 0, 0.1);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
        border-radius: var(--radius-md);
        border-top: 3px solid #F4B400;
    }

    .nav-dropdown.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        margin-top: 15px;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 0;
    }

    .nav-menu li {
        border-radius: var(--radius-sm);
    }

    .nav-menu .nav-link {
        display: block;
        padding: 14px 16px;
        color: var(--text);
        font-weight: 500;
        border-radius: var(--radius-sm);
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        color: var(--primary);
        background: rgba(37, 99, 235, 0.08);
    }

    .nav-menu .nav-link::after {
        display: none;
    }

    .nav-dropdown .nav-actions {
        flex-direction: column;
        gap: 12px;
        padding-top: 20px;
        border-top: 1px solid var(--border-light);
    }

    .nav-dropdown .nav-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .nav-dropdown .nav-actions .btn-outline {
        color: var(--primary);
        border-color: var(--primary);
    }

    .nav-dropdown .nav-actions .btn-outline:hover {
        background: var(--primary-extra-light);
        color: var(--primary);
    }

    .nav-dropdown .nav-actions .btn-primary {
        background: linear-gradient(135deg, #F4B400, #FFD166);
        color: #1f2937;
    }

    .nav-dropdown .user-avatar {
        background: var(--light);
        border-color: var(--border);
    }

    .nav-dropdown .user-avatar .user-name {
        color: var(--text);
    }

    .nav-dropdown .user-avatar .user-role {
        color: var(--text-light);
        display: block;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .nav-mobile-overlay {
        display: block;
    }

    .nav-dropdown {
        position: fixed;
        top: 70px;
        left: 16px;
        right: 16px;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 24px 20px;
        gap: 20px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(244, 180, 0, 0.1);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
        border-radius: var(--radius-md);
        border-top: 3px solid #F4B400;
    }

    .nav-dropdown.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 0;
    }

    .nav-menu li {
        border-radius: var(--radius-sm);
    }

    .nav-menu .nav-link {
        display: block;
        padding: 14px 16px;
        color: var(--text);
        font-weight: 500;
        border-radius: var(--radius-sm);
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        color: var(--primary);
        background: rgba(37, 99, 235, 0.08);
    }

    .nav-menu .nav-link::after {
        display: none;
    }

    .nav-dropdown .nav-actions {
        flex-direction: column;
        gap: 12px;
        padding-top: 20px;
        border-top: 1px solid var(--border-light);
    }

    .nav-dropdown .nav-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .nav-dropdown .nav-actions .btn-outline {
        color: var(--primary);
        border-color: var(--primary);
    }

    .nav-dropdown .nav-actions .btn-outline:hover {
        background: var(--primary-extra-light);
        color: var(--primary);
    }

    .nav-dropdown .nav-actions .btn-primary {
        background: linear-gradient(135deg, #F4B400, #FFD166);
        color: #1f2937;
    }

    .nav-dropdown .user-avatar {
        background: var(--light);
        border-color: var(--border);
    }

    .nav-dropdown .user-avatar .user-name {
        color: var(--text);
    }

    .nav-dropdown .user-avatar .user-role {
        color: var(--text-light);
        display: block;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .page-header, .profile-header, .settings-header, .courses-header {
        padding: 100px 0 40px;
    }

    .page-header h1, .profile-header h1, .settings-header h1, .courses-header h1 {
        font-size: 2rem;
    }

    .profile-card {
        padding: 24px;
        margin: -40px 16px 24px;
        border-radius: 16px;
    }

    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .profile-info .avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .user-details h2 {
        font-size: 1.5rem;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .course-item .course-content,
    .courses-grid .course-content {
        padding: 20px;
    }

    .course-card .course-title {
        font-size: 1.125rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 50px 0;
    }

    .user-avatar {
        padding: 6px 12px;
    }

    .avatar-circle {
        width: 36px;
        height: 36px;
    }

    .user-name {
        font-size: 0.8125rem;
    }

    .user-role {
        display: none; /* Hide role on mobile to save space */
    }

    .user-menu {
        min-width: 200px;
        right: -20px; /* Adjust position for mobile */
    }

    .user-menu-header .user-info {
        display: none; /* Hide duplicate info on mobile */

    }

    .container {
        padding: 0 16px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 12px 16px;
    }

    .nav-dropdown {
        top: 64px;
        left: 12px;
        right: 12px;
        padding: 20px 16px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo i {
        font-size: 1.4rem;
    }

    .page-header, .profile-header, .settings-header, .courses-header {
        padding: 90px 0 30px;
    }

    .page-header h1, .profile-header h1, .settings-header h1, .courses-header h1 {
        font-size: 1.75rem;
    }

    .profile-card {
        padding: 20px;
        margin: -30px 12px 20px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .user-details h2 {
        font-size: 1.25rem;
    }

    .course-card .course-image {
        height: 160px;
    }

    .course-card .course-content {
        padding: 16px;
    }

    .section {
        padding: 40px 0;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
        min-height: 44px; /* Touch-friendly button height */
    }

    /* Ensure touch-friendly interactive elements */
    button, .btn, a.btn {
        min-height: 44px;
        touch-action: manipulation;
    }

    /* Prevent horizontal overflow */
    * {
        max-width: 100%;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}