/* STS (Student Teaching System) - Brand Identity Stylesheet */

/* --- Fonts & Root Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --primary: #123B82;        /* Deep Academic Blue - Saudi Navy */
    --primary-light: #1D4ED8;  /* Academic Blue Light accent */
    --primary-dark: #0F2E66;   /* Darker Blue */
    --accent: #D4A63A;         /* Academic Gold */
    --accent-hover: #B58722;   /* Rich Gold */
    --accent-light: #F8F1DD;   /* Pale Gold tint */
    
    /* System Tones */
    --bg-main: #FAFBFC;        /* Soft White background */
    --bg-card: #FFFFFF;        /* Pure White */
    --text-title: #1F2937;     /* Primary Text */
    --text-body: #374151;      /* Text Body */
    --text-muted: #6B7280;     /* Secondary Text */
    --border: #E5E7EB;         /* Light grey border */
    
    /* Statuses */
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;

    /* Animations & Timing */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Typography variables dynamically overridden by layout directory */
    --font-family: 'Inter', sans-serif;
}

/* Bi-directional Font Handling */
[dir="rtl"] {
    --font-family: 'Cairo', sans-serif;
}

[dir="ltr"] {
    --font-family: 'Inter', sans-serif;
}

/* --- Base & Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 70px; /* Space for sticky header */
}

/* --- Links Styling --- */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* --- Developer / Preview Toolbar --- */
.dev-toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: #fff;
    height: 40px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    border-bottom: 2px solid var(--accent);
}

.dev-toolbar .roles {
    display: flex;
    gap: 10px;
    align-items: center;
}

.dev-toolbar .role-btn {
    background: #334155;
    border: 1px solid #475569;
    color: #cbd5e1;
    padding: 2px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
}

.dev-toolbar .role-btn.active {
    background: var(--accent);
    color: var(--primary);
    font-weight: 600;
    border-color: var(--accent);
}

.dev-toolbar .lang-toggle-btn {
    background: transparent;
    color: #fff;
    border: 1px solid #475569;
    padding: 2px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Adjust page padding when toolbar is active */
body.has-dev-toolbar {
    padding-top: 110px;
}

/* --- General Layout & Grid System --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid columns using CSS Grid logical auto-fit */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}
.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-accent {
    background: var(--accent);
    color: var(--primary);
    border: 1px solid var(--accent);
}
.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    border-color: var(--accent-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-secondary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
}
.btn-text:hover {
    color: var(--primary);
}

/* --- Header & Global Navigation --- */
header.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    z-index: 999;
    height: 70px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

body.has-dev-toolbar header.main-header {
    top: 40px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    order: -1;
}

.logo-img {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--accent);
}

nav.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

nav.main-nav a {
    text-decoration: none;
    color: var(--text-body);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

nav.main-nav a:hover {
    color: var(--accent-hover);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* User Profile Dropdown Badge */
.user-menu-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-main);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.user-menu-badge:hover {
    background: #f1f5f9;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

/* --- Section Switching System --- */
.app-section {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.app-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* --- Public Landing Page Layout --- */
/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    border-bottom: 5px solid var(--accent);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.15) 0%, transparent 70%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.hero-title {
    font-size: 42px;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

[dir="rtl"] .hero-title {
    font-size: 46px;
    line-height: 1.3;
}

.hero-title span {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 18px;
    color: #cbd5e1;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

/* Feature Section */
.features-section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    margin-top: 10px;
}

.feature-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: var(--accent-light);
    color: var(--accent-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14.5px;
}

/* Statistics Section */
.stats-section {
    background: var(--primary);
    color: #fff;
    padding: 60px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 40px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 15px;
    color: #94a3b8;
}

/* Testimonial slider */
.testimonials-section {
    padding: 80px 0;
    background: #f1f5f9;
}

.testimonial-card {
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.testimonial-text {
    font-style: italic;
    color: var(--text-body);
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
}

/* FAQ accordion */
.faq-section {
    padding: 80px 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
}

.faq-question i {
    transition: var(--transition);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
    color: var(--text-muted);
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 200px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Footer styling */
footer.main-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 30px;
    border-top: 4px solid var(--accent);
}

footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 16px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
}

[dir="rtl"] .footer-col h4::after {
    left: auto;
    right: 0;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* --- Modals --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-top: 6px solid var(--accent);
    padding: 35px;
    position: relative;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

[dir="rtl"] .modal-close {
    right: auto;
    left: 15px;
}

.modal-close:hover {
    color: var(--danger);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-family: inherit;
    font-size: 14.5px;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.15);
}

/* File Upload drag-drop area */
.file-dropzone {
    border: 2.5px dashed var(--border);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: var(--bg-main);
    cursor: pointer;
    transition: var(--transition);
}

.file-dropzone:hover, .file-dropzone.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.file-dropzone i {
    font-size: 32px;
    color: var(--accent-hover);
    margin-bottom: 12px;
}

/* --- Marketplace & Course Cards --- */
.marketplace-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
}

@media (max-width: 991px) {
    .marketplace-container {
        grid-template-columns: 1fr;
    }
}

.filter-sidebar {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border);
    height: fit-content;
}

.filter-sidebar h3 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
}

.filter-option input {
    accent-color: var(--accent);
}

/* Course Card */
.course-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.course-banner {
    position: relative;
    height: 160px;
    background: linear-gradient(45deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    text-align: center;
    padding: 20px;
}

.course-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

[dir="rtl"] .course-badge {
    right: auto;
    left: 12px;
}

.course-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-hover);
    margin-bottom: 5px;
}

.course-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.3;
    cursor: pointer;
}

.course-card-title:hover {
    color: var(--accent-hover);
}

.course-university {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-instructor {
    font-size: 13px;
    color: var(--text-body);
    font-weight: 500;
    margin-bottom: 15px;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--warning);
    margin-bottom: 15px;
}

.course-rating span {
    color: var(--text-muted);
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 15px;
    margin-top: auto;
}

.course-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.course-price.free {
    color: var(--success);
}

/* --- Course Details Page --- */
.details-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 60px 0;
    border-bottom: 4px solid var(--accent);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 991px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
}

.details-video-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 8px;
    border: 3px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.details-video-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.play-overlay-btn {
    position: absolute;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 0 20px rgba(197, 160, 89, 0.6);
    transition: var(--transition);
}

.details-video-preview:hover .play-overlay-btn {
    transform: scale(1.1);
    background: var(--accent-hover);
    color: #fff;
}

.purchase-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    padding: 30px;
    position: sticky;
    top: 90px;
}

.purchase-card .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.purchase-card .price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

/* --- Payment Simulator UI --- */
.payment-card-icon {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.payment-card-icon img {
    height: 32px;
    width: auto;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    background: #fff;
}

.otp-field {
    text-align: center;
    letter-spacing: 12px;
    font-size: 24px;
    font-weight: 700;
}

/* --- Dashboard Modules Shared Layout --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 70px);
}

@media (max-width: 991px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

.dashboard-sidebar {
    background: var(--primary);
    color: #fff;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.dashboard-menu-item:hover, .dashboard-menu-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

.dashboard-menu-item.logout-btn {
    color: #f87171 !important;
    margin-top: auto;
    border: 1px solid rgba(248, 113, 113, 0.15);
}

.dashboard-menu-item.logout-btn:hover {
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.3);
}

.dashboard-body {
    padding: 40px;
    background: var(--bg-main);
}

/* Dashboard Summary Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.metric-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.metric-icon {
    font-size: 20px;
    color: var(--accent-hover);
}

/* --- Learning Experience Player --- */
.player-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 30px;
    height: 600px;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 991px) {
    .player-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
}

.video-container {
    position: relative;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.video-viewport {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-viewport video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Anti-Piracy Watermark overlay */
.player-watermark {
    position: absolute;
    top: 25%;
    left: 25%;
    color: rgba(255, 255, 255, 0.12);
    font-size: 18px;
    font-weight: 700;
    pointer-events: none;
    user-select: none;
    transform: rotate(-15deg);
    z-index: 10;
    white-space: nowrap;
    text-shadow: 0 0 1px rgba(0,0,0,0.2);
    animation: bounce-watermark 25s infinite linear;
}

@keyframes bounce-watermark {
    0% { top: 15%; left: 10%; }
    25% { top: 70%; left: 60%; }
    50% { top: 40%; left: 80%; }
    75% { top: 80%; left: 20%; }
    100% { top: 15%; left: 10%; }
}

.player-sidebar {
    background: #1e293b;
    border-left: 1px solid #334155;
    display: flex;
    flex-direction: column;
    color: #f1f5f9;
}

[dir="rtl"] .player-sidebar {
    border-left: none;
    border-right: 1px solid #334155;
}

.player-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #334155;
}

.player-tab-btn {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.player-tab-btn.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    background: rgba(255,255,255,0.02);
}

.player-sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.lesson-list-item {
    padding: 12px 15px;
    border-radius: 6px;
    background: #334155;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    transition: var(--transition);
}

.lesson-list-item:hover, .lesson-list-item.active {
    background: var(--primary);
    border-left: 3.5px solid var(--accent);
}

[dir="rtl"] .lesson-list-item:hover, [dir="rtl"] .lesson-list-item.active {
    border-left: none;
    border-right: 3.5px solid var(--accent);
}

/* --- AI Tutor Panel --- */
.ai-tutor-container {
    background: #fff;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 500px;
    overflow: hidden;
}

.ai-tutor-header {
    background: var(--primary);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-tutor-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8fafc;
}

.chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14.5px;
}

.chat-bubble.assistant {
    background: #fff;
    align-self: flex-start;
    border: 1px solid var(--border);
    color: var(--text-body);
}

[dir="rtl"] .chat-bubble.assistant {
    align-self: flex-start;
}

.chat-bubble.user {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
}

.ai-tutor-inputs {
    padding: 15px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    background: #fff;
}

/* Quick Actions buttons */
.ai-tutor-actions {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    background: #f1f5f9;
    border-top: 1px solid var(--border);
    overflow-x: auto;
}

.ai-action-chip {
    padding: 6px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--border);
    font-size: 12.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.ai-action-chip:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

/* --- Gamification & Leaderboards --- */
.leaderboard-list {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.rank-badge {
    width: 32px;
    font-weight: 800;
    font-size: 16px;
    color: var(--text-muted);
}

.rank-badge-1 { color: #f59e0b; }
.rank-badge-2 { color: #94a3b8; }
.rank-badge-3 { color: #b45309; }

.leaderboard-row img.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #cbd5e1;
    margin-right: 15px;
}

[dir="rtl"] .leaderboard-row img.avatar {
    margin-right: 0;
    margin-left: 15px;
}

.badge-gallery {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.badge-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    width: 120px;
}

.badge-icon-gold {
    font-size: 32px;
    color: var(--accent);
    margin-bottom: 8px;
}

.badge-icon-locked {
    font-size: 32px;
    color: #cbd5e1;
    margin-bottom: 8px;
}

/* --- STS Elite Card (3D Hover Effect) --- */
.elite-card-container {
    perspective: 1000px;
    width: 340px;
    margin: 40px auto;
}

.elite-card-canvas {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid var(--accent);
    border-radius: 16px;
    padding: 25px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 30px rgba(197, 160, 89, 0.2);
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
}

.elite-card-canvas::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.06), transparent);
    transform: rotate(45deg);
    pointer-events: none;
}

.elite-card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 10px var(--accent);
}

[dir="rtl"] .elite-card-badge {
    right: auto;
    left: 20px;
}

.elite-card-qr {
    background: #fff;
    padding: 8px;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elite-card-qr img {
    width: 100%;
    height: 100%;
}

.elite-card-meta {
    text-align: center;
}

.elite-card-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
}

.elite-card-level {
    color: var(--accent);
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

.elite-card-stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
    margin-top: 20px;
    font-size: 12px;
}

.elite-card-stat span {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

/* --- Admin Recommendation Split view --- */
.admin-split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .admin-split-view {
        grid-template-columns: 1fr;
    }
}

.document-preview-pane {
    background: #cbd5e1;
    border-radius: 8px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
    position: relative;
    padding: 20px;
}

.document-mock-pdf {
    width: 100%;
    background: #fff;
    padding: 40px;
    aspect-ratio: 1/1.4;
    box-shadow: var(--shadow-md);
    border-radius: 4px;
    font-size: 11px;
}

.document-mock-header {
    border-bottom: 1.5px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-stamp-overlay {
    border: 3px double var(--danger);
    color: var(--danger);
    padding: 5px;
    font-weight: 800;
    font-size: 10px;
    text-transform: uppercase;
    border-radius: 6px;
    transform: rotate(-10deg);
}

.extracted-data-pane {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* --- Responsive & Utilities --- */
.badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-status-pending { background: #fef3c7; color: #d97706; }
.badge-status-approved { background: #d1fae5; color: #059669; }
.badge-status-rejected { background: #fee2e2; color: #dc2626; }

.d-none { display: none !important; }
.text-center { text-align: center !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
    body { padding-top: 60px; }
    header.main-header { height: 60px; }
    .logo-text { font-size: 18px; }
    .hero-title { font-size: 32px; }
    [dir="rtl"] .hero-title { font-size: 34px; }
    nav.main-nav { display: none; } /* Mobile menu toggled by JS */
}

/* --- How It Works Section --- */
.how-it-works-section {
    padding: 80px 0;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border);
}
.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}
.how-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
.how-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--accent);
}
.how-step-num {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    border: 3px solid var(--bg-main);
}
.how-step-icon {
    font-size: 36px;
    color: var(--accent);
    margin-bottom: 20px;
    margin-top: 10px;
}
.how-step h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
}
.how-step p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* --- Article / Text Pages --- */
.article-layout {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 50px;
    margin: 40px auto;
    max-width: 900px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.article-layout h1 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 800;
    border-bottom: 2px solid var(--accent-light);
    padding-bottom: 15px;
}
.article-layout h2 {
    color: var(--primary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
}
.article-layout p {
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 15px;
}
.article-layout ul {
    margin-bottom: 20px;
    padding-right: 20px;
    padding-left: 20px;
}
.article-layout ul li {
    margin-bottom: 10px;
    color: var(--text-body);
    font-size: 14.5px;
}

/* --- Contact Us Form --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 40px;
    margin-top: 30px;
}
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .article-layout {
        padding: 30px 20px;
    }
}
.contact-info-card {
    background: var(--primary);
    color: #fff;
    padding: 40px 30px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.contact-info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}
.contact-info-item i {
    font-size: 20px;
    color: var(--accent);
}

/* --- Language Switcher Dropdown --- */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.btn-lang-dropdown {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-body);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-lang-dropdown:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--primary);
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-card);
    min-width: 120px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
    border-radius: 6px;
    border: 1px solid var(--border);
    z-index: 1000;
    overflow: hidden;
    margin-top: 5px;
}

[dir="ltr"] .lang-dropdown-content {
    right: auto;
    left: 0;
}

.lang-dropdown-content a {
    color: var(--text-body);
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
    text-align: right;
}

[dir="ltr"] .lang-dropdown-content a {
    text-align: left;
}

.lang-dropdown-content a:hover {
    background-color: var(--bg-main);
    color: var(--accent-hover);
}

.lang-dropdown:hover .lang-dropdown-content {
    display: block;
}



/* Bi-directional flex direction alignment updates */
[dir="rtl"] .logo-svg text {
    letter-spacing: normal;
}
[dir="ltr"] .main-nav {
    flex-direction: row;
}

/* Custom logo adjustment */
.logo-svg {
    display: block;
    max-height: 100%;
}

/* --- Action Cards Section & Hover Interactions --- */
.action-cards-section {
    padding: 60px 0;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
}

.action-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.action-card-icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.action-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.action-card-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.action-card-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-hover);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.action-card-link i {
    transition: transform 0.2s;
}

.action-card:hover .action-card-link i {
    transform: translateX(4px);
}

[dir="rtl"] .action-card:hover .action-card-link i {
    transform: translateX(-4px);
}

/* --- Unified Auth Modal Custom Styles --- */
.auth-role-card {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-role-card:hover {
    border-color: var(--accent);
    background: var(--accent-light) !important;
    transform: translateY(-2px);
}

.auth-tabs {
    display: flex;
    gap: 15px;
}

.auth-tab-btn {
    background: none;
    border: none;
    font-weight: 500;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 12px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.auth-tab-btn:hover {
    color: var(--primary);
}

.auth-tab-btn.active {
    color: var(--primary);
    font-weight: 700 !important;
    border-bottom-color: var(--accent);
}

/* --- SSO Buttons --- */
.btn-sso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    font-weight: 700;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-title);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-sso:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-google i {
    color: #ea4335;
    font-size: 18px;
}

.btn-outlook i {
    color: #0078d4;
    font-size: 18px;
}


/* --- STS Custom Enhancements --- */
@keyframes oauth-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.oauth-account-item:hover {
    background-color: #f1f5f9 !important;
    border-color: var(--accent) !important;
}

/* Custom Table hover styling for Wallet purchases and Admin User tables */
#purchases-table-el th, #purchases-table-el td,
#admin-users-table th, #admin-users-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

#purchases-table-el tr:hover,
#admin-users-table tr:hover {
    background-color: #f8fafc;
}

.file-dropzone:hover {
    border-color: var(--accent) !important;
    background-color: #f1f5f9 !important;
}

/* Dynamic verification checks animations */
#inst-verification-card i.fa-circle-check {
    animation: ocr-check-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes ocr-check-pop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ===========================================================================
   === MOBILE MENU & DRAWER NAVIGATION ========================================
   =========================================================================== */

/* Hamburger Toggle Button */
.btn-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 24px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-hamburger:hover {
    background-color: var(--bg-main);
    color: var(--accent);
}

/* Mobile Drawer Overlay */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Drawer Layout */
.mobile-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -320px; /* Off-screen right by default for RTL */
    width: 300px;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slide in from right in RTL */
.mobile-drawer.open {
    transform: translateX(-320px);
}

/* Drawer position for LTR support */
[dir="ltr"] .mobile-drawer {
    right: auto;
    left: -320px;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
}

/* Slide in from left in LTR */
[dir="ltr"] .mobile-drawer.open {
    transform: translateX(320px);
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 1.5px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.drawer-close:hover {
    color: var(--danger);
}

.drawer-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    border-radius: 8px;
    color: var(--text-body);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    margin-bottom: 5px;
}

.drawer-link:hover, .drawer-link.active {
    background: var(--bg-main);
    color: var(--primary);
}

.drawer-link.active {
    border-right: 4px solid var(--accent);
    padding-right: 14px;
}

[dir="ltr"] .drawer-link.active {
    border-right: none;
    border-left: 4px solid var(--accent);
    padding-left: 14px;
}

/* Responsive Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Scaled Video Viewport & PDF viewports */
video {
    max-width: 100%;
    height: auto;
}

/* Container responsive expansions for wide displays */
@media (min-width: 1440px) {
    .container {
        max-width: 1380px;
    }
}
@media (min-width: 1600px) {
    .container {
        max-width: 1520px;
    }
}
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
    }
}

/* Grid columns stack on mobile viewports */
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
    }
}

/* Dashboard sidebar responsive scaling */
@media (max-width: 991px) {
    header.main-header nav.main-nav {
        display: none !important;
    }
    
    header.main-header #guest-header-actions,
    header.main-header #logged-header-actions {
        display: none !important;
    }
    
    .btn-hamburger {
        display: block !important;
    }
    
    /* Responsive Dashboard Sidebars */
    .dashboard-layout {
        grid-template-columns: 1fr !important;
        flex-direction: column;
    }
    
    .dashboard-sidebar {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        padding: 10px;
        white-space: nowrap;
        gap: 10px;
        border-bottom: 1px solid var(--border);
        border-left: none !important;
        border-right: none !important;
        position: sticky;
        top: 70px;
        background: #fff;
        z-index: 10;
    }
    
    .dashboard-sidebar .dashboard-menu-item {
        margin-bottom: 0 !important;
        padding: 8px 16px !important;
        border-radius: 20px !important;
    }
    
    .dashboard-sidebar .dashboard-menu-item.logout-btn {
        margin-top: 0 !important;
    }
    
    /* Metrics grids stack on mobile */
    .metrics-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    /* Details split view columns layout stack */
    .details-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Split layout inside instructor dashboard stack */
    #instructor-dashboard-section .dashboard-body > div > div {
        grid-template-columns: 1fr !important;
    }
    
    #inst-manage-course > div {
        grid-template-columns: 1fr !important;
    }
    
    /* Admin panels split view stack */
    .admin-split-view {
        grid-template-columns: 1fr !important;
    }
}

/* iPhone SE and small screens adjustment */
@media (max-width: 375px) {
    .logo-text {
        font-size: 18px;
    }
    
    .logo-svg {
        width: 110px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* --- Modern Segmented Language Switcher --- */
.lang-toggle-container {
    position: relative;
    display: flex;
    background: #f1f3f5; /* Light background for segments */
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 2px;
    cursor: pointer;
    user-select: none;
    align-items: center;
    width: 175px;
    height: 38px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.lang-toggle-segment {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    z-index: 2;
    height: 100%;
    transition: color 0.3s ease;
    border-radius: 28px;
}

.lang-toggle-segment .lang-flag {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

.lang-toggle-slider {
    position: absolute;
    top: 2px;
    bottom: 2px;
    width: calc(50% - 2px);
    background: var(--bg-card); /* White slider background */
    border-radius: 28px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slider position in RTL */
[dir="rtl"] .lang-toggle-slider {
    right: 2px;
    left: auto;
}
[dir="rtl"] .lang-toggle-container.lang-ar .lang-toggle-slider {
    transform: translateX(0);
}
[dir="rtl"] .lang-toggle-container.lang-en .lang-toggle-slider {
    transform: translateX(calc(-100%));
}

/* Slider position in LTR */
[dir="ltr"] .lang-toggle-slider {
    left: 2px;
    right: auto;
}
[dir="ltr"] .lang-toggle-container.lang-ar .lang-toggle-slider {
    transform: translateX(0);
}
[dir="ltr"] .lang-toggle-container.lang-en .lang-toggle-slider {
    transform: translateX(calc(100%));
}

/* Highlighted texts */
.lang-toggle-container.lang-ar #lang-toggle-ar {
    color: var(--primary);
}
.lang-toggle-container.lang-en #lang-toggle-en {
    color: var(--primary);
}

/* Hover styles for slider */
.lang-toggle-container:hover {
    border-color: var(--accent);
}

/* Section Highlight Animation */
@keyframes highlight-flash {
    0% {
        background-color: var(--accent-light) !important;
        box-shadow: 0 0 35px rgba(212, 166, 58, 0.4);
    }
    100% {
        background-color: var(--bg-main) !important;
        box-shadow: none;
    }
}
.highlight-section {
    animation: highlight-flash 2.5s cubic-bezier(0.25, 1, 0.5, 1);
}
