:root {
    /* Core Colors */
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --accent: #f59e0b;
    /* Amber */

    /* Light Theme Defaults */
    --bg-body: #ffffff;
    --bg-surface: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --glow: rgba(124, 58, 237, 0.15);

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius: 12px;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --glow: rgba(139, 92, 246, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(124, 58, 237, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.23);
}

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

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

.text-center {
    text-align: center;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Navbar */
.navbar {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
}

.logo-text span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn,
.lang-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover,
.lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    /* Hidden by default */
    width: 300px;
    height: 100vh;
    background: var(--bg-surface);
    z-index: 1001;
    transition: right 0.3s ease;
    padding: 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .mobile-menu {
    right: auto;
    left: -100%;
    transition: left 0.3s ease;
}

.mobile-menu.active {
    right: 0;
}

[dir="rtl"] .mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.mobile-logo {
    height: 32px;
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
    /* Extra padding */
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    /* Almost full screen */
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.badge {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
}

/* Hero Visual Animation */
.hero-visual {
    position: relative;
    height: 400px;
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2rem;
    position: absolute;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
    width: 280px;
}

[data-theme="dark"] .glass-card {
    border-color: rgba(255, 255, 255, 0.05);
}

.card-1 {
    top: 20px;
    left: 20px;
    z-index: 2;
}

.card-2 {
    bottom: 40px;
    right: 20px;
    animation-delay: -3s;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.icon-box.warning {
    background: var(--accent);
}

.card-text h4 {
    margin-bottom: 0.5rem;
}

.line {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    width: 100%;
    margin-bottom: 0.5rem;
}

.w-75 {
    width: 75%;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.bg-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    border-radius: 50%;
    z-index: 0;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step-card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.step-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Features */
.features {
    background: var(--bg-surface);
}

.feature-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-list ion-icon {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.app-mockup {
    background: var(--bg-body);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
}

.mockup-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ef4444;
}

.yellow {
    background: #f59e0b;
}

.green {
    background: #22c55e;
}

.skeleton-row {
    height: 12px;
    background: var(--bg-surface);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.skeleton-row.header {
    height: 40px;
    margin-bottom: 2rem;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.skeleton-card {
    height: 100px;
    background: var(--bg-surface);
    border-radius: 8px;
}

/* Dark Section (Suppliers) */
.dark-section {
    background: #0f172a;
    /* Always dark */
    color: white;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.dash-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dash-item ion-icon {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

/* Audience */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.audience-card {
    padding: 3rem;
    background: var(--bg-surface);
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.audience-card.highlight {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: none;
}

.audience-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* CTA */
.cta-section {
    background: var(--bg-body);
}

.highlight-text {
    color: var(--primary);
    font-size: 2.5rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    margin-top: 4rem;
    background: var(--bg-surface);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    height: 30px;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {

    .nav-links {
        display: none;
    }

    .nav-actions {
        margin-left: auto;
        margin-right: 1rem;
    }

    .menu-toggle {
        display: block;
        /* margin-left: auto; Removed as nav-actions now takes the space */
    }

    /* Ensure menu toggle is visible */

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

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

    .audience-card.highlight {
        transform: none;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
        /* Push to right in LTR, left in RTL */
    }
}

/* RTL overrides */
[dir="rtl"] .menu-toggle {
    margin-left: 0;
    margin-right: 0;
}

[dir="rtl"] .nav-actions {
    margin-left: 1rem;
    margin-right: auto;
}

[dir="rtl"] .hero-text h1 {
    line-height: 1.4;
}

[dir="rtl"] .feature-list li {
    text-align: right;
}

[dir="rtl"] .feature-list ion-icon {
    margin-left: 1rem;
    margin-right: 0;
}

/* Store Buttons */
.store-area {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

[data-theme="dark"] .store-area {
    border-top-color: rgba(255, 255, 255, 0.05);
}

.store-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.store-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-store {
    background-color: var(--text-main);
    color: var(--bg-body);
    padding: 0.5rem 1.25rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 160px;
    border: 1px solid transparent;
}

.btn-store:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
    /* Improve contrast on hover if needed */
}

[data-theme="dark"] .btn-store {
    background-color: white;
    /* White button in dark mode */
    color: black;
}

[data-theme="dark"] .btn-store:hover {
    background-color: #f1f5f9;
}

/* In light mode, buttons are black. Hover? */
:not([data-theme="dark"]) .btn-store:hover {
    background-color: #1e293b;
    /* Slightly lighter black */
}

.store-icon {
    font-size: 2rem;
    display: flex;
    align-items: center;
}

.store-text {
    display: flex;
    flex-direction: column;
    text-align: start;
    line-height: 1.1;
}

.store-small {
    font-size: 0.65rem;
    opacity: 0.9;
    font-weight: 500;
}

.store-large {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .store-area {
        align-items: center;
        border-top: none;
        /* Remove border on mobile to cleaner look if centered */
        margin-top: 2rem;
    }

    .store-btns {
        justify-content: center;
    }
}