/* ACCMAA — تحسينات الداشبورد: شريط المدربين · الهيدر · معرض العلامة */

.topbar-row--swapped {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.topbar-row--swapped .topbar-start {
    flex: 0 0 auto;
    order: 0;
    min-width: 0;
    margin-inline-end: auto;
    padding-inline-end: 12px;
}
.topbar-row--swapped .topbar-tools { flex: 0 0 auto; order: 2; }
.topbar-row--swapped .mega-nav {
    flex: 1 1 auto;
    order: 1;
    justify-content: center !important;
    gap: 4px;
    padding-inline: 8px;
    flex-wrap: wrap;
}

html[dir="ltr"] .topbar-row--swapped .topbar-start { order: 0; margin-inline-end: auto; margin-inline-start: 0; }
html[dir="ltr"] .topbar-row--swapped .topbar-tools { order: 2; }
html[dir="ltr"] .topbar-row--swapped .mega-nav { order: 1; }

.topbar-brand-link {
    gap: 0 !important;
    padding: 4px 8px !important;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 4px 16px rgba(10, 54, 105, 0.08);
}
.topbar-brand-link:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(212, 175, 55, 0.45);
}

.mega-nav-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 11px;
    overflow: visible;
    flex-shrink: 0;
    position: relative;
    border: 1.5px solid rgba(212, 175, 55, 0.42);
    box-shadow: 0 4px 14px rgba(10, 54, 105, 0.2);
}

.mega-nav-icon-wrap i.fas,
.mega-nav-icon-wrap i.fab {
    font-size: 0.95rem;
}

body.premium-ui .mega-flat-link--clean {
    padding: 8px 12px !important;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(10, 54, 105, 0.08);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
body.premium-ui .mega-flat-link--clean:hover {
    transform: translateY(-2px);
    border-color: var(--gold, #D4AF37);
    box-shadow: 0 6px 20px rgba(10, 54, 105, 0.12);
    background: #fff;
}

.topbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(10, 54, 105, 0.08);
    box-shadow: 0 2px 8px rgba(10, 54, 105, 0.06);
}
.topbar-icon-btn i { color: var(--primary, #0A3669); font-size: 1rem; }
.topbar-icon-btn:hover {
    background: var(--gold-light, #fff9e8);
    border-color: var(--gold, #D4AF37);
}

.brand-logo--official.topbar-logo {
    height: 52px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
}
.topbar-premium.is-scrolled .brand-logo--official.topbar-logo {
    height: 46px;
    max-width: 128px;
}
.topbar-brand-text-wrap--with-official-logo .topbar-tagline {
    display: none;
}
@media (max-width: 1100px) {
    body.member-mode .topbar-row--swapped .mega-nav,
    body.admin-mode .topbar-row--swapped .mega-nav { display: none !important; }
}

body.premium-ui .mega-trigger,
body.premium-ui .mega-flat-link {
    display: inline-flex !important;
    align-items: center;
    gap: 6px !important;
}

body.premium-ui .mega-flat-link > span,
body.premium-ui .mega-trigger .mega-trigger-label {
    flex-shrink: 0;
    white-space: nowrap;
}

.accmaa-instructors-rail {
    position: fixed;
    z-index: 900;
    top: calc(var(--header-stack-h, 100px) + 12px);
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    width: 88px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(248,250,252,0.95));
    border: 1px solid var(--accmaa-border, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(10, 54, 105, 0.12);
    overflow: hidden;
    backdrop-filter: blur(8px);
}

html[dir="rtl"] .accmaa-instructors-rail { left: 10px; right: auto; }
html[dir="ltr"] .accmaa-instructors-rail { right: 10px; left: auto; }

.instructors-rail-head {
    flex-shrink: 0;
    padding: 10px 6px;
    text-align: center;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--primary, #0A3669);
    background: linear-gradient(180deg, #fff9e8, #fff);
    border-bottom: 1px solid var(--accmaa-border, #e2e8f0);
    line-height: 1.3;
}

.instructors-rail-head i {
    display: block;
    font-size: 1rem;
    color: var(--gold, #D4AF37);
    margin-bottom: 4px;
}

.instructors-rail-viewport {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
}

.instructors-rail-track {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 6px;
    animation: instructorsRailScroll 45s linear infinite;
}

.accmaa-instructors-rail:hover .instructors-rail-track { animation-play-state: paused; }

@keyframes instructorsRailScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.instructors-rail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border: 1px solid var(--accmaa-border, #e2e8f0);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
}

.instructors-rail-item:hover {
    transform: scale(1.04);
    border-color: var(--rail-accent, var(--gold));
    box-shadow: 0 4px 16px rgba(10, 54, 105, 0.12);
}

.instructors-rail-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rail-accent, #0A3669), var(--gold, #D4AF37));
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instructors-rail-name {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--primary, #0A3669);
    text-align: center;
    line-height: 1.25;
    max-height: 2.5em;
    overflow: hidden;
}

.instructors-rail-spec {
    font-size: 0.5rem;
    color: var(--muted, #64748b);
    text-align: center;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
}

.instructors-rail-meta { font-size: 0.5rem; color: var(--gold, #D4AF37); font-weight: 700; }

html[dir="rtl"] body.has-instructors-rail .main-wrap { margin-left: 100px; }
html[dir="ltr"] body.has-instructors-rail .main-wrap { margin-right: 100px; }

.dash-brand-gallery {
    padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 32px);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 50%, #f0f4f8 100%);
}

.dash-brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.dash-brand-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--accmaa-border, #e2e8f0);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    text-align: inherit;
    padding: 0;
    box-shadow: 0 8px 28px rgba(10, 54, 105, 0.08);
    transition: transform 0.25s, box-shadow 0.25s;
}

.dash-brand-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(10, 54, 105, 0.14);
}

.dash-brand-card-visual { display: block; aspect-ratio: 16/10; overflow: hidden; }
.dash-brand-card-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dash-brand-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px 20px;
    align-items: flex-start;
}

.dash-brand-card-body strong { font-size: 1.05rem; color: var(--primary, #0A3669); }
.dash-brand-card-body small { font-size: 0.82rem; color: var(--muted, #64748b); line-height: 1.45; }

.accmaa-fx-bar.fx-bar--premium {
    background: linear-gradient(90deg, #041629, #0A3669 40%, #0d4a8a 100%);
    min-height: 36px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.35);
}

.fx-bar--premium .fx-bar-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    padding: 4px 0;
}

.fx-bar--premium .fx-bar-label small { font-size: 0.58rem; opacity: 0.75; font-weight: 500; }

.fx-tick-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}

.fx-tick-name { font-size: 0.68rem; opacity: 0.85; max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
.fx-tick-rate { font-variant-numeric: tabular-nums; font-weight: 700; color: #fde68a; }
.fx-updated-time { font-size: 0.62rem; opacity: 0.7; white-space: nowrap; }

@media (max-width: 1100px) {
    .accmaa-instructors-rail { display: none; }
    body.has-instructors-rail .main-wrap { margin-left: 0 !important; margin-right: 0 !important; }
}

@media (max-width: 900px) {
    .topbar-row--swapped { flex-wrap: wrap; }
    body.member-mode .topbar-row--swapped .mega-nav,
    body.admin-mode .topbar-row--swapped .mega-nav {
        order: 10;
        width: 100%;
        flex: 1 1 100%;
        padding-top: 4px;
        border-top: 1px solid var(--accmaa-border);
    }
}

@media (prefers-reduced-motion: reduce) {
    .instructors-rail-track { animation: none; }
    .testimonials-track { animation: none; }
}

/* ─── Marketing header (easyT-style) ─── */
body.marketing-header .topbar-premium {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.marketing-header .mega-flat-link--clean {
    border: none !important;
    background: transparent !important;
    font-weight: 600;
    color: var(--primary, #0A3669) !important;
}
body.marketing-header .mega-flat-link--clean span {
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
}
body.marketing-header .mega-flat-link--clean:hover {
    background: rgba(10,54,105,0.06) !important;
    color: var(--primary);
}

/* ─── Stats bar ─── */
.landing-stats-bar {
    background: linear-gradient(90deg, #061f3d, #0A3669 50%, #0d4a8a);
    color: #fff;
    padding: 20px 16px;
}
.landing-stats-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    text-align: center;
}
.landing-stat strong {
    display: block;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--gold, #D4AF37);
    font-variant-numeric: tabular-nums;
}
.landing-stat span { font-size: 0.78rem; opacity: 0.9; line-height: 1.35; }

/* ─── Live spotlight ─── */
.live-spotlight { padding: clamp(24px, 4vw, 48px) 16px; }
.live-spotlight-card {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg, #fff 0%, #f0f6fc 100%);
    border: 1px solid var(--accmaa-border);
    border-radius: 24px;
    padding: clamp(20px, 4vw, 36px);
    box-shadow: 0 16px 48px rgba(10,54,105,0.1);
}
.live-spotlight-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.live-spotlight-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
}
.live-spotlight-badge--type { background: #7f1d1d; color: #fff; }
.live-spotlight-badge--date { background: rgba(10,54,105,0.08); color: var(--primary); }
.live-spotlight-body h2 { margin: 0 0 10px; color: var(--primary); font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
.live-spotlight-desc { color: var(--muted); margin: 0 0 10px; line-height: 1.55; }
.live-spotlight-doc, .live-spotlight-schedule { font-size: 0.88rem; margin: 6px 0; }
.live-spotlight-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.live-spotlight-orbit {
    width: 120px; height: 120px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #0A3669);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; color: #fff;
    box-shadow: 0 12px 32px rgba(10,54,105,0.2);
}
@media (max-width: 700px) {
    .live-spotlight-card { grid-template-columns: 1fr; }
    .live-spotlight-visual { display: none; }
}

/* ─── Testimonials ─── */
.testimonials-section { padding: clamp(32px, 5vw, 56px) 0; background: #f8fafc; overflow: hidden; }
.testimonials-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.testimonials-track {
    display: flex; gap: 20px; width: max-content;
    animation: testimonialsScroll 55s linear infinite;
}
.testimonials-marquee:hover .testimonials-track { animation-play-state: paused; }
@keyframes testimonialsScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
[dir="rtl"] .testimonials-track { animation-name: testimonialsScrollRtl; }
@keyframes testimonialsScrollRtl {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}
.testimonial-card {
    flex: 0 0 min(340px, 85vw);
    background: #fff;
    border: 1px solid var(--accmaa-border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(10,54,105,0.06);
}
.testimonial-card blockquote {
    margin: 0 0 16px;
    font-size: 0.92rem;
    line-height: 1.65;
    color: #334155;
}
.testimonial-quote-icon { color: var(--gold); opacity: 0.5; margin-left: 6px; }
.testimonial-card footer { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--gold));
    color: #fff; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}

/* ─── Reasons ─── */
.landing-reasons { padding: clamp(32px, 5vw, 56px) 16px; }
.landing-reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}
.landing-reason-card {
    text-align: center;
    padding: 24px 18px;
    border: 1px solid var(--accmaa-border);
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.landing-reason-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(10,54,105,0.1); }
.landing-reason-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: linear-gradient(135deg, #0A3669, #1e5a9a);
    color: var(--gold);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: 12px;
}
.landing-reason-card strong { display: block; color: var(--primary); margin-bottom: 6px; }
.landing-reason-card small { color: var(--muted); line-height: 1.45; }

/* ─── FAQ ─── */
.landing-faq { padding: clamp(32px, 5vw, 56px) 16px; max-width: 820px; margin: 0 auto; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    border: 1px solid var(--accmaa-border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}
.faq-item summary {
    padding: 16px 18px;
    font-weight: 700;
    cursor: pointer;
    color: var(--primary);
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 0; padding: 0 18px 16px; color: var(--muted); line-height: 1.6; font-size: 0.92rem; }
.faq-cta { text-align: center; margin-top: 28px; }
.faq-cta p { margin-bottom: 14px; color: var(--muted); }

/* ─── Rich footer ─── */
.site-footer-rich {
    background: linear-gradient(180deg, #061f3d, #041629);
    color: rgba(255,255,255,0.88);
    padding: 48px 20px 24px;
    margin-top: 0;
}
.site-footer-grid {
    max-width: 1100px;
    margin: 0 auto 28px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}
.footer-brand-col p { font-size: 0.88rem; opacity: 0.8; line-height: 1.55; margin: 12px 0; }
.footer-logo { max-height: 48px; width: auto; }
.footer-col h4 { color: var(--gold); font-size: 0.9rem; margin: 0 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-link {
    background: none; border: none; color: rgba(255,255,255,0.75);
    font-family: inherit; font-size: 0.84rem; padding: 5px 0;
    cursor: pointer; text-align: inherit;
}
.footer-link:hover { color: #fff; }
.site-footer-bottom {
    max-width: 1100px; margin: 0 auto;
    padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
    font-size: 0.78rem; opacity: 0.75;
}
@media (max-width: 800px) {
    .site-footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Logo أفقي + هيكل الداشبورد ─── */
.brand-logo--horizontal {
    height: 52px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}
.brand-logo-wrap--horizontal {
    padding: 4px 8px;
    background: transparent;
    box-shadow: none;
}
.brand-logo-wrap--horizontal::after { display: none; }
.topbar-premium.is-scrolled .brand-logo--horizontal { height: 44px; max-width: 168px; }

.dash-landing {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.dash-zone {
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 56px);
    width: 100%;
}
.dash-zone--tools { padding-block: 8px 24px; }
.dash-zone--pillars { padding-block: 32px 16px; }

.dash-pillar-explore {
    padding: clamp(32px, 5vw, 56px) clamp(16px, 4vw, 56px) !important;
    max-width: 1320px;
    margin-inline: auto;
}
.pillar-explore-stack {
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.pillar-explore-block {
    border-radius: 24px;
    border: 1px solid rgba(10, 54, 105, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 48px rgba(10, 54, 105, 0.08);
    padding: clamp(20px, 3vw, 28px);
    overflow: hidden;
}
.pillar-explore-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}
.pillar-explore-head h3 {
    margin: 0;
    color: var(--primary, #0A3669);
    font-size: 1.15rem;
}
.pillar-explore-head p {
    margin: 4px 0 0;
    color: var(--muted, #64748b);
    font-size: 0.88rem;
}
.pillar-explore-modules.choices-visual-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 16px;
}
.pillar-explore-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgba(10, 54, 105, 0.1);
}
.pillar-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(10, 54, 105, 0.12);
    background: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary, #0A3669);
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}
.pillar-link-chip:hover {
    border-color: var(--gold, #D4AF37);
    transform: translateY(-2px);
}

.dash-brand-gallery {
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 56px);
}
.dash-brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 900px) {
    .dash-brand-grid { grid-template-columns: 1fr; }
    .pillar-explore-head { grid-template-columns: 1fr; text-align: center; }
    .pillar-explore-enter { justify-self: center; }
}
