/* --- VARIABLES --- */
:root {
    --bg-dark: #0f1216;
    --bg-light: #f0f2f5;
    --primary: #ff7b00;
    --primary-glow: rgba(255, 123, 0, 0.4);

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 20px;

    --text-main: #ffffff;
    --text-muted: #b0b0b0;

    --font-en: 'Inter', sans-serif;
    --font-ar: 'Tajawal', sans-serif;

    /* SIZING */
    --h1-size: 5rem;
    --h2-size: 3rem;
    --p-size: 1.15rem;
}

body.light-mode {
    --bg-dark: #eef2f6;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --text-main: #1a1e24;
    --text-muted: #4a505c;
    --primary-glow: rgba(255, 123, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-en);
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
    font-size: 18px;
}

body.rtl {
    direction: rtl;
    font-family: var(--font-ar);
}

body.blur-switch {
    filter: blur(20px);
    pointer-events: none;
    transition: filter 0.4s ease-in-out;
}

/* --- 3D CANVAS & TOOLTIP --- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.8;
}

body.light-mode #canvas-container {
    opacity: 0.4;
    filter: invert(1);
}

#particle-tooltip {
    position: fixed;
    background: rgba(255, 123, 0, 0.9);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    pointer-events: none;
    z-index: 10;
    display: none;
    transform: translate(15px, 15px);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* --- GLASS MIXIN --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* --- NAVBAR --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 18, 22, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

/* LOGO STYLES */
.logo {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 1px;
}

.logo span.main {
    color: var(--text-main);
}

.logo span.orange {
    color: var(--primary);
}

.spark-container {
    position: relative;
    display: inline-block;
    width: 14px;
    text-align: center;
}

.spark {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--primary);
    font-size: 1.2rem;
    animation: pulse-glow 2s infinite ease-in-out;
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    font-size: 1.05rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Language Selector */
.lang-selector,
.mobile-lang-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.lang-option {
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.lang-option:hover {
    color: var(--primary);
}

.lang-option.active {
    color: var(--primary);
    background: rgba(255, 123, 0, 0.15);
    font-weight: 700;
}

.lang-divider {
    color: var(--glass-border);
    font-weight: 300;
}

.mobile-lang-selector {
    padding: 15px 10px;
    justify-content: center;
    border-bottom: 1px solid var(--glass-border);
}

/* Responsive Elements */
.desktop-only {
    display: block;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-main);
    background: none;
    border: none;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px;
    display: none;
    flex-direction: column;
    gap: 20px;
    z-index: 999;
    backdrop-filter: blur(20px);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a,
.mobile-menu button {
    font-size: 1.2rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    padding: 10px;
    border-bottom: 1px solid var(--glass-border);
    text-align: left;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    cursor: pointer;
}

/* --- BUTTONS (Consistent Orange Theme) --- */
.btn {
    padding: 12px 28px;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 35px var(--primary-glow);
    background: #ff8c1a;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 0 25px var(--primary-glow);
}

.btn-ghost {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 140px 20px 60px;
}

.hero h1 {
    font-size: var(--h1-size);
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 25px;
}

.changing-word {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary), #ffb300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.changing-word.blur-out {
    filter: blur(10px);
    opacity: 0;
}

.changing-word.blur-in {
    filter: blur(0);
    opacity: 1;
}

.social-bar {
    margin-top: 50px;
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 12px 35px;
    border-radius: 50px;
    cursor: pointer;
    transition: 0.3s;
}

.social-bar:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

/* --- SECTIONS --- */
.section {
    padding: 60px 5%;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: var(--h2-size);
    margin-bottom: 15px;
    font-weight: 800;
}

.section-title span {
    color: var(--primary);
}

.section-title p {
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
    font-size: var(--p-size);
    line-height: 1.6;
}

/* --- INTERACTIVE CARDS (3D Tilt Effect for ALL cards) --- */
.interactive-card {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    will-change: transform;
    position: relative;
    overflow: hidden;
}

.interactive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 123, 0, 0.2) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
    z-index: 1;
}

.interactive-card:hover::before {
    opacity: 1;
}

.interactive-card:hover {
    border-color: var(--primary);
    box-shadow:
        0 25px 50px rgba(255, 123, 0, 0.2),
        0 0 40px rgba(255, 123, 0, 0.15),
        inset 0 0 30px rgba(255, 123, 0, 0.05);
}

.interactive-card .card-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 123, 0, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
    filter: blur(30px);
    z-index: 0;
}

.interactive-card:hover .card-glow {
    opacity: 1;
}

/* --- PROCESS CARDS --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1300px;
    margin: 0 auto;
    perspective: 1000px;
}

.process-card {
    padding: 35px;
    border-radius: 24px;
    position: relative;
}

.step-number {
    font-size: 5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: -15px;
    right: 20px;
    pointer-events: none;
    transition: color 0.3s ease, transform 0.3s ease;
    z-index: 1;
}

.process-card:hover .step-number {
    color: rgba(255, 123, 0, 0.15);
    transform: scale(1.15) rotate(-5deg);
}

body.light-mode .step-number {
    color: rgba(0, 0, 0, 0.05);
}

body.light-mode .process-card:hover .step-number {
    color: rgba(255, 123, 0, 0.2);
}

.process-card h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

.process-card:hover h3 {
    transform: translateX(5px);
}

.process-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* --- COMPARISON --- */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1000px;
}

.comp-card {
    padding: 50px;
    border-radius: 30px;
}

.comp-card.old {
    border: 1px solid rgba(255, 50, 50, 0.2);
    background: rgba(255, 50, 50, 0.02);
}

.comp-card.new {
    border: 1px solid var(--primary);
    background: rgba(255, 123, 0, 0.05);
}

.comp-list {
    list-style: none;
    margin-top: 30px;
}

.comp-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.old .icon {
    color: #ff4d4d;
    font-size: 1.3rem;
}

.new .icon {
    color: #00e676;
    font-size: 1.3rem;
}

/* --- PRICING SECTION --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1000px;
    padding-top: 30px;
    overflow: visible;
}

.pricing-card {
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    background: rgba(255, 123, 0, 0.05);
    transform: scale(1.05);
    padding-top: 55px;
    overflow: visible !important;
}

.pricing-popular {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 100;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(255, 123, 0, 0.4);
}

.pricing-badge {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.pricing-price {
    margin-bottom: 20px;
}

.pricing-price .currency {
    font-size: 1.2rem;
    color: var(--text-muted);
    vertical-align: top;
}

.pricing-price .amount {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-main);
}

.pricing-price .period {
    font-size: 1rem;
    color: var(--text-muted);
}

.pricing-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.6;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 1rem;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features i {
    color: var(--primary);
    font-size: 1.2rem;
}

.pricing-card .btn {
    width: 100%;
}

/* --- ROI CALCULATOR --- */
.roi-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px;
    border-radius: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

input[type=range] {
    width: 100%;
    height: 8px;
    background: var(--glass-border);
    border-radius: 5px;
    -webkit-appearance: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.roi-big-text {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin: 15px 0;
}

/* --- BLOG SECTION ENHANCED --- */
.blog-categories {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 10px 24px;
    border-radius: 50px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.category-btn:hover {
    background: rgba(255, 123, 0, 0.1);
}

.category-btn.active {
    background: var(--primary);
    color: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    perspective: 1000px;
}

.blog-card {
    border-radius: 24px;
    display: flex;
    flex-direction: column;
}

.blog-card.hidden {
    display: none;
}

.blog-img-thumb {
    height: 220px;
    width: 100%;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    position: relative;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

.blog-img-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
    pointer-events: none;
}

.blog-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.blog-content {
    padding: 25px 30px 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-meta i {
    color: var(--primary);
}

.blog-content h3 {
    margin-bottom: 12px;
    font-size: 1.4rem;
    color: var(--text-main);
    font-weight: 700;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-content h3 {
    color: var(--primary);
}

.blog-content p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex-grow: 1;
}

.blog-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.blog-card:hover .read-more {
    gap: 15px;
}

/* --- BLOG MODAL ENHANCED --- */
#blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s;
}

#blog-modal.active {
    opacity: 1;
}

.modal-content {
    background: var(--bg-dark);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.close-modal:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.modal-header {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 24px 24px 0 0;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--bg-dark), transparent);
}

.modal-body {
    padding: 40px 50px 50px;
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 1.1rem;
}

.modal-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.modal-body h2 {
    color: var(--text-main);
    margin-bottom: 15px;
    font-size: 2.5rem;
    line-height: 1.2;
}

.modal-meta {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.95rem;
    color: var(--text-muted);
}

.modal-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-meta i {
    color: var(--primary);
}

.modal-body h3 {
    color: var(--primary);
    margin: 35px 0 15px;
    font-size: 1.5rem;
}

.modal-body p {
    margin-bottom: 20px;
}

.modal-body ul {
    margin: 20px 0;
    padding-left: 25px;
}

.modal-body li {
    margin-bottom: 12px;
    position: relative;
}

.modal-body li::marker {
    color: var(--primary);
}

.modal-share {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.modal-share span {
    font-weight: 600;
    color: var(--text-main);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-buttons button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-buttons button:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* --- FOOTER --- */
footer {
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
    font-size: 1.1rem;
}

/* --- ANIMATIONS --- */
@keyframes pulse-glow {
    0% {
        text-shadow: 0 0 5px rgba(255, 123, 0, 0.5);
        transform: translateX(-50%) scale(1);
    }

    50% {
        text-shadow: 0 0 20px rgba(255, 123, 0, 1);
        transform: translateX(-50%) scale(1.2);
    }

    100% {
        text-shadow: 0 0 5px rgba(255, 123, 0, 0.5);
        transform: translateX(-50%) scale(1);
    }
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .comparison-grid,
    .roi-container {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .section {
        padding: 40px 20px;
    }

    .modal-body {
        padding: 30px 25px 40px;
    }

    .modal-body h2 {
        font-size: 1.8rem;
    }

    .blog-categories {
        gap: 10px;
    }

    .category-btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
}