/*
 * ثيم الـLanding Page العام — نفس متغيرات الألوان الأساسية المستخدمة في
 * admin-theme.css (تركواز/أخضر مزرق) عشان الهوية البصرية تفضل واحدة بين
 * لوحة التحكم والموقع العام.
 */
:root {
    --color-primary: #0E7C7B;
    --color-primary-dark: #0B5E5D;
    --color-primary-rgb: 14, 124, 123;
    --color-accent: #4FD1C5;
    --color-accent-rgb: 79, 209, 197;
    --color-dark: #0F2A2A;
    --color-ink: #1F2937;
    --color-muted: #5B6B6A;
    --color-bg: #F7FAFA;
    --color-bg-soft: #EEF7F6;
    --font-sans: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    font-family: var(--font-sans);
    color: var(--color-ink);
    background-color: #fff;
    overflow-x: hidden;
}

.text-primary-brand { color: var(--color-primary) !important; }
.bg-primary-brand { background-color: var(--color-primary) !important; }
.bg-soft { background-color: var(--color-bg-soft) !important; }

/* ============== Buttons ============== */
.btn-brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    border: none;
    padding: .85rem 1.75rem;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 10px 25px -8px rgba(var(--color-primary-rgb), .55);
    transition: transform .18s ease, box-shadow .18s ease;
}
.btn-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -8px rgba(var(--color-primary-rgb), .65);
    color: #fff;
}
.btn-brand-outline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: .8rem 1.7rem;
    border-radius: 12px;
    font-weight: 700;
    transition: all .18s ease;
}
.btn-brand-outline:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ============== Navbar ============== */
.landing-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(var(--color-primary-rgb), .08);
    transition: box-shadow .2s ease;
}
.landing-navbar.scrolled {
    box-shadow: 0 6px 24px -12px rgba(15, 42, 42, .18);
}
.landing-navbar .nav-link {
    font-weight: 600;
    color: var(--color-ink);
    padding: .5rem 1rem !important;
}
.landing-navbar .nav-link:hover,
.landing-navbar .nav-link.active {
    color: var(--color-primary);
}
.landing-brand img { height: 42px; width: auto; }
.landing-brand span { font-weight: 800; font-size: 1.15rem; color: var(--color-primary); }

/* ============== Language switcher — segmented pill ============== */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(var(--color-primary-rgb), .08);
    border-radius: 999px;
    padding: 4px;
}
.lang-switch-icon {
    color: var(--color-primary);
    font-size: .85rem;
    padding-inline-start: .5rem;
    padding-inline-end: .15rem;
}
.lang-switch-item {
    padding: .35rem .85rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--color-muted);
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
    white-space: nowrap;
}
.lang-switch-item:hover { color: var(--color-primary); }
.lang-switch-item.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 10px -4px rgba(var(--color-primary-rgb), .55);
}

/* ============== Hero ============== */
.hero-section {
    position: relative;
    padding: 6.5rem 0 7rem;
    background: radial-gradient(1200px 600px at 15% -10%, rgba(var(--color-accent-rgb), .18), transparent),
                radial-gradient(900px 500px at 100% 10%, rgba(var(--color-primary-rgb), .12), transparent),
                var(--color-bg);
    overflow: hidden;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(var(--color-primary-rgb), .1);
    color: var(--color-primary);
    font-weight: 700;
    font-size: .85rem;
    padding: .4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}
.hero-title {
    font-size: clamp(2rem, 4.2vw, 3.4rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--color-dark);
    margin-bottom: 1.25rem;
}
.hero-description {
    font-size: 1.15rem;
    color: var(--color-muted);
    max-width: 560px;
    margin-bottom: 2rem;
    line-height: 1.8;
}
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}
.hero-visual-blob {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 420px;
    height: 420px;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), .18), rgba(var(--color-accent-rgb), .22));
    border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
    animation: blobMove 10s ease-in-out infinite;
    filter: blur(2px);
}
@keyframes blobMove {
    0%, 100% { border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%; transform: rotate(0deg) scale(1); }
    50% { border-radius: 58% 42% 35% 65% / 55% 60% 40% 45%; transform: rotate(8deg) scale(1.04); }
}
.hero-visual-image {
    position: relative;
    z-index: 2;
    max-width: 320px;
    width: 100%;
    filter: drop-shadow(0 22px 35px rgba(15, 42, 42, .22));
    animation: floatY 5s ease-in-out infinite;
}
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
.hero-floating-card {
    position: absolute;
    z-index: 3;
    background: #fff;
    border-radius: 14px;
    padding: .75rem 1.1rem;
    box-shadow: 0 14px 34px -14px rgba(15, 42, 42, .3);
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: 700;
    font-size: .85rem;
    animation: floatY 6s ease-in-out infinite;
}
.hero-floating-card i { color: var(--color-primary); font-size: 1.1rem; }
.hero-floating-card.card-1 { top: 8%; inset-inline-start: 0; animation-delay: .3s; }
.hero-floating-card.card-2 { bottom: 12%; inset-inline-end: 0; animation-delay: 1.2s; }
.hero-floating-card.card-3 { top: 45%; inset-inline-start: -5%; animation-delay: 2s; }

/* ============== Section basics ============== */
.section-label {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .04em;
    background: rgba(var(--color-primary-rgb), .1);
    padding: .35rem .9rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: .85rem;
}
.section-description {
    color: var(--color-muted);
    font-size: 1.05rem;
    max-width: 640px;
    line-height: 1.8;
}
section { scroll-margin-top: 84px; }

/* ============== Cards ============== */
.feature-card, .step-card, .info-card {
    background: #fff;
    border-radius: 18px;
    padding: 2rem 1.6rem;
    height: 100%;
    box-shadow: 0 6px 24px -16px rgba(15, 42, 42, .18);
    border: 1px solid rgba(var(--color-primary-rgb), .06);
    transition: transform .22s ease, box-shadow .22s ease;
}
.feature-card:hover, .step-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px -18px rgba(15, 42, 42, .28);
}
.feature-icon, .step-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), .12), rgba(var(--color-accent-rgb), .18));
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 1.1rem;
}
.step-number {
    position: absolute;
    top: -14px;
    inset-inline-start: -10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .9rem;
    box-shadow: 0 6px 14px -4px rgba(var(--color-primary-rgb), .6);
}
.step-card { position: relative; }

.benefit-list { list-style: none; padding: 0; margin: 0; }
.benefit-list li {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    margin-bottom: .9rem;
    font-weight: 600;
    color: var(--color-ink);
}
.benefit-list li i {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), .12);
    border-radius: 50%;
    width: 26px;
    height: 26px;
    min-width: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    margin-top: 2px;
}

/* ============== Split sections (About / Doctor / Vendor) ============== */
.split-section-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-bg-soft), #fff);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}
.split-section-image img {
    max-width: 70%;
    filter: drop-shadow(0 18px 30px rgba(15, 42, 42, .15));
}

/* ============== Join / Contact forms ============== */
.join-card, .contact-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 12px 40px -20px rgba(15, 42, 42, .3);
    padding: 2.25rem;
}
.legal-content {
    line-height: 1.9;
    color: #3a4a4a;
    font-size: 1.02rem;
}
.form-control-brand {
    border-radius: 10px;
    border: 1.5px solid #E4EEEE;
    padding: .7rem 1rem;
}
.form-control-brand:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 .2rem rgba(var(--color-primary-rgb), .15);
}

/* ============== Footer ============== */
.landing-footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, .78);
    padding: 4rem 0 1.5rem;
}
.landing-footer h6 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1.1rem;
}
.landing-footer a {
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
}
.landing-footer a:hover { color: var(--color-accent); }
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    margin-inline-end: .5rem;
    transition: background .18s ease, transform .18s ease;
}
.footer-social a:hover { background: var(--color-primary); transform: translateY(-3px); }
.app-badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    padding: .6rem 1rem;
    color: #fff;
    margin-inline-end: .6rem;
    margin-bottom: .6rem;
    transition: background .18s ease;
}
.app-badge:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.app-badge i { font-size: 1.5rem; }
.app-badge small { display: block; font-size: .68rem; opacity: .75; }
.app-badge strong { display: block; font-size: .9rem; }

/* ============== WhatsApp floating button ============== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    z-index: 1040;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .6);
    animation: pulseWhatsapp 2.4s ease-in-out infinite;
}
.whatsapp-float:hover { color: #fff; transform: scale(1.06); }
@keyframes pulseWhatsapp {
    0%, 100% { box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .6); }
    50% { box-shadow: 0 12px 28px -4px rgba(37, 211, 102, .85); }
}

/*
 * ملحوظة تصميم مهمة: كان هنا في الأول نظام "Reveal on scroll" بيخفي كل
 * قسم (opacity:0) لحد ما IntersectionObserver يكتشفه وقت الـScroll —
 * جربته فعليًا بلقطة شاشة كاملة (screenshot) ولقيت نص الصفحة بيبان فاضي
 * تمامًا، لأن أي أداة أو متصفح بيلتقط الصفحة كلها دفعة واحدة من غير
 * Scroll حقيقي (زي محركات البحث اللي مابتعملش Scroll، أو أدوات الفحص،
 * أو مستخدم بيقفز لرابط #anchor مباشرة) هيخلي المحتوى ده يفضل مخفي —
 * وده خطير جدًا لصفحة أساسها التحويل لعملاء (Doctor/Vendor CTAs). فبدل
 * ما أخاطر بمحتوى مختفي لأي زائر حقيقي، شلت فكرة الإخفاء بالكامل —
 * المحتوى كله مرئي مباشرة دايمًا (opacity:1 ثابتة)، والحركة الوحيدة
 * المتبقية هي تأثيرات hover الخفيفة على الكروت (مش شرط لظهور أي حاجة).
 */
.reveal {
    opacity: 1;
    transform: none;
}

/* ============== RTL/LTR aware tweaks ============== */
[dir="rtl"] .split-section-image { direction: rtl; }

/* ============== Hero — Doctor ↔ Platform ↔ Vendor composition ============== */
.hero-ecosystem {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 380px;
}
.hero-node {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 40px -18px rgba(15, 42, 42, .3);
    padding: 1.1rem 1.3rem;
    text-align: center;
    width: 128px;
}
.hero-node i { font-size: 1.9rem; color: var(--color-primary); }
.hero-node span { display: block; font-size: .75rem; font-weight: 700; margin-top: .4rem; color: var(--color-ink); }
.hero-node.node-doctor { animation: floatY 5.5s ease-in-out infinite; }
.hero-node.node-vendor { animation: floatY 5.5s ease-in-out infinite; animation-delay: .6s; }
.hero-node-center {
    position: relative;
    z-index: 3;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 40px -14px rgba(var(--color-primary-rgb), .6);
    margin: 0 -6px;
}
.hero-node-center img { width: 56px; height: 56px; object-fit: contain; filter: brightness(0) invert(1); }
.hero-connector {
    flex: 1;
    max-width: 90px;
    height: 2px;
    background-image: linear-gradient(90deg, rgba(var(--color-primary-rgb), .5) 50%, transparent 50%);
    background-size: 10px 2px;
    position: relative;
    z-index: 1;
}
.hero-connector::before,
.hero-connector::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    transform: translateY(-50%);
    animation: connectorDot 2.6s linear infinite;
}
.hero-connector::after { animation-delay: 1.3s; }
@keyframes connectorDot {
    0% { left: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* ============== Phone mockup (Doctor App) ============== */
.phone-mockup {
    position: relative;
    width: 260px;
    height: 520px;
    margin-inline: auto;
    background: var(--color-dark);
    border-radius: 42px;
    padding: 14px;
    box-shadow: 0 30px 60px -24px rgba(15, 42, 42, .4);
}
.phone-mockup::before {
    content: '';
    position: absolute;
    top: 14px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 20px;
    background: var(--color-dark);
    border-radius: 0 0 14px 14px;
    z-index: 2;
}
.phone-mockup-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, var(--color-bg-soft), #fff 60%);
    border-radius: 30px;
    overflow: hidden;
    padding: 2.2rem 1rem 1rem;
}
.phone-screen-card {
    background: #fff;
    border-radius: 14px;
    padding: .75rem .9rem;
    box-shadow: 0 8px 18px -10px rgba(15, 42, 42, .18);
    margin-bottom: .7rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .72rem;
    font-weight: 700;
    color: var(--color-ink);
    animation: floatY 4.5s ease-in-out infinite;
}
.phone-screen-card i { color: var(--color-primary); font-size: 1.1rem; }
.phone-screen-card:nth-child(2) { animation-delay: .4s; }
.phone-screen-card:nth-child(3) { animation-delay: .8s; }
.phone-screen-card:nth-child(4) { animation-delay: 1.2s; margin-bottom: 0; }
.phone-screen-card.is-accent { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: #fff; }
.phone-screen-card.is-accent i { color: #fff; }

.app-store-badges { display: flex; flex-wrap: wrap; gap: .75rem; }
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: var(--color-dark);
    color: #fff;
    border-radius: 12px;
    padding: .65rem 1.1rem;
    transition: transform .18s ease, box-shadow .18s ease;
}
.store-badge:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 12px 24px -12px rgba(15, 42, 42, .5); }
.store-badge i { font-size: 1.6rem; }
.store-badge small { display: block; font-size: .65rem; opacity: .75; }
.store-badge strong { display: block; font-size: .9rem; }

/* ============== Vendor section — distinct visual identity ============== */
.vendor-section-panel {
    background: linear-gradient(155deg, var(--color-dark), #123B3A 70%);
    border-radius: 28px;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}
.vendor-section-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(500px 300px at 90% 0%, rgba(var(--color-accent-rgb), .18), transparent);
}
.vendor-section-panel .section-label { background: rgba(255, 255, 255, .12); color: var(--color-accent); }
.vendor-section-panel .section-title,
.vendor-section-panel .section-description,
.vendor-section-panel .benefit-list li { color: #fff; position: relative; z-index: 1; }
.vendor-section-panel .section-description { color: rgba(255, 255, 255, .78); }
.vendor-section-panel .benefit-list li i { background: rgba(var(--color-accent-rgb), .2); color: var(--color-accent); }

.vendor-flow-card {
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    padding: 1.4rem 1rem;
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
}
.vendor-flow-card i { font-size: 1.6rem; color: var(--color-accent); margin-bottom: .5rem; display: block; }
.vendor-flow-card span { font-size: .8rem; font-weight: 700; }

/* ============== Workflow — connected horizontal steps ============== */
.workflow-row {
    display: flex;
    align-items: stretch;
    gap: 0;
}
.workflow-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0 .5rem;
}
.workflow-step-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(var(--color-primary-rgb), .2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 800;
    box-shadow: 0 10px 24px -14px rgba(15, 42, 42, .25);
}
.workflow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-size: 1.3rem;
    padding-top: 22px;
    flex: 0 0 auto;
    width: 40px;
}
[dir="rtl"] .workflow-arrow i { transform: scaleX(-1); }

@media (max-width: 767.98px) {
    .workflow-row { flex-direction: column; gap: 1.5rem; }
    .workflow-arrow { width: auto; padding: 0; transform: rotate(90deg); }
    [dir="rtl"] .workflow-arrow i { transform: rotate(0); }
    .hero-ecosystem { flex-wrap: wrap; gap: 1rem; min-height: auto; }
    .hero-connector { display: none; }
    .phone-mockup { width: 220px; height: 440px; }
    .vendor-section-panel { padding: 2rem 1.25rem; }
    .hero-section { padding: 3.5rem 0 3rem; text-align: center; }
    .hero-description { margin-inline: auto; }
    .hero-visual { min-height: 280px; margin-top: 2rem; }
    .hero-visual-image { max-width: 220px; }
    .whatsapp-float { width: 52px; height: 52px; font-size: 1.5rem; bottom: 16px; inset-inline-end: 16px; }
}
