﻿
@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 900;
    font-display: block;
    src: url("../fonts/fa-solid-900.woff2") format("woff2"),
         url("../fonts/fa-solid-900.ttf") format("truetype");
}

@font-face {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("../fonts/fa-regular-400.woff2") format("woff2"),
         url("../fonts/fa-regular-400.ttf") format("truetype");
}

@font-face {
    font-family: "Font Awesome 6 Brands";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("../fonts/fa-brands-400.woff2") format("woff2"),
         url("../fonts/fa-brands-400.ttf") format("truetype");
}

@font-face {
    font-family: 'Cairo';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/Cairo.ttf") format("truetype");
}

.fa {
    font-family: var(--fa-style-family, "Font Awesome 6 Free");
    font-weight: var(--fa-style, 900);
}

.fa, .fa-brands, .fa-classic, .fa-regular, .fa-sharp, .fa-solid, .fab, .far, .fas {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: var(--fa-display, inline-block);
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
}

.fa-classic, .fa-regular, .fa-solid, .far, .fas {
    font-family: "Font Awesome 6 Free";
}

.fa-brands, .fab {
    font-family: "Font Awesome 6 Brands";
}

.fa-regular, .far {
    font-weight: 400;
}

.fa-solid, .fas {
    font-weight: 900;
}

/* Common FontAwesome icon classes */
.fa-home:before { content: "\f015"; }
.fa-user:before { content: "\f007"; }
.fa-search:before { content: "\f002"; }
.fa-envelope:before { content: "\f0e0"; }
.fa-phone:before { content: "\f095"; }
.fa-bars:before { content: "\f0c9"; }
.fa-times:before { content: "\f00d"; }
.fa-chevron-down:before { content: "\f078"; }
.fa-chevron-up:before { content: "\f077"; }
.fa-chevron-left:before { content: "\f053"; }
.fa-chevron-right:before { content: "\f054"; }
.fa-angle-down:before { content: "\f107"; }
.fa-angle-up:before { content: "\f106"; }
.fa-angle-left:before { content: "\f104"; }
.fa-angle-right:before { content: "\f105"; }
.fa-star:before { content: "\f005"; }
.fa-heart:before { content: "\f004"; }
.fa-check:before { content: "\f00c"; }
.fa-plus:before { content: "\f067"; }
.fa-minus:before { content: "\f068"; }
.fa-edit:before { content: "\f044"; }
.fa-trash:before { content: "\f1f8"; }
.fa-download:before { content: "\f019"; }
.fa-upload:before { content: "\f093"; }
.fa-play:before { content: "\f04b"; }
.fa-pause:before { content: "\f04c"; }
.fa-stop:before { content: "\f04d"; }
.fa-cog:before { content: "\f013"; }
.fa-gear:before { content: "\f013"; }
.fa-bell:before { content: "\f0f3"; }
.fa-globe:before { content: "\f0ac"; }
.fa-map-marker:before { content: "\f041"; }
.fa-calendar:before { content: "\f133"; }
.fa-clock:before { content: "\f017"; }
.fa-book:before { content: "\f02d"; }
.fa-graduation-cap:before { content: "\f19d"; }

/* ========== CSS CUSTOM PROPERTIES (VARIABLES) ========== */
:root {
    /* Primary Brand Colors */
    --primary-color: #4b1e1e;
    --secondary-color: #e39823;
    --primary-light: #6b2c2c;
    --primary-dark: #3a1616;
    
    /* Site Background */
    --site-bg: #ffe0e2;
    
    /* Gradients */
    --primary-gradient: linear-gradient(225deg, #4b1e1e 0%, #6b2c2c 50%, #4b1e1e 100%);

/* ========== CATEGORY PAGE ENHANCEMENTS - RTL ========== */

/* RTL Modern Category Banner Section */
html[dir="rtl"] .modern-category-banner {
    direction: rtl;
}

html[dir="rtl"] .banner-content {
    text-align: right;
}

html[dir="rtl"] .banner-title {
    font-family: 'Cairo', 'Tajawal', 'Amiri', Arial, sans-serif;
    font-weight: 700;
    text-align: right;
}

html[dir="rtl"] .banner-description {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    text-align: right;
}

html[dir="rtl"] .category-badge {
    flex-direction: row-reverse;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

html[dir="rtl"] .category-stats {
    justify-content: flex-end;
}

html[dir="rtl"] .stat-label {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

/* RTL Modern Navigation Tabs */
html[dir="rtl"] .modern-nav-tabs .nav-link {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    flex-direction: row-reverse;
}

/* RTL Modern Subcategory Cards */
html[dir="rtl"] .subcategory-title {
    font-family: 'Cairo', 'Tajawal', 'Amiri', Arial, sans-serif;
    font-weight: 600;
    text-align: right;
}

html[dir="rtl"] .meta-item {
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

html[dir="rtl"] .explore-button {
    flex-direction: row-reverse;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

html[dir="rtl"] .modern-subcategory-card:hover .explore-button {
    transform: translateX(-5px);
}

html[dir="rtl"] .courses-badge {
    left: 15px;
    right: auto;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

/* RTL Modern Instructor Cards */
html[dir="rtl"] .instructor-name {
    font-family: 'Cairo', 'Tajawal', 'Amiri', Arial, sans-serif;
    font-weight: 600;
}

html[dir="rtl"] .instructor-role {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

html[dir="rtl"] .view-profile-btn {
    flex-direction: row-reverse;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

html[dir="rtl"] .online-status {
    left: 5px;
    right: auto;
}

/* RTL Empty States */
html[dir="rtl"] .empty-state-wrapper h4 {
    font-family: 'Cairo', 'Tajawal', 'Amiri', Arial, sans-serif;
    font-weight: 600;
}

html[dir="rtl"] .empty-state-wrapper p {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

html[dir="rtl"] .info-message {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    text-align: center;
}

/* RTL Section Headers */
html[dir="rtl"] .section-header .section-badge {
    flex-direction: row-reverse;
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

html[dir="rtl"] .section-title {
    font-family: 'Cairo', 'Tajawal', 'Amiri', Arial, sans-serif;
    font-weight: 700;
}

html[dir="rtl"] .section-description {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

/* RTL Responsive Adjustments */
@media (max-width: 768px) {
    html[dir="rtl"] .banner-content {
        text-align: center;
    }
    
    html[dir="rtl"] .banner-title {
        text-align: center;
    }
    
    html[dir="rtl"] .banner-description {
        text-align: center;
    }
}

html[dir="rtl"] .category-product-body:hover .category-arrow-icon {
    animation: bounceLeft 2s infinite;
}

@keyframes bounceLeft {
    0%, 20%, 50%, 80%, 100% { transform: rotate(180deg) translateX(0); }
    40% { transform: rotate(180deg) translateX(10px); }
    60% { transform: rotate(180deg) translateX(5px); }
}

/* RTL Instructor Cards */
html[dir="rtl"] .instructor-name {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
    font-weight: 600;
}

html[dir="rtl"] .instructor-btn {
    font-family: 'Cairo', 'Tajawal', Arial, sans-serif;
}

html[dir="rtl"] .instructor-btn i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* RTL Floating animations */
html[dir="rtl"] .floating-shape {
    animation: floatRtl 6s ease-in-out infinite;
}

@keyframes floatRtl {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(-120deg); }
    66% { transform: translateY(10px) rotate(-240deg); }
}

/* RTL Responsive adjustments */
@media (max-width: 768px) {
    html[dir="rtl"] .category-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    html[dir="rtl"] .category-title {
        font-size: 1.3rem;
    }
    
    html[dir="rtl"] .category-subtitle {
        font-size: 0.9rem;
    }
}
    --secondary-gradient: linear-gradient(225deg, #e39823 0%, #f4a940 100%);
    --dark-gradient: linear-gradient(225deg, var(--primary-color), var(--primary-light));
    
    /* Neutral Colors */
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #888888;
    --border-color: #e5e5e5;
    
    /* Effects & Shadows */
    --shadow-light: rgba(75, 30, 30, 0.1);
    --shadow-medium: rgba(75, 30, 30, 0.15);
    --shadow-heavy: rgba(75, 30, 30, 0.25);
    --hover-bg: rgba(75, 30, 30, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.1);
    
    /* Header Specific */
    --header-height: 84px;
    --header-shadow: 0 2px 20px var(--shadow-light);
    
    /* Footer Specific */
    --footer-primary: #4b1e1e;
    --footer-secondary: #e39823;
    --footer-gradient: linear-gradient(225deg, #4b1e1e 0%, #6b2c2c 50%, #4b1e1e 100%);
    --footer-text: #ffffff;
    --footer-text-muted: rgba(255, 255, 255, 0.8);
    --footer-accent: #e39823;
    
    /* Spacing */
    --container-padding: 15px;
    --section-padding: 60px 0;
    --element-gap: 15px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-small: 6px;
    --radius-medium: 12px;
    --radius-large: 20px;
    --radius-full: 50%;
    
    /* Typography */
    --font-primary: 'Cairo', 'Tajawal', 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 600;
    --font-weight-heavy: 700;
}

/* ========== MODERN FORM ELEMENTS - RTL ========== */

/* Modern Select Dropdown - RTL */
html[dir="rtl"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 16px 12px;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem 0.75rem 1rem 2.5rem;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

html[dir="rtl"] .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--shadow-light);
}

html[dir="rtl"] .form-select:hover {
    border-color: var(--primary-light);
}

html[dir="rtl"] .form-select option {
    padding: 0.5rem;
    color: var(--text-color);
    background-color: var(--white);
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] .form-select option:hover {
    background-color: var(--light-bg);
}

html[dir="rtl"] .form-select option:checked {
    background-color: var(--primary-color);
    color: var(--white);
}

/* File Input Styling - RTL */
html[dir="rtl"] .form-control[type="file"] {
    border: 2px dashed var(--border-color);
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: right;
    direction: rtl;
}

html[dir="rtl"] .form-control[type="file"]:hover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

html[dir="rtl"] .form-control[type="file"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--shadow-light);
}

/* Date Input Styling - RTL */
html[dir="rtl"] .form-control[type="date"] {
    padding-left: 2.5rem;
    padding-right: 0.75rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23666' d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM2 4v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V4H2z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 16px;
    text-align: right;
    direction: rtl;
}

/* Form Check Styling - RTL */
html[dir="rtl"] .form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    direction: rtl;
}

html[dir="rtl"] .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.5rem;
    margin-right: 0;
    border: 2px solid var(--border-color);
    border-radius: 0.25rem;
    background-color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

html[dir="rtl"] .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

html[dir="rtl"] .form-check-input[type="radio"] {
    border-radius: 50%;
}

html[dir="rtl"] .form-check-input[type="radio"]:checked {
    background-image: none;
    background-color: var(--primary-color);
    position: relative;
}

html[dir="rtl"] .form-check-input[type="radio"]:checked::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--white);
}

html[dir="rtl"] .form-check-label {
    font-weight: var(--font-weight-medium);
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.95rem;
    text-align: right;
}

/* Form Label Styling - RTL */
html[dir="rtl"] .form-label {
    font-weight: var(--font-weight-bold);
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-align: right;
}

/* ========== GLOBAL RESET & BASE STYLES ========== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    background-color: var(--site-bg);
}

.container-fluid {
    max-width: 100%;
    padding: 0 var(--container-padding);
}

/* ========== MODERN HEADER STYLES ========== */
.modern-header {
    background: var(--white);
    box-shadow: var(--header-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: var(--header-height);
    transition: all var(--transition-normal);
}

.modern-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Header Brand */
.navbar-brand img {
    height: 45px;
    transition: transform var(--transition-normal);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Navigation */
.main-nav-item {
    position: relative;
    margin: 0 4px;
}

/* Enhanced Navigation Link Effects for RTL */
.main-nav-item .nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--header-primary, #ff6b35);
    transition: width 0.3s ease;
}

.main-nav-item:hover .nav-link-modern::after {
    width: 100%;
    right: 0;
}

.main-nav-item:hover .nav-link-modern {
    color: var(--header-primary, #ff6b35) !important;
    transform: translateY(-1px);
}

.nav-link-modern {
    display: flex !important;
    align-items: center;
    padding: 12px !important;
    color: var(--text-dark) !important;
    font-weight: var(--font-weight-medium) !important;
    border-radius: var(--radius-small);
    transition: all var(--transition-normal);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-link-modern::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, transparent, var(--glass-bg), transparent);
    transition: right var(--transition-slow);
}

.nav-link-modern:hover {
    background: var(--hover-bg);
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.nav-link-modern:hover::before {
    right: 100%;
}

.nav-link-modern i {
    margin-left: 8px;
    font-size: 16px;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    min-width: 280px;
    border-radius: var(--radius-medium);
    box-shadow: 0 10px 40px var(--shadow-medium);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 1001;
}

.main-nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu .dropdown-item {
    padding: 12px 20px;
    color: var(--text-dark);
    transition: all var(--transition-fast);
    border-radius: 0;
}

.mega-menu .dropdown-item:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
    padding-right: 25px;
}

/* Mobile Menu Toggle */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
    border-radius: var(--radius-small);
    background: var(--hover-bg);
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Header Buttons */
.header-btn {
    padding: 8px 20px;
    border-radius: var(--radius-medium);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.header-btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-light);
}

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

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

/* ========== NEWS TICKER STYLES ========== */
.news-container {
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 8px 0;
}

.news-container ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    animation: ticker-rtl 60s linear infinite;
    will-change: transform;
    width: min-content;
}

.news-container ul li {
    white-space: nowrap;
    padding: 0 15px;
    position: relative;
    color: var(--text-dark);
    font-size: 14px;
}

.news-container ul li::after {
    content: "";
    width: 1px;
    height: 15px;
    background: var(--border-color);
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.news-container:hover ul {
    animation-play-state: paused;
}

.title-news {
    padding: 0 15px;
    font-weight: var(--font-weight-medium);
    color: white;
    border-left: 1px solid var(--border-color);
}

@keyframes ticker-rtl {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========== MODERN FOOTER STYLES ========== */
.modern-footer {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
    margin-top: 60px;
    color: var(--footer-text);
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.footer-main {
    position: relative;
    z-index: 2;
    padding: 50px 0 30px;
}

.footer-section {
    margin-bottom: 40px;
}

/* Footer Brand */
.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-direction: row-reverse;
}

.footer-logo {
    width: 60px;
    height: 60px;
    filter: brightness(0) invert(1);
    object-fit: contain;
}

.footer-brand-text {
    color: var(--footer-text);
    font-size: 24px;
    font-weight: var(--font-weight-heavy);
    margin: 0;
}

.footer-description {
    color: var(--footer-text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 15px;
}

/* Footer Links */
.footer-title {
    color: var(--footer-text);
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--footer-text-muted);
    text-decoration: none;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--footer-text);
    padding-right: 10px;
}

.footer-links a i {
    width: 16px;
    text-align: center;
}

/* Social Media */
.footer-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-medium);
    background: var(--glass-bg);
    color: var(--footer-text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.social-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(227, 152, 35, 0.3);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-copyright {
    color: var(--footer-text-muted);
    margin: 0;
    font-size: 14px;
}

/* ========== MODERN ALERT SYSTEM - RTL ========== */
html[dir="rtl"] .alert {
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    display: none;
    position: relative;
    animation: slideDown 0.3s ease;
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .alert.show {
    display: block;
}

html[dir="rtl"] .alert-danger {
    background-color: #fef2f2;
    border-right: 4px solid #ef4444;
    border-left: none;
    color: #dc2626;
}

html[dir="rtl"] .alert-success {
    background-color: #f0fdf4;
    border-right: 4px solid #22c55e;
    border-left: none;
    color: #16a34a;
}

html[dir="rtl"] .alert-warning {
    background-color: #fffbeb;
    border-right: 4px solid #f59e0b;
    border-left: none;
    color: #d97706;
}

html[dir="rtl"] .alert-info {
    background-color: #eff6ff;
    border-right: 4px solid #3b82f6;
    border-left: none;
    color: #2563eb;
}

html[dir="rtl"] .alert i {
    margin-left: 0.5rem;
    margin-right: 0;
    font-size: 1rem;
}

/* ========== UTILITY CLASSES ========== */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-gradient-primary { background: var(--primary-gradient) !important; }
.bg-gradient-secondary { background: var(--secondary-gradient) !important; }

.shadow-light { box-shadow: 0 2px 10px var(--shadow-light) !important; }
.shadow-medium { box-shadow: 0 4px 20px var(--shadow-medium) !important; }
.shadow-heavy { box-shadow: 0 8px 30px var(--shadow-heavy) !important; }

.rounded-small { border-radius: var(--radius-small) !important; }
.rounded-medium { border-radius: var(--radius-medium) !important; }
.rounded-large { border-radius: var(--radius-large) !important; }

.transition-fast { transition: all var(--transition-fast) !important; }
.transition-normal { transition: all var(--transition-normal) !important; }
.transition-slow { transition: all var(--transition-slow) !important; }

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 991.98px) {
    :root {
        --header-height: 84px;
        --container-padding: 10px;
        --section-padding: 40px 0;
    }
    
    .navbar-collapse {
        background: var(--white);
        margin-top: 10px;
        border-radius: var(--radius-medium);
        box-shadow: var(--shadow-light);
        padding: 20px;
    }
    
    .nav-link-modern {
        padding: 15px 10px !important;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link-modern:last-child {
        border-bottom: none;
    }
    
    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        margin-top: 10px;
        background: var(--light-bg);
    }
    
    .footer-section {
        text-align: center;
        margin-bottom: 30px;
    }
}

@media (max-width: 767.98px) {
    .news-container ul {
        animation-duration: 20s;
    }
    
    .footer-brand {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .news-container ul {
        animation-duration: 15s;
    }
    
    .header-btn {
        padding: 6px 15px;
        font-size: 14px;
    }
    
    .footer-main {
        padding: 30px 0 20px;
    }
}

/* ========== ANIMATION ENHANCEMENT ========== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== HIGH CONTRAST SUPPORT ========== */
@media (prefers-contrast: high) {
    :root {
        --shadow-light: rgba(0, 0, 0, 0.3);
        --shadow-medium: rgba(0, 0, 0, 0.4);
        --shadow-heavy: rgba(0, 0, 0, 0.5);
    }
}

/* ========== RTL SPECIFIC ENHANCEMENTS ========== */
.navbar-nav {
    flex-direction: row;
}

.navbar-nav .nav-item {
    margin: 0 5px;
}

.dropdown-menu {
    text-align: right;
    z-index: 9999 !important; /* Ensure language dropdown appears above header */
}

.language-dropdown .dropdown-menu {
    z-index: 9999 !important;
    background: white !important;
    border: 1px solid rgba(0,0,0,0.15);
    box-shadow: 0 6px 12px rgba(0,0,0,0.175);
}

.dropdown-item {
    text-align: right;
}

/* Form elements RTL */
.form-control {
    text-align: right;
}

.input-group .form-control:not(:last-child) {
    border-left: 0;
    border-right: 1px solid var(--border-color);
}

.input-group .form-control:not(:first-child) {
    border-right: 0;
    border-left: 1px solid var(--border-color);
}

/* Button groups RTL */
.btn-group .btn:not(:last-child) {
    border-left: 0;
}

.btn-group .btn:not(:first-child) {
    border-right: 0;
}

/* Pagination RTL */
.pagination .page-link {
    margin-right: 0;
    margin-left: -1px;
}

.pagination .page-item:first-child .page-link {
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

.pagination .page-item:last-child .page-link {
    border-radius: var(--radius-small) 0 0 var(--radius-small);
}

/* List groups RTL */
.list-group-item {
    text-align: right;
}

/* Cards RTL */
.card-header,
.card-body,
.card-footer {
    text-align: right;
}

/* Alerts RTL */
.alert {
    text-align: right;
}

.alert-dismissible .btn-close {
    left: 0;
    right: auto;
}

/* ========== MODERN FOOTER STYLES - RTL ========== */
.modern-footer {
    background: var(--footer-gradient);
    position: relative;
    overflow: hidden;
    margin-top: 60px;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.footer-main {
    position: relative;
    z-index: 2;
    padding: 50px 0 30px;
}

.footer-section {
    margin-bottom: 40px;
}

.footer-logo-section {
    text-align: right;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.footer-logo {
    width: 80px;
    height: 60px;
    filter: brightness(0) invert(1);
    object-fit: contain;
}

.footer-brand-text {
    color: var(--footer-text);
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.footer-description {
    color: var(--footer-text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 15px;
    text-align: right;
}

.footer-social {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    direction: rtl;
    flex-direction: row;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--footer-text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn:hover {
    background: var(--footer-accent);
    color: white;
    transform: translateY(-3px);
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(227, 152, 35, 0.3);
}

.footer-title {
    color: var(--footer-text);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
    text-align: right;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: auto;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--footer-accent);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
    direction: rtl;
}

.footer-links li {
    margin-bottom: 14px;
    text-align: right;
}

.footer-link {
    color: var(--footer-text-muted);
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-direction: row-reverse;
    text-align: right;
    flex-direction: row;
}

.footer-link:hover {
    color: var(--footer-accent);
    text-decoration: none;
    transform: translateX(-5px);
}

.footer-link i {
    font-size: 14px;
    width: 16px;
    text-align: center;
    color: var(--footer-accent);
}

.join-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: var(--footer-text);
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.join-btn:hover {
    background: var(--footer-accent);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 152, 35, 0.3);
}

/* Join Us Section - Center buttons in RTL */
.footer-section .footer-links {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: right;
}

.footer-copyright {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 0;
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    flex-direction: row-reverse;
}

.copyright-text {
    color: var(--footer-text-muted);
    font-size: 14px;
    margin: 0;
}

.linky-link {
    color: var(--footer-accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.linky-link:hover {
    color: var(--footer-text);
    text-decoration: none;
}

@media (max-width: 768px) {
    .footer-main {
        padding: 40px 0 20px;
    }
    
    .footer-section {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .footer-logo-section,
    .footer-title {
        text-align: center;
    }
    
    .footer-description {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-title::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .copyright-content {
        flex-direction: column;
        text-align: center;
    }
    
    .join-btn {
        max-width: 280px;
        margin: 0 auto 12px;
    }
}

@media (max-width: 576px) {
    .footer-brand {
        justify-content: center;
        text-align: center;
    }
    
    .footer-brand-text {
        font-size: 20px;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .card-validation-feedback {
        margin-top: 10px;
        font-size: 1rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-align: center;
        padding: 10px 14px;
        border-radius: 10px;
    }

    .card-validation-feedback i {
        font-size: 1.1rem;
    }

    .card-validation-feedback.valid {
        color: #198754;
        background: rgba(25, 135, 84, 0.08);
        border: 1px solid rgba(25, 135, 84, 0.25);
    }

    .card-validation-feedback.invalid {
        color: #dc3545;
        background: rgba(220, 53, 69, 0.08);
        border: 1px solid rgba(220, 53, 69, 0.25);
    }

    .card-number-input .form-control.is-invalid {
        border-color: #dc3545;
        box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.12);
    }
}
/*
 * Portal RTL CSS - Homepage Specific Styles for Right-to-Left Languages
 * Contains all homepage-only RTL styles including hero, sections, and animations
 * Works with portal-modset-rtl.css as the base framework
 */

/* ========== HEADER HOVER EFFECTS ========== */
/* Ensure header hover effects are properly working */
.nav-link-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
}

.nav-link-modern:hover {
    background: var(--hover-bg, rgba(75, 30, 30, 0.1)) !important;
    color: var(--primary-color, #4b1e1e) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(75, 30, 30, 0.2);
}

.nav-link-modern::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, transparent, rgba(75, 30, 30, 0.1), transparent);
    transition: right 0.5s ease;
}

.nav-link-modern:hover::before {
    right: 100%;
}

/* Header action buttons - Enhanced Design */
.header-action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    margin: 0 4px;
    border-radius: 12px;
    background: rgb(88 38 31);
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.header-action-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.header-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Wishlist heart icon enhancement */
.header-action-btn .fa-heart {
    transition: all 0.3s ease;
}

.header-action-btn:hover .fa-heart {
    color: #ff6b6b;
    transform: scale(1.1);
}

/* Action counter styling */
.action-counter {
    position: absolute;
    top: -6px;
    left: -6px; /* RTL: left instead of right */
    background: red;
    color: #fff8f8;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    animation: counterPulse 2s infinite;
}

@keyframes counterPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notification button specific styling */
.notification-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    margin: 0 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.notification-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.notification-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Notification count */
.notification-count {
    position: absolute;
    top: -6px;
    left: -6px; /* RTL: left instead of right */
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
    color: #212529;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Action counter for wishlist, etc. */
.action-counter {
    position: absolute;
    top: -5px;
    left: -5px; /* RTL: left instead of right */
    background: repeating-radial-gradient(circle at 30% 30%, #ff6b6b, #ff6b6b 10px, #ff4757 10px, #ff4757 20px);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
}

/* Dashboard button styles */
.dashboard-btn {
    background: #4b1e1e !important; /* Dark system color */
    color: #ffffff !important; /* White text */
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(75, 30, 30, 0.2);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.dashboard-btn:hover {
    background: #3a1616 !important; /* Darker on hover */
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(75, 30, 30, 0.3);
    color: #ffffff !important; /* Keep white text on hover */
}

/* Mega menu hover effects */
.mega-menu-link:hover {
    background: var(--hover-bg, rgba(75, 30, 30, 0.1)) !important;
    color: var(--primary-color, #4b1e1e) !important;
    transform: translateX(-5px) !important;
}

/* ========== SMOOTH ANIMATIONS ========== */
/* Fix flickering animations by ensuring they only trigger once */
.category-card,
.faq-item,
.opinion-card,
.partner-item {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Initial state for scroll animations */
.category-card.animate-on-scroll,
.faq-item.animate-on-scroll,
.opinion-card.animate-on-scroll,
.partner-item.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

/* Animated state */
.category-card.animate-in,
.faq-item.animate-in,
.opinion-card.animate-in,
.partner-item.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent repeated animations */
.category-card.animation-complete,
.faq-item.animation-complete,
.opinion-card.animation-complete,
.partner-item.animation-complete {
    transition: none;
}

/* Staggered animation delays */
.category-card:nth-child(1) { transition-delay: 0.1s; }
.category-card:nth-child(2) { transition-delay: 0.2s; }
.category-card:nth-child(3) { transition-delay: 0.3s; }
.category-card:nth-child(4) { transition-delay: 0.4s; }
.category-card:nth-child(5) { transition-delay: 0.5s; }
.category-card:nth-child(6) { transition-delay: 0.6s; }
.category-card:nth-child(7) { transition-delay: 0.7s; }
.category-card:nth-child(8) { transition-delay: 0.8s; }

.opinion-card:nth-child(1) { transition-delay: 0.1s; }
.opinion-card:nth-child(2) { transition-delay: 0.2s; }
.opinion-card:nth-child(3) { transition-delay: 0.3s; }
.opinion-card:nth-child(4) { transition-delay: 0.4s; }
.opinion-card:nth-child(5) { transition-delay: 0.5s; }
.opinion-card:nth-child(6) { transition-delay: 0.6s; }

/* Category Search Styles - Disabled */
.category-search {
    display: none !important;
}

/* FAQ Search Styles - Disabled */
.faq-search-container {
    display: none !important;
}

.faq-search-input {
    display: none !important;
}

/* ========== MODERN HEADER STYLES - RTL ========== */
.modern-header {
    background: #ffffff;
    box-shadow: 0 2px 20px rgba(75, 30, 30, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 70px;
    transition: all 0.3s ease;
}

.modern-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand img {
    height: 45px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.main-nav-item {
    position: relative;
    margin: 0 4px;
}

.nav-link-modern {
    display: flex !important;
    align-items: center;
    padding: 12px !important;
    color: #2c3e50 !important;
    font-weight: 500 !important;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-link-modern::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: right 0.5s ease;
}

.nav-link-modern:hover {
    background: rgba(75, 30, 30, 0.08);
    color: #4b1e1e !important;
    transform: translateY(-2px);
}

.nav-link-modern:hover::before {
    right: 100%;
}

.nav-link-modern i {
    margin-left: 8px;
    font-size: 16px;
}

.mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    min-width: 280px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(75, 30, 30, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.main-nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu .dropdown-item {
    padding: 12px 20px;
    color: #2c3e50;
    transition: all 0.2s ease;
    border-radius: 0;
}

.mega-menu .dropdown-item:hover {
    background: rgba(75, 30, 30, 0.08);
    color: #4b1e1e;
    padding-right: 25px;
}

.navbar-toggler {
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(75, 30, 30, 0.08);
}

.navbar-toggler:focus {
    box-shadow: none;
}

.header-btn {
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.header-btn-primary {
    background: #4b1e1e;
    color: #ffffff;
}

.header-btn-primary:hover {
    background: #3a1616;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(75, 30, 30, 0.1);
}

.header-btn-outline {
    border-color: #4b1e1e;
    color: #4b1e1e;
    background: transparent;
}

.header-btn-outline:hover {
    background: #4b1e1e;
    color: #ffffff;
}

.news-container {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 8px 0;
}

.news-container ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    animation: ticker-rtl 60s linear infinite;
    will-change: transform;
    width: min-content;
}

.news-container ul li {
    white-space: nowrap;
    padding: 0 15px;
    position: relative;
    color: #2c3e50;
    font-size: 14px;
}

.news-container ul li::after {
    content: "";
    width: 1px;
    height: 15px;
    background: #e9ecef;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.news-container:hover ul {
    animation-play-state: paused;
}


/* ========== MODERN FOOTER STYLES - RTL ========== */
.modern-footer {
    background: linear-gradient(135deg, #4b1e1e 0%, #6b2c2c 50%, #4b1e1e 100%);
    position: relative;
    overflow: hidden;
    margin-top: 60px;
    color: #ffffff;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="80" cy="40" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="40" cy="80" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.footer-main {
    position: relative;
    z-index: 2;
    padding: 50px 0 30px;
}

.footer-section {
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo {
    width: 210px;
    height: 60px;
    filter: brightness(0) invert(1);
    object-fit: contain;
}

.footer-brand-text {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 15px;
}

.footer-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    text-align: right;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: #e39823;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #ffffff;
    padding-right: 10px;
}

.footer-links a i {
    width: 16px;
    text-align: center;
}

.footer-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-btn:hover {
    background: #e39823;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(227, 152, 35, 0.3);
}

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

.footer-copyright {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 14px;
}

@keyframes ticker-rtl {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ========== HEADER FIXES FOR RTL ========== */
/* Fix duplicate logos in RTL layout */
html[dir="rtl"] .modern-header .d-flex.d-lg-none .navbar-brand + .navbar-brand {
    display: none !important;
}

html[dir="rtl"] .modern-header .d-none.d-lg-flex .navbar-brand + .navbar-brand {
    display: none !important;
}

/* Ensure proper responsive behavior for RTL */
@media (min-width: 992px) {
    html[dir="rtl"] .modern-header .d-flex.d-lg-none {
        display: none !important;
    }
    
    html[dir="rtl"] .modern-header .d-none.d-lg-flex {
        display: flex !important;
    }
}

@media (max-width: 991.98px) {
    html[dir="rtl"] .modern-header .d-flex.d-lg-none {
        display: flex !important;
    }
    
    html[dir="rtl"] .modern-header .d-none.d-lg-flex {
        display: none !important;
    }
}

/* ========== ALERT STYLES RTL ========== */
/* RTL-specific alert styles */
html[dir="rtl"] .alert i {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* ========== MATERIAL DESIGN FORM FIELDS - RTL ========== */

/* Base Material Form Group - RTL */
html[dir="rtl"] .form-group.material-outlined {
    position: relative;
    margin-bottom: 1.5rem;
    direction: rtl;
}

/* Input Field Base Styles - RTL */
html[dir="rtl"] .form-group.material-outlined .form-control {
    width: 100%;
    padding: 16px 12px 8px 12px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: transparent;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #333;
    font-family: inherit;
    line-height: 1.5;
    text-align: right;
    direction: rtl;
}

/* Label Styles - RTL */
html[dir="rtl"] .form-group.material-outlined label {
    position: absolute;
    top: 16px;
    right: 12px;
    left: auto;
    font-size: 16px;
    color: #757575;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff !important;
    padding: 0 4px;
    transform-origin: right top;
    z-index: 1;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    direction: rtl;
}

/* Floating Label Animation - RTL */
html[dir="rtl"] .form-group.material-outlined .form-control:focus + label,
html[dir="rtl"] .form-group.material-outlined .form-control:not(:placeholder-shown) + label,
html[dir="rtl"] .form-group.material-outlined .form-control:valid + label {
    top: -8px;
    right: 8px;
    left: auto;
    font-size: 12px;
    color: var(--primary-color);
    background-color: #ffffff !important;
    transform: translateY(0);
    font-weight: 500;
}

/* Focus State - RTL */
html[dir="rtl"] .form-group.material-outlined .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Error State - RTL */
html[dir="rtl"] .form-group.material-outlined .form-control.is-invalid {
    border-color: #d32f2f;
}

html[dir="rtl"] .form-group.material-outlined .form-control.is-invalid + label {
    color: #d32f2f;
}

/* Success State - RTL */
html[dir="rtl"] .form-group.material-outlined .form-control.is-valid {
    border-color: #388e3c;
}

html[dir="rtl"] .form-group.material-outlined .form-control.is-valid + label {
    color: #388e3c;
}

/* Disabled State - RTL */
html[dir="rtl"] .form-group.material-outlined .form-control:disabled {
    background-color: #f5f5f5;
    color: #9e9e9e;
    border-color: #e0e0e0;
}

html[dir="rtl"] .form-group.material-outlined .form-control:disabled + label {
    color: #9e9e9e;
}

/* Select Field Styles - RTL */
html[dir="rtl"] .form-group.material-outlined .form-select {
    padding: 16px 12px 8px 40px;
    background-position: left 12px center;
    background-size: 16px 12px;
    cursor: pointer;
    text-align: right;
    direction: rtl;
}

/* Form Outline - RTL */
html[dir="rtl"] .form-group.material-outlined .form-outline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    pointer-events: none;
}

/* Placeholder for empty inputs - RTL */
html[dir="rtl"] .form-group.material-outlined .form-control::placeholder {
    color: transparent;
}

/* Hover Effects - RTL */
html[dir="rtl"] .form-group.material-outlined .form-control:hover:not(:focus):not(:disabled) {
    border-color: #bdbdbd;
}

/* Dark Theme Support - RTL */
@media (prefers-color-scheme: dark) {
    html[dir="rtl"] .form-group.material-outlined .form-control {
        background-color: #1e1e1e;
        border-color: #424242;
        color: #dd5e5e;
    }
    
    html[dir="rtl"] .form-group.material-outlined label {
        color: #bdbdbd;
        background-color: #1e1e1e !important;
    }
    
    html[dir="rtl"] .form-group.material-outlined .form-control:focus + label,
    html[dir="rtl"] .form-group.material-outlined .form-control:not(:placeholder-shown) + label,
    html[dir="rtl"] .form-group.material-outlined .form-control:valid + label {
        background-color: #1e1e1e !important;
        color: #64b5f6;
    }
    
    html[dir="rtl"] .form-group.material-outlined .form-control:focus {
        border-color: #64b5f6;
        box-shadow: 0 0 0 1px #64b5f6;
    }
}

/* ========================================
   CARD PAYMENT MODAL STYLES - RTL
======================================== */

/* Fix for purchase buttons height issues */
.btn-purchase {
    height: auto !important;
    min-height: 44px;
    max-height: 50px;
    padding: 12px 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.3s ease;
    vertical-align: middle;
    line-height: 1.2;
}

.btn-purchase i {
    font-size: 1rem;
    margin: 0;
}

.btn-card, .btn-receipt, .btn-enroll {
    height: auto !important;
    min-height: 44px !important;
    max-height: 50px !important;
}

.mobile-purchase-btn {
    height: auto !important;
    min-height: 40px !important;
    max-height: 46px !important;
    padding: 10px 16px !important;
}

/* RTL Modal Structure */
.card-payment-modal {
    direction: rtl;
    z-index: 1055 !important;
}

.card-payment-modal .modal-dialog {
    max-width: 520px;
    margin: 1.75rem auto;
    direction: rtl;
}

.card-payment-modal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 80px var(--shadow-heavy, rgba(75, 30, 30, 0.25));
    overflow: hidden;
    background: var(--white, #ffffff);
    direction: rtl;
    position: relative;
}

/* RTL Modal Header */
.card-payment-modal .modal-header {
    background: var(--primary-gradient, linear-gradient(135deg, #4b1e1e 0%, #6b2c2c 100%));
    border: none;
    padding: 20px 25px;
    position: relative;
    overflow: hidden;
    direction: rtl;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-payment-modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='20' cy='20' r='1'/%3E%3C/g%3E%3C/svg%3E") repeat;
    z-index: 1;
}

.card-payment-modal .modal-title {
    color: var(--white, #ffffff);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    z-index: 2;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    direction: rtl;
    text-align: right;
    order: 2;
    flex: 1;
}

.card-payment-modal .modal-title i {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-left: 10px;
    margin-right: 0;
}

.card-payment-modal .btn-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.8rem;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
    order: 1;
    margin-left: 10px;
    cursor: pointer;
}

.card-payment-modal .btn-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white, #ffffff);
    transform: rotate(90deg);
}

.card-payment-modal .btn-close:before {
    content: "×";
    font-size: 1.8rem;
    line-height: 1;
}

/* RTL Modal Body */
.card-payment-modal .modal-body {
    padding: 35px 25px;
    background: var(--white, #ffffff);
    direction: rtl;
    text-align: right;
    position: relative;
}

.payment-card-icon {
    text-align: center;
    margin-bottom: 25px;
}

.payment-card-icon .icon-wrapper {
    display: inline-flex;
    width: 70px;
    height: 70px;
    background: var(--primary-gradient, linear-gradient(135deg, #4b1e1e 0%, #6b2c2c 100%));
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 8px 25px var(--shadow-medium, rgba(75, 30, 30, 0.2));
    animation: pulse 2s infinite;
}

.payment-card-icon .icon-wrapper i {
    color: var(--white, #ffffff);
    font-size: 1.8rem;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.payment-card-icon h6 {
    color: var(--primary-color, #4b1e1e);
    font-weight: 600;
    margin: 0 0 5px;
    font-size: 1rem;
}

.payment-card-icon .subtitle {
    color: var(--text-light, #666666);
    font-size: 0.85rem;
    margin: 0;
}

/* RTL Input Group */
.card-input-group {
    position: relative;
    margin-bottom: 20px;
    direction: rtl;
    text-align: right;
}

.card-input-group label {
    color: var(--primary-color, #4b1e1e);
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 0.9rem;
    text-align: right;
    direction: rtl;
}

.card-input-group label i {
    color: var(--secondary-color, #e39823);
    margin-left: 6px;
    margin-right: 0;
}

.card-number-input {
    position: relative;
    direction: rtl;
}

.card-number-input .form-control {
    border: 2px solid var(--border-color, #e5e5e5);
    border-radius: 10px;
    padding: 15px 45px 15px 15px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1px;
    background: var(--light-bg, #f8f9fa);
    transition: all 0.3s ease;
    color: var(--text-dark, #333333);
    height: auto;
    min-height: 48px;
    text-align: center;
    direction: ltr;
}

.card-number-input .form-control:focus {
    border-color: var(--primary-color, #4b1e1e);
    box-shadow: 0 0 0 3px var(--shadow-light, rgba(75, 30, 30, 0.1));
    background: var(--white, #ffffff);
    outline: none;
}

.card-number-input .form-control.is-valid {
    border-color: #28a745;
    background: #f8fff8;
}

.card-number-input .form-control.is-invalid {
    border-color: #dc3545;
    background: #fff8f8;
}

.card-number-input .input-icon {
    position: absolute;
    left: 15px;
    right: auto;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color, #e39823);
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
}

.card-validation-feedback {
    margin-top: 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    direction: rtl;
    text-align: right;
}

.card-validation-feedback.valid {
    color: #28a745;
}

.card-validation-feedback.invalid {
    color: #dc3545;
}

.card-validation-feedback i {
    font-size: 0.85rem;
}

/* RTL Modal Footer - Single Button Design */
.card-payment-modal .modal-footer {
    background: var(--light-bg, #f8f9fa);
    border: none;
    padding: 20px 25px;
    direction: rtl;
    text-align: center;
}

.modal-purchase-btn {
    background: var(--secondary-gradient, linear-gradient(135deg, #e39823 0%, #f4a940 100%));
    color: var(--white, #ffffff);
    border: none;
    border-radius: 12px;
    padding: 14px 35px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    height: auto !important;
    min-height: 48px !important;
    max-height: 52px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    direction: rtl;
    white-space: nowrap;
    line-height: 1.2;
    vertical-align: middle;
    box-shadow: 0 4px 15px rgba(227, 152, 35, 0.3);
    cursor: pointer;
    min-width: 200px;
}

.modal-purchase-btn:hover {
    background: var(--primary-gradient, linear-gradient(135deg, #4b1e1e 0%, #6b2c2c 100%));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium, rgba(75, 30, 30, 0.25));
    color: var(--white, #ffffff);
}

.modal-purchase-btn:disabled {
    background: var(--text-muted, #888888);
    transform: none;
    box-shadow: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-purchase-btn i {
    font-size: 1rem;
    margin-left: 8px;
    margin-right: 0;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Fix modal backdrop and positioning */
.card-payment-modal.modal {
    z-index: 1055 !important;
}

.card-payment-modal .modal-backdrop {
    z-index: 1050 !important;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-open {
    overflow: hidden !important;
}

.modal-backdrop.show {
    opacity: 0.6 !important;
}

/* Responsive Design for RTL */
@media (max-width: 576px) {
    .card-payment-modal .modal-dialog {
        margin: 0.5rem;
        max-width: none;
    }
    
    .card-payment-modal .modal-header {
        padding: 15px 20px;
    }
    
    .card-payment-modal .modal-body {
        padding: 25px 20px;
    }
    
    .card-payment-modal .modal-footer {
        padding: 15px 20px;
    }
    
    .modal-purchase-btn {
        width: 100%;
        min-width: auto;
        max-width: none;
        padding: 12px 20px;
        min-height: 44px !important;
        max-height: 48px !important;
    }
    
    .btn-purchase {
        min-height: 40px !important;
        max-height: 46px !important;
        padding: 10px 16px !important;
    }
    
    .payment-card-icon .icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .payment-card-icon .icon-wrapper i {
        font-size: 1.5rem;
    }
}

/* Animation for modal entrance - RTL */
.card-payment-modal.fade .modal-dialog {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translate(0, -30px) scale(0.98);
}

.card-payment-modal.show .modal-dialog {
    transform: translate(0, 0) scale(1);
}

.user-profile-dropdown {
    position: relative;
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--header-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.profile-img:hover {
    transform: scale(1.1);
    border-color: var(--header-primary);
}

.profile-menu {
    position: absolute;
    top: 100%;
    left: 0; /* RTL: left instead of right */
    background: #ffffff !important; /* Solid white background */
    min-width: 250px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(75, 30, 30, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid rgba(75, 30, 30, 0.1);
    margin-top: 8px;
    transform-origin: top left; /* RTL: top left instead of top right */
    backdrop-filter: blur(10px);
}

.user-profile-dropdown:hover .profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333333 !important;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 8px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.profile-menu-item:hover {
    background: #f8f9fa !important; /* Light background on hover */
    color: #4b1e1e !important;
    transform: translateX(-5px); /* RTL: move left instead of right */
    box-shadow: 0 2px 8px rgba(75, 30, 30, 0.1);
}

.profile-menu-item:active {
    background: #e9ecef !important;
    transform: translateX(-3px);
}

.profile-menu-item i {
    width: 20px;
    margin-left: 12px; /* RTL: margin-left instead of margin-right */
    margin-right: 0;
    color: var(--header-secondary);
}

html[dir="rtl"] .user-profile-dropdown .profile-menu {
    right: auto;
    left: 0;
    transform-origin: top left;
}

/* Profile dropdown animation */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

html[dir="rtl"] .header-action-btn .mega-menu {
    right: auto;
    left: 0;
}

@media (max-width: 991.98px) {
    html[dir="rtl"] .d-flex.align-items-center:last-child {
        margin-right: 10px;
    }
    
    html[dir="rtl"] .dropdown-menu {
        right: auto;
        left: 0;
    }
    
}

@media (max-width: 991.98px) {
    html[dir="rtl"] .top-bar-unified {
        display: none !important;
    }
}

/* ========== MEGA MENU DETAILED STYLES ========== */
.mega-menu-item {
    position: relative;
}

.mega-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--header-text-dark) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 8px;
}

.mega-menu-link:hover {
    background: var(--header-hover-bg);
    color: var(--header-primary) !important;
    transform: translateX(-5px); /* RTL: move left instead of right */
}

.mega-menu-link .icons {
    width: 24px;
    margin-left: 12px; /* RTL: margin-left instead of margin-right */
    color: #ff6b35; /* Orange color for mega menu icons */
}

.mega-menu-link .text-cat {
    flex: 1;
    font-weight: 500;
}

.mega-menu-link .has-sub-category {
    color: var(--header-secondary);
    transition: transform 0.3s ease;
}

.mega-menu-link:hover .has-sub-category {
    transform: translateX(-3px); /* RTL: move left instead of right */
}

.sub-mega-menu {
    position: absolute;
    top: 0;
    right: 100%; /* RTL: right instead of left */
    background: #ffffff !important; /* Explicit white background */
    min-width: 250px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(75, 30, 30, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px); /* RTL: negative value */
    transition: all 0.3s ease;
    border: 1px solid rgba(75, 30, 30, 0.1);
    margin-right: 8px; /* RTL: margin-right instead of margin-left */
    z-index: 1002; /* Ensure sub-menus appear above main menus */
}

.mega-menu-item:hover .sub-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Multi-level mega menu support - up to 4 levels */
.sub-mega-menu .mega-menu-item {
    position: relative;
}

.sub-mega-menu .sub-mega-menu {
    top: 0;
    right: 100%;
    margin-right: 8px;
    z-index: 1003;
}

.sub-mega-menu .sub-mega-menu .sub-mega-menu {
    z-index: 1004;
}

.sub-mega-menu .sub-mega-menu .sub-mega-menu .sub-mega-menu {
    z-index: 1005;
}

/* Style for nested menu icons */
.sub-mega-menu .mega-menu-link .icons {
    color: #ff6b35; /* Orange for all levels */
}

.sub-mega-menu .mega-menu-link:hover {
    background: rgba(255, 107, 53, 0.1); /* Light orange hover */
    color: #ff6b35 !important;
}

/* ========== SOCIAL ICONS STYLES ========== */
/* Enhanced Social Icons */
.social-icons-container {
    gap: 8px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-icon:focus {
    color: #fff !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* ========== NOTIFICATION SYSTEM STYLES ========== */
.notifications {
    position: relative !important;
}

.notification-btn {
    background: none !important;
    border: none !important;
    color: var(--primary-color) !important;
    font-size: 18px !important;
    cursor: pointer !important;
    padding: 10px !important;
    border-radius: 50% !important;
    transition: var(--transition) !important;
    position: relative !important;
    overflow: hidden !important;
}

.notification-btn:hover {
    background: rgba(75, 30, 30, 0.1) !important;
}

.notification-count {
    position: absolute !important;
    top: 2px !important;
    left: 2px !important; /* RTL: left instead of right */
    background: #dc3545 !important;
    color: var(--white) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 2px 5px !important;
    border-radius: 10px !important;
    min-width: 16px !important;
    text-align: center !important;
    line-height: 1 !important;
}

.notification-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important; /* RTL: left instead of right */
    background: #ffffff !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
    min-width: 350px !important;
    max-width: 400px !important;
    z-index: 9999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) scale(0.95) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    max-height: 450px !important;
    overflow: hidden !important;
    backdrop-filter: blur(20px) !important;
    margin-top: 12px !important;
}

.notification-dropdown.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

.notification-header {
    background: linear-gradient(135deg, #4b1e1e 0%, #6b2d2d 100%) !important;
    color: white !important;
    padding: 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: none !important;
}

.notification-header h6 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: white !important;
}

.notification-header .btn {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 12px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.notification-header .btn:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.05) !important;
}

.notification-body {
    max-height: 350px !important;
    overflow-y: auto !important;
    padding: 0 !important;
    background: #ffffff !important;
}

.notification-body::-webkit-scrollbar {
    width: 4px !important;
}

.notification-body::-webkit-scrollbar-track {
    background: #f8f9fa !important;
}

.notification-body::-webkit-scrollbar-thumb {
    background: #dee2e6 !important;
    border-radius: 2px !important;
}

.notification-body::-webkit-scrollbar-thumb:hover {
    background: #adb5bd !important;
}

.notification-item {
    display: flex !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #f1f3f4 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    background: white !important;
}

.notification-item:hover {
    background: #f8f9fa !important;
    transform: translateX(-3px) !important; /* RTL: move left */
}

.notification-item.unread {
    background: linear-gradient(90deg, rgba(75, 30, 30, 0.03) 0%, rgba(255, 255, 255, 1) 20%) !important;
    border-left: 4px solid #4b1e1e !important; /* RTL: left border */
}

.notification-item.unread::before {
    content: '' !important;
    position: absolute !important;
    right: 16px !important; /* RTL: right side */
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 8px !important;
    height: 8px !important;
    background: #dc3545 !important;
    border-radius: 50% !important;
    animation: pulse 2s infinite !important;
}

@keyframes pulse {
    0% { opacity: 1; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.5; transform: translateY(-50%) scale(1.2); }
    100% { opacity: 1; transform: translateY(-50%) scale(1); }
}

.notification-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #4b1e1e 0%, #6b2d2d 100%) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 16px !important; /* RTL: left instead of right */
    margin-right: 0 !important;
    flex-shrink: 0 !important;
}

.notification-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.notification-title {
    font-weight: 600 !important;
    font-size: 14px !important;
    color: var(--text-dark) !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.3 !important;
}

.notification-text {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    margin: 0 0 4px 0 !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.notification-time {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    opacity: 0.8 !important;
}

/* Mobile Profile and Login Button Improvements */
.btn-outline-primary {
    border-radius: 25px !important;
    font-weight: 600 !important;
    backdrop-filter: blur(10px) !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--header-accent) !important;
    color: var(--header-accent) !important;
    transition: all 0.3s ease !important;
}

.btn-outline-primary:hover {
    background: var(--header-accent) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(227, 152, 35, 0.3) !important;
}

/* My Lectures Mobile Button */
.my-lectures-mobile {
    font-size: 12px !important;
    padding: 6px 12px !important;
    white-space: nowrap !important;
    min-height: 32px !important;
}

/* Mobile Profile Dropdown Improvements */
.dropdown-menu {
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    background: var(--glass-bg) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
}

.dropdown-item {
    color: var(--header-text) !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
    transition: all 0.3s ease !important;
}

.dropdown-item:hover {
    background: var(--header-accent) !important;
    color: white !important;
}

/* Modern Language Switcher - Portal Style */
.language-switcher .language-btn {
    background: var(--glass-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    padding: 8px 16px !important;
    color: var(--header-text) !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
    min-height: 40px !important;
}

.language-switcher .language-btn:hover,
.language-switcher .language-btn:focus,
.language-switcher .language-btn.show {
    background: var(--header-accent) !important;
    color: white !important;
    border-color: var(--header-accent) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 20px rgba(227, 152, 35, 0.3) !important;
}

.language-display {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.language-flag {
    width: 20px !important;
    height: 15px !important;
    border-radius: 3px !important;
    object-fit: cover !important;
}

.language-text {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: white !important;
}

.language-arrow {
    font-size: 12px !important;
    transition: transform 0.3s ease !important;
}

.language-btn.show .language-arrow {
    transform: rotate(180deg) !important;
}

.language-dropdown-menu {
    background: var(--glass-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(15px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    padding: 8px !important;
    margin-top: 8px !important;
    min-width: 180px !important;
    right: 0 !important;
    left: auto !important;
}

.language-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    margin: 2px 0 !important;
    color: var(--header-text) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.language-item:hover {
    background: rgba(227, 152, 35, 0.1) !important;
    color: var(--header-accent) !important;
}

.language-item.active {
    background: var(--header-accent) !important;
    color: white !important;
}

.language-content {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.language-name {
    font-size: 14px !important;
    font-weight: 500 !important;
}

.language-check {
    color: currentColor !important;
    font-size: 14px !important;
}

/* RTL Language Switcher Adjustments */
[dir="rtl"] .language-display {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .language-content {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .language-dropdown-menu {
    text-align: right !important;
}

/* News Bar Improvements */
.news-close-btn {
    background: none !important;
    border: none !important;
    color: white !important;
    font-size: 16px !important;
    padding: 8px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.news-close-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.1) !important;
}

.news-close-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
}

/* ========== RTL MATERIAL MOBILE MENU STYLES ========== */
/* RTL adjustments for Material Design mobile menu */

html[dir="rtl"] .mm-link {
    text-align: right !important;
}

html[dir="rtl"] .mm-link:hover {
    transform: translateX(-4px) !important;
}

html[dir="rtl"] .mm-link i {
    margin-right: 0 !important;
    margin-left: 16px !important;
}

html[dir="rtl"] .mm-arrow {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html[dir="rtl"] .mm-badge {
    margin-left: 0 !important;
    margin-right: auto !important;
}

html[dir="rtl"] .mm-submenu-link {
    padding: 0.75rem 3rem 0.75rem 1.25rem !important;
    text-align: right !important;
}

html[dir="rtl"] .mm-submenu-link:hover {
    padding-right: 3.5rem !important;
    padding-left: 1.25rem !important;
}

html[dir="rtl"] .mm-submenu-link i {
    margin-right: 0 !important;
    margin-left: 12px !important;
}

/* RTL Mobile responsive adjustments */
@media (max-width: 576px) {
    html[dir="rtl"] .mm-submenu-link {
        padding-right: 2.5rem !important;
        padding-left: 1rem !important;
    }
    
    html[dir="rtl"] .mm-submenu-link:hover {
        padding-right: 3rem !important;
        padding-left: 1rem !important;
    }
}

/* ========== MOBILE HEADER BASE STYLES ========== */

/* Mobile Header Container - Fixed position for scroll */
.mobile-header-container {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--white, #ffffff);
    box-shadow: var(--header-shadow, 0 2px 20px rgba(0, 0, 0, 0.1));
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color, #e9ecef);
}

/* Mobile Header Main Structure */
.mobile-header {
    width: 100%;
    padding: 0;
    margin: 0;
    height: var(--header-height, 60px);
}

.mobile-header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 100%;
    gap: 15px;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 40px;
    height: 40px;
    order: 1;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--text-color, #333);
    margin: 3px 0;
    transition: 0.3s;
}

/* Mobile Logo - positioned next to menu icon */
.mobile-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    order: 2;
}

.mobile-logo a {
    display: inline-block;
}

.mobile-logo img {
    height: 35px;
    width: auto;
    max-width: none;
}

/* Mobile Actions - pushed to the right */
.mobile-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    order: 3;
}

/* Mobile Profile */
/* ========== MOBILE PROFILE DROPDOWN REDESIGN FOR RTL ========== */
.mobile-profile-dropdown {
    position: relative;
    z-index: 1060;
}

.mobile-profile-img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    object-fit: cover;
}

.mobile-profile-img:hover {
    transform: scale(1.05);
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(227, 152, 35, 0.2);
}

/* RTL Mobile Profile Dropdown Menu */
[dir="rtl"] .mobile-profile-menu {
    position: fixed !important;
    top: auto !important;
    left: 10px !important;
    right: auto !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 99999 !important;
    min-width: 280px !important;
    max-width: 90vw !important;
    background: var(--white) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-medium) !important;
    box-shadow: 0 10px 40px rgba(75, 30, 30, 0.15) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    overflow: hidden !important;
    font-family: 'Cairo', 'Tajawal', 'Amiri', Arial, sans-serif !important;
}

[dir="rtl"] .mobile-profile-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* RTL Mobile Profile Header */
[dir="rtl"] .mobile-profile-header {
    background: var(--primary-gradient) !important;
    padding: 20px !important;
    margin: 0 !important;
    border: none !important;
    color: var(--white) !important;
}

[dir="rtl"] .mobile-profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: rtl;
}

[dir="rtl"] .mobile-profile-header-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

[dir="rtl"] .mobile-profile-details h6 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
    color: var(--white) !important;
    text-align: right;
}

[dir="rtl"] .mobile-profile-details small {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 12px;
    text-align: right;
}

/* RTL Mobile Dropdown Items */
[dir="rtl"] .mobile-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 15px 20px !important;
    color: var(--text-dark) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all var(--transition-fast) !important;
    border: none !important;
    background: transparent !important;
    direction: rtl !important;
}

[dir="rtl"] .mobile-dropdown-item:hover,
[dir="rtl"] .mobile-dropdown-item:focus {
    background: var(--hover-bg) !important;
    color: var(--primary-color) !important;
    transform: translateX(-5px) !important;
}

[dir="rtl"] .mobile-dropdown-item i {
    width: 18px !important;
    text-align: center !important;
    color: var(--secondary-color) !important;
    font-size: 14px !important;
    margin-left: 8px !important;
    margin-right: 0 !important;
}

[dir="rtl"] .mobile-dropdown-item span {
    flex: 1 !important;
    text-align: right !important;
}

/* RTL Logout Item Special Styling */
[dir="rtl"] .mobile-logout-item {
    border-top: 1px solid var(--border-color) !important;
    color: #dc3545 !important;
}

[dir="rtl"] .mobile-logout-item:hover {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
    transform: translateX(-5px) !important;
}

[dir="rtl"] .mobile-logout-item i {
    color: #dc3545 !important;
}

/* RTL Dropdown Divider */
[dir="rtl"] .mobile-profile-menu .dropdown-divider {
    margin: 0 !important;
    border-color: var(--border-color) !important;
    opacity: 1 !important;
}

/* Additional RTL mobile profile styles continue with existing ones */

.mobile-profile-header-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
}

.mobile-profile-details h6 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
    color: var(--white, #ffffff);
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif !important;
}

.mobile-profile-details small {
    opacity: 0.9;
    font-size: 13px;
    color: var(--white, #ffffff);
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif !important;
}

.mobile-dropdown-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 20px !important;
    color: var(--text-color, #333) !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif !important;
}

.mobile-dropdown-item:hover {
    background: var(--background-light, #f8f9fa) !important;
    color: var(--primary-color, #4b1e1e) !important;
    padding-left: 25px !important;
}

.mobile-dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--primary-color, #4b1e1e);
    font-size: 16px;
}

.mobile-logout-item {
    color: var(--danger-color, #dc3545) !important;
}

.mobile-logout-item:hover {
    background: var(--danger-light, #f8d7da) !important;
    color: var(--danger-dark, #721c24) !important;
}

.mobile-logout-item i {
    color: var(--danger-color, #dc3545) !important;
}

/* Mobile My Lectures Button */
.mobile-lectures-container {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.mobile-lectures-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--secondary-color, #e39823);
    color: var(--white, #ffffff);
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif !important;
    box-shadow: 0 2px 8px rgba(227, 152, 35, 0.3);
}

.mobile-lectures-btn:hover {
    background: var(--primary-color, #4b1e1e);
    color: var(--white, #ffffff);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.mobile-lectures-btn i {
    font-size: 14px;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
    font-weight: 900 !important;
}

.mobile-lectures-btn span {
    font-weight: 600;
}

/* Mobile Login Button */
.mobile-login-container {
    display: flex;
    align-items: center;
}

.mobile-login-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: var(--primary-color, #4b1e1e);
    color: var(--white, #ffffff);
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-login-btn:hover {
    background: var(--primary-dark, #3a1616);
    color: var(--white, #ffffff);
    text-decoration: none;
    transform: translateY(-1px);
}

.mobile-login-btn i {
    font-size: 12px;
}

/* Mobile Offcanvas - RTL sliding from right */
.mobile-offcanvas {
    width: 280px !important;
    max-width: 80vw;
    font-family: 'Cairo', 'Tajawal', 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 2055 !important;
}

.mobile-offcanvas.show {
    transform: translateX(0);
}

.mobile-offcanvas.hiding {
    transform: translateX(-100%);
}

/* Mobile Offcanvas Backdrop - behind menu */
.offcanvas-backdrop {
    z-index: 1040 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

.mobile-offcanvas-header {
    background: var(--primary-gradient, linear-gradient(135deg, var(--primary-color, #4b1e1e), var(--primary-dark, #3a1616)));
    color: var(--white, #ffffff);
    border-bottom: none;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white, #ffffff);
}

.mobile-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mobile-user-details h6 {
    margin: 0;
    font-weight: 600;
    font-size: 16px;
    color: var(--white, #ffffff);
}

.mobile-user-details small {
    opacity: 0.8;
    font-size: 12px;
    color: var(--white, #ffffff);
}

.mobile-offcanvas-title {
    color: var(--white, #ffffff);
    margin: 0;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.mobile-close-btn {
    background: none;
    border: none;
    color: var(--white, #ffffff);
    font-size: 20px;
    padding: 5px;
    cursor: pointer;
}

/* Mobile Offcanvas Body */
.mobile-offcanvas-body {
    padding: 0;
    background: var(--background-light, #f8f9fa);
}

/* Mobile Auth Section */
.mobile-auth-section {
    padding: 20px;
    background: var(--white, #ffffff);
    border-bottom: 1px solid var(--border-color, #e9ecef);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-login {
    background: var(--primary-color, #4b1e1e);
    color: var(--white, #ffffff);
}

.mobile-login:hover {
    background: var(--primary-dark, #3a1616);
    color: var(--white, #ffffff);
    text-decoration: none;
}

.mobile-register {
    background: var(--success-color, #28a745);
    color: var(--white, #ffffff);
}

.mobile-register:hover {
    background: var(--success-dark, #1e7e34);
    color: var(--white, #ffffff);
    text-decoration: none;
}

/* Mobile Menu Items */
.mobile-menu-item {
    border-bottom: 1px solid var(--border-color, #e9ecef);
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    color: var(--text-color, #333);
    text-decoration: none;
    background: var(--white, #ffffff);
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-menu-link:hover {
    background: var(--background-light, #f8f9fa);
    color: var(--primary-color, #4b1e1e);
    text-decoration: none;
    padding-left: 25px;
}

.mobile-menu-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: var(--primary-color, #4b1e1e);
}

.mobile-menu-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
    color: var(--text-muted, #6c757d);
}

.mobile-category-toggle[aria-expanded="true"] .mobile-menu-arrow,
.mobile-category-toggle.expanded .mobile-menu-arrow {
    transform: rotate(180deg);
}

/* Mobile Submenu */
.mobile-submenu {
    background: var(--background-light, #f8f9fa);
    overflow: hidden;
    transition: height 0.3s ease;
    height: 0;
}

.mobile-submenu.show {
    height: auto;
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px 12px 50px;
    color: var(--text-muted, #666);
    text-decoration: none;
    background: var(--background-light, #f8f9fa);
    transition: all 0.2s ease;
    font-size: 14px;
}

.mobile-submenu-link:hover {
    background: var(--border-color, #e9ecef);
    color: var(--primary-color, #4b1e1e);
    text-decoration: none;
    padding-left: 55px;
}

.mobile-submenu-link i {
    width: 16px;
    text-align: center;
    font-size: 14px;
    color: var(--primary-color, #4b1e1e);
}

/* Mobile Menu Divider */
.mobile-menu-divider {
    height: 8px;
    background: var(--border-color, #e9ecef);
}

/* Mobile Logout */
.mobile-logout {
    color: var(--danger-color, #dc3545) !important;
}

.mobile-logout:hover {
    background: var(--danger-light, #f8d7da) !important;
    color: var(--danger-dark, #721c24) !important;
}

/* Body padding to account for fixed header */
body.mobile-header-active {
    padding-top: var(--header-height, 60px) !important;
}

/* Hide desktop header completely on mobile */
@media (max-width: 991.98px) {
    .modern-header {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .modern-header .d-lg-none {
        display: none !important;
    }
    
    /* Ensure mobile header is visible and properly positioned on mobile */
    .mobile-header-container {
        display: block !important;
        visibility: visible !important;
    }
}

/* Safety: ensure mobile header is hidden on desktop and modern header is hidden on mobile (RTL) */
@media (min-width: 992px) {
    .mobile-header-container { 
        display: none !important; 
        visibility: hidden !important;
    }
    
    .modern-header {
        display: block !important;
        visibility: visible !important;
    }
}

/* Ensure modern header is completely hidden on mobile and tablets */
@media (max-width: 991.98px) {
    .modern-header {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
}

/* Cairo Font for Mobile Header Text Only (Excluding Icons) */
.mobile-header-container span,
.mobile-header-container a:not(.mobile-login-btn i):not(.fas):not(.fa):not(.far):not(.fab),
.mobile-header-container button:not(.mobile-menu-toggle):not(.mobile-close-btn),
.mobile-offcanvas-title,
.mobile-user-details h6,
.mobile-user-details small,
.mobile-auth-btn span,
.mobile-menu-link span,
.mobile-submenu-link span,
.mobile-login-btn span,
.dropdown-item:not(i) {
    font-family: 'Cairo', 'Tajawal', 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 500 !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Preserve FontAwesome Icons - Higher specificity */
.mobile-header-container i,
.mobile-offcanvas i,
.mobile-menu-link i,
.mobile-submenu-link i,
.mobile-auth-btn i,
.mobile-login-btn i,
.dropdown-item i,
i.fas, i.fa, i.far, i.fab,
.fas, .fa, .far, .fab {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Specific weight for regular icons */
.far,
i.far {
    font-weight: 400 !important;
}

/* Specific family for brand icons */
.fab,
i.fab {
    font-family: 'Font Awesome 6 Brands' !important;
    font-weight: 400 !important;
}

/* Responsive adjustments for very small screens */
@media (max-width: 480px) {
    .mobile-offcanvas {
        width: 90vw !important;
    }
    
    .mobile-header-content {
        padding: 10px 12px;
    }
    
    .mobile-logo img {
        height: 30px;
    }
    
    .mobile-login-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ========== MOBILE HEADER RTL STYLES ========== */

/* RTL Support for Mobile Header - Right-to-left sliding */
[dir="rtl"] .mobile-offcanvas {
    left: auto !important;
    right: 0 !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease-in-out !important;
}

[dir="rtl"] .mobile-offcanvas.show {
    transform: translateX(0) !important;
}

[dir="rtl"] .mobile-offcanvas.hiding {
    transform: translateX(100%) !important;
}

/* RTL Header Layout */
[dir="rtl"] .mobile-header-content {
    direction: rtl;
    justify-content: flex-start;
    flex-direction: row-reverse;
}

[dir="rtl"] .mobile-actions {
    margin-left: 0;
    margin-right: auto;
    order: 1;
}

[dir="rtl"] .mobile-logo {
    order: 2;
}

[dir="rtl"] .mobile-menu-toggle {
    order: 3;
}

/* RTL Offcanvas Body - Fixed positioning */
[dir="rtl"] .mobile-offcanvas-body {
    position: relative;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* RTL Menu Container - Prevent movement */
[dir="rtl"] .mobile-menu-item {
    position: relative;
    border-bottom: 1px solid var(--border-color, #e9ecef);
}

/* RTL Menu Link - Fixed positioning with proper alignment */
[dir="rtl"] .mobile-menu-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-color, #333);
    text-decoration: none;
    background: var(--white, #ffffff);
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
    padding: 16px 20px;
    direction: rtl;
    text-align: right !important;
    justify-content: flex-start;
    flex-direction: row-reverse;
}

/* RTL Menu Link Span Text Alignment */
[dir="rtl"] .mobile-menu-link span {
    text-align: right !important;
    flex: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

[dir="rtl"] .mobile-menu-link:hover {
    padding-left: 20px;
    padding-right: 25px;
    position: relative;
    transform: none !important;
    background: var(--background-light, #f8f9fa);
    color: var(--primary-color, #4b1e1e);
    text-align: right !important;
}

[dir="rtl"] .mobile-submenu-link {
    padding-left: 20px;
    padding-right: 50px;
    position: relative;
    transition: all 0.2s ease;
    direction: rtl;
    text-align: right !important;
    justify-content: flex-start;
    flex-direction: row-reverse;
}

/* RTL Submenu Link Span Text Alignment */
[dir="rtl"] .mobile-submenu-link span {
    text-align: right !important;
    flex: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

[dir="rtl"] .mobile-submenu-link:hover {
    padding-left: 20px;
    padding-right: 55px;
    position: relative;
    transform: none !important;
    background: var(--border-color, #e9ecef);
    color: var(--primary-color, #4b1e1e);
    text-align: right !important;
}

[dir="rtl"] .mobile-menu-arrow {
    margin-left: 0;
    margin-right: auto;
    order: -1;
}

/* RTL Menu Icons Alignment */
[dir="rtl"] .mobile-menu-link i {
    text-align: center;
    color: var(--primary-color, #4b1e1e);
    order: 1;
    margin-left: 0;
    margin-right: 10px;
    flex-shrink: 0;
    width: 20px;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
    font-weight: 900 !important;
}

[dir="rtl"] .mobile-submenu-link i {
    text-align: center;
    color: var(--primary-color, #4b1e1e);
    order: 1;
    margin-left: 0;
    margin-right: 10px;
    flex-shrink: 0;
    width: 16px;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
    font-weight: 900 !important;
}

/* RTL User Info Section */
[dir="rtl"] .mobile-user-info {
    direction: rtl;
    text-align: right;
    flex-direction: row-reverse;
}

[dir="rtl"] .mobile-user-details {
    text-align: right;
}

[dir="rtl"] .mobile-user-details h6,
[dir="rtl"] .mobile-user-details small {
    text-align: right;
    font-family: 'Cairo', 'Tajawal', 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 500 !important;
}

/* RTL Offcanvas Title */
[dir="rtl"] .mobile-offcanvas-title {
    text-align: right;
    flex-direction: row-reverse;
    justify-content: space-between;
    font-family: 'Cairo', 'Tajawal', 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 600 !important;
}

/* RTL Dropdown Menu Positioning */
[dir="rtl"] .mobile-profile-dropdown .dropdown-menu {
    right: auto !important;
    left: 0 !important;
    text-align: right;
    transform-origin: top right;
}

[dir="rtl"] .mobile-profile-info {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .mobile-profile-details {
    text-align: right;
}

[dir="rtl"] .mobile-dropdown-item {
    text-align: right;
    flex-direction: row-reverse;
    justify-content: flex-start;
    gap: 12px;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif !important;
    font-weight: 500 !important;
}

[dir="rtl"] .mobile-dropdown-item:hover {
    padding-left: 20px !important;
    padding-right: 25px !important;
}

[dir="rtl"] .mobile-dropdown-item i {
    margin-right: 0 !important;
    margin-left: 8px !important;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
    font-weight: 900 !important;
}

/* RTL My Lectures Button */
[dir="rtl"] .mobile-lectures-container {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .mobile-lectures-btn {
    flex-direction: row-reverse;
    gap: 6px;
    font-family: 'Cairo', 'Tajawal', 'Amiri', sans-serif !important;
    font-weight: 500 !important;
}

[dir="rtl"] .mobile-lectures-btn i {
    margin-right: 0 !important;
    margin-left: 6px !important;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
    font-weight: 900 !important;
}

/* RTL Mobile Login Button */
[dir="rtl"] .mobile-login-btn {
    flex-direction: row-reverse;
    gap: 5px;
    font-family: 'Cairo', 'Tajawal', 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 500 !important;
}

[dir="rtl"] .mobile-login-btn i {
    margin-right: 0 !important;
    margin-left: 5px !important;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
    font-weight: 900 !important;
}

/* RTL Bootstrap Spacing Overrides */
[dir="rtl"] .mobile-header .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .mobile-header .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

[dir="rtl"] .mobile-offcanvas .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .mobile-offcanvas .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

/* RTL Menu Icons Alignment */
[dir="rtl"] .mobile-menu-link i {
    text-align: center;
    color: var(--primary-color, #4b1e1e);
}

[dir="rtl"] .mobile-submenu-link i {
    text-align: center;
    color: var(--primary-color, #4b1e1e);
}

/* RTL Auth Buttons */
[dir="rtl"] .mobile-auth-btn {
    flex-direction: row-reverse;
    text-align: right;
    font-family: 'Cairo', 'Tajawal', 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 500 !important;
}

[dir="rtl"] .mobile-auth-btn i {
    margin-right: 0 !important;
    margin-left: 10px !important;
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome' !important;
    font-weight: 900 !important;
}

/* RTL Menu Items Font */
[dir="rtl"] .mobile-menu-link {
    font-family: 'Cairo', 'Tajawal', 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 500 !important;
}

[dir="rtl"] .mobile-submenu-link {
    font-family: 'Cairo', 'Tajawal', 'Amiri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-weight: 500 !important;
}

/* RTL Close Button */
[dir="rtl"] .mobile-close-btn {
    order: -1;
}

/* RTL Mobile Auth Buttons */
[dir="rtl"] .mobile-auth-btn {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .mobile-auth-btn i {
    margin-right: 0 !important;
    margin-left: 10px !important;
}

/* RTL Mobile Menu Items */
[dir="rtl"] .mobile-menu-link {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .mobile-menu-link i {
    margin-right: 0 !important;
    margin-left: 15px !important;
}

[dir="rtl"] .mobile-submenu-link {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .mobile-submenu-link i {
    margin-right: 0 !important;
    margin-left: 15px !important;
}

/* RTL Close Button */
[dir="rtl"] .mobile-close-btn {
    margin-left: 0;
    margin-right: auto;
}

/* ========== MOBILE FOOTER LAYOUT FOR RTL ========== */
/* Mobile Footer Layout: Main Sections and Platform Overview in same row, Join Us centered below */
@media (max-width: 991.98px) {
    [dir="rtl"] .modern-footer .row {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    
    /* Logo section stays first and full width */
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(1) {
        order: 1;
        width: 100%;
        margin-bottom: 30px;
        flex: 0 0 100%;
    }
    
    /* Create a wrapper for the two middle columns */
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(2),
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(4) {
        order: 2;
        width: 50%;
        flex: 0 0 50%;
        padding-left: 10px;
        padding-right: 10px;
        display: inline-block;
        vertical-align: top;
    }
    
    /* Main Sections - Left side */
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(2) {
        border-left: 1px solid rgba(255,255,255,0.1);
    }
    
    /* Platform Overview - Right side */
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(4) {
        border-right: 1px solid rgba(255,255,255,0.1);
    }
    
    /* Join Us - Centered below the two columns */
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(3) {
        order: 3;
        width: 100%;
        flex: 0 0 100%;
        text-align: center;
        margin-top: 30px;
        clear: both;
    }
    
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(3) .footer-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(3) .footer-title {
        text-align: center;
    }
    
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(3) .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        max-width: 300px;
    }
    
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(3) .join-btn {
        min-width: 250px;
        text-align: center;
        justify-content: center;
    }
}

/* For very small screens, stack all columns */
@media (max-width: 576px) {
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(2),
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(4) {
        width: 100%;
        margin-bottom: 20px;
    }
    
    [dir="rtl"] .modern-footer .col-lg-3:nth-child(3) .join-btn {
        min-width: 200px;
    }
}

/* ========== RTL MOBILE PROFILE DROPDOWN POSITIONING AND ANIMATIONS ========== */

/* RTL Dropdown Backdrop and Positioning Safety */
[dir="rtl"] .mobile-profile-dropdown-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1065 !important;
    background: transparent !important;
    pointer-events: none !important;
}

/* Ensure RTL dropdown is always on top */
[dir="rtl"] .mobile-profile-menu {
    position: fixed !important;
    z-index: 99999 !important;
}

/* RTL Mobile Header Z-Index Management */
[dir="rtl"] .mobile-header-container {
    position: sticky !important;
    z-index: 1250 !important;
}

/* RTL Additional Safety for Dropdown Positioning */
@media (max-width: 991.98px) {
    [dir="rtl"] .mobile-profile-menu.show {
        position: fixed !important;
        z-index: 99999 !important;
        top: auto !important;
        transform: translateY(0) !important;
    }
    
    [dir="rtl"] .mobile-profile-dropdown {
        z-index: 1061 !important;
    }
    
    /* RTL Enhanced animations for mobile */
    [dir="rtl"] .mobile-profile-menu:not(.show) {
        transform: translateY(-15px) scale(0.95) !important;
        opacity: 0 !important;
    }
    
    [dir="rtl"] .mobile-profile-menu.show {
        transform: translateY(0) scale(1) !important;
        opacity: 1 !important;
        animation: dropdownSlideInRTL 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    }
}

/* RTL Dropdown Animation Keyframes */
@keyframes dropdownSlideInRTL {
    0% {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* RTL Mobile Profile Menu Item Animations */
[dir="rtl"] .mobile-dropdown-item {
    position: relative !important;
    overflow: hidden !important;
}

[dir="rtl"] .mobile-dropdown-item::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    right: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(227, 152, 35, 0.1), transparent) !important;
    transition: right 0.5s ease !important;
    pointer-events: none !important;
}

[dir="rtl"] .mobile-dropdown-item:hover::before {
    right: 100% !important;
}

/* RTL Profile Image Hover Animation */
[dir="rtl"] .mobile-profile-img {
    position: relative !important;
    overflow: hidden !important;
}

[dir="rtl"] .mobile-profile-img::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: radial-gradient(circle, rgba(227, 152, 35, 0.2) 0%, transparent 70%) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
    border-radius: 50% !important;
}

.mobile-profile-img:hover::after {
    opacity: 1 !important;
}

[dir="rtl"] .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #4b1e1e;
    --bs-btn-border-color: #4b1e1e;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #2c0909;
    --bs-btn-hover-border-color: #4b1e1e;
    --bs-btn-focus-shadow-rgb: 49,132,253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #4b1e1e;
    --bs-btn-active-border-color: #4b1e1e;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #4b1e1e;
    --bs-btn-disabled-border-color: #4b1e1e;
}