body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

[dir="rtl"] body,
[dir="rtl"] p,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6,
[dir="rtl"] a:not(.material-icons):not(.material-symbols-outlined):not([class^="tio-"]):not([class*=" tio-"]), [dir="rtl"] span:not(.material-icons):not(.material-symbols-outlined):not([class^="tio-"]):not([class*=" tio-"]), [dir="rtl"] div, [dir="rtl"] button,
[dir="rtl"] .lx-btn, [dir="rtl"] .lx-title, [dir="rtl"] .lx-subtitle, [dir="rtl"] .lx-section-title {
    font-family: 'Cairo', sans-serif !important;
    line-height: 1.7;
}

:root {
    --lx-primary: #005ce6;
    --lx-primary-hover: #004dc2;
    --lx-secondary: #f0f6ff;
    --lx-text-dark: #1f2937;
    --lx-text-muted: #6b7280;
    --lx-bg-light: #f9fafb;
    --lx-border: #e5e7eb;
    --lx-transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.dark-theme {
    --lx-primary: #3b82f6;
    --lx-primary-hover: #60a5fa;
    --lx-secondary: #1e3a8a;
    --lx-text-dark: #f3f4f6;
    --lx-text-muted: #9ca3af;
    --lx-bg-light: #111827;
    --lx-border: #374151;
}

/* Header Glassmorphism */
header.lx-header-scrolled {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 10px 0 !important;
    transition: var(--lx-transition-smooth);
}
.dark-theme header.lx-header-scrolled {
    background: rgba(17, 24, 39, 0.85) !important;
}

/* Navigation Active State */
.navbar-nav .nav-link.active {
    color: var(--lx-primary) !important;
    font-weight: 700;
    position: relative;
}
.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: var(--lx-primary);
    border-radius: 3px;
    transition: var(--lx-transition-smooth);
}

/* Typography Enhancements */
.lx-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--lx-text-dark);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
@media (max-width: 768px) {
    .lx-title { font-size: 2.2rem; }
}
.lx-title span {
    color: var(--lx-primary);
}
.lx-subtitle {
    font-size: 1.2rem;
    color: var(--lx-text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
    line-height: 1.6;
}
@media (max-width: 768px) {
    .lx-subtitle { font-size: 1.05rem; margin-bottom: 1.5rem; }
}
.lx-section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--lx-text-dark);
    text-align: center;
    margin-bottom: 1rem;
}
@media (max-width: 768px) {
    .lx-section-title { font-size: 1.8rem; margin-bottom: 0.5rem; }
}

/* Buttons */
.lx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--lx-transition-smooth);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
@media (max-width: 768px) {
    .lx-btn { width: 100%; padding: 0.75rem 1rem; font-size: 1rem; }
}
.lx-btn-primary {
    background-color: var(--lx-primary);
    color: #ffffff !important;
    border: 1px solid var(--lx-primary);
}
.lx-btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--lx-transition-smooth);
}
.lx-btn-primary:hover::before {
    left: 100%;
    transition: 0.5s;
}
.lx-btn-primary:hover {
    background-color: var(--lx-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 92, 230, 0.3);
}
.lx-btn-outline {
    background-color: transparent;
    color: var(--lx-primary);
    border: 1px solid var(--lx-primary);
}
.lx-btn-outline:hover {
    background-color: var(--lx-secondary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Hero Section */
.banner-section {
    padding-top: 150px !important;
    padding-bottom: 40px !important;
    background: linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
    position: relative;
    overflow: hidden;
}
.dark-theme .banner-section {
    background: linear-gradient(135deg, var(--lx-bg-light) 0%, #1e3a8a 100%);
}
.banner-section::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 300px; height: 300px;
    background: var(--lx-primary);
    opacity: 0.05;
    border-radius: 50%;
    filter: blur(50px);
}
@media (max-width: 768px) {
    .banner-section { padding-top: 120px !important; padding-bottom: 30px !important; }
}

/* Hero Image Enhancement & Floating */
.lx-hero-img {
    max-width: 125%;
    width: 125%;
    margin-left: -12.5%;
    animation: floating 6s ease-in-out infinite;
    will-change: transform;
}
[dir="rtl"] .lx-hero-img {
    margin-right: -12.5%;
    margin-left: 0;
}
@media (max-width: 991px) {
    .lx-hero-img {
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}
@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Trust Strip */
.lx-trust-strip {
    background: #fff;
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    position: relative;
    z-index: 10;
}
.dark-theme .lx-trust-strip { background: var(--lx-bg-light); border-bottom: 1px solid var(--lx-border); }
.lx-trust-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 50px;
    background: var(--lx-secondary);
    transition: var(--lx-transition-smooth);
    border: 1px solid transparent;
}
.dark-theme .lx-trust-pill { background: #1f2937; }
.lx-trust-pill:hover {
    transform: translateY(-2px);
    border-color: var(--lx-primary);
    box-shadow: 0 4px 12px rgba(0,92,230,0.1);
}
.lx-trust-icon {
    width: 40px; height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lx-primary);
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.dark-theme .lx-trust-icon { background: #374151; }
.lx-trust-text h6 { font-size: 0.95rem; font-weight: 700; margin: 0; color: var(--lx-text-dark); }
.lx-trust-text p { font-size: 0.8rem; margin: 0; color: var(--lx-text-muted); }

/* How It Works */
.lx-steps-wrapper {
    position: relative;
    padding-top: 2rem;
}
.lx-step-line {
    position: absolute;
    top: 50px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--lx-border);
    z-index: 0;
}
.lx-steps-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}
@media (max-width: 991px) {
    .lx-steps-container { grid-template-columns: repeat(2, 1fr); }
    .lx-step-line { display: none; }
}
@media (max-width: 576px) {
    .lx-steps-container { grid-template-columns: 1fr; }
}
.lx-step-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid var(--lx-border);
    transition: var(--lx-transition-smooth);
    height: 100%;
    position: relative;
}
.dark-theme .lx-step-card { background: var(--lx-bg-light); }
.lx-step-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-6px);
    border-color: var(--lx-primary);
}
.lx-step-number {
    position: absolute;
    top: -15px; left: 50%;
    transform: translateX(-50%);
    width: 30px; height: 30px;
    background: var(--lx-primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 8px rgba(0,92,230,0.2);
}
.lx-step-icon {
    width: 80px; height: 80px;
    background: var(--lx-secondary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.2rem;
    font-size: 2.5rem;
    color: var(--lx-primary);
    transition: var(--lx-transition-smooth);
}
.lx-step-card:hover .lx-step-icon {
    background: var(--lx-primary);
    color: #fff;
    transform: scale(1.1);
}

/* Services */
.lx-service-card {
    background: #fff;
    border-radius: 1rem;
    padding: 0;
    text-align: center;
    border: 1px solid var(--lx-border);
    transition: var(--lx-transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}
.dark-theme .lx-service-card { background: var(--lx-bg-light); }
.lx-service-card:hover {
    border-color: var(--lx-primary);
    box-shadow: 0 15px 30px rgba(0, 92, 230, 0.15);
    transform: translateY(-6px);
}
.lx-service-icon {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--lx-secondary);
}
.lx-service-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--lx-transition-smooth);
}
.lx-service-card:hover .lx-service-icon img {
    transform: scale(1.05);
}
.lx-service-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 92, 230, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--lx-transition-smooth);
}
.lx-service-card:hover .lx-service-overlay {
    opacity: 1;
}
.lx-service-overlay span {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    transform: translateY(20px);
    transition: var(--lx-transition-smooth);
}
.lx-service-card:hover .lx-service-overlay span {
    transform: translateY(0);
}
.lx-service-card h6 {
    font-size: 1.25rem;
    font-weight: 800;
    padding: 1.5rem 1rem;
    margin: 0;
    color: var(--lx-text-dark);
}

/* Why Choose LundrX */
.lx-why-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}
.lx-why-img {
    width: 100%;
    transition: transform 0.5s ease;
}
.lx-why-img-wrapper:hover .lx-why-img {
    transform: scale(1.03);
}
.lx-feature-card {
    padding: 1rem;
    border-radius: 0.75rem;
    transition: var(--lx-transition-smooth);
    border: 1px solid transparent;
}
.lx-feature-card:hover {
    background: #fff;
    border-color: var(--lx-border);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transform: translateY(-3px);
}
.dark-theme .lx-feature-card:hover { background: #1f2937; }

/* Download Apps Section */
.lx-apps-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
}
.lx-app-box {
    background: linear-gradient(135deg, #ffffff 0%, var(--lx-secondary) 100%);
    border-radius: 1.5rem;
    padding: 2.5rem;
    border: 1px solid var(--lx-border);
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: var(--lx-transition-smooth);
}
.dark-theme .lx-app-box { background: linear-gradient(135deg, #1f2937 0%, #111827 100%); }
.lx-app-box:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}
.lx-app-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 150px;
    color: var(--lx-primary);
    opacity: 0.05;
    z-index: 0;
    transform: rotate(-15deg);
}
[dir="rtl"] .lx-app-bg-icon { left: -20px; right: auto; transform: rotate(15deg); }
.lx-app-box-content { position: relative; z-index: 1; }
.lx-app-box h3 { font-weight: 800; color: var(--lx-text-dark); }
.lx-app-box ul li {
    font-weight: 600;
    color: var(--lx-text-muted);
    display: flex;
    align-items: center;
}
.lx-app-links img {
    height: 50px;
    transition: transform 0.2s;
}
.lx-app-links img:hover { transform: scale(1.05); }

/* Phone Mockup */
.lx-phone-mockup {
    position: relative;
    max-width: 320px;
    margin: 0 auto;
    border-radius: 2.5rem;
    padding: 10px;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 92, 230, 0.25);
    border: 8px solid #f8fafc;
    animation: floating 6s ease-in-out infinite;
    will-change: transform;
}
.dark-theme .lx-phone-mockup {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.lx-phone-screen {
    border-radius: 2rem;
    overflow: hidden;
    position: relative;
    aspect-ratio: 9/19.5; /* standard modern phone ratio */
    background: var(--lx-secondary);
}
.lx-phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
.lx-phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 25px;
    background: #f8fafc;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 2;
}
.dark-theme .lx-phone-notch { background: #334155; }


/* Provider CTA / Registration */
.lx-provider-cta {
    background: linear-gradient(135deg, var(--lx-secondary) 0%, #dbeafe 100%);
    border-radius: 2rem;
    padding: 3rem 4rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,92,230,0.1);
}
.dark-theme .lx-provider-cta { background: linear-gradient(135deg, #1e3a8a 0%, #111827 100%); }
.lx-provider-cta::before {
    content: '';
    position: absolute;
    top: -50px; left: -50px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    filter: blur(40px);
}
@media (max-width: 991px) {
    .lx-provider-cta { padding: 2rem; text-align: center; }
}
.lx-partner-img {
    max-height: 350px;
    object-fit: cover;
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* FAQ Accordion */
.accordion-button:not(.collapsed) {
    background-color: var(--lx-secondary);
    color: var(--lx-primary);
    box-shadow: none;
}
.accordion-button:focus { box-shadow: none; border-color: rgba(0,0,0,0.1); }
.accordion-button::after {
    transition: var(--lx-transition-smooth);
}
.accordion-item {
    border: 1px solid var(--lx-border) !important;
    border-radius: 0.75rem !important;
    overflow: hidden;
}

/* Final CTA */
.lx-final-cta {
    background: linear-gradient(135deg, var(--lx-primary) 0%, #0040a8 100%);
    border-radius: 2rem;
    padding: 4rem 2rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,92,230,0.2);
}
.lx-final-cta::before, .lx-final-cta::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.lx-final-cta::before { width: 300px; height: 300px; top: -100px; left: -100px; }
.lx-final-cta::after { width: 200px; height: 200px; bottom: -50px; right: -50px; }
.lx-final-cta h2 { font-weight: 800; margin-bottom: 1rem; color: #fff; }
.lx-final-cta p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }

/* Reveal Animations */
.lx-reveal { opacity: 0; transition: var(--lx-transition-smooth); }
.lx-reveal-up { opacity: 0; transform: translateY(40px); transition: var(--lx-transition-smooth); }
.lx-reveal-left { opacity: 0; transform: translateX(-40px); transition: var(--lx-transition-smooth); }
.lx-reveal-right { opacity: 0; transform: translateX(40px); transition: var(--lx-transition-smooth); }
.lx-stagger-item { opacity: 0; transform: translateY(20px); transition: var(--lx-transition-smooth); }
[dir="rtl"] .lx-reveal-left { transform: translateX(40px); }
[dir="rtl"] .lx-reveal-right { transform: translateX(-40px); }

.is-visible { opacity: 1; transform: translate(0, 0) scale(1); }

/* Back to Top */
.lx-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--lx-primary);
    color: #fff;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,92,230,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--lx-transition-smooth);
    z-index: 999;
    cursor: pointer;
}
[dir="rtl"] .lx-back-to-top { right: auto; left: 30px; }
.lx-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lx-back-to-top:hover {
    background: var(--lx-primary-hover);
    transform: translateY(-3px);
}

/* Mobile Sticky CTA */
.lx-mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 15px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    z-index: 998;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: none;
}
.dark-theme .lx-mobile-sticky-cta { background: #1f2937; }
@media (max-width: 991px) {
    .lx-mobile-sticky-cta { display: block; }
}
.lx-mobile-sticky-cta.show {
    transform: translateY(0);
}

/* Footer Enhancements */
.footer__wrapper { font-size: 1.1rem; }
.footer-bottom { font-size: 1rem; }
.footer__wrapper-link li a { font-size: 1.05rem; transition: color 0.3s; }
.footer__wrapper-link li a:hover { color: var(--lx-primary) !important; padding-right: 5px; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ====== ARABIC (RTL) SPECIFIC ENHANCEMENTS ====== */
html[dir="rtl"] body {
    font-size: 16px;
    line-height: 1.8;
}
html[dir="rtl"] p, html[dir="rtl"] li {
    font-size: 16px;
    line-height: 1.8;
}
html[dir="rtl"] .lx-title {
    font-size: 52px;
    line-height: 1.4;
    text-wrap: balance;
    margin-bottom: 24px;
}
html[dir="rtl"] .lx-subtitle {
    font-size: 18px;
    line-height: 1.8;
}
html[dir="rtl"] .lx-section-title {
    font-size: 36px;
    line-height: 1.5;
}
html[dir="rtl"] h3, html[dir="rtl"] h4 {
    font-size: 24px;
}
html[dir="rtl"] .lx-trust-text h6, html[dir="rtl"] .lx-step-card h4 {
    font-size: 20px;
}

@media (max-width: 768px) {
    html[dir="rtl"] body, html[dir="rtl"] p, html[dir="rtl"] li {
        font-size: 15px;
    }
    html[dir="rtl"] .lx-title {
        font-size: 34px;
    }
    html[dir="rtl"] .lx-section-title {
        font-size: 30px;
    }
}

/* Header & Logo Enhancements */
.lx-header {
    padding: 15px 0;
}
.lx-header .navbar-brand img {
    height: 45px; /* Larger logo */
}

/* Base structural fixes */
.lx-title, .lx-section-title {
    min-width: 0;
    text-wrap: balance;
}

/* Ensure no absolute positioning causes issues in RTL */
html[dir="rtl"] .lx-step-line {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}
