/* ══════════════════════════════════════════════════════════════
   📱 بازطراحی موبایل صفحه اصلی — خلوت‌تر، فشرده‌تر، اپ‌مانند
   ══════════════════════════════════════════════════════════════
   این فایل فقط روی موبایل اعمال می‌شه (تمام قوانین داخل @media)،
   نسخه‌ی دسکتاپ کاملاً دست‌نخورده باقی می‌مونه. */

@media (max-width: 768px) {

    /* ─────────────────────────────────────────────
       ۱. مخفی‌کردن بخش‌های «چرا بریمو» و «نحوه کار»
       ───────────────────────────────────────────── */
    [data-mobile-hide="true"] {
        display: none !important;
    }

    /* ─────────────────────────────────────────────
       ۲. کارت‌های پروموشنال — کوچیک‌تر، کنار هم، زیباتر
       ───────────────────────────────────────────── */
    /* 🔒 اصلاح: قبلاً این دو کارت روی موبایل زیر هم (تک‌ستونه) می‌شدن؛
       الان با specificity بالاتر، همیشه کنار هم می‌مونن ولی با اندازه‌ی
       فشرده و مناسب موبایل */
    .promo-cards-row {
        grid-template-columns: 1fr 1fr !important;
        gap: .6rem !important;
        margin: 1.4rem 0 1rem !important;
    }
    .promo-card-club, .promo-card-discount {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        text-align: right !important;
        padding: 1rem .9rem !important;
        border-radius: 18px !important;
        min-height: auto !important;
        gap: .5rem !important;
    }
    .promo-card-club-icon, .promo-card-discount-icon {
        width: 34px !important;
        height: 34px !important;
        font-size: 1rem !important;
        order: -1;
        animation: none !important; /* حذف انیمیشن شناور که در سایز کوچیک آزاردهنده می‌شد */
    }
    .promo-card-club-text h3, .promo-card-discount-text h3 {
        font-size: .82rem !important;
        margin-bottom: .3rem !important;
        line-height: 1.4;
    }
    .promo-card-club-text p, .promo-card-discount-text p {
        font-size: .62rem !important;
        margin-bottom: .6rem !important;
        max-width: 100% !important;
        line-height: 1.6;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .promo-club-btn, .promo-discount-btn {
        padding: .4rem .9rem !important;
        font-size: .64rem !important;
        width: 100%;
        text-align: center;
    }

    /* ─────────────────────────────────────────────
       ۳. مودال نصب اپلیکیشن — از تمام‌صفحه به یک کارت ظریف
       ───────────────────────────────────────────── */
    /* 🔒 اصلاح: قبلاً این مودال با inset:0 کل صفحه رو می‌پوشوند؛ الان یه
       کارت جمع‌وجور و مرکزی، با فاصله‌ی مشخص از لبه‌های صفحه */
    .install-guide-modal {
        padding: 1.2rem !important;
        align-items: center !important;
    }
    .install-guide-content {
        max-width: 320px !important;
        width: 100% !important;
        max-height: 78vh !important;
        overflow-y: auto !important;
        padding: 1.3rem 1.2rem !important;
        border-radius: 20px !important;
    }
    .install-guide-title {
        font-size: .95rem !important;
        margin-bottom: .3rem !important;
    }
    .install-guide-subtitle {
        font-size: .68rem !important;
        margin-bottom: .9rem !important;
    }
    .install-step {
        padding: .7rem !important;
        margin-bottom: .6rem !important;
    }
    .install-step-title {
        font-size: .74rem !important;
        gap: .4rem !important;
    }
    .install-step-icon {
        width: 24px !important;
        height: 24px !important;
        font-size: .78rem !important;
    }
    .install-step-desc {
        font-size: .64rem !important;
        line-height: 1.7 !important;
    }
    .install-guide-close {
        padding: .6rem !important;
        font-size: .78rem !important;
        margin-top: .6rem !important;
    }

    /* ─────────────────────────────────────────────
       ۴. دکمه‌های شناور — طراحی کاملاً جدید و خلاقانه
       ───────────────────────────────────────────── */
    /* 🎨 به‌جای سه دایره‌ی جدا و هم‌رنگ، یه کپسول شیشه‌ای واحد با
       رنگ‌بندی متنوع برای هر آیکون — حس مدرن‌تر و متفاوت‌تر */
    .floating-actions {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
        right: 12px !important;
        flex-direction: column !important;
        gap: 0 !important;
        background: rgba(28, 25, 19, .55) !important;
        backdrop-filter: blur(18px) saturate(160%) !important;
        -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
        border: 1px solid rgba(255, 255, 255, .1) !important;
        border-radius: 24px !important;
        padding: 6px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .35) !important;
    }
    .floating-btn {
        width: 42px !important;
        height: 42px !important;
        border-radius: 18px !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 15px !important;
        position: relative;
        margin: 2px 0;
    }
    .floating-btn::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 18px;
        opacity: .16;
        transition: opacity .25s ease;
    }
    .floating-btn:active::before { opacity: .32; }
    /* رنگ اختصاصی و متنوع برای هر دکمه، به‌جای یک رنگ یکسان */
    #goTopBtn i { color: #F5A623; }
    #goTopBtn::before { background: #F5A623; }
    #themeToggleBtn i { color: #7FD1AE; }
    #themeToggleBtn::before { background: #7FD1AE; }
    #shareSiteBtn i { color: #6EB4F7; }
    #shareSiteBtn::before { background: #6EB4F7; }
    .floating-btn:hover, .floating-btn:active {
        transform: scale(1.08) !important;
    }
    /* جداکننده‌ی ظریف بین دکمه‌ها */
    .floating-btn:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 20%;
        right: 20%;
        height: 1px;
        background: rgba(255, 255, 255, .08);
    }

    /* ─────────────────────────────────────────────
       ۵. باکس معرفی بری («بری اینجاست!») — موقعیت بهتر، فضای کمتر
       ───────────────────────────────────────────── */
    /* 🔒 اصلاح: قبلاً پیام «بری اینجاست!» همیشه و ثابت نمایش داده می‌شد
       و فضای زیادی اشغال می‌کرد. الان فقط دوره‌ای (هر چند ثانیه یک‌بار
       برای مدت کوتاه) ظاهر می‌شه و بقیه‌ی وقت فقط خودِ آیکون بری —
       جمع‌وجورتر و جذاب‌تر */
    .bari-float-wrap {
        bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
        left: 12px !important;
        gap: .2rem !important;
    }
    .bari-float-btn {
        width: 48px !important;
        height: 48px !important;
    }
    .bari-float-bubble {
        font-size: .6rem !important;
        padding: .3rem .7rem !important;
        max-width: 110px;
        white-space: normal !important;
        text-align: center;
        line-height: 1.5;
        /* به‌جای نمایش دائمی، دوره‌ای محو و ظاهر می‌شه */
        animation: bariBubbleCycle 8s ease-in-out infinite !important;
    }
    @keyframes bariBubbleCycle {
        0%, 100% { opacity: 0; transform: translateY(4px) scale(.92); }
        8%, 30% { opacity: 1; transform: translateY(0) scale(1); }
        38% { opacity: 0; transform: translateY(4px) scale(.92); }
    }

    /* ─────────────────────────────────────────────
       ۶. تیتر اصلی هیرو («بریمو دقیقاً برای حل همین مشکل...»)
       ───────────────────────────────────────────── */
    /* 🔒 اصلاح مهم: قبلاً هر <span> داخل این تیتر (حتی وسط یه جمله)
       display:block داشت — یعنی این جمله به‌جای دو خط طبیعی، به ۴ خط
       جدا و نامرتب می‌شکست. الان با چیدمان درست (مثل اپ‌های بزرگ:
       متن فشرده، تاکید رنگی روی کلمه‌ی کلیدی، بدون شکستگی عجیب) بازطراحی شده. */
    .hero-left h1 {
        font-size: 1.55rem !important;
        line-height: 1.55 !important;
        letter-spacing: -.3px !important;
        margin-bottom: 1rem !important;
        text-align: center;
    }
    .hero-left h1 .hl-white {
        display: inline !important;
    }
    .hero-left h1 .hl-amber {
        display: inline !important;
        filter: none !important;
    }
    .hero-left h1 br {
        display: none; /* حذف شکست خط دستی قدیمی؛ بذار متن خودش طبیعی بشکنه */
    }

    /* ─────────────────────────────────────────────
       ۷. فوتر — چیدمان فشرده‌تر و دسته‌بندی بصری واضح‌تر
       ───────────────────────────────────────────── */
    /* 🔒 اصلاح: قبلاً همه‌ی بخش‌ها کاملاً تک‌ستونه و پشت‌سرهم با فاصله‌ی
       زیاد بودن. الان «دسترسی سریع» و «قوانین» کنار هم (دو ستون) میان
       که فضای عمودی خیلی کمتر بشه، و بین بخش‌ها یه خط ظریف جداکننده
       برای دسته‌بندی بصری واضح‌تر اضافه شده */
    .footer {
        padding: 1.6rem 1rem 1.2rem !important;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.4rem 1rem !important;
        text-align: right !important;
    }
    .footer-col:first-child {
        grid-column: 1 / -1;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        margin-bottom: .2rem;
        align-items: center !important;
        text-align: center !important;
    }
    .footer-col:last-child {
        grid-column: 1 / -1;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, .07);
        align-items: center !important;
        text-align: center !important;
    }
    .footer-col { align-items: flex-start !important; }
    .footer-title {
        font-size: .78rem !important;
        margin-bottom: .7rem !important;
    }
    .footer-title::after { right: auto !important; transform: none !important; }
    .footer-links {
        gap: .5rem !important;
        align-items: flex-start !important;
    }
    .footer-links a {
        font-size: .68rem !important;
    }
    .footer-description {
        font-size: .68rem !important;
        line-height: 1.7 !important;
        margin: .6rem 0 !important;
    }
    .footer-copyright {
        font-size: .58rem !important;
    }
    .footer-social {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center !important;
        gap: .5rem !important;
    }
    .social-link {
        padding: .35rem .7rem !important;
        font-size: .64rem !important;
    }

}
