/**
 * Accmaa — إطلاق موبايل + شريط شركاؤنا الديناميكي (20261006p)
 * يصلح: بكسلة الموبايل · قص القائمة · توقف شريط الجامعات · دخول حاد
 */

/* ══════════ شريط شركاؤنا — حركة مستمرة وواضحة ══════════ */
@keyframes accmaaPartnersScroll {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-33.333%, 0, 0); }
}

html body .ak-partners-strip__track.partners-marquee-track-a,
html body .ak-partners-strip .partners-marquee-track-a,
html body #accmaaHomePartners .partners-marquee-track-a {
    display: flex !important;
    width: max-content !important;
    gap: 14px !important;
    animation: accmaaPartnersScroll 42s linear infinite !important;
    animation-play-state: running !important;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    backface-visibility: hidden;
}

html body .ak-partners-strip__marquee,
html body #accmaaHomePartners .partners-marquee-wrap {
    overflow: hidden !important;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

/* لا توقف الشريط إلا عند إخفاء التبويب */
html body .ak-partners-strip.accmaa-perf-idle .partners-marquee-track-a,
html body .ak-partners-strip .partners-marquee-track-a {
    animation-play-state: running !important;
}
html.accmaa-tab-hidden .ak-partners-strip .partners-marquee-track-a {
    animation-play-state: paused !important;
}

html body .ak-uni-logo {
    transform: none !important;
    filter: none !important;
    backdrop-filter: none !important;
}
html body .ak-uni-logo__img {
    image-rendering: auto !important;
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 768px) {
    html body .ak-partners-strip__track.partners-marquee-track-a,
    html body #accmaaHomePartners .partners-marquee-track-a {
        animation-duration: 32s !important;
        gap: 10px !important;
    }
}

/* ══════════ دخول المنصة على الموبايل — حاد بدون بكسلة ══════════ */
@media (max-width: 900px) {
    html body .accmaa-enter-gate,
    html body .accmaa-enter-gate__card,
    html body .accmaa-enter-gate__logo,
    html body .accmaa-brand-intro,
    html body .accmaa-brand-intro *,
    html body .accmaa-brand-intro-logo {
        filter: none !important;
        -webkit-filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transform: none !important;
        text-shadow: none !important;
    }

    html body .accmaa-enter-gate {
        background: #0A3669 !important;
        background-image: none !important;
        min-height: calc(100dvh - var(--header-stack-h, 96px)) !important;
        padding: 28px 16px !important;
        place-items: center;
    }

    html body .accmaa-enter-gate__card {
        width: 100% !important;
        max-width: 420px !important;
        padding: 8px 4px !important;
    }

    html body .accmaa-enter-gate__logo {
        width: 96px !important;
        max-width: 28vw !important;
        height: auto !important;
        margin-bottom: 14px !important;
    }

    html body .accmaa-enter-gate__title {
        font-size: 1.45rem !important;
        line-height: 1.4 !important;
    }

    html body .accmaa-enter-gate__lead {
        font-size: 0.95rem !important;
        line-height: 1.65 !important;
    }

    html body .accmaa-enter-gate__actions {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    html body .accmaa-enter-gate__cta,
    html body .accmaa-enter-gate .btn-gold,
    html body .accmaa-enter-gate .btn-outline {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 48px !important;
        font-size: 1rem !important;
        transform: none !important;
        filter: none !important;
    }
}

/* ══════════ القائمة الجانبية على الموبايل — كاملة حادة غير مقصوصة ══════════ */
@media (max-width: 900px) {
    html body.sidebar-open .sidebar,
    html body.sidebar-open.guest-mode .sidebar,
    html body.sidebar-open.member-mode .sidebar,
    html body.sidebar-open.admin-mode .sidebar,
    html body.accmaa-academy-chrome.sidebar-open .sidebar {
        width: min(92vw, 340px) !important;
        max-width: 340px !important;
        height: calc(100dvh - var(--header-stack-h, var(--topbar-h, 96px))) !important;
        max-height: calc(100dvh - var(--header-stack-h, var(--topbar-h, 96px))) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        filter: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transform: none !important;
        opacity: 1 !important;
        z-index: 900 !important;
        overscroll-behavior: contain;
    }

    html body.sidebar-open .sidebar .icons-dock,
    html body.sidebar-open #iconsDock {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 8px !important;
        flex-shrink: 0 !important;
    }

    html body.sidebar-open .sidebar .icon-btn,
    html body.sidebar-open .sidebar .icons-dock .icon-btn,
    html body.sidebar-open #iconsDock .icon-btn {
        min-height: 70px !important;
        height: auto !important;
        max-height: none !important;
        padding: 10px 8px !important;
        overflow: visible !important;
        transform: none !important;
        filter: none !important;
        -webkit-filter: none !important;
        background-image: none !important;
        box-shadow: none !important;
        border-radius: 12px !important;
    }

    html body.sidebar-open .sidebar .icon-btn span,
    html body.sidebar-open .sidebar .icon-btn .icon-btn-label,
    html body.sidebar-open .icons-dock .icon-btn span,
    html body.sidebar-open .icons-dock .icon-btn .icon-btn-label {
        display: block !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-height: none !important;
        font-size: 0.78rem !important;
        line-height: 1.35 !important;
        font-weight: 700 !important;
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }

    html body.sidebar-open .sidebar .icon-btn i,
    html body.sidebar-open .sidebar .icon-btn .icon-bg-visual i {
        font-size: 1.1rem !important;
        filter: none !important;
        transform: none !important;
        text-shadow: none !important;
    }

    html body.sidebar-open .sidebar .icon-bg-layer,
    html body.sidebar-open .sidebar .icon-btn.has-icon-bg::before,
    html body.sidebar-open .sidebar .icon-btn.has-icon-bg::after,
    html body.sidebar-open .sidebar .icon-btn.has-card-bg::before,
    html body.sidebar-open .sidebar .icon-btn.has-card-bg::after {
        display: none !important;
        background-image: none !important;
        content: none !important;
    }

    html body.sidebar-open .sidebar .sections-panel {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 28px !important;
    }

    html body.sidebar-open .sidebar .sec-item,
    html body.sidebar-open .sidebar .section-link,
    html body.sidebar-open .sidebar .nav-item {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        line-height: 1.4 !important;
        min-height: 44px !important;
        align-items: center !important;
    }
}

/* نص الموبايل عام — حدة أوضح */
@media (max-width: 900px) {
    html body.accmaa-academy-chrome,
    html body.guest-mode,
    html body {
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
        text-rendering: optimizeLegibility;
    }

    html body .topbar-premium,
    html body #megaNav.mega-nav {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        filter: none !important;
    }

    html body .accmaa-nav-svg,
    html body .accmaa-nav-icon-wrap {
        filter: none !important;
        transform: none !important;
    }
}
