/* ── Animated Background ── */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: -2;
    pointer-events: none;
    opacity: 1;
    /* Ensure visibility */
}

.spline-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 25%;
    height: 50%;
    z-index: -1;
    pointer-events: none;
}

#canvas3d {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .spline-container {
        width: 100%;
        height: 250px;
        opacity: 0.5;
        position: relative;
        z-index: 1;
        margin-top: -50px;
        margin-bottom: 20px;
    }
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    /* Increased opacity for softer but more visible effect */
    z-index: -1;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.6;
    /* Ensure visible */
}

[data-theme="light"] .orb {
    opacity: 0.4;
    mix-blend-mode: multiply;
}

.orb-1 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--primary), transparent);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--accent), transparent);
    bottom: -100px;
    right: -100px;
    animation-delay: 5s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--primary), transparent);
    top: 50%;
    right: 10%;
    animation-delay: 10s;
    opacity: 0.2;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    75% {
        transform: translate(40px, 10px) scale(1.05);
    }
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 50%, rgba(0, 212, 255, 0.01) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 100;
    animation: scan 8s linear infinite;
    opacity: 0.5;
}

@keyframes scan {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(4px);
    }
}

:root {
    --primary: #7c3aed;
    --primary-glow: rgba(124, 58, 237, 0.4);
    --gradient-primary: linear-gradient(135deg, #7c3aed -20%, #00d4ff 100%);
    --accent: #00d4ff;
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --gray: #64748b;
    --white: #ffffff;
    --dark: #ffffff;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'JetBrains Mono', monospace;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;
    --spotlight-1: radial-gradient(circle at 25% 25%, rgba(123, 44, 191, 0.12) 0%, transparent 75%);
    --spotlight-2: radial-gradient(circle at 75% 75%, rgba(0, 212, 255, 0.1) 0%, transparent 75%);
    color-scheme: light;
}

[data-theme="dark"] {
    --primary: #00d4ff;
    --primary-glow: rgba(0, 212, 255, 0.4);
    --gradient-primary: linear-gradient(135deg, #00d4ff -20%, #7b2cbf 100%);
    --accent: #ff006e;
    --dark: #05080f;
    --bg-main: #05080f;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #8b95a5;
    --gray: #8b95a5;
    --white: #ffffff;
    --spotlight-1: radial-gradient(circle at 40% 40%, rgba(123, 44, 191, 0.25) 0%, transparent 100%);
    --spotlight-2: radial-gradient(circle at 60% 60%, rgba(0, 212, 255, 0.2) 0%, transparent 100%);
    --spotlight-3: radial-gradient(circle at center, rgba(123, 44, 191, 0.08) 0%, transparent 80%);
    color-scheme: dark;
}

/* ==========================================================================
   PROGRAMMING THEMES: THE SYNTHETIC ARCHITECT (Stitch Powered)
   ========================================================================== */

/* NEON DARK: Neon Synthesis (Stitch: 8d4c8b) */
[data-theme="neon-dark"] {
    --bg-main: #131314; /* Surface */
    --bg-card: #1c1b1c; /* Surface Container Low */
    --card-bg-highest: #353436; /* Surface Container Highest */
    --text-primary: #e5e2e3; /* On Background */
    --text-secondary: #b9cacb; /* On Surface Variant */
    --primary: #00f0ff; /* Primary Container (Synthetic Glow) */
    --primary-glow: rgba(0, 240, 255, 0.15);
    --gradient-primary: linear-gradient(45deg, #dbfcff, #00f0ff); /* Synthetic Texture */
    --accent: #7000ff; /* Secondary Container (Glitch Purple) */
    --accent-success: #00f990; /* Tertiary Container (Neon Green Active) */
    --border-color: transparent; /* NO-LINE RULE */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --spotlight-1: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.08) 0%, transparent 70%);
    --spotlight-2: none;
    --border-radius: 0px; /* MODULAR BRUTALISM */
    color-scheme: dark;
}



/* NEON LIGHT: Architectural Synthesis (Stitch: 57e454) */
[data-theme="neon-light"] {
    --bg-main: #f8fafc; /* Surgical Technical White */
    --bg-card: #f1f5f9; /* Recessed Section */
    --card-bg-highest: #ffffff; /* Pop Card */
    --text-primary: #0f172a; /* Industrial Slate */
    --text-secondary: #475569; /* Muted Slate */
    --primary: #006970; /* Industrial Cyan */
    --primary-glow: rgba(0, 105, 112, 0.08);
    --gradient-primary: linear-gradient(135deg, #006970, #00f0ff);
    --accent: #131314; /* Contrast Dark */
    --accent-success: #006d3c; /* Tertiary Forest (Fixed) */
    --border-color: transparent; /* NO-LINE RULE */
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --spotlight-1: radial-gradient(circle at 50% 50%, rgba(0, 105, 112, 0.05) 0%, transparent 70%);
    --spotlight-2: none;
    --border-radius: 0px; /* MODULAR BRUTALISM */
    color-scheme: light;
}


/* THE NO-LINE RULE: Global Border Removal for Technical Themes */
[data-theme="neon-dark"] .service-card,
[data-theme="neon-dark"] .contact-form,
[data-theme="neon-dark"] .navbar,
[data-theme="neon-light"] .service-card,
[data-theme="neon-light"] .contact-form,
[data-theme="neon-light"] .navbar {
    border: none !important;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

/* Typography Overrides for Technical Identity */
[data-theme="neon-dark"] h1, [data-theme="neon-dark"] h2,
[data-theme="neon-light"] h1, [data-theme="neon-light"] h2 {
    font-family: var(--font-heading);
    letter-spacing: 2px;
    text-transform: uppercase;
}

[data-theme="neon-dark"] .hero-subtitle,
[data-theme="neon-dark"] .nav-link,
[data-theme="neon-light"] .hero-subtitle,
[data-theme="neon-light"] .nav-link {
    font-family: var(--font-mono);
    text-transform: lowercase;
}



[data-theme="light"] .dotpy-logo {
    filter: invert(1);
}

body {
    background-color: var(--bg-main);
    background-image: var(--spotlight-1), var(--spotlight-2);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.4s, color 0.4s, opacity 0.2s;
}

body.switching {
    opacity: 0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Entrance Animations ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-text {
    background: linear-gradient(to right, var(--text-primary) 50%, transparent 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 1s ease-in-out;
}

.reveal-text.active {
    background-position: 0 0;
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 1px;
}

a {
    color: inherit;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* ── Layout ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 8, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.85);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1rem;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

.brand-icon {
    font-size: 1.4rem;
    color: var(--primary);
    flex-shrink: 0;
}

.logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.navbar .logo-img {
    height: 48px;
}

.footer .logo-img {
    height: 64px;
}

/* Brand name special styling for "Ismail" */
.brand-highlight {
    display: inline;
    transition: var(--transition);
}

@keyframes logo-sparks {
    0% {
        text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
    }

    25% {
        text-shadow: 0 0 15px #fff, 2px -2px 4px var(--accent), -2px 2px 4px var(--primary);
    }

    50% {
        text-shadow: 0 0 10px var(--primary), 0 0 25px var(--primary), 3px 3px 2px rgba(255, 255, 255, 0.8);
    }

    75% {
        text-shadow: 0 0 15px #fff, -2px -2px 4px var(--accent), 2px 2px 4px var(--primary);
    }

    100% {
        text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
    }
}

.brand-highlight:hover {
    -webkit-text-fill-color: #fff;
    filter: drop-shadow(0 0 15px var(--primary-glow));
    animation: logo-sparks 0.4s steps(4) infinite;
    cursor: pointer;
}

/* ── RTL & LTR Support ── */
html[lang="en"] {
    direction: ltr;
    text-align: left;
}

html[dir="rtl"] {
    text-align: right;
}

html[dir="rtl"] .nav-container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

html[dir="rtl"] .controls {
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero-stats {
    flex-direction: row-reverse;
}

html[dir="rtl"] .course-cta,
html[dir="rtl"] .hero-cta,
html[dir="rtl"] .workflow-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .career-card,
html[dir="rtl"] .workflow-card,
html[dir="rtl"] .service-card {
    text-align: right;
}

html[dir="rtl"] .faq-question {
    text-align: right;
    display: flex;
    justify-content: space-between;
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-content {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .footer-column {
    text-align: right;
}

html[dir="rtl"] .footer-column ul {
    list-style: none;
    padding: 0;
}

html[dir="rtl"] .sidebar-section {
    direction: rtl;
}

html[dir="rtl"] .nav-link {
    text-align: right;
}

html[dir="rtl"] .hero-tag {
    text-align: right;
}

html[dir="rtl"] .contact-info {
    text-align: right;
}

html[dir="rtl"] .form-group label {
    text-align: right;
    display: block;
}

html[dir="rtl"] .tool-name {
    text-align: right;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    font-family: var(--font-heading);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    text-shadow: 0 0 12px var(--primary-glow);
}

.controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    position: relative;
}

.control-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    border-radius: 0; /* Modular Brutalism: 0px corners */
    font-size: 0.75rem;
    transition: var(--transition);
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.theme-selector {
    position: relative;
}

.theme-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-card);
    min-width: 180px;
    display: none;
    flex-direction: column;
    z-index: 1001;
    border-radius: 0; /* Modular Brutalism */
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    /* No-Line Rule: boundaries defined by tonal depth */
    overflow: hidden;
    backdrop-filter: blur(15px);
}

.theme-menu.active {
    display: flex;
    animation: menuFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.theme-option {
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.theme-option:hover {
    background: rgba(0, 212, 255, 0.08);
    color: var(--primary);
    padding-left: 1.5rem;
}

.theme-option.active {
    background: rgba(0, 212, 255, 0.12);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.theme-option i {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
}


/* ── Mobile Nav ── */
.nav-toggle {
    display: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.blueprint-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--border-color) 1px, transparent 1px), linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black 10%, transparent 75%);
    z-index: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-tag {
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 5px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.stat-number {
    font-size: 1.8rem;
    font-family: var(--font-heading);
}

.stat-number,
.stat-item .stat-number {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* ── Buttons ── */
.btn {
    padding: 0.9rem 2rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #000;
}

.btn-primary:hover {
    box-shadow: 0 0 25px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.08);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.05);
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.65rem;
}

.nav-right {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}

[dir="rtl"] .nav-right {
    margin-right: 0;
    margin-left: 0.5rem;
}

.auth-link {
    white-space: nowrap;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.auth-link:hover {
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-large {
    padding: 1.1rem 2.5rem;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
}

/* ── Profile & Partner Styles ── */
.about-profile-header {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.profile-image-container {
    width: 250px;
    height: 250px;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
    position: relative;
    background: var(--bg-card);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.5);
    transition: transform 0.5s ease;
}

.profile-image-container:hover .profile-image {
    transform: scale(1.05);
}

.partner-logo {
    height: 24px;
    width: auto;
    margin-bottom: 0.5rem;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: var(--transition);
}

.partner-card:hover .partner-logo {
    filter: none;
    opacity: 1;
}


.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Sale Badge ── */
@keyframes pulse-sale {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }
}

.sale-badge {
    background: var(--accent);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.7rem;
    display: inline-block;
    margin-bottom: 1rem;
    animation: pulse-sale 2s infinite;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-heading);
}

/* ── Tools / Partners Section ── */
.tools-section {
    padding: 6rem 0;
}

.section-subtitle {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
    margin-top: 2rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.8rem 1rem;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.tool-logo-img {
    max-width: 80%;
    max-height: 24px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    filter: grayscale(1) brightness(2);
}

[data-theme="light"] .tool-logo-img:not(.dotpy-logo) {
    filter: grayscale(1) brightness(0.2);
}

[data-theme="light"] .dotpy-logo {
    filter: none;
}

@keyframes vibrate {

    0%,
    100% {
        transform: translateY(-4px) translateX(0);
    }

    25% {
        transform: translateY(-4px) translateX(-2px);
    }

    50% {
        transform: translateY(-4px) translateX(2px);
    }

    75% {
        transform: translateY(-4px) translateX(-2px);
    }
}

.tool-card:hover {
    border-color: var(--primary);
    animation: vibrate 0.3s ease-in-out;
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.08);
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.tool-name {
    font-size: 0.8rem;
    font-weight: 600;
}

.partner-badge {
    font-size: 0.6rem;
    color: var(--accent);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Page Section (inner pages) ── */
.page-section {
    padding: 8rem 0 4rem;
    min-height: 100vh;
    position: relative;
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Content Titles ── */
.content-title {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Timeline ── */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-marker {
    position: absolute;
    left: -2.6rem;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: var(--gradient-primary);
    border-radius: 50%;
}

.timeline-content h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.timeline-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.timeline-content ul {
    list-style: none;
}

.timeline-content li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.2rem 0;
}

.timeline-content li::before {
    content: '▹ ';
    color: var(--primary);
}

/* ── Skills Grid ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.skill-category h4 {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
}

/* ── Credentials ── */
.credentials-list {
    display: grid;
    gap: 1rem;
}

.credential-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.2rem;
}

.credential-icon {
    font-size: 1.5rem;
}

.credential-item strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.credential-item span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ── Education ── */
.education-grid {
    display: grid;
    gap: 1.5rem;
}

.education-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.education-icon {
    font-size: 2rem;
}

.education-item h3 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.education-item p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.education-year {
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ── Languages ── */
.languages-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.language-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    text-align: center;
}

.language-item strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.language-level {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* ── Achievements ── */
.achievements-grid {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 1.5rem;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.achievement-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    flex: 0 0 300px;
    transition: var(--transition);
}

.achievement-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.1);
}

.achievement-number {
    font-size: 2.2rem;
    font-family: var(--font-heading);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.project-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.achievement-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.achievement-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ── Services ── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-features li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
}

/* ── Course Card ── */
.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.course-card.coming-soon {
    opacity: 0.6;
}

.course-card.coming-soon::after {
    content: 'COMING SOON';
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--accent);
    color: white;
    padding: 4px 40px;
    font-size: 0.6rem;
    font-family: var(--font-heading);
    transform: rotate(45deg);
    letter-spacing: 1px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

/* ── Course Details ── */
.course-details-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
}

.course-details-card h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 600;
}

.course-topics {
    margin-top: 1.5rem;
}

.course-topics h5 {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.course-topics ul {
    list-style: none;
}

.course-topics li {
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding: 0.2rem 0;
}

.course-topics li::before {
    content: '▹ ';
    color: var(--primary);
}

/* ── Featured Course ── */
.featured-course-section {
    padding: 4rem 0;
}

.strategic-partner-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.8rem;
    color: var(--accent);
    font-family: var(--font-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.course-content h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.course-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.course-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.highlight-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.highlight-icon {
    font-size: 1.5rem;
}

.highlight-item strong {
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.2rem;
}

.highlight-item p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cta-note {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

.partner-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.partner-link {
    color: var(--primary);
    font-size: 0.8rem;
}

/* ── CTA Section ── */
.cta-section {
    padding: 6rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Workflows ── */
.workflows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.workflow-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
}

.workflow-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.workflow-icon {
    font-size: 1.5rem;
}

.workflow-tag {
    font-size: 0.65rem;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 2px 8px;
    border-radius: 50px;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.workflow-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.workflow-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.workflow-features {
    list-style: none;
    margin-bottom: 1rem;
}

.workflow-features li {
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding: 0.15rem 0;
}

/* ── Modal ── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #0a0e1a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lesson-detail-modal {
    max-width: 800px;
    padding: 0;
    overflow: hidden;
    background: #0a0e1a !important;
}

.lesson-detail-modal .modal-body {
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
}

.lesson-video-container {
    width: 100%;
    background: #000;
}

.lesson-info {
    padding: 2rem;
}

.lesson-full-desc {
    white-space: pre-wrap;
    line-height: 1.6;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
}

.modal-content h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.modal-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    font-family: var(--font-body);
}

/* ── FAQ ── */
.faq-section {
    padding: 6rem 0;
}

.faq-list {
    max-width: 800px;
    margin: 2rem auto 0;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    padding: 1.2rem 1.5rem;
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    transition: var(--transition);
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.04);
}

.faq-question .faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
    color: var(--primary);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-answer-inner {
    padding: 0 1.5rem 1.2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ── Careers ── */
.careers-section {
    padding: 6rem 0;
    text-align: center;
}

.careers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.career-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: left;
}

.career-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.career-type {
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    display: block;
}

.career-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ── Testimonials ── */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: var(--r-lg);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.testimonial-quote {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more-btn {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    margin-top: 0.5rem;
    display: inline-block;
}

.read-more-btn:hover {
    text-decoration: underline;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px var(--primary-glow);
    font-family: var(--font-heading);
}

.testimonial-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.testimonial-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 2px 0 0 0;
}

.testimonial-rating {
    color: #ffb700;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* ── Footer ── */
.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-column h4 {
    font-size: 0.75rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 0.75rem 0;
}

.footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--primary);
}

/* ── Partners (About) ── */
.partners-section {
    margin-top: 3rem;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.partner-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 0.8rem;
}

.partner-card:hover {
    border-color: var(--primary);
}

/* ── Contact form ── */
.contact-info {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.contact-form select,
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.9rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.contact-form select:focus,
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ── Policy pages ── */
.policy-content {
    line-height: 1.9;
}

.policy-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.policy-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.policy-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.policy-content li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

/* ── Academy Workflows & Playlists ── */
.academy-controls .view-btn.active {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    transform: scale(1.02);
}

.academy-controls .filter-btn:hover {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

.category-section h2 {
    position: relative;
    color: var(--text-primary);
}

.category-section h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
}

[dir="rtl"] .category-section h2::after {
    left: auto;
    right: 0;
}

/* Clickable Category Tags */
.clickable-tag:hover {
    background: var(--primary) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(124, 58, 237, 0.2);
}

/* Pagination Controls */
.pagination-controls .btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.pagination-controls .btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

.pagination-controls .btn-primary {
    background: var(--primary);
    border: 1px solid var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.workflows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    width: 100%;
}

@media (max-width: 640px) {
    .workflows-grid {
        grid-template-columns: 1fr;
    }

    .category-section h2 {
        font-size: 1.25rem !important;
    }
}

/* Dashboard Panel */
.dashboard-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.dashboard-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #00f2ff, #ff2d78);
}

/* Custom Select Styling */
.academy-controls select {
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    padding-right: 1.5rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

[data-theme="dark"] .academy-controls select {
    color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23aaa' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
}

.workflow-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 380px;
}

.workflow-icon {
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 58, 237, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}

.workflow-card img {
    height: 180px !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 12px 12px 0 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-main);
        flex-direction: column;
        align-items: center;
        padding-top: 3rem;
        gap: 1.5rem;
        transition: 0.3s;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }

    .course-highlights {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.8rem;
    }
}

/*  Entrance Animations  */
@keyframes reveal-bottom {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes reveal-left {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes reveal-right {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes reveal-scale {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.reveal {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.reveal.entrance-done {
    opacity: 1;
}

.reveal-bottom.entrance-done {
    animation: reveal-bottom 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.reveal-left.entrance-done {
    animation: reveal-left 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.reveal-right.entrance-done {
    animation: reveal-right 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.reveal-scale.entrance-done {
    animation: reveal-scale 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/*  Arabic RTL Styling & Typography  */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap");

/* Page Transition & Direction */
body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.page-ready {
    opacity: 1;
}

.switching .container {
    opacity: 0.5;
    filter: blur(2px);
    transition: all 0.2s ease;
}

html[lang="en"] {
    direction: ltr;
    text-align: left;
}

[dir="rtl"] {
    font-family: "Cairo", sans-serif !important;
}

[dir="rtl"] .nav-link,
[dir="rtl"] .hero-tag,
[dir="rtl"] .section-subtitle,
[dir="rtl"] .btn,
[dir="rtl"] .stat-label {
    letter-spacing: 0 !important;
}

[dir="rtl"] .timeline {
    border-left: none;
    border-right: 2px solid var(--border-color);
    padding-left: 0;
    padding-right: 2rem;
}

[dir="rtl"] .timeline-marker {
    left: auto;
    right: -2.6rem;
}

[dir="rtl"] .timeline-content li::before {
    content: "◃ ";
}

[dir="rtl"] .controls {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-menu {
    gap: 1.5rem;
}

/* Auth & User Interactions */
.auth-link {
    font-size: 0.75rem !important;
    padding: 0.4rem 0.9rem !important;
    border-radius: 4px;
    border: 1px solid var(--primary) !important;
    color: var(--primary) !important;
}

[dir="ltr"] .auth-link {
    margin-left: 0.5rem;
}

[dir="rtl"] .auth-link {
    margin-right: 0.5rem;
}

.favorite-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px;
    opacity: 0.4;
    transition: var(--transition);
}

.favorite-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

.list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Modal Base */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 15, 0.9);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.modal-backdrop.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlide {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.modal-body {
    padding: 2.5rem;
}

/* Lesson Detail Modal */
.lesson-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.lesson-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.lesson-full-desc {
    color: var(--white);
    line-height: 1.6;
    opacity: 0.9;
    font-size: 1rem;
}

/* Comments Section */
.comments-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.comment-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.comment-meta strong {
    color: var(--primary);
}

.comment-meta span {
    color: var(--text-secondary);
}

.comment-text {
    font-size: 0.95rem;
    color: var(--white);
    line-height: 1.5;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

@media (max-width: 768px) {
    .modal-backdrop {
        padding: 0;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .lesson-info h2 {
        font-size: 1.5rem;
    }
}

/* Red Subscribe Button */
.btn-subscribe-red {
    background: linear-gradient(135deg, #ff4b2b, #ff416c) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.3) !important;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-subscribe-red:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 75, 43, 0.4) !important;
    filter: brightness(1.1);
}

/* Video Responsiveness */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
}

.video-responsive iframe,
.video-responsive object,
.video-responsive embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Project Details Modal ── */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.project-modal-content {
    background: rgba(20, 20, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.project-modal.active .project-modal-content {
    transform: scale(1) translateY(0);
}

.project-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10010;
    transition: all 0.3s ease;
}

.project-modal-close:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.project-modal-header {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    background: #0a0a14;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-modal-header img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 400px;
}

.project-modal-icon-fallback {
    font-size: 8rem;
    padding: 4rem;
}

.project-modal-body {
    padding: 2.5rem;
}

.project-modal-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-modal-short {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.project-modal-long {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    white-space: pre-wrap;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.project-gallery-item {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 16/9;
}

.project-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .project-modal-body {
        padding: 1.5rem;
    }

    .project-modal-title {
        font-size: 1.8rem;
    }

    .project-modal-header {
        max-height: 250px;
    }

    .project-modal-header img {
        max-height: 250px;
    }
}

/* ── Lightbox Overlay ── */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

/* Force native dropdown options to be readable (black text on white background) */
select option {
    background-color: #ffffff !important;
    color: #000000 !important;
}