/* ============================================================
   Wissam Trader - Main Stylesheet
   Colors: Gold #C9A84C / Dark Red #8B0000 / Dark BG #0D0D0D
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800;900&family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS Variables ---- */
:root {
    --gold: #C9A84C;
    --gold-light: #E8C96A;
    --gold-dark: #A07830;
    --gold-gradient: linear-gradient(135deg, #C9A84C 0%, #E8C96A 50%, #A07830 100%);
    --burgundy: #00356D;
    --burgundy-light: #0050A4;
    --burgundy-dark: #00264D;
    --dark: #0D0D0D;
    --dark-2: #141414;
    --dark-3: #1A1A1A;
    --dark-4: #222222;
    --dark-5: #2A2A2A;
    --dark-card: #161616;
    --text-primary: #F5F5F5;
    --text-secondary: #CCCCCC;
    --text-muted: #888888;
    --border: rgba(201, 168, 76, 0.2);
    --border-strong: rgba(201, 168, 76, 0.4);
    --shadow: 0 4px 20px rgba(0,0,0,0.5);
    --shadow-gold: 0 4px 20px rgba(201, 168, 76, 0.2);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --font-ar: 'Cairo', 'Tajawal', sans-serif;
    --font-en: 'Montserrat', sans-serif;
}


/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark);
    color: var(--text-primary);
    font-family: var(--font-ar);
    line-height: 1.7;
    overflow-x: hidden;
}

body.lang-en {
    font-family: var(--font-en);
    direction: ltr;
}

body.lang-ar {
    font-family: var(--font-ar);
    direction: rtl;
}

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

a:hover {
    color: var(--gold-light);
}

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

ul, ol {
    list-style: none;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--dark-2);
}
::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

.text-gold { color: var(--gold); }
.text-burgundy { color: var(--burgundy-light); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-start { text-align: start; }
.text-end { text-align: end; }

/* ---- Container ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Section ---- */
.section {
    padding: 80px 0;
}

.section-sm {
    padding: 50px 0;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--gold-gradient);
    margin: 15px auto;
    border-radius: 2px;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 2px 30px rgba(0,0,0,0.8);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 75px;
    padding: 0 30px;
    max-width: 1300px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.logo-tagline {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

.nav-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-switcher {
    display: flex;
    align-items: center;
    background: var(--dark-4);
    border: 1px solid var(--border);
    border-radius: 25px;
    overflow: hidden;
}

.lang-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    text-decoration: none;
}

.lang-btn.active {
    background: var(--gold-gradient);
    color: var(--dark);
    border-radius: 25px;
}

.lang-btn:hover:not(.active) {
    color: var(--gold);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn-gold {
    background: var(--gold-gradient);
    color: var(--dark);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 168, 76, 0.4);
    color: var(--dark);
}

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

.btn-outline-gold:hover {
    background: var(--gold-gradient);
    color: var(--dark);
    transform: translateY(-2px);
}

.btn-burgundy {
    background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-light) 100%);
    color: white;
}

.btn-burgundy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.4);
    color: white;
}

.btn-dark {
    background: var(--dark-4);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-dark:hover {
    background: var(--dark-5);
    border-color: var(--gold);
    color: var(--gold);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
}

.card-body {
    padding: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--dark-3);
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--dark-3);
}

/* Course Card */
.course-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.15);
    transform: translateY(-5px);
}

.course-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-thumbnail img {
    transform: scale(1.05);
}

.course-badge {
    position: absolute;
    top: 12px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

body.lang-ar .course-badge { right: 12px; }
body.lang-en .course-badge { left: 12px; }

.badge-free {
    background: linear-gradient(135deg, #1a5c1a, #2d8a2d);
    color: #90EE90;
    border: 1px solid #2d8a2d;
}

.badge-paid {
    background: var(--gold-gradient);
    color: var(--dark);
}

.course-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-level {
    font-size: 0.78rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.4;
}

.course-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.course-meta i {
    color: var(--gold);
    margin-inline-end: 4px;
}

.course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.course-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold);
}

.course-price.free {
    color: #4CAF50;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--dark-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
    background: var(--dark-4);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23C9A84C' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 40px;
}

body.lang-ar select.form-control {
    background-position: right 14px center;
    padding-right: 40px;
    padding-left: 16px;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-error {
    color: #ff6b6b;
    font-size: 0.82rem;
    margin-top: 5px;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-top: 5px;
}

/* ============================================================
   ALERTS & FLASH MESSAGES
   ============================================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #81C784;
}

.alert-error, .alert-danger {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #EF9A9A;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #FFE082;
}

.alert-info {
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--border);
    color: var(--gold);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 75px;
    background: var(--dark);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
    radial-gradient(
        ellipse at 20% 50%,
        rgb(0 53 109 / 20%) 0%,
        transparent 60%
    ),
    radial-gradient(
        ellipse at 80% 20%,
        rgb(0 53 109 / 10%) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 50% 80%,
        rgb(0 53 109 / 12%) 0%,
        transparent 50%
    );
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(201, 168, 76, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(201, 168, 76, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 0;
}

.hero-text {}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--border-strong);
    color: var(--gold);
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title .highlight {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-video-wrapper {
    position: relative;
}

.hero-video-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(201, 168, 76, 0.1);
    aspect-ratio: 16/9;
    background: var(--dark-3);
}

.hero-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.hero-video-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse, rgba(201, 168, 76, 0.15) 0%, transparent 70%);
    z-index: -1;
    border-radius: var(--radius-lg);
}

/* ============================================================
   STATS SECTION
   ============================================================ */
.stats-section {
    background: var(--dark-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold-gradient);
}

.stat-item:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: var(--shadow-gold);
}

.stat-icon {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 15px;
    display: block;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-section {
    background: var(--dark);
    padding: 80px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.testimonial-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 15px;
    font-size: 5rem;
    color: rgba(201, 168, 76, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

body.lang-ar .testimonial-card::before { right: 20px; }
body.lang-en .testimonial-card::before { left: 20px; }

.testimonial-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
}

.stars {
    display: flex;
    gap: 3px;
    margin-bottom: 15px;
    color: var(--gold);
    font-size: 1rem;
}

.testimonial-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.testimonial-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.testimonial-badge {
    font-size: 0.78rem;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Trustpilot-style header */
.trustpilot-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.trustpilot-score {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--dark-card);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius);
}

.trustpilot-rating {
    font-size: 2rem;
    font-weight: 900;
    color: var(--gold);
}

.trustpilot-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================
   COURSES GRID
   ============================================================ */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.courses-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 9px 22px;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    background: var(--dark-3);
    color: var(--text-muted);
    font-family: inherit;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--gold-gradient);
    color: var(--dark);
    border-color: transparent;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--dark-3);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.page-btn:hover,
.page-btn.active {
    background: var(--gold-gradient);
    color: var(--dark);
    border-color: transparent;
}

/* ============================================================
   COURSE DETAIL
   ============================================================ */
.course-detail-hero {
    background: var(--dark-2);
    border-bottom: 1px solid var(--border);
    padding: 80px 0 50px;
}

.course-detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 50px;
    align-items: start;
}

.course-detail-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.course-detail-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.course-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.meta-item i {
    color: var(--gold);
}

.purchase-card {
    background: var(--dark-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: sticky;
    top: 90px;
}

.purchase-card-video {
    aspect-ratio: 16/9;
    background: var(--dark-3);
    overflow: hidden;
}

.purchase-card-video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.purchase-card-body {
    padding: 25px;
}

.purchase-price {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 20px;
}

.purchase-price.free {
    color: #4CAF50;
}

.episodes-list {
    background: var(--dark-2);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: 40px;
}

.episodes-header {
    padding: 20px 25px;
    background: var(--dark-3);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.episode-item {
    display: flex;
    align-items: center;
    padding: 16px 25px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.episode-item:last-child {
    border-bottom: none;
}

.episode-item:hover:not(.locked) {
    background: rgba(201, 168, 76, 0.05);
}

.episode-item.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.episode-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--dark-4);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
    margin-inline-end: 15px;
}

.episode-info {
    flex: 1;
}

.episode-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 3px;
}

.episode-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.episode-status {
    margin-inline-start: 15px;
    font-size: 0.8rem;
}

.episode-status.preview {
    color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.episode-status.locked-icon {
    color: var(--text-muted);
}

.episode-status.completed {
    color: #4CAF50;
}

/* ============================================================
   VIDEO PLAYER PAGE
   ============================================================ */
.video-player-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    padding-top: 90px;
    min-height: 100vh;
}

.video-main {}

.video-wrapper {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 25px;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.video-nav {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.episodes-sidebar {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

/* ============================================================
   USER DASHBOARD
   ============================================================ */
.dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    padding-top: 90px;
    min-height: 100vh;
    padding-bottom: 60px;
}

.dashboard-sidebar {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    position: sticky;
    top: 90px;
    height: fit-content;
}

.user-profile-mini {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    margin-bottom: 12px;
}

.user-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.user-email {
    font-size: 0.82rem;
    color: var(--text-muted);
}

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

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-nav-link i {
    width: 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    background: rgba(201, 168, 76, 0.1);
    color: var(--gold);
}

.sidebar-nav-link:hover i,
.sidebar-nav-link.active i {
    color: var(--gold);
}

.sidebar-nav-link.logout {
    color: #ff6b6b;
    margin-top: 10px;
}

.sidebar-nav-link.logout i {
    color: #ff6b6b;
}

.sidebar-nav-link.logout:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.dashboard-content {}

.dashboard-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-title i {
    color: var(--gold);
}

/* Progress Bar */
.progress-bar-container {
    background: var(--dark-4);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-bar {
    height: 100%;
    background: var(--gold-gradient);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ============================================================
   PAYMENT PAGE
   ============================================================ */
.payment-page {
    padding-top: 90px;
    min-height: 100vh;
    padding-bottom: 60px;
}

.payment-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.payment-form-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.payment-form-header {
    background: var(--dark-3);
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.test-payment-badge {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #FFD700;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.payment-form-body {
    padding: 30px;
}

.card-input-group {
    position: relative;
}

.card-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

body.lang-ar .card-icon { right: 14px; }
body.lang-en .card-icon { left: 14px; }

body.lang-ar .card-input-group .form-control { padding-right: 45px; }
body.lang-en .card-input-group .form-control { padding-left: 45px; }

.order-summary-card {
    background: var(--dark-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: sticky;
    top: 90px;
}

.order-summary-header {
    background: var(--gold-gradient);
    padding: 18px 25px;
    color: var(--dark);
    font-weight: 700;
    font-size: 1rem;
}

.order-summary-body {
    padding: 25px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold);
}

.secure-badges {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--dark-3);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--dark-2);
    border-inline-end: 1px solid var(--border);
    position: fixed;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
    flex-shrink: 0;
}

body.lang-ar .admin-sidebar { right: 0; }
body.lang-en .admin-sidebar { left: 0; }

.admin-sidebar-logo {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sidebar-logo img {
    height: 40px;
}

.admin-sidebar-logo-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
}

.admin-nav-section {
    padding: 15px 15px 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    border-inline-start: 3px solid transparent;
}

.admin-nav-link i {
    width: 18px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(201, 168, 76, 0.08);
    color: var(--gold);
    border-inline-start-color: var(--gold);
}

.admin-nav-link:hover i,
.admin-nav-link.active i {
    color: var(--gold);
}

.admin-main {
    flex: 1;
    min-height: 100vh;
    background: var(--dark);
}

body.lang-ar .admin-main { margin-right: 260px; }
body.lang-en .admin-main { margin-left: 260px; }

.admin-topbar {
    background: var(--dark-2);
    border-bottom: 1px solid var(--border);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-content {
    padding: 30px;
}

/* Admin Stats Cards */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.admin-stat-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.admin-stat-card:hover {
    border-color: var(--gold);
}

.admin-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.admin-stat-icon.gold {
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold);
}

.admin-stat-icon.burgundy {
    background: rgba(139, 0, 0, 0.2);
    color: var(--burgundy-light);
}

.admin-stat-icon.green {
    background: rgba(76, 175, 80, 0.15);
    color: #4CAF50;
}

.admin-stat-icon.blue {
    background: rgba(33, 150, 243, 0.15);
    color: #2196F3;
}

.admin-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Admin Table */
.admin-table-card {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table-header {
    padding: 18px 22px;
    background: var(--dark-3);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-table-title {
    font-weight: 700;
    font-size: 1rem;
}

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

.admin-table th {
    padding: 14px 18px;
    text-align: start;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--dark-3);
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 14px 18px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.05);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(201, 168, 76, 0.03);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(76, 175, 80, 0.15);
    color: #81C784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #FFD54F;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.badge-danger {
    background: rgba(244, 67, 54, 0.15);
    color: #EF9A9A;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.badge-gold {
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold);
    border: 1px solid var(--border);
}

.badge-info {
    background: rgba(33, 150, 243, 0.15);
    color: #90CAF9;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--dark-2);
    border-top: 1px solid var(--border);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {}

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

.footer-logo img {
    height: 50px;
}

.footer-logo-name {
    font-size: 1.2rem;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--dark-4);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gold-gradient);
    color: var(--dark);
    border-color: transparent;
    transform: translateY(-3px);
}

.footer-col-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 20px;
}

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

.footer-link {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-link:hover {
    color: var(--gold);
    padding-inline-start: 5px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 12px;
}

.footer-contact-item i {
    color: var(--gold);
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-link {
    color: var(--text-muted);
    font-size: 0.82rem;
    transition: var(--transition);
}

.footer-bottom-link:hover {
    color: var(--gold);
}

/* ============================================================
   PAGE HERO (Inner Pages)
   ============================================================ */
.page-hero {
    background: var(--dark-2);
    border-bottom: 1px solid var(--border);
    padding: 100px 0 50px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(139, 0, 0, 0.1) 0%, transparent 60%);
}

.page-hero-content {
    position: relative;
    z-index: 1;
}

.page-hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--gold);
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--dark-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

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

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 18px 25px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.p-20 { padding: 20px; }
.p-25 { padding: 25px; }
.p-30 { padding: 30px; }

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Counter animation */
.counter {
    display: inline-block;
}

/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .course-detail-grid {
        grid-template-columns: 1fr;
    }

    .purchase-card {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-layout {
        grid-template-columns: 220px 1fr;
    }

    .payment-grid {
        grid-template-columns: 1fr;
    }

    .order-summary-card {
        position: static;
    }
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 15px;
        height: 65px;
    }

    .nav {
        display: none;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        background: rgba(13, 13, 13, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border);
        gap: 5px;
    }

    .nav.open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 12px 16px;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding-top: 65px;
    }

    .hero-content {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

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

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    body.lang-ar .admin-sidebar {
        transform: translateX(100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    body.lang-ar .admin-main,
    body.lang-en .admin-main {
        margin: 0;
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-player-layout {
        grid-template-columns: 1fr;
        padding-top: 75px;
    }

    .episodes-sidebar {
        position: static;
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .hero-title {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 15px;
    }
}

/* For screens smaller than 768px (tablets and phones) */
@media (max-width: 768px) {
    .logo-name,
    .logo-tagline {
        display: none;
    }
}

/* For very small screens (phones) */
@media (max-width: 480px) {
    .logo-name,
    .logo-tagline {
        display: none;
    }
}
