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

:root {
    --primary: #2c3e50;
    --primary-light: #34495e;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --carlog-color: #4A90E2;
    --agenda-color: #1a73e8;
    --shiftix-color: #667eea;
    --bg-body: #f0f4f8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-subtle: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== Language Toggle System ===== */
body.lang-en [data-ar] {
    display: none !important;
}

body.lang-ar [data-en] {
    display: none !important;
}

body.lang-ar {
    font-family: 'Tajawal', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.navbar-brand span {
    color: var(--accent);
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
    border-radius: 2px;
}

.lang-ar .nav-links a::after {
    left: auto;
    right: 0;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ===== Language Toggle Button ===== */
.lang-toggle {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
    margin-inline-start: 12px;
}

.lang-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
}

/* When in English mode, show Arabic font for the toggle (since it says "عربي") */
.lang-en .lang-toggle {
    font-family: 'Tajawal', sans-serif;
}

/* When in Arabic mode, show English font for the toggle (since it says "English") */
.lang-ar .lang-toggle {
    font-family: 'Inter', sans-serif;
}

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

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #f0f4f8 0%, #e0eafc 50%, #dfe6f0 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: radial-gradient(ellipse at 60% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 55%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-3%, 3%) scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 750px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.18);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 28px;
    font-weight: 600;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: #fff;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.hero-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.hero-btn svg {
    width: 18px;
    height: 18px;
    transition: var(--transition);
}

/* LTR: arrow points right */
.lang-en .hero-btn:hover svg {
    transform: translateX(4px);
}

/* RTL: arrow flips and points left */
.lang-ar .hero-btn svg {
    transform: scaleX(-1);
}

.lang-ar .hero-btn:hover svg {
    transform: scaleX(-1) translateX(4px);
}

/* ===== Stats Bar ===== */
.stats-bar {
    padding: 40px 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

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

.stat-item {
    padding: 16px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 12px;
    color: var(--accent);
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

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

/* ===== Section Common ===== */
.section {
    padding: 100px 0;
}

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

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto;
}

/* ===== Apps Section ===== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.app-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 36px 28px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.app-card.carlog::before { background: var(--carlog-color); }
.app-card.agenda::before { background: var(--agenda-color); }
.app-card.shiftix::before { background: var(--shiftix-color); }

.app-card:hover {
    transform: translateY(-6px);
    border-color: #cbd5e1;
    box-shadow: var(--shadow-lg);
}

.app-card.carlog:hover { box-shadow: 0 10px 30px rgba(74, 144, 226, 0.12); }
.app-card.agenda:hover { box-shadow: 0 10px 30px rgba(26, 115, 232, 0.12); }
.app-card.shiftix:hover { box-shadow: 0 10px 30px rgba(102, 126, 234, 0.12); }

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.app-icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.app-icon.carlog { background: linear-gradient(135deg, var(--carlog-color), #357ABD); }
.app-icon.agenda { background: linear-gradient(135deg, var(--agenda-color), #1557b0); }
.app-icon.shiftix { background: linear-gradient(135deg, var(--shiftix-color), #5a67d8); }

.app-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.app-name {
    font-size: 1.4rem;
    font-weight: 700;
}

.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-available {
    background: #ecfdf5;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.badge-soon {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.badge-dev {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.app-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.app-features {
    margin-bottom: 28px;
    flex-grow: 1;
}

.app-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.app-features li svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.app-card.carlog .app-features li svg { color: var(--carlog-color); }
.app-card.agenda .app-features li svg { color: var(--agenda-color); }
.app-card.shiftix .app-features li svg { color: var(--shiftix-color); }

.app-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
    flex: 1;
    text-align: center;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    color: #fff;
}

.app-card.carlog .btn-primary { background: var(--carlog-color); }
.app-card.agenda .btn-primary { background: var(--agenda-color); }
.app-card.shiftix .btn-primary { background: var(--shiftix-color); }

.app-card.carlog .btn-primary:hover { background: #357ABD; box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3); }
.app-card.agenda .btn-primary:hover { background: #1557b0; box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3); }
.app-card.shiftix .btn-primary:hover { background: #5a67d8; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: #94a3b8;
    color: var(--text-primary);
    background: var(--bg-light);
}

.btn-disabled {
    background: var(--bg-light);
    color: var(--text-muted);
    cursor: default;
    pointer-events: none;
    border: 1px solid var(--border-color);
}

/* ===== Why Us Section ===== */
.why-section {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.why-card {
    text-align: center;
    padding: 36px 24px;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.why-card:hover {
    transform: translateY(-4px);
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}

.why-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 14px;
    color: var(--accent);
}

.why-icon svg {
    width: 26px;
    height: 26px;
}

.why-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.why-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta-section {
    text-align: center;
    padding: 100px 0;
}

.cta-content {
    max-width: 550px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.cta-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: #fff;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.cta-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.cta-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-white);
}

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

.footer-brand h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-brand h3 span {
    color: var(--accent);
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 350px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .apps-grid {
        grid-template-columns: 1fr 1fr;
    }

    .apps-grid .app-card:last-child {
        grid-column: 1 / -1;
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }

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

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

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

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

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

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

    .apps-grid .app-card:last-child {
        max-width: 100%;
    }

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

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

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        right: 0;
        left: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .lang-toggle {
        margin-inline-end: 8px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

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

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

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

    .cta-content h2 {
        font-size: 1.6rem;
    }
}
