@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

/* =========
   Base
========= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2a37;
    --muted: #6b7280;
    --primary: #426287;
    /* متناسق مع النافبار والفوتر */
    --primary-600: #2d4766;
    --accent: #3b82f6;
    --radius: 16px;
    --shadow-sm: 0 2px 8px rgba(17, 24, 39, .06);
    --shadow-md: 0 10px 20px rgba(17, 24, 39, .08);
    --shadow-lg: 0 18px 40px rgba(17, 24, 39, .12);
}

html,
body {
    height: 100%
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg);
    color: var(--text);
    text-align: center;
    overflow-x: hidden;
    line-height: 1.65;
}

/* =========
   Layout
========= */
.container {
    width: min(1200px, 92vw);
    margin: 7.5rem auto 4rem;
    /* يترك مسافة تحت الـnavbar الثابت */
}

/* =========
   Welcome
========= */
.welcome-container {
    margin: 0 auto 2rem;
    padding: 1.5rem 2rem;
    border: 1px solid #e5e7eb97;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    width: 70%;
    justify-content: center;
    box-shadow: var(--shadow-md);
    max-width: 800px;
}

.welcome-container p {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-600);
    margin: 0;
    text-align: center;
    letter-spacing: 2px
}

.welcome-container .brand-name {
    color: var(--accent);
    font-weight: 900;
}

.welcome-container .welcome-user-name {
    color: #16a34a;
    /* أخضر مميز للاسم */
    font-weight: 900;
}

/* =========
   "ابدأ الآن" زر
========= */
.start-button-container {
    margin: 8rem 0 2.5rem
}

.start-button {
    display: inline-block;
    direction: rtl;
    background: var(--primary);
    color: #fff;
    padding: .9rem 1.6rem;
    border-radius: 9999px;
    font-weight: 700;
    letter-spacing: .2px;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.start-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: var(--shadow-lg)
}

.start-button:active {
    transform: translateY(0);
    filter: brightness(.98)
}

/* =========
   Section title (نص "شنو هدفك...")
========= */
#courseFilterContainer {
    display: none;
    /* يُظهره السكربت */
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .45s ease, transform .45s ease;
    padding: 2rem 0 1rem;
}

#courseFilterContainer.visible {
    display: block;
    opacity: 1;
    transform: translateY(0)
}

#courseFilterContainer p {
    font-size: 1.4rem;
    color: var(--text);
    margin-bottom: 2rem;
}

/* =========
   Category buttons
========= */
#categoryButtons {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap
}

.category-btn {
    border: none;
    width: 11rem;
    height: 8.4rem;
    border-radius: 20px;
    background: #e9eef6;
    color: var(--primary-600);
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    padding: 1rem .75rem;
    direction: rtl;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border .18s ease;
    border: 1px solid #d6dee9;
}

.category-btn span {
    display: block;
    margin-bottom: .35rem;
    font-size: 1.6rem;
}

.category-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: #dde6f3
}

.category-btn.selected {
    background: linear-gradient(180deg, #426287, #2d4766);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 12px 28px rgba(66, 98, 135, .28);
    transform: translateY(-3px) scale(1.02);
}

/* =========
   Courses grid container
========= */
#coursesContainer {
    display: none;
    /* السكربت يضيف .visible */
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .45s ease, transform .45s ease;
    margin: 2rem auto 4rem;
    padding: 1.25rem;
    background: transparent;
}

#coursesContainer.visible {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
    opacity: 1;
    transform: translateY(0);
}

/* =========
   Course card
========= */
.course-card {
    position: relative;
    background: var(--card);
    border: 1px solid #e6ecf2;
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    /* نص الكارت في الوسط */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* كل العناصر في الوسط */
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
    min-height: 22rem;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg)
}

.course-card h3 {
    margin: 0;
    font-size: 1rem;
    color: #1f2937;
    font-weight: 800;
}

.course-card p {
    margin: 0;
    color: #6b7280;
    font-size: .9rem;
    line-height: 1.6;
    max-width: 95%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== الشارات (المستوى + نوع الكورس) كسطر واحد في الأعلى ===== */
.course-card .course-badge,
.course-card .badge-delivery {
    position: static !important;
    /* نلغي أي تموضع مطلق سابق */
    display: inline-flex !important;
    align-items: center;
    gap: .25rem;
    margin: 0 .35rem 6px .35rem !important;
    padding: 4px 9px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: .78rem;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.course-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

/* مبتدئ افتراضي */
.course-badge[data-level="متوسط"] {
    background: #ffedd5;
    color: #b45309;
}

.course-badge[data-level="متقدم"] {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-delivery {
    background: #e2e8f0;
    color: #334155;
}

/* مسجل */
.badge-delivery.live {
    background: #fee2e2;
    color: #b91c1c;
}

/* لايف */

/* ===== صورة/ثَمب الفيديو بنسبة 16:9 ثابتة وتظهر دائمًا ===== */
.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.video-thumbnail-wrapper::before {
    content: "";
    display: block;
    padding-top: 56.25%;
    /* 16:9 */
}

.video-thumbnail-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block !important;
    opacity: 1 !important;
}

/* زر التفاصيل */
.course-card a {
    margin-top: .2rem;
    align-self: center;
    width: 68%;
    text-decoration: none;
    background: var(--accent);
    color: #fff;
    padding: .65rem 1rem;
    border-radius: 9999px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(59, 130, 246, .28);
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

.course-card a:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 12px 24px rgba(59, 130, 246, .32)
}

.course-card a:active {
    transform: translateY(0);
    filter: brightness(.96)
}

/* =========
   My Courses (كورساتي)
========= */
.my-courses-section {
    background: var(--card);
    padding: 1.25rem 1.25rem 1.5rem;
    margin: 1.5rem auto 0;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #eef0f4;
    direction: rtl;
    text-align: right;
}

.my-courses-section h2 {
    color: var(--primary-600);
    margin: 0 0 1rem 0
}

.my-courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
    gap: .9rem;
    justify-content: center;
}

.my-course-card {
    border: 1px solid #e9edf4;
    border-radius: 12px;
    padding: 1rem;
    background: #f9fbff;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}

.my-course-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md)
}

.my-course-card h4 {
    margin-bottom: .5rem;
    font-size: 1rem;
    color: var(--text);
    font-weight: 800
}

.my-course-progress {
    height: 10px;
    background: #e9eef6;
    border-radius: 9999px;
    overflow: hidden;
    margin: .45rem 0 .25rem
}

.my-course-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #5a7ea0)
}

.my-course-card small {
    color: var(--muted)
}

.my-course-card button {
    margin-top: .55rem;
    padding: .45rem .8rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    transition: filter .15s ease, transform .15s ease
}

.my-course-card button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px)
}

.my-course-card.completed {
    background: #eef8f1;
    border-color: #cfe9db
}

.my-course-card.completed h4 {
    color: #1d7a3a
}

.about-section {
    background: #ffffff;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    margin: 2rem auto;
    width: min(900px, 94%);
    text-align: center;
}

.about-section h2 {
    color: var(--primary-600);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.about-section p {
    color: #606a74;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-section p strong {
    color: var(--primary-600);
    padding: 0 .15rem;
}

.short-intro {
    background: linear-gradient(180deg, #ffffffcc, #ffffff);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 750px;
    box-shadow: var(--shadow-sm);
}

.short-intro strong {
    color: #3b82f6;
}

.short-intro p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--primary-600);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* =========
   Utilities
========= */
.responsive-video {
    width: 100%;
    max-width: 900px;
    height: 450px;
    border-radius: 15px;
    display: block;
    margin: 15px auto;
    box-shadow: var(--shadow-sm)
}

/* لطاقة دخول خفيفة لكل العناصر التي تُعرض لاحقًا */
.fade-in-up {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp .45s ease forwards
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* =========
   Empty state
========= */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px;
    margin: 24px auto;
    max-width: 680px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
    border: 1px solid #e5e7eb;
    text-align: center;
}

.empty-state .empty-emoji {
    font-size: 42px;
    line-height: 1;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin: 6px 0 2px;
}

.empty-state p {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

/* =========
   Universities
========= */
.university-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

.university-card {
    background: #fff;
    border: 1px solid #e6ecf2;
    border-radius: 16px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    transition: transform .15s ease, box-shadow .15s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    min-height: 160px;
}

.university-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

.university-card img {
    height: 95px;
    width: 100%;
    object-fit: contain;
    filter: saturate(.95);
    user-select: none;
}

.university-card .name {
    font-size: 1.02rem;
    font-weight: 700;
    color: #294766;
}

.university-card.contact {
    border: 1.5px dashed #93c5fd;
    background: #f8fbff;
}

.university-card .contact-emoji {
    font-size: 26px;
}

/* loader */
.unis-loading {
    display: none;
    place-items: center;
    gap: 10px;
    min-height: 180px;
    color: #426287;
    font-weight: 600;
}

.unis-loading .spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid #cbd5e1;
    border-top-color: #426287;
    animation: spin .9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

/* زر رجوع بسيط */
.back-row {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 .75rem;
}

.btn-back {
    border: none;
    background: #e9eef6;
    color: var(--primary-600);
    padding: .4rem .8rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

/* =========
   Responsive
========= */
@media (max-width:1024px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }


    .category-btn {
        width: 10rem;
        height: 7.6rem
    }
}

@media (max-width:768px) {
    .container {
        width: 100%;
        max-width: 100%;
        margin-top: 6.5rem;
        padding-left: 10px;
        padding-right: 10px;
    }

    .welcome-container p {
        font-size: 1.35rem
    }

    .category-btn {
        width: 9.2rem;
        height: 7rem
    }
}

@media (max-width:480px) {
    .welcome-container {
        padding: .9rem 1rem
    }

    .welcome-container p {
        font-size: 1.15rem
    }

    .category-btn {
        width: 8.8rem;
        height: 6.8rem
    }

    .course-card a {
        width: 78%
    }
}

/* === PATCH: رجّع صور معاينة الكورسات وثبّت الشارات بطريقة متناسقة === */

/* خلي صندوق الصورة ثابت بنسبة 16:9 ومشبع المساحة */
.course-card .video-thumbnail-wrapper {
    position: relative !important;
    width: 100% !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    background: #f3f5f8;
}

.course-card .video-thumbnail-wrapper::before {
    content: "" !important;
    display: block !important;
    padding-top: 56.25% !important;
    /* 16:9 */
}

.course-card .video-thumbnail-wrapper img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
}

/* الشارتين (مستوى الكورس + نوعه) يتثبتوا فوق الصورة يمين/يسار */
.course-card {
    position: relative;
    /* علشان التمركز المطلق يتم على الكارت */
}

.course-card .course-badge,
.course-card .badge-delivery {
    position: absolute !important;
    top: 8px !important;
    z-index: 2 !important;
    padding: 4px 8px !important;
    border-radius: 9999px !important;
    font-weight: 700 !important;
    font-size: .78rem !important;
    white-space: nowrap !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06) !important;
    pointer-events: none;
    /* ما تعطلش ضغط الصورة */
}

.course-card .course-badge {
    right: 8px !important;
}

/* مستوى الكورس */
.course-card .badge-delivery {
    left: 8px !important;
}

/* مسجّل/لايف */

/* ألوان خفيفة للشارات (لو ما بتتلوّن Inline) */
.course-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.course-badge[data-level="متوسط"] {
    background: #ffedd5;
    color: #b45309;
}

.course-badge[data-level="متقدم"] {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-delivery {
    background: #e2e8f0;
    color: #334155;
}

.badge-delivery.live {
    background: #fee2e2;
    color: #b91c1c;
}

/* ===== Badges over course thumbnail (final tidy) ===== */
.video-thumb {
    position: relative;
}

.thumb-badges {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.chip {
    font-size: .78rem;
    font-weight: 700;
    padding: .25rem .6rem;
    border-radius: 9999px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

/* ألوان المستوى */
.level--مبتدئ {
    background: #e8f1ff;
    color: #1d4ed8;
}

.level--متوسط {
    background: #fff5e6;
    color: #b45309;
}

.level--متقدم {
    background: #fee2e2;
    color: #b91c1c;
}

/* ألوان نوع الكورس */
.chip--delivery.recorded {
    background: #e2e8f0;
    color: #334155;
}

.chip--delivery.live {
    background: #ffeaea;
    color: #dc2626;
}

/* === PATCH: شارات أوضح في طرفين + زر بالأسفل === */

/* 1) ضع الشارتين على طرفين أعلى الصورة */
.course-card .video-thumb .thumb-badges {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    /* كل شارة في طرف */
    align-items: center;
    padding: 0 10px;
    transform: none;
    /* يلغي التوسيط القديم */
    pointer-events: none;
    /* ما تمنع الضغط على الصورة */
}

/* 2) كبر الشارات وخليها أوضح فوق الصورة */
.course-card .video-thumb .chip {
    font-size: .9rem;
    /* أكبر شوية */
    font-weight: 800;
    padding: .35rem .75rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, .7);
    /* حافة فاتحة للوضوح */
    backdrop-filter: blur(3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
}

/* ألوان النوع (مباشر/مسجل) تبقى كما هي لكن أكثر ثباتاً */
.course-card .video-thumb .chip.chip--delivery.recorded {
    background: #e2e8f0;
    color: #334155;
}

.course-card .video-thumb .chip.chip--delivery.live {
    background: #ffeaea;
    color: #dc2626;
}

/* 3) ثبت زر "شوف أكثر" في أسفل الكارت وخلِّ عرضه متناسق */
.course-card .actions {
    margin-top: auto;
    /* يدفعه لأسفل الكارت */
    width: 100%;
    display: flex;
    justify-content: center;
}

.course-card .actions .view-details-btn {
    width: 72%;
    /* نفس المقاس لكل الكروت */
}

@media (max-width: 640px) {
    .course-card .actions .view-details-btn {
        width: 88%;
    }
}

/* ===== Hero wrapper ===== */
.hero-with-bubbles {
    position: relative;
    min-height: 460px;
    /* مساحة كافية للفقاعات */
    display: grid;
    gap: 1rem;
}

.hero-with-bubbles>* {
    position: relative;
    z-index: 2;
}

/* ===== Specialty bubbles layer (display only) ===== */
.specialty-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* عرض فقط */
    z-index: 1;
    /* تحت المحتوى */
}

/* Bubble base */
.specialty-bubbles .bubble {
    position: absolute;
    width: clamp(86px, 9vw, 120px);
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    color: var(--primary-600);
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, .65);
    box-shadow: 0 12px 28px rgba(17, 24, 39, .10);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: floatY var(--dur, 10s) var(--delay, 0s) ease-in-out infinite alternate;
    text-align: center;
}

.specialty-bubbles .icon {
    font-size: clamp(18px, 2.2vw, 24px);
    line-height: 1;
}

.specialty-bubbles .label {
    font-size: clamp(11px, 1.1vw, 13px);
}

/* Soft gradients (متناسقة مع الثيم) */
.b1 {
    left: 7%;
    top: 16%;
    --dur: 8.5s;
    --delay: .2s;
    background: radial-gradient(120% 120% at 30% 30%, #eef6ff, #d7e6ff 70%);
}

.b2 {
    right: 9%;
    top: 22%;
    --dur: 9.8s;
    --delay: .6s;
    background: radial-gradient(120% 120% at 30% 30%, #eefcf3, #d9f1e4 70%);
}

.b3 {
    left: 15%;
    bottom: 12%;
    --dur: 10.8s;
    --delay: .1s;
    background: radial-gradient(120% 120% at 30% 30%, #fff0f3, #ffd7df 70%);
}

.b4 {
    right: 13%;
    bottom: 16%;
    --dur: 8.9s;
    --delay: .4s;
    background: radial-gradient(120% 120% at 30% 30%, #f3f0ff, #e3ddff 70%);
}

/* Vertical floating motion */
@keyframes floatY {
    0% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(12px);
    }
}

/* Mobile positions: أبعد الفقاعات عن الزر والنص */
@media (max-width: 680px) {
    .b1 {
        left: 6%;
        top: 6%;
    }

    .b2 {
        right: 6%;
        top: 14%;
    }

    .b3 {
        left: 4%;
        bottom: 8%;
    }

    .b4 {
        right: 8%;
        bottom: 10%;
    }
}

/* احترام تفضيلات تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .specialty-bubbles .bubble {
        animation: none;
    }
}

/* ==== Mobile layout: tidy 2x2 grid, no overlap ==== */
@media (max-width: 680px) {
    .hero-with-bubbles {
        min-height: initial;
        /* ما نسيبش فراغ كبير */
        gap: .75rem;
    }

    /* نخلي طبقة الفقاعات عنصر عادي ياخد مساحته قبل الترحيب */
    .specialty-bubbles {
        position: relative;
        inset: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        place-items: center;
        gap: 12px;
        margin: 8px 0 4px;
        z-index: 2;
        /* فوق الخلفية لكن تحت أي منيو طافية */
        pointer-events: none;
        /* عرض فقط */
    }

    /* كل فقاعة ثابتة، دائرية، بدون أنيميشن */
    .specialty-bubbles .sp-bubble {
        position: relative;
        width: 84px;
        aspect-ratio: 1 / 1;
        animation: none;
    }

    .specialty-bubbles .icon {
        font-size: 18px;
    }

    .specialty-bubbles .label {
        font-size: 12px;
    }

    /* مسافات لطيفة حول النص والزر */
    .welcome-container {
        margin-top: .25rem;
    }

    .short-intro p {
        line-height: 1.9;
    }

    .start-button-container {
        margin-top: .25rem;
    }
}

/* شاشات أصغر جدًا */
@media (max-width: 360px) {
    .specialty-bubbles .sp-bubble {
        width: 78px;
    }

    .specialty-bubbles .label {
        font-size: 11px;
    }
}

/* ===== Floating WhatsApp FAB ===== */
.whatsapp-fab {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #25D366;
    /* لون واتساب */
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
    z-index: 1000;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease;
}

.whatsapp-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .22);
}

.whatsapp-fab:active {
    transform: translateY(0);
}

.whatsapp-fab:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .9);
    outline-offset: 2px;
}

/* أيقونة داخل الزر */
.whatsapp-fab svg {
    width: 26px;
    height: 26px;
}

/* نبضة خفيفة للفت الانتباه أول ثانيتين */
@keyframes fab-pop {
    0% {
        transform: scale(.9);
        opacity: .0
    }

    100% {
        transform: scale(1);
        opacity: 1
    }
}

.whatsapp-fab {
    animation: fab-pop .4s ease-out both;
}

@media (max-width: 680px) {
    .whatsapp-fab {
        width: 56px;
        height: 56px;
    }
}

/* لو المستخدم مفعّل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-fab {
        animation: none;
    }
}

/* === Year badge colors === */
.chip--year {
    border: 1px solid transparent;
    padding: .2rem .5rem;
    border-radius: 9999px;
    font-weight: 700;
}

.chip--year.y1 {
    background: #e6f4ff;
    border-color: #b6e0ff;
    color: #0b5394
}

/* First year */
.chip--year.y2 {
    background: #e8f7ee;
    border-color: #cde7d6;
    color: #166534
}

/* Second year */
.chip--year.y3 {
    background: #fff1e6;
    border-color: #ffd6a8;
    color: #9a3412
}

/* Third year */
.chip--year.y4 {
    background: #f3e8ff;
    border-color: #e0c3ff;
    color: #6b21a8
}

/* Fourth year */


/* Strong course code badge */
.code-badge-strong {
    background: #e9f5ff;
    color: #0b4a6f;
    border: 1px solid #bfe3ff;
    box-shadow: 0 4px 10px rgba(11, 74, 111, .18);
    font-weight: 700;
    letter-spacing: .5px;
}

.chip--year {
    border: 1px solid transparent
}

.chip--year.y1 {
    background: #e6f4ff;
    border-color: #b6e0ff;
    color: #0b5394
}

/* First year */
.chip--year.y2 {
    background: #e8f7ee;
    border-color: #cde7d6;
    color: #166534
}

/* Second year */
.chip--year.y3 {
    background: #fff1e6;
    border-color: #ffd6a8;
    color: #9a3412
}

/* Third year */
.chip--year.y4 {
    background: #f3e8ff;
    border-color: #e0c3ff;
    color: #6b21a8
}

/* Fourth year */

/* ============ Trust Bar ============ */
.trust-bar {
    background: #f8fafc;
    /* رمادي فاتح */
    border-block: 1px solid #e2e8f0;
    padding: 10px 0;
}

.trust-bar .trust-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.trust-bar .trust-title {
    color: #475569;
    /* slate-600 */
    font-weight: 600;
    white-space: nowrap;
}

.trust-logos {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.trust-logos li {
    line-height: 0;
}

.trust-logos img {
    height: 34px;
    filter: grayscale(100%) contrast(90%);
    opacity: .75;
    transition: filter .2s ease, opacity .2s ease, transform .2s ease;
}

.trust-logos img:hover {
    filter: none;
    opacity: 1;
    transform: translateY(-2px);
}

.trust-logos .fallback {
    color: #64748b;
    /* slate-500 */
    font-size: 14px;
}

/* موبايل: نخفي العنوان ونصغّر الشعارات */
@media (max-width: 640px) {
    .trust-bar .trust-title {
        display: none;
    }

    .trust-logos {
        justify-content: center;
        gap: 16px;
    }

    .trust-logos img {
        height: 26px;
    }
}

/* ===== Trust Bar (layout tidy) ===== */
.trust-bar {
    /* قربه من زر CTA وخفّف المسافات حوله */
    margin: 18px 0 8px;
}

.trust-bar .trust-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* رأس الشريط: عنوان وفاصل رفيع */
.trust-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    /* مسافة صغيرة فوق الشريط المتحرك */
}

.trust-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: #eef2ff;
    /* لمسة خفيفة */
    color: #334155;
    /* slate-700 */
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.trust-divider {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
    /* خط ممتد لليمين */
}

/* إطار الشريط المتحرك */
.marquee {
    position: relative;
    overflow: hidden;
    /* يخفي خارج الإطار */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    padding: 8px 0;
    /* ارتفاع مريح للشعارات */
    min-height: 54px;
    /* يمنع الإحساس بالقصّ */
}

/* مسار التحريك */
.marquee__track {
    display: flex;
    align-items: center;
    gap: 28px;
    width: max-content;
    will-change: transform;
    animation: marquee var(--marquee-duration, 40s) linear infinite;
}

.marquee__track li {
    flex: 0 0 auto;
    line-height: 0;
}

.marquee__track img {
    height: 36px;
    width: auto;
    filter: grayscale(100%) contrast(90%);
    opacity: .75;
    transition: filter .2s ease, opacity .2s ease, transform .2s ease;
}

.marquee__track img:hover {
    filter: none;
    opacity: 1;
    transform: translateY(-2px);
}

/* الحركة المستمرة */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* لأننا مكرّرين المحتوى مرتين */
}

/* موبايل: اصغر، والعنوان فوق وحده */
@media (max-width: 640px) {
    .trust-head {
        margin-bottom: 8px;
    }

    .trust-title {
        font-size: 13px;
        padding: 5px 10px;
    }

    .marquee {
        padding: 6px 0;
        min-height: 44px;
    }

    .marquee__track {
        gap: 18px;
    }

    .marquee__track img {
        height: 26px;
    }
}

/* إيقاف مؤقت عند المرور (اختياري) */
.trust-bar:hover .marquee__track {
    animation-play-state: paused;
}

/* ===== How We Help ===== */
.how-help {
    padding: 28px 0 8px;
}

.how-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.how-title {
    font-weight: 800;
    font-size: 22px;
    color: #0f172a;
    /* slate-900 */
    margin: 0 0 16px;
    text-align: center;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.how-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    transition: transform .2s ease, box-shadow .2s ease;
}

.how-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .09);
}

.how-icon {
    font-size: 28px;
    line-height: 1;
}

.how-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.how-card p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.how-btn {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    background: #334155;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(51, 65, 85, .25);
}

.how-btn:hover {
    filter: brightness(1.05);
}

.how-btn.ghost {
    background: #eef2ff;
    color: #334155;
    box-shadow: none;
    border: 1px solid #e2e8f0;
}

.how-btn.ghost:hover {
    background: #e5e7ff;
}

/* ===== CTA Band ===== */
.cta-band {
    margin: 22px 0 6px;
}

.cta-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, #e2e8f0, #f8fafc);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cta-text h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.cta-text p {
    margin: 0;
    color: #475569;
}

.cta-actions {
    display: flex;
    gap: 10px;
}

/* موبايل */
@media (max-width: 900px) {
    .how-grid {
        grid-template-columns: 1fr;
    }

    .how-card {
        align-items: stretch;
    }

    .cta-wrap {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cta-actions {
        justify-content: center;
    }
}

/* ===== Arabic typography & RTL tidy ===== */
:root {
    --body-font: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Naskh Arabic", Arial, sans-serif;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: var(--body-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* بطاقات "كيف نساعدك؟" */
.how-help,
.how-card {
    direction: rtl;
    text-align: right;
}

.how-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    /* ضمان تساوي الارتفاعات */
    height: 100%;
}

.how-icon {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 4px;
}

.how-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 800;
    letter-spacing: 0;
    color: #0f172a;
    /* slate-900 */
}

.how-card p {
    margin: 2px 0 0;
    font-size: 15px;
    line-height: 1.9;
    /* سطر مريح للعربي */
    color: #475569;
    /* slate-600 */
    text-wrap: pretty;
    /* يحسّن كسر الأسطر (مدعوم تدريجيًا) */
    word-spacing: .2px;
    /* لمسة توازن للكلمات */
}

/* منع ظهور نقاط/ماركرات داخل البطاقات (يعالج النقطة الحمراء) */
.how-card ul,
.how-card ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.how-card *::marker {
    content: none;
}

.how-card p::before,
.how-card p::after {
    content: none !important;
}

/* تثبيت الزر بأسفل البطاقة لمظهر متّسق */


/* داخل البطاقات فقط */
.how-card .how-btn {
    align-self: flex-start;
    margin-top: auto;
}


/* تحسين CTA النصي */
.cta-text h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0;
}

.cta-text p {
    margin: 0;
    font-size: 15px;
    line-height: 1.9;
    color: #475569;
}

/* شبكة البطاقات: تساوي صفوف ومحاذاة أنيقة */
.how-grid {
    align-items: stretch;
    /* كل البطاقات نفس الارتفاع */
}

/* موبايل */
@media (max-width: 900px) {
    .how-card p {
        font-size: 14.5px;
        line-height: 1.9;
    }
}

/* ===== CTA Band (fixed alignment) ===== */
.cta-band {
    margin: 22px 0 6px;
}

#ctaBand {
    direction: rtl;
}

/* تأكيد RTL داخل السكشن */

.cta-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 18px 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, #e7ecf3, #f8fafc);
    border: 1px solid #e2e8f0;

    /* تنظيم محكم: نص + أزرار */
    display: grid;
    grid-template-columns: 1fr auto;
    /* النص يتمدّد، الأزرار على الجنب */
    align-items: center;
    /* توسيط رأسي */
    column-gap: 18px;
}

.cta-text {
    text-align: right;
}

.cta-text h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
}

.cta-text p {
    margin: 0;
    font-size: 15px;
    line-height: 1.9;
    /* راحة للقراءة بالعربي */
    color: #475569;
    max-width: 60ch;
    /* يمنع السطر يطوّل قوي */
    text-wrap: pretty;
}

.cta-actions {
    display: flex;
    align-items: center;
    /* تمركز رأسي للأزرار */
    gap: 10px;
}

/* شكل الأزرار داخل الـCTA */
.cta-actions .how-btn {
    padding: 10px 16px;
    border-radius: 9999px;
    line-height: 1;
    white-space: nowrap;
}

/* موبايل */
@media (max-width: 900px) {
    .cta-wrap {
        grid-template-columns: 1fr;
        /* فوق/تحت */
        row-gap: 12px;
        text-align: center;
    }

    .cta-text {
        text-align: center;
    }

    .cta-actions {
        justify-content: center;
    }
}

/* ===== Students Feedback ===== */
.fb-section {
    margin: 20px 0 10px;
}

.fb-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* رأس العنوان */
.fb-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.fb-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: #eef2ff;
    color: #334155;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
}

.fb-divider {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* إطار الشريط */
.fb-marquee {
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    padding: 10px 0;
    min-height: 160px;
}

/* مسار الحركة */
.fb-track {
    display: flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    will-change: transform;
    animation: fb-scroll var(--fb-dur, 40s) linear infinite;
}

@keyframes fb-scroll {
    0% {
        transform: translateX(0)
    }

    100% {
        transform: translateX(-50%)
    }
}

.fb-section:hover .fb-track {
    animation-play-state: paused;
}

/* وقّف عند المرور (ديسكتوب) */

/* الكروت */
.fb-track li {
    flex: 0 0 auto;
    list-style: none;
}

.fb-card {
    width: 280px;
    height: 150px;
    /* مقاس الكارت */
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

.fb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .09);
}

.fb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* موبايل */
@media (max-width: 640px) {
    .fb-marquee {
        padding: 8px 0;
        min-height: 120px;
    }

    .fb-card {
        width: 220px;
        height: 120px;
    }

    .fb-track {
        gap: 10px;
    }
}

/* الكارت غير قابل للنقر */
.fb-card {
    cursor: default;
}

.fb-card:hover {
    transform: none;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
}

/* ===== Students Feedback Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.lightbox.open {
    display: flex;
    animation: lbFade .15s ease-out;
}

@keyframes lbFade {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.lightbox__img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    user-select: none;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
    position: absolute;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .92);
    color: #0f172a;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.lightbox__close {
    top: 16px;
    inset-inline-end: 16px;
}

.lightbox__prev {
    top: 50%;
    inset-inline-start: 18px;
    transform: translateY(-50%);
}

.lightbox__next {
    top: 50%;
    inset-inline-end: 18px;
    transform: translateY(-50%);
}

.lightbox__caption {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 92vw;
    color: #e5e7eb;
    font-size: 14px;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

/* تحسين تجربة الضغط */
.fb-card {
    cursor: zoom-in;
}

.fb-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

@media (max-width:640px) {
    .lightbox__img {
        max-width: 96vw;
        max-height: 86vh;
        border-radius: 10px;
    }

    .lightbox__prev,
    .lightbox__next {
        width: 36px;
        height: 36px;
    }
}

#studentsFeedback .fb-head {
    display: flex;
    flex-direction: row-reverse !important;
    /* العنوان يمين والخط لليسار */
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#studentsFeedback .fb-title {
    font-weight: 900;
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    color: #294766;
    background: linear-gradient(180deg, #eef4ff, #e6f0ff);
    border: 1px solid #d6e3ff;
    padding: .5rem .9rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(17, 24, 39, .06);
    white-space: nowrap;
}

#studentsFeedback .fb-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, #dbe7ff, transparent 65%);
    border-radius: 999px;
}

/* لا توقف التحريك عند المرور (لو فيه قاعدة قديمة بتعمل pause) */
#studentsFeedback:hover .fb-track {
    animation-play-state: running !important;
}

/* حجم مريح للكروت والمسار */
#studentsFeedback .fb-marquee {
    min-height: 160px;
}

#studentsFeedback .fb-track {
    gap: 14px;
}

/* خلي الشريط كله RTL عشان العنوان يبقى يمين */
#trustBar {
    direction: rtl;
}

/* ✨ اعزل مسار التحريك على LTR حتى مع RTL للأب */
#trustBar .marquee,
#trustBar .marquee__track,
#trustBar .marquee__track>li {
    direction: ltr !important;
    unicode-bidi: isolate;
    /* يمنع توريث الاتجاه */
}

/* المسار بدون gap علشان مايحصلش فجوة عند نقطة الوصل */
#trustBar .marquee__track {
    display: flex;
    flex-direction: row;
    gap: 0 !important;
    width: max-content;
    will-change: transform;
    animation: marquee var(--marquee-duration, 40s) linear infinite;
}

/* استخدم مسافة بالمارجن بدل gap */
#trustBar .marquee__track>li {
    list-style: none;
    line-height: 0;
    margin-inline: 14px;
}

#trustBar .marquee__track img {
    height: 36px;
    width: auto;
    filter: grayscale(100%) contrast(90%);
    opacity: .75;
    transition: filter .2s, opacity .2s, transform .2s;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }

    /* لأننا مكررين المحتوى */
}

/* ===== Mobile menu utilities (لإننا مش بنستخدم Tailwind) ===== */
.hidden {
    display: none !important;
}

.flex {
    display: flex !important;
}

/* اخفي قائمة الموبايل افتراضيًا، واظهرها فقط لما نضيف .flex */
#mobile-menu {
    display: none;
    /* افتراضيًا مخفية */
}

#mobile-menu.flex {
    display: flex;
    /* بنظهرها لما نضغط زر القائمة */
    flex-direction: column;
    gap: 8px;
}

/* على الشاشات الكبيرة خفيها دايمًا مهما حصل */
@media (min-width: 992px) {
    #mobile-menu {
        display: none !important;
    }
}

/* إيقاف الحركة عند الإيقاف اليدوي */
.marquee__track.is-paused {
    animation-play-state: paused !important;
}

/* تمييز اللوجو المختار (يلغي الـ grayscale) */
.marquee__track img.is-active {
    filter: none !important;
    opacity: 1 !important;
    transform: translateY(-2px) scale(1.02);
}

/* (اختياري) أثناء المرور بالماوس يلون مؤقتاً */
.marquee__track img:hover {
    filter: none;
    opacity: 1;
}

/* أزرار مصغّرة للموبايل */
.auth-compact {
    display: none;
    align-items: center;
    gap: .5rem;
}


.btn-pill {
    padding: .38rem .75rem;
    border-radius: 9999px;
    font-size: .85rem;
    border: 1px solid #d1d9e6;
    background: #fff;
    color: #294766;
}

.btn-pill.primary {
    background: #294766;
    color: #fff;
    border-color: #294766;
}
.btn-ghost, .btn-primary{
    text-decoration: none;
}

.btn-pill.danger {
    background: #f43f5e;
    color: #fff;
    border-color: #f43f5e;
}

.btn-pill.outline:hover {
    background: #f1f5f9;
}

/* إظهار البلوك على الشاشات الصغيرة فقط */
@media (max-width: 680px) {
    .auth-compact {
        display: inline-flex;
    }

    /* لو عندك مجموعة أزرار ديسكتوب، اخفِها على الموبايل */
    .auth-desktop {
        display: none !important;
    }
}

@media (min-width: 681px) {
    .auth-compact {
        display: none !important;
    }

    /* يبقى داخل الديسكتوب كما هو */
}

/* Utilities (fallback لو مش بتستخدم Tailwind) */
.hidden {
    display: none !important;
}

.flex {
    display: flex !important;
}

/* طبقة المنيو للموبايل */
#mobile-menu {
    position: fixed;
    top: 64px;
    /* عدّلها حسب ارتفاع النافبار */
    inset-inline: 0;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
    z-index: 9999;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
}

body.nav-open {
    overflow: hidden;
}

/* يمنع سكرول البودي أثناء فتح المنيو */

/* --- CTA Animation Pack: glow + ring + shine + float --- */
#startCta {
    position: relative;
    isolation: isolate;
    /* عشان الـ pseudo elements تتقصّ على الزر */
    box-shadow: 0 12px 28px rgba(66, 98, 135, .28);
    will-change: transform, filter;
    animation:
        cta-float 4.5s ease-in-out infinite alternate,
        cta-glow 2.8s ease-in-out infinite;
}

/* حلقة نبض تُظهر "نداء" كل شوية */
#startCta::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 9999px;
    background: radial-gradient(closest-side, rgba(66, 98, 135, .25), transparent 70%);
    transform: scale(.9);
    opacity: .0;
    z-index: -1;
    animation: cta-ring 3.6s ease-out infinite;
}

/* لمعة بتمرّ بسرعة */
#startCta::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .30) 40%, transparent 60%);
    transform: translateX(-120%);
    mix-blend-mode: screen;
    animation: cta-shine 5.5s ease-in-out infinite;
    pointer-events: none;
}

/* Hover أدق (ما يلغيش أنيميشين الأساسية) */
#startCta:hover {
    transform: translateY(-2px) scale(1.04);
    filter: brightness(1.06);
}

/* Keyframes */
@keyframes cta-float {
    from {
        transform: translateY(0)
    }

    to {
        transform: translateY(-6px)
    }
}

@keyframes cta-glow {

    0%,
    100% {
        box-shadow: 0 12px 28px rgba(66, 98, 135, .28)
    }

    50% {
        box-shadow: 0 16px 36px rgba(66, 98, 135, .36)
    }
}

@keyframes cta-ring {
    0% {
        transform: scale(.9);
        opacity: .0
    }

    10% {
        opacity: .55
    }

    50% {
        opacity: .12
    }

    100% {
        transform: scale(1.15);
        opacity: 0
    }
}

@keyframes cta-shine {
    0% {
        transform: translateX(-130%) rotate(0.001deg)
    }

    12% {
        transform: translateX(130%) rotate(0.001deg)
    }

    100% {
        transform: translateX(130%) rotate(0.001deg)
    }
}

/* احترام تفضيلات تقليل الحركة */
@media (prefers-reduced-motion: reduce) {

    #startCta,
    #startCta::before,
    #startCta::after {
        animation: none !important
    }
}

/* نبضة مركّزة وقت النداء */
#startCta.cta-attn {
    transform: translateY(-3px) scale(1.06);
    filter: brightness(1.08);
}

/* ========= CTA HYPER ATTRACT PACK ========= */

/* طبقة الشكل المتدرّج المتغيّر + حواف نيّون نابضة */
#startCta {
    position: relative;
    isolation: isolate;
    overflow: visible;
    background-image:
        linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0)),
        radial-gradient(120% 120% at 0% 0%, #6ea8fe 0%, #8ec5ff 40%, #c4e1ff 70%, #ffffff 100%);
    background-blend-mode: overlay, normal;
    transition: transform .25s ease, filter .25s ease, box-shadow .25s ease;
    box-shadow: 0 12px 30px rgba(40, 80, 140, .35), inset 0 0 0 1px rgba(255, 255, 255, .18);
    animation: ctaHue 8s linear infinite;
    /* تغيّر بسيط في ألوان الخلفية */
}

/* وهج نيّون خارجي نابض */
#startCta::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 9999px;
    background: conic-gradient(from 0deg,
            rgba(110, 168, 254, .0) 0deg,
            rgba(110, 168, 254, .55) 120deg,
            rgba(110, 168, 254, .0) 360deg);
    filter: blur(14px);
    opacity: .75;
    z-index: -1;
    animation: ctaHalo 3.2s ease-in-out infinite;
}

/* لمعة شُعاعية “كومِت” تعدي على الزر */
#startCta::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .35) 45%, transparent 60%);
    transform: translateX(-130%);
    mix-blend-mode: screen;
    animation: ctaComet 4.8s ease-in-out infinite;
    pointer-events: none;
}

/* زوم لطيف عند الـ hover */
#startCta:hover {
    transform: translateY(-3px) scale(1.06) rotate(-.3deg);
    filter: brightness(1.06);
}

/* “نبضة تركيز” تُضاف بالـ JS كل شوية */
#startCta.cta-attn {
    transform: translateY(-4px) scale(1.08);
    filter: saturate(1.15) brightness(1.08) contrast(1.03);
    box-shadow: 0 16px 40px rgba(40, 80, 140, .45);
}

/* شرار لامع بيظهر حوالين الزر (عناصر تُنشأ بالـ JS) */
.cta-spark {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff, rgba(255, 255, 255, .2) 70%, transparent 71%);
    pointer-events: none;
    animation: sparkFly .9s ease-out forwards;
    box-shadow: 0 0 10px rgba(255, 255, 255, .55);
}

/* كونفيتي بسيط عند الضغط */
.cta-confetti {
    position: absolute;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    will-change: transform, opacity;
    opacity: .95;
    animation: confettiFall 900ms cubic-bezier(.22, .61, .36, 1) forwards;
}

/* تأثير حلقة نداء أوسع (تتضاف بكلاس من JS لحظياً) */
#startCta.cta-ping::before {
    animation: ctaPing 900ms ease-out 1;
}

/* ==== Keyframes ==== */
@keyframes ctaHue {
    0% {
        filter: hue-rotate(0deg)
    }

    100% {
        filter: hue-rotate(18deg)
    }

    /* تغيّر خفيف */
}

@keyframes ctaHalo {

    0%,
    100% {
        opacity: .55;
        transform: scale(.98) rotate(0deg)
    }

    50% {
        opacity: .9;
        transform: scale(1.02) rotate(8deg)
    }
}

@keyframes ctaComet {
    0% {
        transform: translateX(-130%) rotate(.001deg)
    }

    12% {
        transform: translateX(130%) rotate(.001deg)
    }

    100% {
        transform: translateX(130%) rotate(.001deg)
    }
}

@keyframes sparkFly {
    0% {
        transform: translate(0, 0) scale(.8);
        opacity: 1
    }

    100% {
        transform: translate(var(--dx), var(--dy)) scale(1.2);
        opacity: 0
    }
}

@keyframes confettiFall {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    100% {
        transform: translate(var(--cfx), var(--cfy)) rotate(var(--rot)) scale(.9);
        opacity: 0;
    }
}

@keyframes ctaPing {
    0% {
        box-shadow: 0 0 0 0 rgba(110, 168, 254, .0)
    }

    40% {
        box-shadow: 0 0 0 14px rgba(110, 168, 254, .22)
    }

    100% {
        box-shadow: 0 0 0 26px rgba(110, 168, 254, 0)
    }
}

/* احترام تفضيلات تقليل الحركة */
@media (prefers-reduced-motion: reduce) {

    #startCta,
    #startCta::before,
    #startCta::after {
        animation: none !important;
    }
}

/* ==== Mobile guards ==== */
@media (max-width:680px) {

    html,
    body {
        overflow-x: hidden;
    }

    .desktop-menu {
        display: none !important;
    }

    /* لو عندك منيو دِسك توب */
    .auth-compact {
        display: inline-flex !important;
    }

    /* أزرار الموبايل فقط */
}

/* ===== Stats strip ===== */
.stats-strip {
    margin: 1.25rem auto 2rem;
    width: min(1100px, 94%);
    background: var(--card);
    border: 1px solid #e6ecf2;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 16px 10px;
    text-align: center;
}

.stats-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.stats-number {
    font-weight: 900;
    font-size: clamp(1.2rem, 2.6vw, 2rem);
    color: var(--primary-600);
    line-height: 1;
}

.stats-label {
    color: var(--muted);
    font-weight: 700;
    font-size: .95rem;
}

@media (max-width:640px) {
    .stats-strip {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ===== Stats bar ===== */
.stats-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 1rem auto 0;
    width: min(920px, 94%);
}

.stat-card {
    background: var(--card);
    border: 1px solid #e6ecf2;
    border-radius: 16px;
    padding: 14px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-label {
    color: var(--muted);
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 4px;
}

.stat-value {
    color: var(--primary-600);
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: .5px;
}

@media (max-width:480px) {
    .stat-value {
        font-size: 1.4rem;
    }
}

.stat-ico {
    margin-left: 6px;
    display: inline-block;
    transform: translateY(1px)
}

.stat-card:hover .stat-ico {
    animation: bob .9s ease-in-out infinite
}

@keyframes bob {

    0%,
    100% {
        transform: translateY(1px)
    }

    50% {
        transform: translateY(-2px)
    }
}

:root {
    --card-bg: hsla(210 40% 98% / .55);
    --card-border: hsl(214 32% 91%);
    --ink: hsl(215 28% 17%);
    --muted: hsl(215 16% 47%);
    --accent: hsl(205 92% 48%);
    --radius: 18px;
    --shadow: 0 10px 30px rgba(2, 8, 20, .06);
}

@media (prefers-color-scheme: dark) {
    :root {
        --card-bg: hsla(220 16% 16% / .45);
        --card-border: hsl(220 10% 26%);
        --ink: hsl(210 20% 96%);
        --muted: hsl(215 16% 72%);
        --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    }
}

.stats-grid {
    --gap: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: var(--gap);
    align-items: stretch;
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    position: relative;
    padding: 18px 20px 22px;
    border-radius: var(--radius);
    border: 1px solid var(--card-border);
    background:
        radial-gradient(1200px 400px at 10% -20%, rgba(99, 165, 255, .08), transparent 40%),
        radial-gradient(1200px 400px at 110% 120%, rgba(52, 211, 153, .08), transparent 40%),
        var(--card-bg);
    box-shadow: var(--shadow);
    transform: translateY(10px) scale(.985);
    opacity: 0;
    transition: transform .7s cubic-bezier(.2, .7, .2, 1),
        opacity .7s cubic-bezier(.2, .7, .2, 1),
        box-shadow .25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
}

.stat-card::after {
    /* لمسة لمعان خفيفة */
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .15), transparent 30%);
    opacity: .5;
}

.stat-card:hover {
    transform: translateY(0) scale(1);
    box-shadow: 0 16px 36px rgba(2, 8, 20, .10);
}

.stat-card.is-visible {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.stat-top {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.stat-title {
    margin: 0;
    font-size: .98rem;
    font-weight: 700;
    letter-spacing: .2px;
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--accent);
    background: radial-gradient(circle at 30% 30%, rgba(99, 165, 255, .25), transparent 60%),
        rgba(99, 165, 255, .08);
    border: 1px solid rgba(99, 165, 255, .25);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    transform: translateZ(0);
    transition: transform .35s ease;
}

.stat-card:hover .stat-icon {
    transform: translateY(-2px) scale(1.04);
}

.stat-number {
    margin-top: 8px;
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--ink);
    font-weight: 800;
    letter-spacing: .5px;
    font-variant-numeric: tabular-nums;
    /* Gradient ink لإحساس premium خفيف */
    background: linear-gradient(90deg, hsl(215 20% 20%), hsl(215 12% 35%));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}

.stat-number::after {
    /* خط تحتي متحرك خفيف */
    content: "";
    display: block;
    height: 3px;
    margin-top: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(99, 165, 255, .35), rgba(52, 211, 153, .35));
    transform-origin: left;
    transform: scaleX(0);
    transition: transform .9s cubic-bezier(.2, .8, .2, 1);
}

.stat-card.is-visible .stat-number::after {
    transform: scaleX(1);
}

:root{
  --sp-card-bg:#fff;
  --sp-border:#e8eef5;
  --sp-ink:#243047;
  --sp-muted:#5b6b83;
  --sp-accent:#4678f3;      /* الأزرق الهادي */
  --sp-radius:16px;
  --sp-shadow:0 8px 24px rgba(2,8,20,.06);
}
@media (prefers-color-scheme:dark){
  :root{
    --sp-card-bg:#141822;
    --sp-border:#242b38;
    --sp-ink:#ecf1f9;
    --sp-muted:#a9b4c6;
    --sp-shadow:0 10px 30px rgba(0,0,0,.35);
  }
}

/* الشبكة */
.stats-pro{
  display:grid;
  grid-template-columns: repeat(3, minmax(220px,1fr));
  gap:18px;
  margin-block: 6px 10px;
}
@media (max-width: 900px){ .stats-pro{ grid-template-columns: 1fr; } }

/* الكارت */
.stat-pro{
  position:relative;
  border:1px solid var(--sp-border);
  background:var(--sp-card-bg);
  border-radius:var(--sp-radius);
  box-shadow:var(--sp-shadow);
  padding:16px 18px 18px;
  opacity:0; transform: translateY(8px);
  animation: sp-in .5s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: var(--d, 0ms);
}
.stat-pro:hover{ box-shadow:0 12px 28px rgba(2,8,20,.10); }

/* الهيدر */
.stat-head{
  display:flex; align-items:center; justify-content:space-between;
  color:var(--sp-muted);
}
.stat-title{
  margin:0; font-size:.98rem; font-weight:700; letter-spacing:.2px;
}

/* أيقونة دائرية صغيرة */
.stat-chip{
  width:34px; height:34px; display:grid; place-items:center; border-radius:50%;
  color:var(--sp-accent);
  background: rgba(70,120,243,.08);
  border:1px solid rgba(70,120,243,.22);
  transition: transform .25s ease;
}
.stat-pro:hover .stat-chip{ transform: translateY(-2px); }

/* الرقم */
.stat-number{
  margin-top:10px;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.4rem);
  font-weight:800;
  line-height:1.1;
  color:var(--sp-ink);
  font-variant-numeric: tabular-nums;
}

/* دخول */
@keyframes sp-in{
  from{ opacity:0; transform: translateY(8px); }
  to  { opacity:1; transform:none; }
}

/* ========= Stats: polish overrides ========= */

/* لوحة ألوان هادئة */
:root{
  --sp-accent-h: 221;                 /* غيّر الدرجة لو عايز (220–230 أزرق، 260 بنفسجي) */
  --sp-accent:      hsl(var(--sp-accent-h) 85% 56%);
  --sp-accent-ink:  hsl(var(--sp-accent-h) 78% 40%);

  --sp-card-bg:#fff;
  --sp-border: hsl(215 33% 92%);      /* حدّ خفيف بدلاً من الغامق */
  --sp-ink:   hsl(222 47% 21%);
  --sp-muted: hsl(215 17% 45%);
  --sp-radius:18px;
  --sp-shadow:0 8px 22px rgba(2,8,20,.06);
}
@media (prefers-color-scheme:dark){
  :root{
    --sp-card-bg:#121722;
    --sp-border:  #222b39;
    --sp-ink:     #eaf0f9;
    --sp-muted:   #a4b0c3;
    --sp-shadow:  0 10px 30px rgba(0,0,0,.35);
  }
}

/* 1) فكّ الالتصاق من الجوانب + عرض أقصى أنيق */
.stats-pro{
  max-width: 1120px;                 /* وسط الصفحة */
  margin: 12px auto 18px;
  padding-inline: clamp(12px, 4vw, 28px);   /* مسافة جانبية ثابتة */
  display:grid;
  grid-template-columns: repeat(3, minmax(240px,1fr));
  gap: clamp(14px, 2.5vw, 22px);
}
@media (max-width: 900px){
  .stats-pro{ grid-template-columns: 1fr; }
}

/* 2) الكارت أخفّ، بدون سواد */
.stat-pro{
  position:relative;
  background: var(--sp-card-bg);
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 16px 20px 18px;
  opacity:0; transform: translateY(8px);
  animation: sp-in .48s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: var(--d, 0ms);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.stat-pro:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(2,8,20,.10);
  border-color: hsl(var(--sp-accent-h) 45% 75% / .55);
}

/* شريط لمّاع خفيف أعلى الكارت (اختياري وجميل) */
.stat-pro::before{
  content:"";
  position:absolute; left:10px; right:10px; top:8px; height:2px;
  border-radius:999px;
  background: linear-gradient(90deg,
    hsl(var(--sp-accent-h) 90% 60% / .35),
    hsl(var(--sp-accent-h) 90% 60% / .05) 60%,
    transparent);
  pointer-events:none;
}

/* 3) الهيدر */
.stat-head{
  display:flex; align-items:center; justify-content:space-between;
  color:var(--sp-muted);
}
.stat-title{
  margin:0; font-size:.98rem; font-weight:700; letter-spacing:.2px;
}

/* أيقونة داخل شارة ناعمة */
.stat-chip{
  width:32px; height:32px; display:grid; place-items:center;
  border-radius:10px;
  color: var(--sp-accent-ink);
  background: hsl(var(--sp-accent-h) 95% 97%);
  border: 1px solid hsl(var(--sp-accent-h) 45% 85% / .7);
  box-shadow: inset 0 2px 6px hsl(var(--sp-accent-h) 75% 35% / .12);
  transition: transform .25s ease;
}
.stat-pro:hover .stat-chip{ transform: translateY(-2px); }

/* الرقم */
.stat-number{
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: clamp(1.6rem, 1.1rem + 1.3vw, 2.35rem);
  color: var(--sp-ink);
  line-height: 1.1;
}

/* حركة دخول بسيطة */
@keyframes sp-in{
  from{opacity:0; transform:translateY(8px)}
  to  {opacity:1; transform:none}
}

/* ====== Stats vertical layout (icon → title → number) ====== */

/* الحاوية: نفس الجريد، بس نخلي كل كارت مرتاح */
.stats-pro{
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(12px,4vw,28px);
  display:grid;
  grid-template-columns: repeat(3, minmax(230px,1fr));
  gap: clamp(14px,2.5vw,22px);
}
@media (max-width: 900px){
  .stats-pro{ grid-template-columns: 1fr; }
}

/* الكارت نفسه */
.stat-pro{
  text-align: center;                       /* كل شيء في المنتصف */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 18px 20px;
  min-height: 150px;                        /* مساحة كفاية للترتيب العمودي */
}

/* رتب الهيدر عموديًا */
.stat-head{
  width: 100%;
  display: flex;
  flex-direction: column;                   /* أيقونة فوق ثم العنوان */
  align-items: center;
  justify-content: center;
  gap: 8px;                                 /* مسافة بين الأيقونة والعنوان */
  margin-bottom: 6px;
}

/* لو العنوان كان قبل الأيقونة في الـHTML… نقلّبه بالأorder */
.stat-head .stat-chip{ order: -1; }         /* الأيقونة أولاً */
.stat-head .stat-title{ order: 0; }

/* الأيقونة – أكبر شوية وناعمة */
.stat-chip{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--sp-accent-ink);
  background: hsl(var(--sp-accent-h) 95% 97%);
  border: 1px solid hsl(var(--sp-accent-h) 45% 85% / .7);
  box-shadow: inset 0 2px 6px hsl(var(--sp-accent-h) 75% 35% / .12);
}

/* العنوان */
.stat-title{
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--sp-muted);
  text-align: center;
}

/* الرقم – أسفلهم مع مسافة مريحة */
.stat-number{
  margin-top: 10px;                         /* مسافة تحت العنوان */
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem);
  line-height: 1.1;
  color: var(--sp-ink);
}

/* الشريط اللمّاع العلوي يبقى مخفف */
.stat-pro::before{
  left: 16px; right: 16px; top: 10px;
  opacity: .6;
}
/* ==== Stats width 70% (desktop + mobile) ==== */
/* ضع هذا البلوك بعد أي كود قديم لـ .stats-pro ليقوم بالـ override */

.stats-pro{
  width: 70%;            /* المطلوب */
  max-width: none;       /* نلغي الحدّ السابق (1120px) */
  margin-inline: auto;   /* في المنتصف */
  padding-inline: 0;     /* اختياري: نشيل الحافة الداخلية */
  grid-template-columns: repeat(3, minmax(180px, 1fr)); /* نتجنّب overflow */
}

/* موبايل: كارت واحد في الصف لكن ما زال 70% من عرض الشاشة */
@media (max-width: 900px){
  .stats-pro{
    grid-template-columns: 1fr;
    width: 70%;
  }
}

/* ==== Auth buttons (Header) ========================================== */
:root{
  --nav-bg: #3f5d70;           /* لون شريط الهيدر */
  --brand-500: #4b6b88;        /* لون أساسي */
  --brand-400: #5f80a0;
  --brand-600: #38546c;
  --white: #fff;
}

.nav-auth, /* لو عندك كونتينر للأزرار */
#loginLinkCompact, 
#signupLinkCompact {
  font-family: inherit;
}

/* قاعدة مشتركة */
.btn-auth,
#loginLinkCompact,
#signupLinkCompact{
  --btn-h: 42px;
  --btn-fs: 15px;
  --btn-pad-x: 18px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h);
  padding: 0 var(--btn-pad-x);
  font-size: var(--btn-fs);
  font-weight: 700;
  letter-spacing: .2px;
  border-radius: 9999px;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
  user-select: none;
  white-space: nowrap;
}

/* إنشاء حساب = Primary (ممتلئ) */
.btn-auth--primary,
#signupLinkCompact{
  color: var(--white);
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.05);
}
.btn-auth--primary:hover,
#signupLinkCompact:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.08);
  filter: brightness(1.04);
}
.btn-auth--primary:active,
#signupLinkCompact:active{
  transform: translateY(0);
  filter: brightness(.98);
}

/* تسجيل الدخول = Outline (شفّاف) */
.btn-auth--outline,
#loginLinkCompact{
  color: #f7fafc;
  background: rgba(255,255,255,.06);
  border: 2px solid rgba(255,255,255,.65);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 4px 12px rgba(0,0,0,.12);
}
.btn-auth--outline:hover,
#loginLinkCompact:hover{
  background: rgba(255,255,255,.12);
  transform: translateY(-1px);
}
.btn-auth--outline:active,
#loginLinkCompact:active{
  transform: translateY(0);
}

/* فوكس واضح للوصولية */
.btn-auth:focus-visible,
#loginLinkCompact:focus-visible,
#signupLinkCompact:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.5), 0 0 0 6px rgba(59,130,246,.45);
}

/* تباعد بين الزرين */
.nav-auth{ display:flex; gap:12px; align-items:center; }
#loginLinkCompact{ margin-inline-start: 0; margin-inline-end: 8px; }

/* ===== موبايل / شاشات صغيرة ===== */
@media (max-width: 768px){
  .btn-auth,
  #loginLinkCompact,
  #signupLinkCompact{
    --btn-h: 34px;
    --btn-fs: 14px;
    --btn-pad-x: 14px;
    border-width: 1.5px;
  }
  .nav-auth{ gap:8px; }
}

/* شاشات ضيّقة جدًا */
@media (max-width: 380px){
  .btn-auth,
  #loginLinkCompact,
  #signupLinkCompact{
    --btn-h: 32px;
    --btn-fs: 13px;
    --btn-pad-x: 12px;
  }
}

