/*
 * ==========================================================================
 * صفحة تحميل التطبيقات (app.php)
 * ==========================================================================
 *
 * ⚠ تبنى فوق page-hero.css (الترويسة الزرقاء والألوان والخط Tajawal): فلا ألوان ولا خطوط هنا.
 *   الألوان كلها من متغيرات --fx-* فيتبع الفاتح والداكن كبقية الصفحات.
 */

.ap-hero { min-height: 150px; }

/* بطاقة المنصة الرئيسية (أندرويد) */
.ap-feat {
    position: relative; z-index: 2; margin: -52px 16px 0; padding: 20px;
    display: flex; flex-direction: column; gap: 18px;
    background: var(--fx-sf); border: 1px solid var(--fx-bd); border-radius: 26px; box-shadow: var(--fx-shadow);
}
.ap-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ap-ic {
    flex: 0 0 auto; width: 64px; height: 64px; border-radius: 19px; display: grid; place-items: center;
    color: var(--fx-ac); background: var(--fx-tint);
}
.ap-ic svg { width: 32px; height: 32px; }
.ap-id { min-width: 0; }
.ap-nm { font-size: 22px; font-weight: 800; line-height: 1.25; }
.ap-pills { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.ap-pill {
    display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px;
    font-size: 12px; font-weight: 700; color: var(--fx-ac); background: var(--fx-tint);
}
.ap-cta {
    display: flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 34px;
    border-radius: 17px; text-decoration: none; font-size: 16.5px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #3978E8, #5b93ee); box-shadow: 0 12px 24px -12px rgba(57, 120, 232, .9);
}
.ap-cta:active { transform: scale(.985); }
.ap-cta svg { width: 20px; height: 20px; }

.ap-sec { margin: 24px 22px 10px; font-size: 13px; font-weight: 800; color: var(--fx-dm); }
.ap-feat + .ap-sec { margin-top: 22px; }
.ap-tiles { margin: 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ap-t {
    display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px 13px;
    background: var(--fx-sf); border: 1px solid var(--fx-bd); border-radius: 18px; box-shadow: var(--fx-shadow);
    color: inherit; text-decoration: none;
}
a.ap-t:active { background: var(--fx-sf2); }
.ap-t .i {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
    color: var(--fx-ac); background: var(--fx-tint);
}
.ap-t .i svg { width: 21px; height: 21px; }
.ap-t .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.ap-t .t b { font-size: 14px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.ap-t .soon {
    padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--fx-wt); background: var(--fx-wb);
}
.ap-t .v { font-size: 11.5px; font-weight: 600; color: var(--fx-dm); }
.ap-t .g { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: var(--fx-ac); background: var(--fx-tint); }
.ap-t .g svg { width: 18px; height: 18px; }
.ap-t.off .i { opacity: .55; }
.ap-t.off .t b { color: var(--fx-dm); }

/* ───────────── الكمبيوتر: صفحة بعرض 920 في المنتصف، بطاقة أندرويد أفقية، والمنصات الاخرى صف واحد ───────────── */
@media (min-width: 900px) {
    .fx-wrap:has(> .ap-hero) { max-width: 920px; padding: 24px 0 48px; }
    .fx-wrap:has(> .ap-hero) > .ap-hero { border-radius: 30px; min-height: 130px; }
    .fx-wrap:has(> .ap-hero) > .ap-feat {
        flex-direction: row; align-items: center; justify-content: space-between; gap: 24px;
        margin: -40px 28px 0; padding: 24px 28px;
    }
    .fx-wrap:has(> .ap-hero) .ap-ic { width: 76px; height: 76px; border-radius: 22px; }
    .fx-wrap:has(> .ap-hero) .ap-ic svg { width: 38px; height: 38px; }
    .fx-wrap:has(> .ap-hero) .ap-cta { flex: 0 0 auto; }
    .fx-wrap:has(> .ap-hero) > .ap-sec { margin: 28px 30px 12px; font-size: 14px; }
    .fx-wrap:has(> .ap-hero) > .ap-tiles { margin: 0 28px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
    .fx-wrap:has(> .ap-hero) .ap-t { padding: 14px 16px; }
}

/*
 * ───────────── الكمبيوتر: الشريط العلوي الثابت لصفحة التحميل العامة (بلا قائمة جانبية) ─────────────
 * داخل الحساب يتولى desktop.css شريطا بنفس الشكل (بعد قائمة الجانب). وهنا للزائر قبل الدخول: شريط أبيض بعرض الصفحة
 * وسطر صغير باسم الهوية فوق العنوان وزر الرجوع في البداية، كباقي الصفحات. وبطاقة اللوجو الطويلة تذهب (الا ان كان فيها زر تحميل لمنصة الزائر).
 */
@media (min-width: 900px) {
    .fx-wrap:has(> .ap-hero) > .ap-feat { margin: 0 28px; }

    html:not([data-dk]) .fx-wrap:has(> .ap-hero) { padding: 96px 0 48px; }
    html:not([data-dk]) .fx-wrap > .ap-hero {
        position: fixed; top: 0; inset-inline: 0; z-index: 900; box-sizing: border-box; display: flex; align-items: center;
        height: 72px; min-height: 0; max-width: none; margin: 0; padding: 0 28px; border-radius: 0; overflow: visible;
        background: var(--fx-sf); color: var(--fx-tx); border: 0; border-bottom: 1px solid var(--fx-bd); box-shadow: 0 6px 18px -14px rgba(20, 36, 90, .35);
    }
    html:not([data-dk]) .fx-wrap > .ap-hero::before, html:not([data-dk]) .fx-wrap > .ap-hero::after { display: none; }
    html:not([data-dk]) .ap-hero .fx-hero-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; margin: 0; padding: 0; }
    html:not([data-dk]) .ap-hero .fx-hero-t { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin: 0; padding: 0; }
    html:not([data-dk]) .ap-hero .fx-hero-t::before { content: "Fast Creator"; display: block; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--fx-dm); direction: ltr; }
    html:not([data-dk]) .ap-hero .fx-hero-t h1 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.25; color: var(--fx-tx); }
    html:not([data-dk]) .ap-hero .fx-glass {
        order: 9; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
        background: var(--fx-sf); color: var(--fx-dm); border: 1px solid var(--fx-bd); box-shadow: none;
    }
    html[dir="ltr"]:not([data-dk]) .ap-hero .fx-glass { order: -1; }
    html:not([data-dk]) .ap-hero .fx-glass:hover { background: var(--fx-sf2); color: var(--fx-ac); }
    html:not([data-dk]) .ap-hero .fx-glass svg, html:not([data-dk]) .ap-hero .fx-glass svg path { stroke: currentColor; color: inherit; }
}
@media (min-width: 900px) { html:not([data-dk]) .mt-install { top: auto; bottom: 24px; inset-inline-end: 28px; inset-inline-start: auto; } }
