/* ====== RESET & VARIABLES ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00C076;
    --primary-dark: #00A868;
    --danger: #F6465D;
    --warning: #FCD535;
    --bg: #0B0E11;
    --surface: #181A20;
    --border: #2B3139;
    --text: #EAECEF;
    --text-secondary: #848E9C;
    --radius: 16px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    direction: rtl;
    overflow-x: hidden;
}

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

.highlight {
    color: var(--primary);
}

/* ====== BUTTONS ====== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 192, 118, 0.3);
}

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

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

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

/* ====== HEADER ====== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(11, 14, 17, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
}

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

/* ====== HEADER ACTIONS ====== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ====== LANGUAGE SWITCHER ====== */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    background-color: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

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

.lang-btn #currentLangLabel {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--text);
    min-width: 24px;
    text-align: center;
}

.lang-btn:hover #currentLangLabel {
    color: var(--primary);
}

.lang-arrow {
    font-size: 10px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 170px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 1100;
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    text-align: right;
    cursor: pointer;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

/* كود اللغة داخل المربع الأخضر */
.lang-option .lang-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 22px;
    padding: 0 6px;
    background-color: rgba(0, 192, 118, 0.15);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.5px;
    font-family: 'Cairo', sans-serif;
    line-height: 1;
    transition: var(--transition);
    flex-shrink: 0;
}

.lang-option:hover {
    background-color: rgba(0, 192, 118, 0.1);
    color: var(--primary);
}

.lang-option:hover .lang-code {
    background-color: rgba(0, 192, 118, 0.25);
}

.lang-option.active {
    background-color: rgba(0, 192, 118, 0.15);
    color: var(--primary);
    font-weight: 700;
}

.lang-option.active .lang-code {
    background-color: var(--primary);
    color: #000;
}

/* في الوضع RTL القائمة تفتح يميناً */
html[dir="rtl"] .lang-dropdown {
    left: auto;
    right: 0;
}

html[dir="rtl"] .lang-option {
    text-align: right;
}

html[dir="ltr"] .lang-option {
    text-align: left;
}

/* ====== HERO ====== */
.hero {
    padding: 160px 0 100px;
    background: radial-gradient(circle at 20% 30%, rgba(0, 192, 118, 0.15) 0%, transparent 50%);
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(0, 192, 118, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 192, 118, 0.3);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 19px;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border);
    padding-top: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ====== PHONE MOCKUP ====== */
.phone-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.phone-frame {
    width: 300px;
    height: 610px;
    padding: 12px;
    position: relative;
    border-radius: 46px;
    background: linear-gradient(145deg, #2a2a2a 0%, #0d0d0d 100%);
    box-shadow:
        0 0 0 3px #2a2a2a,
        0 0 0 4px #0a0a0a,
        0 40px 80px rgba(0, 192, 118, 0.25),
        0 20px 40px rgba(0, 0, 0, 0.4);
}

.phone-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 34px;
    display: block;
    background-color: #0B0E11;
}

.phone-notch {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 26px;
    background: #000;
    border-radius: 20px;
    z-index: 10;
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.05);
}

.phone-button-left {
    position: absolute;
    left: -4px;
    top: 130px;
    width: 4px;
    height: 35px;
    background: linear-gradient(to right, #0a0a0a, #2a2a2a);
    border-radius: 2px 0 0 2px;
}

.phone-button-right-1 {
    position: absolute;
    right: -4px;
    top: 110px;
    width: 4px;
    height: 55px;
    background: linear-gradient(to left, #0a0a0a, #2a2a2a);
    border-radius: 0 2px 2px 0;
}

.phone-button-right-2 {
    position: absolute;
    right: -4px;
    top: 180px;
    width: 4px;
    height: 80px;
    background: linear-gradient(to left, #0a0a0a, #2a2a2a);
    border-radius: 0 2px 2px 0;
}

.phone-frame::after {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 60px;
    background: radial-gradient(circle, rgba(0, 192, 118, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* ====== SECTIONS ====== */
section {
    padding: 100px 0;
}

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

.section-header h2 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 18px;
}

/* ====== FEATURES ====== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 192, 118, 0.1);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ====== HOW IT WORKS ====== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.step {
    text-align: center;
    padding: 32px 24px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
}

.step-num {
    width: 56px;
    height: 56px;
    background-color: var(--primary);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.step p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ====== DOWNLOAD ====== */
.download {
    background: linear-gradient(135deg, rgba(0, 192, 118, 0.1), rgba(252, 213, 53, 0.05));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.download-text h2 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 12px;
}

.download-text p {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 32px;
}

.download-note {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ====== FAQ ====== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    color: var(--text);
    font-family: 'Cairo', sans-serif;
    font-size: 17px;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

html[dir="ltr"] .faq-question {
    text-align: left;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-toggle {
    font-size: 24px;
    font-weight: 400;
    color: var(--primary);
    transition: var(--transition);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

/* ====== FOOTER ====== */
.footer {
    background-color: #060809;
    border-top: 1px solid var(--border);
    padding: 60px 0 0;
}

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

.footer-logo {
    height: 40px;
    margin-bottom: 16px;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 320px;
}

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

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: var(--transition);
}

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

.footer-info {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 8px;
}

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

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-title {
        font-size: 38px;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .nav {
        display: none;
    }
    .phone-frame {
        width: 260px;
        height: 520px;
        border-radius: 40px;
        padding: 10px;
    }
    .phone-frame img {
        border-radius: 30px;
    }
    .phone-notch {
        width: 80px;
        height: 22px;
        top: 18px;
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    .section-header h2,
    .download-text h2 {
        font-size: 32px;
    }
    .lang-btn {
        padding: 7px 10px;
        font-size: 14px;
    }
    .lang-dropdown {
        min-width: 150px;
    }
}

@media (max-width: 500px) {
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
    .phone-frame {
        width: 240px;
        height: 480px;
    }
    .header-actions {
        gap: 6px;
    }
    .btn-primary {
        padding: 10px 14px;
        font-size: 13px;
    }
    .lang-btn {
        padding: 7px 10px;
        font-size: 12px;
    }
    .lang-btn #currentLangLabel {
        font-size: 12px;
        min-width: 20px;
    }
}