@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Alexandria:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-rgb: 0, 180, 200;
    --primary-color: rgb(var(--primary-rgb));
    --primary-hover: #0097a8;
    --primary-light: rgba(var(--primary-rgb), 0.12);
    --accent-teal: #14b8a6;
    --accent-blue: #3b82f6;
    --accent-gold: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --bg-body: #f5f7fa;
    --bg-surface: #ffffff;
    --bg-soft: #eef3f7;
    --text-main: #0d1b2a;
    --text-secondary: #475569;
    --text-muted: #8fa7b5;
    --text-inverse: #ffffff;
    --border-color: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(255, 255, 255, 0.55);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.13);
    --radius-md: 18px;
    --radius-lg: 28px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-body: #0b1220;
    --bg-surface: #162235;
    --bg-soft: rgba(var(--primary-rgb), 0.12);
    --text-main: #f5f7fa;
    --text-secondary: #a1a1aa;
    --text-muted: #8fa7b5;
    --text-inverse: #0b1220;
    --border-color: #2a3342;
    --glass-bg: rgba(22, 34, 53, 0.84);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.45);
}

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

html {
    scroll-behavior: smooth;
}

html[lang="ar"] {
    font-family: 'Alexandria', sans-serif;
}

html[lang="en"] {
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(var(--primary-rgb), 0.12), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(20, 184, 166, 0.12), transparent 26%),
        var(--bg-body);
    color: var(--text-main);
    font-family: inherit;
    overflow-x: hidden;
}

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

.lang-hide {
    display: none !important;
}

.container-landing {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(18px);
}

.nav-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    font-weight: 800;
    font-size: 18px;
    white-space: nowrap;
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
}

.brand .logo-dark {
    display: none;
}

[data-theme="dark"] .brand .logo-light {
    display: none;
}

[data-theme="dark"] .brand .logo-dark {
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
}

.nav-links a {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn,
.lang-btn,
.menu-btn {
    height: 40px;
    min-width: 40px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover,
.lang-btn:hover,
.menu-btn:hover {
    color: var(--primary-color);
    border-color: rgba(var(--primary-rgb), 0.4);
    background: var(--primary-light);
}

.lang-btn.active-lang {
    display: none;
}

.menu-btn {
    display: none;
}

.btn-primary-landing,
.btn-secondary-landing {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: var(--transition);
}

.btn-primary-landing {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    box-shadow: 0 16px 34px rgba(var(--primary-rgb), 0.24);
}

.btn-primary-landing:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(var(--primary-rgb), 0.32);
}

.btn-secondary-landing {
    color: var(--text-main);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.btn-secondary-landing:hover {
    color: var(--primary-color);
    border-color: rgba(var(--primary-rgb), 0.4);
    transform: translateY(-2px);
}

.hero {
    padding: 82px 0 54px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
    align-items: center;
    gap: 46px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--primary-color);
    background: var(--primary-light);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(34px, 4.4vw, 58px);
    line-height: 1.12;
    letter-spacing: -0.045em;
    font-weight: 700;
    margin-bottom: 18px;
}

html[lang="ar"] .hero h1 {
    letter-spacing: -0.015em;
    font-size: clamp(32px, 4.1vw, 54px);
    line-height: 1.18;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.8;
    max-width: 680px;
    margin-bottom: 26px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.trust-pill i {
    color: var(--accent-teal);
}

.hero-visual {
    position: relative;
}

.hero-image-wrap {
    display: block;
    border-radius: 30px;
    filter: drop-shadow(0 24px 70px rgba(15, 23, 42, 0.13));
    overflow: hidden;
    transform: rotate(-1.5deg);
}

[dir="rtl"] .hero-image-wrap {
    transform: rotate(1.5deg);
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
}

.hero-image-dark {
    display: none;
}

[data-theme="dark"] .hero-image-light {
    display: none;
}

[data-theme="dark"] .hero-image-dark {
    display: block;
}

.app-preview {
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: var(--glass-bg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: rotate(-1.5deg);
}

[dir="rtl"] .app-preview {
    transform: rotate(1.5deg);
}

.preview-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
}

.window-dots span:nth-child(1) { background: var(--accent-red); }
.window-dots span:nth-child(2) { background: var(--accent-gold); }
.window-dots span:nth-child(3) { background: var(--accent-teal); }

.preview-title {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 800;
}

.preview-body {
    display: grid;
    grid-template-columns: 120px 1fr;
    min-height: 440px;
}

.preview-sidebar {
    padding: 16px 12px;
    border-inline-end: 1px solid var(--border-color);
    background: rgba(var(--primary-rgb), 0.04);
}

.preview-nav-item {
    height: 34px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.preview-nav-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.preview-main {
    padding: 18px;
}

.preview-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.preview-stat,
.preview-card {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--bg-surface);
    padding: 16px;
}

.preview-stat strong {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

.preview-stat span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.preview-card {
    min-height: 170px;
}

.chart-bars {
    display: flex;
    align-items: end;
    gap: 10px;
    height: 130px;
    margin-top: 14px;
}

.chart-bars span {
    flex: 1;
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, var(--primary-color), rgba(var(--primary-rgb), 0.2));
}

.floating-card {
    position: absolute;
    right: -18px;
    bottom: 34px;
    width: min(250px, 58%);
    padding: 16px;
    border-radius: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

[dir="rtl"] .floating-card {
    right: auto;
    left: -18px;
}

.floating-card .label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}

.floating-card strong {
    display: block;
    font-size: 22px;
    margin-bottom: 8px;
}

.progress-line {
    height: 8px;
    background: var(--primary-light);
    border-radius: 999px;
    overflow: hidden;
}

.progress-line span {
    display: block;
    width: 78%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-teal), var(--primary-color));
}

.stats-strip {
    padding: 18px 0 46px;
}

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

.stat-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.stat-box strong {
    display: block;
    font-size: 30px;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.stat-box span {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 14px;
}

.section {
    padding: 62px 0;
}

.section-muted {
    background: linear-gradient(180deg, transparent, rgba(var(--primary-rgb), 0.04), transparent);
}

.section-head {
    max-width: 790px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-head h2 {
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.2;
    letter-spacing: -0.035em;
    font-weight: 700;
    margin-bottom: 12px;
}

html[lang="ar"] .section-head h2 {
    letter-spacing: -0.012em;
}

.section-head p {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.8;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-card,
.module-card,
.scenario-card,
.security-card,
.role-card,
.faq-item,
.cta-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.feature-card,
.module-card,
.scenario-card,
.security-card,
.role-card {
    padding: 22px;
    transition: var(--transition);
}

.feature-card:hover,
.module-card:hover,
.scenario-card:hover,
.security-card:hover,
.role-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
}

.card-icon.teal { background: linear-gradient(135deg, var(--accent-teal), #0f766e); }
.card-icon.gold { background: linear-gradient(135deg, var(--accent-gold), #b45309); }
.card-icon.purple { background: linear-gradient(135deg, var(--accent-purple), #6d28d9); }
.card-icon.red { background: linear-gradient(135deg, var(--accent-red), #b91c1c); }

.feature-card h3,
.module-card h3,
.scenario-card h3,
.security-card h3,
.role-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-card p,
.module-card p,
.scenario-card p,
.security-card p,
.role-card p {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 14px;
}

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

.module-card {
    min-height: 188px;
}

.workflow {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    counter-reset: step;
}

.workflow-step {
    position: relative;
    padding: 24px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

.workflow-step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: 900;
    margin-bottom: 14px;
}

.workflow-step h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.workflow-step p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.split-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    align-items: start;
}

.problem-box {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.11), rgba(245, 158, 11, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.solution-box {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(var(--primary-rgb), 0.08));
    border: 1px solid rgba(20, 184, 166, 0.2);
}

.check-list {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-secondary);
    line-height: 1.65;
    font-weight: 600;
}

.check-list i {
    margin-top: 4px;
    color: var(--accent-teal);
}

.problem-box .check-list i {
    color: var(--accent-red);
}

.scenario-grid,
.security-grid,
.role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.scenario-card ul {
    margin-top: 14px;
    padding-inline-start: 20px;
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 14px;
}

.scenario-card li {
    margin-bottom: 7px;
}

.cta-panel {
    position: relative;
    overflow: hidden;
    padding: 42px;
    border-radius: 32px;
    background:
        radial-gradient(circle at 18% 20%, rgba(20, 184, 166, 0.18), transparent 24%),
        linear-gradient(135deg, var(--primary-color), #172554);
    color: #fff;
}

.cta-panel h2 {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 700;
    margin-bottom: 12px;
}

.cta-panel p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.8;
    max-width: 760px;
    margin-bottom: 22px;
}

.cta-panel .btn-secondary-landing {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
}

.faq-list {
    display: grid;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-question {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: inherit;
}

.faq-question i {
    transition: var(--transition);
    color: var(--text-muted);
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-answer {
    display: none;
    padding: 0 22px 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.faq-item.open .faq-answer {
    display: block;
}

.footer {
    padding: 34px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.whatsapp-float {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 1100;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #25d366;
    box-shadow: 0 16px 34px rgba(37, 211, 102, 0.34);
    font-size: 30px;
    transition: var(--transition);
}

.whatsapp-float:hover {
    color: #fff;
    background: #1ebe5d;
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(37, 211, 102, 0.42);
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1100;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    box-shadow: 0 16px 34px rgba(var(--primary-rgb), 0.28);
    font-size: 18px;
    transition: var(--transition);
}

.back-to-top:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(var(--primary-rgb), 0.36);
}

@media (max-width: 1024px) {
    .hero-grid,
    .split-section {
        grid-template-columns: 1fr;
    }

    .cards-grid,
    .scenario-grid,
    .security-grid,
    .role-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .module-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 820px) {
    .nav-inner {
        min-height: 72px;
        justify-content: space-between;
        gap: 10px;
    }

    .brand {
        flex: 1 1 auto;
        gap: 8px;
    }

    .brand img {
        width: 40px;
        height: 40px;
        flex: 0 0 auto;
    }

    .brand span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-actions {
        flex: 0 0 auto;
        gap: 7px;
    }

    .menu-btn {
        display: inline-flex;
    }

    .nav-links {
        position: fixed;
        top: 74px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--border-color);
        border-radius: 18px;
        background: var(--bg-surface);
        box-shadow: var(--shadow-lg);
        margin: 0;
    }

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

    .nav-links a {
        border-radius: 12px;
    }

    .hero {
        padding-top: 48px;
    }

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

    .preview-body {
        grid-template-columns: 1fr;
    }

    .preview-sidebar {
        display: none;
    }
}

@media (max-width: 620px) {
    .container-landing {
        width: min(100% - 24px, 1180px);
    }

    .nav-inner {
        min-height: 68px;
        gap: 8px;
    }

    .nav-actions {
        gap: 6px;
    }

    .icon-btn,
    .lang-btn,
    .menu-btn {
        height: 40px;
        min-width: 40px;
        border-radius: 12px;
    }

    .brand span {
        max-width: clamp(72px, 24vw, 150px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-links {
        top: 68px;
        left: 12px;
        right: 12px;
    }

    .hero h1 {
        font-size: 32px;
    }

    html[lang="ar"] .hero h1 {
        font-size: 30px;
    }

    .cards-grid,
    .scenario-grid,
    .security-grid,
    .role-grid,
    .module-grid,
    .workflow {
        grid-template-columns: 1fr;
    }

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

    .hero-actions,
    .cta-panel .hero-actions {
        flex-direction: column;
    }

    .btn-primary-landing,
    .btn-secondary-landing {
        width: 100%;
    }

    .app-preview,
    .hero-image-wrap {
        transform: none !important;
    }

    .floating-card {
        position: static;
        width: 100%;
        margin-top: 14px;
    }

    .cta-panel {
        padding: 28px;
    }

    .whatsapp-float {
        left: 16px;
        bottom: 16px;
        width: 52px;
        height: 52px;
        font-size: 27px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 46px;
        height: 46px;
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .brand span {
        display: none;
    }

    .brand img {
        width: 38px;
        height: 38px;
    }
}
