﻿/* ===== Variables & Base ===== */
:root {
    --primary: #18a171;
    --primary-dark: #127452;
    --primary-light: #e7f8f2;
    --secondary: #43b78f;
    --secondary-dark: #2f9e79;
    --gray-900: #1a1a1a;
    --gray-700: #374151;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --nav-color: #4b5563;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-lg: 16px;
}
/* ===== Tajawal — خط التصميم المرجعي، مستضاف محلياً =====
   الـ template يحمّله من Google Fonts بأربعة أوزان: 400 و500 و700 و800.
   استُبدل سابقاً بـ ibmplexsansarabic-medium عبر مُحدِّد شامل `*`، وهو ملف
   بوزن واحد؛ فسقطت أوزان التصميم كلّها إلى faux-bold يصنعه المتصفّح.
   ولذلك خُفِّضت قيم font-weight في .nav a و.btn تعويضاً — وقد أُعيدت الآن. */
@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../webfonts/tajawal/tajawal-arabic-400.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../webfonts/tajawal/tajawal-latin-400.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../webfonts/tajawal/tajawal-arabic-500.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../webfonts/tajawal/tajawal-latin-500.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../webfonts/tajawal/tajawal-arabic-700.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../webfonts/tajawal/tajawal-latin-700.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../webfonts/tajawal/tajawal-arabic-800.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../webfonts/tajawal/tajawal-latin-800.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ⭐ يرث من body بدل فرض عائلة بعينها. القيمة الصريحة على `*` تنطبق مباشرةً
   على كل عنصر، فتغلب ما يُورَّث من body مهما كانت أسبقيته — ولذلك كان سطر
   font-family في body بلا أثر أصلاً فعُلِّق. أما أيقونات bootstrap-icons
   وFontAwesome فلم تتأثّر: أسبقيتها أعلى من المُحدِّد الشامل. */
* {
    font-family: inherit;
}
/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.88);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(4px, -6px);
    }

    66% {
        transform: translate(-3px, 4px);
    }
}

@keyframes floatFromCenter {
    0%, 100% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(calc(-50% - 10px));
    }
}

@keyframes pulseSoft {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.03);
        opacity: 0.95;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.65s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.5s ease-out forwards;
}

/* عناصر تظهر عند التمرير (يضاف .in-view من JS) */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

    .animate-on-scroll.in-view {
        opacity: 1;
        transform: translateY(0);
    }

    /* تنويع الحركة حسب القسم */
    .animate-on-scroll.animate-zoom {
        opacity: 0;
        transform: scale(0.92);
        transition: opacity 0.6s ease-out, transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

        .animate-on-scroll.animate-zoom.in-view {
            opacity: 1;
            transform: scale(1);
        }

    .animate-on-scroll.animate-slide-right {
        opacity: 0;
        transform: translateX(48px);
        transition: opacity 0.55s ease-out, transform 0.55s ease-out;
    }

        .animate-on-scroll.animate-slide-right.in-view {
            opacity: 1;
            transform: translateX(0);
        }

    .animate-on-scroll.animate-slide-left {
        opacity: 0;
        transform: translateX(-48px);
        transition: opacity 0.55s ease-out, transform 0.55s ease-out;
    }

        .animate-on-scroll.animate-slide-left.in-view {
            opacity: 1;
            transform: translateX(0);
        }

body.ltr .animate-on-scroll.animate-slide-right {
    transform: translateX(-48px);
}

    body.ltr .animate-on-scroll.animate-slide-right.in-view {
        transform: translateX(0);
    }

body.ltr .animate-on-scroll.animate-slide-left {
    transform: translateX(48px);
}

    body.ltr .animate-on-scroll.animate-slide-left.in-view {
        transform: translateX(0);
    }

.animate-on-scroll.animate-delay-1 {
    transition-delay: 0.1s;
}

.animate-on-scroll.animate-delay-2 {
    transition-delay: 0.2s;
}

.animate-on-scroll.animate-delay-3 {
    transition-delay: 0.3s;
}

.animate-on-scroll.animate-delay-4 {
    transition-delay: 0.4s;
}

.animate-on-scroll.animate-delay-5 {
    transition-delay: 0.5s;
}

/* Stagger: أطفال العنصر يظهرون بتأخير متتابع عند ظهور الأب */
.animate-on-scroll .animate-stagger > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-on-scroll.in-view .animate-stagger > * {
    opacity: 1;
    transform: translateY(0);
}

    .animate-on-scroll.in-view .animate-stagger > *:nth-child(1) {
        transition-delay: 0.05s;
    }

    .animate-on-scroll.in-view .animate-stagger > *:nth-child(2) {
        transition-delay: 0.12s;
    }

    .animate-on-scroll.in-view .animate-stagger > *:nth-child(3) {
        transition-delay: 0.19s;
    }

    .animate-on-scroll.in-view .animate-stagger > *:nth-child(4) {
        transition-delay: 0.26s;
    }

    .animate-on-scroll.in-view .animate-stagger > *:nth-child(5) {
        transition-delay: 0.33s;
    }

    .animate-on-scroll.in-view .animate-stagger > *:nth-child(6) {
        transition-delay: 0.4s;
    }

    .animate-on-scroll.in-view .animate-stagger > *:nth-child(7) {
        transition-delay: 0.47s;
    }

    .animate-on-scroll.in-view .animate-stagger > *:nth-child(8) {
        transition-delay: 0.54s;
    }

/* Hero: حركة عند تحميل الصفحة */
.hero-content.animate-hero {
    opacity: 0;
    animation: fadeInUp 0.7s ease-out 0.15s forwards;
}

.hero-visual.animate-hero {
    opacity: 0;
    animation: fadeInScale 0.7s ease-out 0.4s forwards;
}

/* أشكال زخرفية متحركة (float) */
.hero-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient( 135deg, var(--primary-light) 0%, rgba(24, 161, 113, 0.15) 100% );
    animation: float 6s ease-in-out infinite;
}

.hero-shape-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    right: 8%;
    animation-delay: 0s;
    animation-duration: 5s;
}

.hero-shape-2 {
    width: 80px;
    height: 80px;
    bottom: 25%;
    left: 5%;
    animation-delay: -2s;
    animation-duration: 7s;
}

.hero-shape-3 {
    width: 60px;
    height: 60px;
    top: 50%;
    right: 15%;
    animation: floatSlow 8s ease-in-out infinite;
}

body.ltr .hero-shape-1 {
    right: auto;
    left: 8%;
}

body.ltr .hero-shape-2 {
    left: auto;
    right: 5%;
}

body.ltr .hero-shape-3 {
    right: auto;
    left: 15%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Tajawal", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-900);
    /* background: linear-gradient(135deg, #f5fcf9 0%, #ffffff 50%, #f0fdf4 100%); */
    background: linear-gradient(135deg, #127452 0%, #1274520d 0%, #328e6e26 100%);
    direction: rtl;
    overflow-x: hidden;
    padding-top: 72px; /* space for fixed header */
    position: relative;
}

    body::before {
        content: "";
        position: absolute;
        top: 10%;
        left: -100px;
        width: 400px;
        height: 400px;
        background: radial-gradient( circle, rgba(24, 161, 113, 0.15) 0%, rgba(24, 161, 113, 0) 70% );
        border-radius: 50%;
        filter: blur(50px);
        z-index: -1;
        pointer-events: none;
        animation: floatSlow 10s ease-in-out infinite;
    }

    body::after {
        content: "";
        position: absolute;
        top: 60%;
        right: -100px;
        width: 500px;
        height: 500px;
        background: radial-gradient( circle, rgba(67, 183, 143, 0.15) 0%, rgba(67, 183, 143, 0) 70% );
        border-radius: 50%;
        filter: blur(60px);
        z-index: -1;
        pointer-events: none;
        animation: floatSlow 12s ease-in-out infinite alternate;
    }

    /* LTR layout (used on English page) */
    body.ltr {
        direction: ltr;
    }

        body.ltr .header-inner {
            flex-direction: row;
        }

        body.ltr .logo {
            order: 0;
        }

        body.ltr .header-nav-wrap {
            order: 1;
        }

        body.ltr .header-start {
            order: 2;
        }

        body.ltr .nav {
            direction: ltr;
        }

        /* body.ltr .faq-question {
  direction: ltr;
  text-align: left;
} */

        body.ltr .faq-answer p {
            padding-left: 52px;
            padding-right: 20px;
            text-align: left;
        }

    /* .faq-content {
  background: #f8fcfb;
  padding: 10px;
  border-radius: 12px;
} */

    /* ===== لغة واحدة في الصفحة: إظهار/إخفاء حسب كلاس body ===== */
    body.lang-ar .lang-en {
        display: none !important;
    }

    body.lang-en .lang-ar {
        display: none !important;
    }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header ===== */
.header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: none;
    border-bottom: 1px solid #ededed;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 24px;
}

.header-start {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Keep login + language in same order in both RTL and LTR — only page direction changes */
.header-utils {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: ltr;
}

.lang-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2d3d;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
}

    .lang-selector:hover {
        color: var(--primary-dark);
        background: var(--gray-100);
    }

.lang-dropdown {
    position: relative;
}

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin: 8px 0 0;
    padding: 8px 0;
    min-width: 160px;
    list-style: none;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 100;
}

.lang-dropdown.open .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-menu button {
    display: block;
    width: 100%;
    padding: 10px 20px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2d3d;
    text-align: right;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

    .lang-dropdown-menu button:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

.nav-arrow {
    font-size: 0.65rem;
    opacity: 0.8;
    color: #1f2d3d;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    color: #1f2d3d;
    cursor: pointer;
    transition: color 0.2s;
}

    .nav-dropdown-trigger:hover {
        color: var(--primary);
    }

    .nav-dropdown-trigger.nav-link-active {
        color: var(--primary);
    }

        .nav-dropdown-trigger.nav-link-active::after {
            content: "";
            position: absolute;
            bottom: -4px;
            right: 0;
            left: 0;
            height: 3px;
            background: var(--primary);
            border-radius: 2px;
        }

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin: 8px 0 0;
    padding: 8px 0;
    min-width: 180px;
    list-style: none;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200, #e5e7eb);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 100;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #1f2d3d;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

    .nav-dropdown-menu a:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

/* عنصر بقائمة فرعية (dropdown داخل dropdown) */
.nav-dropdown-item-has-sub {
    position: relative;
}

.nav-dropdown-sub-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 20px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: 500;
    color: #1f2d3d;
    cursor: pointer;
    text-align: right;
    transition: background 0.2s, color 0.2s;
}

[dir="ltr"] .nav-dropdown-sub-trigger {
    text-align: left;
    flex-direction: row;
}

.nav-dropdown-sub-trigger:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-sub-arrow {
    font-size: 0.6rem;
    opacity: 0.8;
    margin-right: 8px;
    flex-shrink: 0;
}

[dir="ltr"] .nav-sub-arrow {
    margin-right: 0;
    margin-left: 8px;
    transform: scaleX(-1);
}

.nav-dropdown-submenu {
    position: absolute;
    top: 0;
    right: 100%;
    margin: 0 4px 0 0;
    padding: 8px 0;
    min-width: 200px;
    list-style: none;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200, #e5e7eb);
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 101;
}

[dir="ltr"] .nav-dropdown-submenu {
    right: auto;
    left: 100%;
    margin: 0 0 0 4px;
    transform: translateX(-8px);
}

[dir="ltr"] .nav-dropdown-item-has-sub.open .nav-dropdown-submenu {
    transform: translateX(0);
}

.nav-dropdown-item-has-sub:hover .nav-dropdown-submenu,
.nav-dropdown-item-has-sub.open .nav-dropdown-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

[dir="ltr"] .nav-dropdown-item-has-sub:hover .nav-dropdown-submenu {
    transform: translateX(0);
}

.nav-dropdown-submenu a {
    display: block;
    padding: 10px 20px;
    color: #1f2d3d;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

    .nav-dropdown-submenu a:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

.nav-link-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-link-active {
    position: relative;
    color: var(--primary);
}

    .nav-link-active::after {
        content: "";
        position: absolute;
        bottom: -4px;
        right: 0;
        left: 0;
        height: 3px;
        background: var(--primary);
        border-radius: 2px;
    }

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 44px;
    width: auto;
}

/* Mobile nav toggle (visible only on small screens via media query) */
.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    color: #1f2d3d;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
}

    .nav-toggle:hover {
        background: var(--gray-100);
        color: var(--primary);
    }

.nav-toggle-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    position: relative;
    transition: transform 0.2s, background 0.2s;
}

    .nav-toggle-icon::before,
    .nav-toggle-icon::after {
        content: "";
        position: absolute;
        left: 0;
        width: 22px;
        height: 2px;
        background: currentColor;
        border-radius: 1px;
        transition: transform 0.2s;
    }

    .nav-toggle-icon::before {
        top: -7px;
    }

    .nav-toggle-icon::after {
        top: 7px;
    }

.header.nav-open .nav-toggle-icon {
    background: transparent;
}

    .header.nav-open .nav-toggle-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    .header.nav-open .nav-toggle-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

    .nav a {
        color: #1f2d3d;
        text-decoration: none;
        font-weight: 600;
        transition: color 0.2s;
    }

        .nav a:hover {
            color: var(--primary);
        }

.login-btn {
    border-radius: 12px !important;
}

/* ===== User menu (بعد تسجيل الدخول) ===== */
.user-menu {
    position: relative;
}

.user-menu-logged {
    display: none;
    position: relative;
}

.user-menu.is-logged-in .login-btn {
    display: none;
}

.user-menu.is-logged-in .user-menu-logged {
    display: block;
}

.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 14px;
    border: none;
    border-radius: 999px;
    background: var(--gray-100);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-900);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

    .user-menu-trigger:hover {
        background: #e0f2fe;
        color: var(--primary-dark);
    }

.user-menu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    order: 0;
}

.user-menu-name {
    order: 1;
}

.user-menu-arrow {
    font-size: 0.6rem;
    opacity: 0.8;
    order: 2;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 20px 0 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 200;
}

.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

[dir="ltr"] .user-dropdown {
    right: auto;
    left: 0;
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px 16px;
    flex-direction: row-reverse;
}

[dir="ltr"] .user-dropdown-header {
    flex-direction: row;
}

.user-dropdown-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: right;
}

[dir="ltr"] .user-dropdown-info {
    text-align: left;
}

.user-dropdown-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gray-900);
}

.user-dropdown-email {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.user-dropdown-nav {
    display: flex;
    flex-direction: column;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-900);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-direction: row-reverse;
    text-align: right;
}

[dir="ltr"] .user-dropdown-item {
    flex-direction: row;
    text-align: left;
}

.user-dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.user-dropdown-icon {
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.user-dropdown-sep {
    height: 1px;
    background: var(--gray-300);
    margin: 8px 0;
}

.user-dropdown-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #dc2626;
    cursor: pointer;
    transition: background 0.15s;
    flex-direction: row-reverse;
    text-align: right;
}

[dir="ltr"] .user-dropdown-logout {
    flex-direction: row;
    text-align: left;
}

.user-dropdown-logout:hover {
    background: #fef2f2;
}

.user-dropdown-icon-logout {
    color: #dc2626 !important;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    font-family: inherit;
    font-size: 1rem;
    text-decoration: none;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-outline-primary {
    background: var(--white);
    border: 1px solid;
}

    .btn-outline-primary:hover {
        background: var(--primary);
        color: var(--white);
    }

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s, color 0.2s, border-color 0.2s;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(24, 161, 113, 0.25);
    }

    .btn:active {
        transform: scale(0.98);
    }

/* ===== Hero (قسم اول — ارتفاع الشاشة الكاملة تحت الهيدر) ===== */
.hero {
    position: relative;
    min-height: calc(100vh - 72px);
    min-height: calc(100dvh - 72px);
    display: flex;
    align-items: center;
    padding: 40px 0 50px;
    overflow: visible;
}

    .hero > .hero-inner.container,
    .hero > .container.hero-inner {
        width: 100%;
        max-width: 1420px;
    }

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--gray-900);
    margin: 0 0 24px;
}

.hero-highlight {
    font-size: 4.2rem;
    color: var(--primary-dark);
}

.hero-accent {
    font-size: 4.2rem;
}

.hero-line {
    display: block;
    font-size: 2.8rem;
    margin-top: 10px;
}

.hero-desc {
    color: var(--gray-700);
    margin: 0 0 36px;
    max-width: 650px;
    font-weight: 500;
    font-size: 1.3rem;
    line-height: 1.7;
}

/* Hero text actions: translation & sound */
.hero-text-actions {
    position: relative;
    /* display: flex; */
    align-items: center;
    gap: 8px;
    /* margin-bottom: 24px; */
}

.hero-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

    .hero-action-btn:hover {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
    }

.hero-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .hero-action-icon svg {
        width: 20px;
        height: 20px;
    }

.hero-translate-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    padding: 12px 16px;
    max-width: 360px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    z-index: 20;
}

    .hero-translate-tooltip[hidden] {
        display: none !important;
    }

.hero-translate-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-800);
    line-height: 1.5;
}

body.ltr .hero-translate-tooltip {
    right: auto;
    left: 0;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

    .hero-cta .btn {
        min-width: 230px;
        padding: 15px 36px;
        font-size: 1.15rem;
    }

/* Hero visual */
.hero-visual {
    position: relative;
    min-height: 580px;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual-img {
    max-width: 100%;
    width: 620px;
    height: auto;
    object-fit: contain;
    display: block;
}

.hero-image-wrap {
    position: relative;
    z-index: 1;
    display: inline-block;
    max-width: 100%;
}

/* بطاقات العبارات فوق صورة الهيرو (ليست من الصورة) */
.hero-overlay-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.8);
    z-index: 2;
    max-width: 85%;
}

.hero-overlay-card-1 {
    top: 32%;
    left: 2%;
}

.hero-overlay-card-2 {
    bottom: 2%;
    left: 2%;
}

.hero-overlay-card-3 {
    top: 70%;
    right: 4%;
    transform: translateY(-50%);
}

/* حركة طفو خفيفة لبطاقات الهيرو */
.hero-overlay-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .hero-overlay-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

.hero-overlay-card-1 {
    animation: float 5s ease-in-out infinite;
}

.hero-overlay-card-2 {
    animation: float 6s ease-in-out infinite 0.8s;
}

.hero-overlay-card-3 {
    animation: floatFromCenter 5.5s ease-in-out infinite 0.4s;
}

    .hero-overlay-card-3:hover {
        transform: translateY(calc(-50% - 4px));
    }

[dir="ltr"] .hero-overlay-card-1 {
    right: auto;
    left: 8%;
}

[dir="ltr"] .hero-overlay-card-2 {
    right: auto;
    left: 2%;
}

[dir="ltr"] .hero-overlay-card-3 {
    left: auto;
    right: 4%;
}

.hero-overlay-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
    text-align: right;
}

[dir="ltr"] .hero-overlay-text {
    text-align: left;
}

.hero-overlay-text br {
    display: block;
    content: "";
    margin-top: 2px;
}

.hero-overlay-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.hero-overlay-icon-green {
    background: rgba(24, 161, 113, 0.15);
    color: var(--primary);
}

.hero-overlay-icon-cap {
    background: rgba(31, 45, 61, 0.08);
    color: var(--gray-900);
}

.hero-overlay-icon-orange {
    background: rgba(249, 115, 22, 0.15);
    color: #ea580c;
}

@media (max-width: 768px) {
    .hero-overlay-card {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .hero-overlay-card-1 {
        top: 32%;
        left: -4%;
    }

    .hero-overlay-card-2 {
        bottom: 2%;
        left: 0;
    }

    .hero-overlay-card-3 {
        top: 68%;
        right: 4%;
    }

    .hero-overlay-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
}

/* ===== Pattern Background Utility (Sides) ===== */
.section-pattern {
    position: relative;
    overflow: hidden;
    background: var(--white);
}

    .section-pattern::before,
    .section-pattern::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 220px;
        background-image: url("../img/pattren2-01.png");
        background-repeat: repeat-y;
        background-size: 140px;
        opacity: 0.5;
        pointer-events: none;
        z-index: 0;
        transition: opacity 0.3s ease;
    }

    /* Left side pattern - mirrored and aligned to cling to the left edge */
    .section-pattern::before {
        left: 0;
        background-position: right top;
        transform: scaleX(-1);
        -webkit-mask-image: linear-gradient( to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100% );
        mask-image: linear-gradient( to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100% );
    }

    /* Right side pattern - aligned to cling to the right edge */
    .section-pattern::after {
        right: 0;
        background-position: right top;
        -webkit-mask-image: linear-gradient( to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100% );
        mask-image: linear-gradient( to left, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100% );
    }

    .section-pattern > * {
        position: relative;
        z-index: 1;
    }

/* ===== Section common ===== */
.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 16px;
    text-align: center;
}

.section-desc {
    color: var(--gray-700);
    text-align: center;
    /* max-width: 640px; */
    margin: 0 auto 32px;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.7;
}

/* ===== Intro / Vision ===== */
.intro {
    padding: 20px 0;
    /* background: var(--gray-100); */
}

    .intro .container {
        text-align: center;
    }

.intro-label {
    display: inline-block;
    padding: 4px 40px;
    background: var(--primary-light);
    color: var(--secondary);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 999px;
    margin: 0 auto 20px;
    box-shadow: 0 0 0 1px rgba(169, 211, 105, 0.3);
}

.intro-heading {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    text-align: center;
    margin: 0 0 20px;
    line-height: 1.4;
}

.intro-heading-accent {
    color: var(--primary-dark);
}

.intro-text {
    text-align: center;
    color: var(--gray-700);
    /* max-width: 520px; */
    margin: 0 auto;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.7;
}

/* ===== Stats ===== */
.stats {
    padding: 10px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.stat-card {
    position: relative;
    border-top: 6px solid transparent;
    padding: 32px 24px;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.2s;
}

    .stat-card:hover {
        transform: translateY(-3px);
        border-top: 6px solid #127452;
        background: var(--gray-100);
    }

    .stat-card:not(:first-child)::before {
        content: "";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 72px;
        background: rgba(0, 0, 0, 0.06);
    }

body.ltr .stat-card:not(:first-child)::before {
    right: auto;
    left: 0;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: var(--gray-700);
    font-weight: 500;
    margin-top: 4px;
}

/* ===== Explore ===== */
.explore {
    padding: 30px 0;
    background: transparent;
}

.tags {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.tag {
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.95rem;
    /* font-weight: 600; */
    color: var(--gray-700);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.tag {
    transition: transform 0.2s ease, background 0.2s, color 0.2s;
}

    .tag:hover,
    .tag.active {
        background: var(--primary);
        color: var(--white);
    }

    .tag:hover {
        transform: scale(1.05);
    }

.explore-number {
    color: var(--primary);
}

.explore-search-wrap {
    position: relative;
    max-width: 560px;
    margin: 0 auto 20px;
}

    .explore-search-wrap .search-icon {
        position: absolute;
        right: 18px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.1rem;
        opacity: 0.6;
        pointer-events: none;
    }

.input-search {
    width: 100%;
    padding: 10px 45px 10px 46px;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--white);
    direction: rtl;
}

    .input-search:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(169, 211, 105, 0.2);
    }

body.ltr .explore-search-wrap .search-icon {
    right: auto;
    left: 18px;
}

body.ltr .input-search {
    direction: ltr;
    padding: 10px 46px 10px 45px;
}

.popular-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.popular-search-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-700);
}

.popular-search .tag {
    position: relative;
}

    .popular-search .tag::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 55%;
        height: 1px;
        background: rgba(0, 0, 0, 0.08);
    }

.explore-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 480px;
    margin: 0 auto;
}

    .explore-cta .input-email {
        flex: 1;
        min-width: 200px;
    }

/* ===== Feature sections ===== */
.feature {
    padding: 40px 0;
}

    .feature:nth-child(even) {
        background: var(--white);
    }

.feature-1 {
    background: linear-gradient( 180deg, rgba(169, 211, 105, 0.12) 0%, var(--white) 100% );
}

.feature:nth-child(odd) {
    background: #f8fcfb;
}

.feature-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.feature-content {
    min-width: 0;
    width: 100%;
}

.feature-2 .feature-inner {
    direction: rtl;
}

.feature-2 .feature-content {
    text-align: right;
}

body.ltr .feature-2 .feature-inner {
    direction: ltr;
}

body.ltr .feature-2 .feature-content {
    text-align: left;
}

.feature-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--secondary);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 16px;
    line-height: 1.35;
}

.feature-desc {
    color: var(--gray-700);
    margin: 0 0 24px;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    max-width: 100%;
}

    .feature-list li {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
        color: var(--gray-700);
    }

    .feature-list .check {
        color: var(--gray-700);
        font-weight: bold;
        font-size: 1.1rem;
    }

.feature-list-cards {
    margin-bottom: 28px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.feature-list-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 50%;
    padding: 8px 18px;
    margin-bottom: 12px;
    box-sizing: border-box;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    color: var(--gray-700);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s;
}

    .feature-list-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border-color: var(--primary-light);
    }

.feature-list-icon {
    font-size: 1.2rem;
}

.feature-list-cta {
    width: 100%;
    max-width: 50%;
    margin-top: 30px;
    margin-bottom: 0;
    list-style: none;
    box-sizing: border-box;
}

    .feature-list-cta .btn {
        width: 100%;
        box-sizing: border-box;
    }

.feature-image-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

    .feature-image-wrap .feature-image {
        display: block;
        width: 100%;
        height: auto;
        min-height: 320px;
        object-fit: cover;
        vertical-align: middle;
    }

/* بطاقات وعبارات فوق صور المميزات (ليست من الصورة) */
.feature-overlay {
    position: absolute;
    z-index: 2;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.feature-overlay-testimonial {
    top: 16px;
    left: 16px;
    max-width: 280px;
    padding: 16px 18px;
}

[dir="ltr"] .feature-overlay-testimonial {
    left: 16px;
}

.feature-overlay-stars {
    color: #f59e0b;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.feature-overlay-stars-inline {
    margin-top: 8px;
    margin-bottom: 0;
}

.feature-overlay-quote {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.5;
    margin: 0 0 12px;
    text-align: right;
}

[dir="ltr"] .feature-overlay-quote {
    text-align: left;
}

.feature-overlay-author {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row-reverse;
}

[dir="ltr"] .feature-overlay-author {
    flex-direction: row;
}

.feature-overlay-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.feature-overlay-author > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

[dir="ltr"] .feature-overlay-author > div {
    text-align: left;
}

.feature-overlay-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-900);
}

.feature-overlay-role {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* شارة شهادة معتمدة */
.feature-overlay-badge {
    bottom: 16px;
    right: 16px;
    left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
}

[dir="ltr"] .feature-overlay-badge {
    left: auto;
    right: 16px;
}

.feature-overlay-badge-icon {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
}

.feature-overlay-badge .lang-ar,
.feature-overlay-badge .lang-en {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* فقاعة الشهادة في القسم الثاني */
.feature-overlay-bubble {
    max-width: 300px;
}

    .feature-overlay-bubble .feature-overlay-avatar {
        width: 44px;
        height: 44px;
    }

/* عداد الطلاب الملتحقين */
.feature-overlay-enrollment {
    bottom: 16px;
    right: auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

[dir="ltr"] .feature-overlay-enrollment {
    left: auto;
    right: 16px;
}

.feature-overlay-enrollment-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-overlay-enrollment-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.feature-overlay-enrollment-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
}

.feature-overlay-avatars {
    display: flex;
    margin-right: 8px;
}

[dir="ltr"] .feature-overlay-avatars {
    margin-right: 0;
    margin-left: 8px;
}

.feature-overlay-avatars img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    margin-right: -8px;
}

[dir="ltr"] .feature-overlay-avatars img {
    margin-right: 0;
    margin-left: -8px;
}

.feature-overlay-avatars img:first-child {
    margin-inline-end: 0;
}

@media (max-width: 768px) {
    .feature-overlay-testimonial {
        max-width: 100%;
        padding: 12px 14px;
    }

    .feature-overlay-quote {
        font-size: 0.88rem;
    }

    .feature-overlay-badge,
    .feature-overlay-enrollment {
        padding: 8px 12px;
    }

    .feature-overlay-enrollment-number {
        font-size: 1.1rem;
    }
}

.feature-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
    min-height: 320px;
}

.feature-testimonial {
    position: absolute;
    top: 20px;
    right: 20px;
    left: auto;
    max-width: 260px;
    padding: 16px 18px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.feature-testimonial-right {
    right: auto;
    left: 20px;
}

.feature-stars {
    color: #f59e0b;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.feature-testimonial p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    color: var(--gray-900);
    line-height: 1.5;
}

.feature-testimonial-name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gray-900);
}

.feature-testimonial-role {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.feature-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--white);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-900);
    box-shadow: var(--shadow);
}

.feature-badge-cert .feature-badge-check {
    color: var(--green);
    font-weight: bold;
}

.feature-badge-right {
    right: auto;
    left: 20px;
}

.feature-badge-enrolled {
    right: auto;
    left: 20px;
}

.feature-badge-avatars {
    font-size: 0.85rem;
}

.feature-image-book {
    background: linear-gradient(145deg, #d4a574 0%, #b8956a 100%);
}

    .feature-image-book::before {
        content: "📖";
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 6rem;
        opacity: 0.5;
    }

.feature-image-class {
    background: linear-gradient(145deg, var(--gray-300) 0%, var(--gray-100) 100%);
}

    .feature-image-class::before {
        content: "";
        position: absolute;
        inset: 0;
        background: url("https://images.unsplash.com/photo-1560785477-d43d2b34e0df?w=600") center/cover;
    }

.read-more {
    position: absolute;
    bottom: 16px;
    right: 16px;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    z-index: 1;
}

    .read-more:hover {
        text-decoration: underline;
    }

.quote-card {
    position: absolute;
    bottom: 24px;
    right: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.9);
    padding: 16px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--gray-900);
    box-shadow: var(--shadow);
    z-index: 1;
}

/* ===== Trust grid ===== */
.trust {
    padding: 40px 0;
    background: transparent;
}

.feature-div-tag {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}

.trust .feature-div-tag .feature-tag {
    display: inline-block;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.trust-card {
    position: relative;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    transition: box-shadow 0.2s, border-color 0.2s, background-color 0.25s, color 0.25s, transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

    /* Pattern image overlay on hover */
    .trust-card::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        background-image: url(../img/pattren.png);
        background-size: cover;
        background-position: center;
        opacity: 0;
        transition: opacity 0.25s;
    }

    /* Vertical separator between white cards (not next to green card) */
    .trust-card:nth-child(n + 3)::before {
        content: "";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 72px;
        background: rgba(0, 0, 0, 0.06);
    }

body.ltr .trust-card:nth-child(n + 3)::before {
    right: auto;
    left: 0;
}

.trust-card:hover {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

    .trust-card:hover::after {
        opacity: 0.35;
    }

    .trust-card:hover h3,
    .trust-card:hover p {
        color: var(--white);
    }

    .trust-card:hover .trust-icon,
    .trust-card:hover .trust-icon-green {
        color: var(--white);
    }

/* Keep card content above pattern overlay */
.trust-card .trust-icon,
.trust-card .trust-icon-green,
.trust-card h3,
.trust-card p {
    position: relative;
    z-index: 1;
}

.trust-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.trust-icon-green {
    color: var(--primary);
}

.trust-card-main .trust-icon {
    color: var(--white);
}

.trust-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 8px;
}

.trust-card p {
    font-size: 0.9rem;
    color: var(--gray-700);
    margin: 0;
}

.trust-card-main {
    background: var(--primary);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

    .trust-card-main:hover::after {
        opacity: 0.35;
    }

    .trust-card-main p {
        color: rgba(255, 255, 255, 0.95);
        margin: 0;
        transition: color 0.3s ease;
    }

/* عندما يتم تمرير الماوس فوق الشبكة، يفقد الكرت الأساسي حالته النشطة */
.trust-grid:hover .trust-card-main {
    background: var(--white);
    color: var(--gray-900);
    border-color: rgba(0, 0, 0, 0.08);
}

    .trust-grid:hover .trust-card-main .trust-icon {
        color: var(--primary);
    }

    .trust-grid:hover .trust-card-main p {
        color: var(--gray-700);
    }

    /* ولكن إذا تم تمرير الماوس فوق الكرت الأساسي نفسه، يعود لحالته النشطة */
    .trust-grid:hover .trust-card-main:hover {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
    }

        .trust-grid:hover .trust-card-main:hover .trust-icon {
            color: var(--white);
        }

        .trust-grid:hover .trust-card-main:hover p {
            color: rgba(255, 255, 255, 0.95);
        }

.trust-icon-ar {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

/* ===== Testimonials ===== */
.testimonials {
    padding: 40px 0;
    background: #f8fcfb;
}

.testimonials-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    direction: rtl;
}

body.ltr .testimonials-inner {
    direction: ltr;
}

.testimonials-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.testimonials-header {
    flex: 1;
    min-width: 0;
    text-align: right;
    overflow: visible;
}

body.ltr .testimonials-header {
    text-align: left;
}

.testimonials-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 8px;
    line-height: 1.3;
}

.testimonials-subtitle {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--gray-900);
    margin: 0;
    display: inline-block;
    position: relative;
    padding: 0 2px;
    padding-bottom: 0.15em;
    z-index: 1;
}

    .testimonials-subtitle::after {
        content: "";
        position: absolute;
        bottom: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        height: 0.25em;
        background: var(--secondary);
        border-radius: 2px;
        z-index: -1;
    }

.testimonials-nav {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.testimonials-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 8px 0 16px 0;
    padding-inline: 24px;
    margin-inline: -24px;
    scroll-behavior: smooth;
}

    .testimonials-track::-webkit-scrollbar {
        display: none;
    }

.testimonial-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
    direction: rtl;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .testimonial-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    }

.testimonial-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
}

.testimonial-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--gray-900);
}

.testimonial-location {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin: 0 0 8px;
}

.testimonial-flag {
    font-style: normal;
}

.testimonial-rating {
    font-size: 0.9rem;
    color: var(--gray-700);
    margin: 0 0 10px;
}

    .testimonial-rating .stars {
        color: #f59e0b;
        margin-right: 4px;
    }

.testimonial-course-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.testimonial-text {
    font-size: 0.9rem;
    color: var(--gray-700);
    margin: 0;
    line-height: 1.6;
    text-align: right;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 25%;
    border: 1px solid var(--gray-300);
    background: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    color: var(--gray-700);
}

    .carousel-btn:hover {
        background: var(--primary);
        border-color: var(--primary);
        color: var(--white);
    }

.testimonials-nav .carousel-prev,
.testimonials-nav .carousel-next {
    position: static;
}

/* نقاط المؤشر تحت السلايدر */
.testimonials-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 4px;
    background: var(--gray-300);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

    .carousel-dot:hover {
        background: var(--gray-500);
    }

    .carousel-dot.active {
        width: 28px;
        background: var(--primary);
    }

/* ===== FAQ ===== */
.faq {
    padding: 72px 0;
    background: var(--white);
}

    .faq .container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--gray-300);
    /* border-radius: var(--radius); */
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    direction: rtl;
    text-align: right;
    background: var(--white);
    border: none;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

    .faq-question:hover {
        background: var(--gray-100);
    }

.faq-icon {
    font-size: 1.1rem;
    color: var(--gray-500);
    flex-shrink: 0;
}

.faq-item.open .faq-icon {
    color: var(--secondary);
}

.faq-answer {
    /* background: #ffffff; */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    .faq-answer p {
        margin: 0;
        padding: 0 20px 18px 20px;
        padding-right: 52px;
        color: var(--gray-700);
        line-height: 1.7;
        border-top: 1px solid var(--gray-100);
    }

/* ===== CTA Bottom ===== */
.cta-bottom {
    direction: rtl;
    position: relative;
    z-index: 999;
    width: calc(100% - 200px);
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: -29px;
    margin-top: 30px;
    border-radius: 20px;
    padding: 20px 0;
    background: linear-gradient( to right, var(--primary) 0%, var(--primary) 28%, var(--primary-light) 42%, #f8fcfb 52%, var(--white) 55%, var(--white) 100% );
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: visible;
}

    .cta-bottom::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 20px;
        background: linear-gradient( to right, rgba(255, 255, 255, 0.08) 0%, transparent 45%, transparent 100% );
        pointer-events: none;
    }

.cta-bottom-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    overflow: visible;
}

.cta-bottom-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 16px;
}

.cta-highlight {
    color: var(--primary);
}

.cta-bottom-desc {
    color: var(--gray-700);
    margin: 0 0 28px;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.7;
}

.cta-bottom-visual {
    position: relative;
    min-height: 320px;
    overflow: visible;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.cta-bottom-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: linear-gradient( 135deg, var(--primary-light) 0%, var(--primary) 60% );
    border-radius: 45% 55% 50% 50% / 55% 45% 55% 45%;
    opacity: 0.35;
}

.cta-bottom-btn {
    padding: 5px 50px;
}

.cta-bottom-image {
    width: auto;
    height: 420px;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    display: block;
    margin-top: -100px;
    margin-bottom: -25px;
}

/* ===== Footer ===== */
.footer {
    background: #212121;
    color: #b0b0b0;
    padding: 56px 0 32px;
}

    .footer .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 900px;
        margin: 0 auto;
    }

.footer-brand {
    margin-bottom: 28px;
}

.footer-logo-wrap {
    margin-bottom: 20px;
}

.footer-logo {
    height: 48px;
    width: auto;
    display: block;
    margin: 0 auto;
    filter: brightness(0) invert(0.85);
}

.footer-mission {
    color: #b0b0b0;
    font-size: 1rem;
    line-height: 1.75;
    margin: 0;
    /* max-width: 640px; */
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 28px;
    margin-bottom: 28px;
    direction: rtl;
}

    .footer-nav a {
        color: #b0b0b0;
        text-decoration: none;
        font-size: 0.95rem;
        transition: color 0.2s;
    }

        .footer-nav a:hover {
            color: #e0e0e0;
        }

.footer-social {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
}

.footer-social-icon {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: #e0e0e0;
}

.footer-copy {
    margin: 0;
    font-size: 0.85rem;
    color: #9a9a9a;
}

/* ===== Padding ===== */
.px-10 {
    padding-left: 10px;
    padding-right: 10px;
}

.px-20 {
    padding-left: 20px;
    padding-right: 20px;
}

.px-30 {
    padding-left: 30px;
    padding-right: 30px;
}

.px-40 {
    padding-left: 40px;
    padding-right: 40px;
}

/* ===== Margin ===== */
.mx-10 {
    margin-left: 10px;
    margin-right: 10px;
}

.mx-20 {
    margin-left: 20px;
    margin-right: 20px;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 992px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-inner,
    .feature-inner,
    .cta-bottom-inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero {
        padding: 48px 0 64px;
    }

    .hero-visual {
        order: -1;
        min-height: 340px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-highlight {
        font-size: 2.75rem;
    }

    .hero-accent {
        font-size: 2.75rem;
    }

    .feature {
        padding: 56px 0;
    }

    .feature-2 .feature-visual {
        order: -1;
    }

    .feature-inner {
        gap: 32px;
    }

    .feature-title {
        font-size: 1.5rem;
    }

    .testimonials-top-row {
        flex-direction: column;
        align-items: flex-end;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .trust-card-main {
        grid-column: span 1;
    }

    .cta-bottom {
        width: calc(100% - 64px);
        margin-top: 24px;
        margin-bottom: -24px;
        padding: 24px 16px;
        background: white;
    }

    .cta-bottom-visual {
        display: none;
    }

    .cta-bottom-title {
        font-size: 1.75rem;
    }

    .cta-bottom-image {
        height: 320px;
        display: none;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .intro-heading {
        font-size: 1.5rem;
    }

    .explore {
        padding: 48px 0;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .header-inner {
        flex-wrap: wrap;
        gap: 16px;
        padding: 12px 16px;
    }

    .header-start {
        order: 3;
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-toggle {
        display: flex;
        order: 2;
    }

    .header-nav-wrap {
        order: 3;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--gray-300);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.2s, visibility 0.2s;
    }

    .header.nav-open .header-nav-wrap {
        max-height: 85vh;
        opacity: 1;
        visibility: visible;
        overflow: auto;
    }

    .header-nav-wrap .nav {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 24px 24px;
        gap: 0;
    }

        .header-nav-wrap .nav a,
        .header-nav-wrap .nav-dropdown {
            padding: 14px 0;
            border-bottom: 1px solid var(--gray-200);
            font-size: 1rem;
        }

            .header-nav-wrap .nav a:last-of-type,
            .header-nav-wrap .nav-dropdown:last-of-type {
                border-bottom: none;
            }

    .header-nav-wrap .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 0 16px;
        margin: 8px 0 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.2s, opacity 0.2s;
    }

    .header-nav-wrap .nav-dropdown.open .nav-dropdown-menu {
        max-height: 200px;
        opacity: 1;
    }

    .logo {
        order: 1;
    }

    .logo-img {
        height: 36px;
    }

    .header-utils {
        gap: 8px;
    }

    .login-btn {
        padding: 8px 18px;
        font-size: 0.9rem;
    }

    .nav a,
    .nav-dropdown-trigger {
        font-size: 0.9rem;
    }

    .nav-dropdown-menu,
    .lang-dropdown-menu {
        right: 0;
        left: auto;
        min-width: 160px;
    }

    .tags {
        gap: 8px;
    }

    .tag {
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    .hero {
        padding: 32px 0 48px;
    }

    .hero-title {
        font-size: 1.7rem;
        margin-bottom: 16px;
    }

    .hero-highlight {
        font-size: 2.1rem;
    }

    .hero-accent {
        font-size: 2.1rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

        .hero-cta .btn {
            width: 100%;
        }

    .px-40 {
        padding-left: 16px;
        padding-right: 16px;
    }

    .intro {
        padding: 32px 0;
    }

    .intro-label {
        padding: 4px 24px;
        font-size: 0.9rem;
    }

    .intro-heading {
        font-size: 1.35rem;
    }

    .intro-text {
        font-size: 0.95rem;
    }

    .stats {
        padding: 24px 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .stat-card {
        padding: 24px 16px;
    }

        .stat-card:not(:first-child)::before {
            right: auto;
            left: 50%;
            top: 0;
            transform: translateX(-50%);
            width: 72px;
            height: 1px;
        }

    body.ltr .stat-card:not(:first-child)::before {
        left: 50%;
        right: auto;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.35rem;
        margin-bottom: 12px;
    }

    .section-desc {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }

    .explore {
        padding: 40px 0;
    }

    .explore-search-wrap {
        margin-bottom: 16px;
    }

    .explore-cta {
        flex-direction: column;
    }

        .explore-cta .input-email {
            min-width: 0;
        }

    .feature {
        padding: 40px 0;
    }

    .feature-tag {
        font-size: 0.8rem;
        padding: 4px 12px;
    }

    .feature-title {
        font-size: 1.35rem;
    }

    .feature-desc {
        font-size: 0.9rem;
    }

    .feature-list-card,
    .feature-list-cta {
        max-width: 100%;
    }

    .trust {
        padding: 48px 0;
    }

        .trust .feature-div-tag {
            margin-bottom: 8px;
        }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 24px;
    }

    .testimonials {
        padding: 48px 0;
    }

    .testimonials-title {
        font-size: 1.5rem;
    }

    .testimonials-subtitle {
        font-size: 1.5rem;
    }

    .testimonial-card {
        flex: 0 0 260px;
        padding: 20px;
    }

    .testimonials-track {
        padding-inline: 16px;
        margin-inline: -16px;
    }

    .faq {
        padding: 48px 0;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .faq-answer p {
        padding: 0 16px 14px 16px;
        padding-right: 44px;
        font-size: 0.9rem;
    }

    .cta-bottom {
        width: calc(100% - 32px);
        margin-top: 20px;
        margin-bottom: -20px;
        padding: 20px 12px;
        border-radius: 16px;
    }

    .cta-bottom-inner {
        gap: 24px;
    }

    .cta-bottom-title {
        font-size: 1.35rem;
    }

    .cta-bottom-desc {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .cta-bottom-image {
        height: 280px;
        display: none;
    }

    .footer {
        padding: 40px 0 24px;
    }

    .footer-logo {
        height: 36px;
    }

    .footer-mission {
        font-size: 0.9rem;
    }

    .footer-nav {
        gap: 6px 16px;
    }

        .footer-nav a {
            font-size: 0.9rem;
        }

    .footer-copy {
        font-size: 0.8rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .header-inner {
        padding: 10px 12px;
    }

    .hero-title {
        font-size: 1.45rem;
    }

    .hero-highlight {
        font-size: 1.7rem;
    }

    .hero-accent {
        font-size: 1.7rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .intro-heading {
        font-size: 1.2rem;
    }

    .feature-title {
        font-size: 1.2rem;
    }

    .testimonial-card {
        flex: 0 0 240px;
    }

    .cta-bottom {
        width: calc(100% - 24px);
        padding: 16px 10px;
    }

    .cta-bottom-title {
        font-size: 1.2rem;
    }

    .cta-bottom-image {
        height: 240px;
        display: none;
    }
}

/* ===== Settings Page Custom Styles ===== */
.form-switch .form-check-input {
    width: 2.8rem;
    height: 1.4rem;
    cursor: pointer;
}

    .form-switch .form-check-input:checked {
        background-color: #198754;
        border-color: #198754;
    }

.custom-shadow {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

/* ===== Courses Page Custom Styles ===== */
.bg-courses-content {
    background-color: #F9FAFB;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #6c757d;
}

.filter-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #ededed;
}

.search-input-group {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

    .search-input-group:focus-within {
        border-color: #18a171;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(24, 161, 113, 0.1);
    }

.btn-filter-dropdown {
    border: 1px solid #e9ecef;
    background-color: #ffffff;
    color: #495057;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 10px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

    .btn-filter-dropdown:hover, .btn-filter-dropdown:focus {
        border-color: #18a171;
        background-color: #fdfdfd;
        color: #18a171;
    }

    .btn-filter-dropdown::after {
        display: inline-block;
        margin-right: auto;
        margin-left: 0;
        content: "";
        border-top: 0.3em solid;
        border-right: 0.3em solid transparent;
        border-bottom: 0;
        border-left: 0.3em solid transparent;
        vertical-align: 0.25em;
    }

    .btn-filter-dropdown .badge-count {
        width: 20px;
        height: 20px;
        background-color: #18a171;
        color: #ffffff;
        font-size: 0.75rem;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

.btn-sort {
    border: 1px solid #e9ecef;
    background-color: #ffffff;
    color: #495057;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

    .btn-sort:hover {
        background-color: #f8f9fa;
    }

.course-card-item {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #ededed;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

    .course-card-item:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
        border-color: #18a171;
    }

.course-card-img-wrap {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.course-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card-item:hover .course-card-img {
    transform: scale(1.05);
}

.badge-level {
    background-color: #e7f8f2 !important;
    color: #18a171 !important;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 6px 12px !important;
    border-radius: 8px !important;
}

.badge-free-course {
    background-color: #e7f8f2;
    color: #18a171;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* تقرير 1 — G1: شارة الدورة التي سجّل فيها الطالب */
.badge-enrolled {
    background-color: #eef2ff;
    color: #3f51b5;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-bookmark {
    width: 46px;
    height: 46px;
    border: 1px solid #e9ecef;
    background-color: #ffffff;
    color: #18a171;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .btn-bookmark:hover {
        background-color: #e7f8f2;
        border-color: #18a171;
    }

.btn-view-course {
    background-color: #18a171;
    color: #ffffff;
    font-weight: 600;
    border-radius: 10px;
    padding: 10px 24px;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
}

    .btn-view-course:hover {
        background-color: #127452;
        color: #ffffff;
    }

/* Custom style for checklist popover */
.filter-popover-menu {
    min-width: 240px;
    border-radius: 14px !important;
    border: 1px solid #ededed !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    padding: 16px !important;
}

.filter-popover-header {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.form-check-input {
    cursor: pointer;
    width: 1.15em;
    height: 1.15em;
}

    .form-check-input:checked {
        background-color: #18a171;
        border-color: #18a171;
    }

.form-check-label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #495057;
    user-select: none;
}

/* ===== Course Details Page Custom Styles ===== */
/* Banner style matching screenshot */
.course-details-banner {
    background: linear-gradient(135deg, #18a171 0%, #127452 100%);
    background-image: linear-gradient(135deg, #18a171 0%, #127452 100%), url('../img/cardPattren.svg');
    background-blend-mode: overlay;
    background-position: left center;
    background-repeat: no-repeat;
    background-size: contain;
    border-radius: 20px;
    padding: 40px;
    color: #ffffff;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

body.ltr .course-details-banner {
    background-position: right center;
}

.banner-badge {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Tabs custom styling */
.nav-tabs-custom {
    border-bottom: 2px solid #ededed;
    display: flex;
    gap: 30px;
    margin-bottom: 35px;
    padding-bottom: 0;
    list-style: none;
}

    .nav-tabs-custom .nav-link {
        color: #495057;
        text-decoration: none;
        font-weight: 600;
        font-size: 1rem;
        padding-bottom: 14px;
        border: none;
        border-bottom: 3px solid transparent;
        transition: all 0.2s ease;
        background: transparent;
        cursor: pointer;
    }

        .nav-tabs-custom .nav-link.active {
            color: #18a171;
            border-bottom-color: #18a171;
        }

.section-title-custom {
    font-weight: 800;
    font-size: 1.4rem;
    color: #1a1a1a;
    margin-bottom: 20px;
    position: relative;
}

.learn-card {
    background: #ffffff;
    border: 1px solid #ededed;
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    transition: all 0.2s ease;
}

    .learn-card:hover {
        border-color: #18a171;
        box-shadow: 0 4px 15px rgba(24, 161, 113, 0.05);
    }

/* Curriculum Accordion Styling */
.curriculum-accordion .accordion-item {
    border: 1px solid #ededed !important;
    border-radius: 12px !important;
    margin-bottom: 12px;
    overflow: hidden;
}

.curriculum-accordion .accordion-button {
    background-color: #ffffff;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 18px 20px;
    border: none !important;
    box-shadow: none !important;
}

    .curriculum-accordion .accordion-button:not(.collapsed) {
        background-color: #f8f9fa;
        color: #18a171;
    }

    .curriculum-accordion .accordion-button::after {
        margin-right: auto;
        margin-left: 0;
    }

.curriculum-accordion .accordion-body {
    background-color: #ffffff;
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.7;
    padding: 20px;
    border-top: 1px solid #ededed;
}

/* Purchase Card Styling (Right Column Sticky) */
.sticky-purchase-card {
    position: sticky;
    top: 96px;
    background: #ffffff;
    border: 1px solid #ededed;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.purchase-img-wrap {
    height: 200px;
    overflow: hidden;
}

.purchase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.purchase-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.purchase-feature-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: 0.9rem;
    color: #495057;
}

    .purchase-feature-item:last-child {
        border-bottom: none;
    }

.purchase-feature-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.purchase-feature-icon {
    color: #18a171;
    font-size: 1.1rem;
}

.price-tag-sale {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a1a1a;
}

.price-tag-original {
    text-decoration: line-through;
    color: #adb5bd;
    font-size: 1rem;
}

.discount-badge {
    background-color: #fdf2f2;
    color: #dc3545;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}

.btn-subscribe {
    background-color: #18a171;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 12px;
    padding: 14px 20px;
    transition: all 0.2s ease;
    width: 100%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .btn-subscribe:hover {
        background-color: #127452;
        color: #ffffff;
    }

/* Checkout page (/Checkout/{id}) — شعارات الدفع بقاعدة لا بأنماط مضمّنة */
.checkout-card {
    background: #ffffff;
    border: 1px solid #ededed;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.checkout-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.checkout-lines > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}

.checkout-lines dt {
    font-weight: 400;
    color: #495057;
}

.checkout-lines dd {
    margin: 0;
}

.checkout-lines .checkout-total {
    border-bottom: none;
    font-weight: 800;
    font-size: 1.25rem;
    color: #1a1a1a;
}

.checkout-gateways {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.checkout-gateway {
    background: #ffffff;
    border: 1px solid #ededed;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

    .checkout-gateway:hover:not(:disabled) {
        border-color: #18a171;
    }

    .checkout-gateway:disabled {
        opacity: 0.5;
        cursor: wait;
    }

    .checkout-gateway img {
        height: 64px;
        max-width: 100%;
        object-fit: contain;
    }

/* Instructor Card Style */
.instructor-card {
    background: #ffffff;
    border: 1px solid #ededed;
    border-radius: 18px;
    padding: 24px;
}

.instructor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e7f8f2;
}

.instructor-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6c757d;
    font-size: 0.85rem;
}

.instructor-stat-icon {
    color: #18a171;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #eee;
    border-radius: 4px;
}

/* Utility for dashed border not in standard BS5 yet */
.border-dashed {
    border-style: dashed !important;
}

.bg-content {
    background-color: #F9FAFB;
}

/* Main Navbar Navigation Styles */
#main-navbar .nav-link.active {
    position: relative;
}

    #main-navbar .nav-link.active::after {
        content: '';
        position: absolute;
        left: 50%;
        bottom: -4px;
        transform: translateX(-50%);
        width: calc(100% + 12px);
        height: 3px;
        background: currentColor;
        border-radius: 2px;
    }

.user-icon {
    width: 28px;
    height: 28px;
}

/*dashboured*/

.sidebar {
    /* 260px كانت تترك 239px صافية بعد الحشو، فتُقصّ ثلاثة عناوين —
       منها «المستخدمون» في المستوى الثالث. قِيس بـ scrollWidth. */
    width: 276px;
    /* ⭐ الشريط عنصر flex داخل .inner-shell، والافتراضي flex-shrink:1 —
       فكان يُضغط دون عرضه المحدَّد: قِيس 238.8px بينما CSS تقول 276px.
       المنع من الانكماش هو ما يجعل العرض المكتوب هو العرض الفعليّ. */
    flex: 0 0 auto;
    min-height: 100vh;
    background: #fff;
    border-left: 1px solid #eee;
}

    .sidebar.player-sidebar {
        width: 300px;
    }

@media (max-width: 992px) {
    .sidebar {
        width: 100% !important;
        min-height: auto;
    }
}

/* ⭐ كان المحدِّد `.sidebar a` شاملاً بلا استثناء، فابتلع روابط قائمة
   التنقّل أيضاً وفرض عليها `padding: 1px` — وهو ما جعل القائمة المنسدلة
   تبدو صفوفاً ملتصقة بلا تنفّس. القياس في المتصفّح أثبته:
       item padding = 1px  ·  item height = 28px

   الآن يُستثنى منه ما يملك تنسيقه الخاص (`.zb-nav__link`)، فيبقى العاملُ
   لبقيّة روابط الشريط ولا يزاحم نظام التنقّل. */
.sidebar a:not(.zb-nav__link) {
    color: #555;
    text-decoration: none;
    padding: 1px 1px;
    display: block;
    border-radius: 8px;
    width: 100%;
    text-align: start;
}

    .sidebar a:not(.zb-nav__link).active,
    .sidebar a:not(.zb-nav__link):hover {
        background: #e9f5ee;
        color: #198754;
    }

.list-group-item {
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px !important;
}

    .list-group-item:hover {
        background-color: #f8f9fa;
    }

    .list-group-item.active-lesson {
        background-color: #e9f5ee !important;
        color: #198754 !important;
        font-weight: bold;
        border-right: 4px solid #198754;
    }

.progress {
    height: 6px;
}

.badge-success {
    background: #d1f7e2;
    color: #198754;
}

.height-80 {
    height: 80px;
}

@media (max-width: 768px) {
    .height-80 {
        height: 120px !important;
    }
}

@media (max-width: 320px) {
    .height-80 {
        height: 160px !important;
    }
}

.span-check {
    width: 24px;
    height: 24px;
}

/* ===== لوحة حسابات الاختبار في صفحة الدخول ===== */
.test-accounts {
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    background-color: #fafafa;
}

.test-accounts-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    color: #4b5563;
    list-style: none;
    user-select: none;
    -webkit-user-select: none;
}

    .test-accounts-summary::-webkit-details-marker {
        display: none;
    }

    /* مثلّث الطيّ: يدور عند الفتح. في RTL يشير يساراً وهو مغلق */
    .test-accounts-summary::after {
        content: "\25C0";
        margin-inline-start: auto;
        font-size: 0.7rem;
        color: #9ca3af;
        transition: transform 0.15s ease;
    }

.test-accounts[open] .test-accounts-summary::after {
    transform: rotate(-90deg);
}

.test-accounts-summary:hover {
    color: var(--primary);
}

.test-accounts-body {
    padding: 0 12px 12px;
    /* ستّة عشر حساباً تتجاوز طول الشاشة وتدفع النموذج بعيداً عند الفتح.
       سقفٌ للارتفاع يُبقي اللوحة كتلةً واحدة تُمرَّر في مكانها. */
    max-height: 22rem;
    overflow-y: auto;
}

.test-accounts-hint {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 0 0 0.6rem;
    line-height: 1.6;
}

/* ── مربّع التصفية ── */
.test-accounts-filter {
    position: relative;
    margin-bottom: 0.65rem;
}

    .test-accounts-filter > i {
        position: absolute;
        inset-inline-start: 0.6rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.75rem;
        color: #9ca3af;
        pointer-events: none;
    }

    .test-accounts-filter input {
        padding-inline-start: 2rem;
        border-radius: 8px;
        font-size: 0.82rem;
    }

.test-accounts-empty {
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
    padding: 0.75rem 0;
    margin: 0;
}

/* ── عنوان المجموعة ── */
.test-accounts-group + .test-accounts-group {
    margin-top: 0.9rem;
}

.test-accounts-group-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.01em;
    margin-bottom: 0.4rem;
}

.test-accounts-group-count {
    background: #e5e7eb;
    color: #4b5563;
    border-radius: 999px;
    padding: 0 0.4rem;
    font-size: 0.68rem;
    line-height: 1.5;
}

/* ── سطر الحساب ── */
.test-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* ثلاث مناطق بعرضٍ محدَّد: الشارة والزرّ لا ينكمشان، والاسم وحده
   هو الذي يأخذ ما تبقّى — فلا يُدفع زرّ الدخول خارج الحاوية. */
.test-account-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid #e5e7eb;
    border-inline-start-width: 3px;
    border-radius: 9px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

    .test-account-item:hover {
        background-color: #f0fdf4;
        border-color: #86efac;
    }

    /* الحدّ الملوّن يميّز الدور من طرف السطر بلا قراءة الشارة */
    .test-account-item.is-admin {
        border-inline-start-color: #dc2626;
    }

    .test-account-item.is-staff {
        border-inline-start-color: #2563eb;
    }

    .test-account-item.is-student {
        border-inline-start-color: #16a34a;
    }

    .test-account-item.is-other {
        border-inline-start-color: #9ca3af;
    }

.test-account-role {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    white-space: nowrap;
    background: #f3f4f6;
    color: #4b5563;
}

.test-account-item.is-admin .test-account-role {
    background: #fee2e2;
    color: #b91c1c;
}

.test-account-item.is-staff .test-account-role {
    background: #dbeafe;
    color: #1d4ed8;
}

.test-account-item.is-student .test-account-role {
    background: #dcfce7;
    color: #15803d;
}

.test-account-info {
    min-width: 0;
}

.test-account-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.test-account-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.1rem;
}

.test-account-purpose {
    font-size: 0.72rem;
    color: #9ca3af;
    line-height: 1.5;
    margin-top: 0.2rem;
}

/* أسماء المستخدمين وكلمات المرور لاتينية: تُعرض LTR داخل صفحة RTL */
.test-account-user,
.test-account-pwd {
    direction: ltr;
    display: inline-block;
    text-align: left;
    unicode-bidi: isolate;
    font-size: 0.7rem;
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.test-account-user {
    background-color: #f3f4f6;
    color: #4b5563;
    max-width: 60%;
}

.test-account-pwd {
    background-color: #fef2f2;
    color: #b91c1c;
}

.test-account-go {
    white-space: nowrap;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.25rem 0.7rem;
    border-radius: 7px;
}

/* بديل صورة الطالب حين لا صورة محفوظة — يمنع أيقونة الصورة المكسورة */
.student-avatar-placeholder {
    width: 80px;
    height: 80px;
}

/* بديل صورة الدورة: مخفيّ افتراضياً ويظهر إن أخفق تحميل الصورة.
   صنف مستقلّ لا d-none/d-flex لأن كليهما !important فيتغالبان. */
.course-img-fallback {
    display: none;
}

    .course-img-fallback.is-shown {
        display: flex;
    }

.course-img {
    height: 200px;
    object-fit: cover;
}

.span-award {
    width: 32px;
    height: 32px;
}

.user-name {
    width: 36px;
    height: 36px;
}

.bell-notification {
    width: 12px;
    height: 12px;
    border: 2px solid white;
}

/* ===== Course Player Page Specific Styles ===== */
/* Video Player styling */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #18a171 0%, #127452 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.video-play-btn {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

    .video-play-btn:hover {
        transform: scale(1.08);
        background: #fff;
    }

    .video-play-btn i {
        color: #18a171;
        font-size: 2rem;
        margin-left: -4px;
        /* offset play icon offset */
    }

/* Option buttons styling */
.quiz-option {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px 20px;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

    .quiz-option:hover {
        border-color: #18a171;
        background: #fdfdfd;
        transform: translateY(-2px);
    }

    .quiz-option.correct {
        border-color: #198754 !important;
        background-color: #e9f5ee !important;
        color: #198754 !important;
    }

    .quiz-option.incorrect {
        border-color: #dc3545 !important;
        background-color: #fdf2f2 !important;
        color: #dc3545 !important;
    }

/* Alerts and banners */
.feedback-banner {
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    display: none;
    animation: playerFadeInUp 0.4s ease;
}

    .feedback-banner.correct {
        background-color: #e9f5ee;
        border: 2px solid #a3cfbb;
        color: #146c43;
    }

    .feedback-banner.incorrect {
        background-color: #fdf2f2;
        border: 2px solid #f5c2c7;
        color: #b02a37;
    }

/* Tutor Grid Cards */
.tutor-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    transition: all 0.2s ease;
    overflow: hidden;
}

    .tutor-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
        border-color: #18a171;
    }

.tutor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e9f5ee;
}

/* Drag & Drop Tap Match styling */
.match-slot {
    height: 140px;
    border: 2px dashed #ccc;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .match-slot.selected {
        border-color: #18a171;
        background-color: #e7f8f2;
    }

.match-word {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

    .match-word.active-word {
        background-color: #18a171 !important;
        color: white !important;
        border-color: #18a171 !important;
        transform: scale(1.05);
    }

    .match-word.placed {
        opacity: 0.4;
        pointer-events: none;
    }

/* ⭐ نسخة ثانية من .custom-shadow تأتي بعد الأولى فتغلبها. أُعيدت قيمتها
   إلى 0.12 مطابقةً للتصميم بدل 0.08 التي كانت تُخفت الظلّ. */
.custom-shadow {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

@keyframes playerFadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes chapterSlideIn {
    from {
        opacity: 0;
        transform: translateX(15px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#titleContainer {
    position: relative;
    padding-right: 15px;
}

    #titleContainer::before {
        content: '';
        position: absolute;
        right: 0;
        top: 2px;
        bottom: 2px;
        width: 4px;
        background-color: #18a171;
        border-radius: 4px;
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #titleContainer.animate-title::before {
        transform: scaleY(1);
    }

    #titleContainer #currentChapterText {
        opacity: 0;
    }

    #titleContainer #currentLessonTitle {
        opacity: 0;
    }

    #titleContainer.animate-title #currentChapterText {
        animation: chapterSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    #titleContainer.animate-title #currentLessonTitle {
        animation: titleSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.08s forwards;
    }
    /*auth*/

.auth-body {
    background: #ffffff !important; /* Overrides the default gradient background from styles.css */
}

    .auth-body::before,
    .auth-body::after {
        content: none !important; /* Prevents background blobs from causing extra scroll height */
    }

/* Custom background visual elements */
.auth-visual-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-visual-img {
    position: relative;
    z-index: 2;
    height: 500px;
    width: auto;
    object-fit: contain;
    animation: float 6s ease-in-out infinite;
}

/* Floating Glass Cards */
.auth-floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.45);
    transition: transform 0.3s ease;
}

    .auth-floating-card:hover {
        transform: scale(1.05);
    }

.auth-float-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Custom styles for Bootstrap Inputs and Labels */
.auth-body .form-control {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 12px 16px;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: #1f2d3d;
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .auth-body .form-control:focus {
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 4px rgba(24, 161, 113, 0.1) !important;
    }

.auth-body .form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
    margin-bottom: 6px;
}

/* Custom Password Input Wrapper (Single block, no border split) */
.password-wrapper {
    position: relative;
    width: 100%;
}

    .password-wrapper .form-control {
        padding-left: 48px !important; /* Extra padding on the left for the eye toggle */
        padding-right: 16px !important;
    }

.password-toggle-btn {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    z-index: 5;
    transition: color 0.2s;
}

    .password-toggle-btn:hover {
        color: var(--primary);
    }

/* Custom Buttons (Social & Submit) */
.auth-body .btn-social {
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #4b5563;
    transition: background-color 0.2s, border-color 0.2s;
}

    .auth-body .btn-social:hover {
        background-color: #f9fafb;
        border-color: #9ca3af;
    }

.auth-body .btn-submit {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    border-radius: 10px;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: background-color 0.2s, transform 0.1s;
}

    .auth-body .btn-submit:hover {
        background-color: var(--primary-dark);
        border-color: var(--primary-dark);
        color: #ffffff;
    }

    .auth-body .btn-submit:active {
        transform: scale(0.98);
    }

/* Onboarding Screen (Interests) */
body.interests-onboarding-body {
    
    position: relative;
    background-size: cover;
    background-position: center;
    padding-top: 0 !important; /* Removes the 72px padding inherited from styles.css */
}

@media (min-width: 992px) {
    body.interests-onboarding-body {
        height: 100vh;
        overflow: hidden;
    }

        body.interests-onboarding-body .interests-container {
            height: 100vh;
            min-height: 0 !important;
        }
}

.interests-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 116, 82, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1;
}

.interests-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* Selectable Interests items */
.interest-item {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease-in-out;
    border-width: 1.5px !important;
    font-size: 0.95rem;
    border-color: var(--gray-300) !important;
}

    .interest-item:hover {
        border-color: var(--primary) !important;
        background-color: var(--primary-light) !important;
        color: var(--primary-dark) !important;
        transform: translateY(-2px);
    }

    .interest-item.selected {
        border-color: var(--primary) !important;
        background-color: var(--primary) !important;
        color: var(--white) !important;
        box-shadow: 0 8px 20px rgba(24, 161, 113, 0.2);
    }

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }
}

/* Prevent scrolling on desktop for a clean, app-like layout */
@media (min-width: 992px) {
    .auth-body {
        height: 100vh;
        overflow: auto;
        padding-bottom: 72px !important; /* Space for the sticky header */
        padding-top: 72px !important; /* Space for the sticky header */
        /*display: flex;*/
        flex-direction: column;
    }

        .auth-body main {
           /* height: calc(100vh - 72px);*/
            flex: 1;
            /*display: flex;*/
            align-items: center;
        }

        .auth-body .row {
            height: 100%;
            min-height: 0 !important;
            width: 100%;
        }

        .auth-body .col-lg-6 {
            /*height: 100%;*/
            overflow-y: auto; /* Allow internal scrolling if content is taller than viewport */
           /* display: flex;*/
            align-items: center;
            justify-content: center;
        }
}

/* Helper layout and link classes to remove inline styles */
.interests-card {
    max-width: 680px;
    width: 100%;
}

.auth-form-container {
    max-width: 440px;
    width: 100%;
}

.auth-body main a,
body.interests-onboarding-body main a {
    color: var(--primary) !important;
    font-weight: 700;
    text-decoration: none;
}

    .auth-body main a:hover,
    body.interests-onboarding-body main a:hover {
        color: var(--primary-dark) !important;
        text-decoration: underline;
    }

.auth-body .form-check-input {
    margin-top: 5px;
}

.auth-body input[type="email"],
.auth-body input[type="password"] {
    direction: ltr;
    text-align: left;
}

.auth-success-alert {
    background-color: #f0fdf4 !important;
}

/* Simulated blurred background element styling */
.simulated-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.85;
    pointer-events: none;
}

/* Correct height and vertical centering for centered auth pages on mobile */
.auth-center-main {
    min-height: calc(100vh - 72px);
}

/*sabry*/
#lesson-sidebar {
    width: 320px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    border-left: 1px solid #e5e7eb;
    position: fixed;
    top: 64px;
    right: 0; /* RTL sidebar */
    background: white;
    z-index: 1000;
}

#lesson-content {
    margin-right: 320px; /* Space for sidebar in RTL */
    margin-top: 64px;
    padding: 2rem;
}

@media (max-width: 991.98px) {
    #lesson-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

        #lesson-sidebar.show {
            transform: translateX(0);
        }

    #lesson-content {
        margin-right: 0;
        padding: 1rem;
    }
}
/* Chat/Dialogue */
.chat-container {
    background: white;
    border-radius: 1.5rem;
    border: 1px solid #e5e7eb;
    padding: 2rem;
}

.chat-bubble {
    border-radius: 0.75rem;
    padding: 1.5rem;
    position: relative;
}

    .chat-bubble.blue {
        background-color: #eff6ff;
        border: 1px solid #dbeafe;
    }

    .chat-bubble.green {
        background-color: var(--emerald-50);
        border: 1px solid var(--emerald-100);
    }

    .chat-bubble.ghost {
        background-color: rgba(249, 250, 251, 0.5);
        border: 1px dashed #e5e7eb;
        color: #d1d5db;
    }
/* Accordion Customization */
.accordion-button:not(.collapsed) {
    background-color: rgba(16, 185, 129, 0.05);
    color: #1f2937;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(16, 185, 129, 0.2);
}

.accordion-button::after {
    margin-right: auto;
    margin-left: 0;
}

/* Scrollbar hide */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Custom scrollbar can be kept or removed, keeping for now for aesthetics */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #eee;
    border-radius: 4px;
}

/* Utility for dashed border not in standard BS5 yet */
.border-dashed {
    border-style: dashed !important;
}

.bg-content {
    background-color: #F9FAFB;
}

.video-container {
    /* 1. Set the desired fixed height for the container */
    height: 300px; /* Example fixed height in pixels or any other unit */
    /* 2. Set width to 100% to fill its parent's width */
    width: 100%;
    /* 3. Hide any part of the video that might overflow the fixed height */
    overflow: hidden;
    /* Optional: Add a background color to see the container boundaries */
    background-color: black;
}

    .video-container video {
        /* 1. Set the width to auto (default) or 100% of the container */
        width: 100%;
        /* 2. Set height to auto. The browser automatically resizes the height 
          while maintaining the original aspect ratio based on the width */
        height: auto;
        /* 3. Optional: Center the video vertically within the container if it's shorter than the container height */
        display: block; /* Helps with centering if needed */
        margin: 0 auto; /* Centers horizontally */
    }
/* Custom scrollbar can be kept or removed, keeping for now for aesthetics */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: #eee;
    border-radius: 4px;
}

/* Utility for dashed border not in standard BS5 yet */
.border-dashed {
    border-style: dashed !important;
}

.bg-content {
    background-color: #F9FAFB;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

    .icon-btn :hover {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
    }

    .icon-btn > i {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.col-video {
    height: 250px;
    width: auto;
}

.play-button {
    position: absolute; /* Positions the button relative to the parent container */
    top: 50%; /* Centers the button vertically */
    left: 50%; /* Centers the button horizontally */
    transform: translate(-50%, -50%); /* Adjusts the button's own center to the position */
    z-index: 10; /* Ensures the button is above the video */
}

.step {
    pointer-events: none;
}

.step-container {
    width: 2rem;
    min-width: 1rem;
}

.step-circle {
    position: unset;
}

.steps-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.step-circle::before {
    width: unset;
    height: unset;
}

.steps .step:first-child {
    margin-left: unset;
}

.steps .step:last-child {
    margin-right: unset;
}

.steps {
    justify-content: space-around;
}
/* Drag and Drop Styles */
.drop-zone {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
    position: relative;
}

    .drop-zone:empty::before {
        content: 'اسحب الى هنا';
        color: #adb5bd;
        font-size: 0.85rem;
        pointer-events: none;
    }

    .drop-zone.dragover {
        border-color: var(--primary-green);
        background-color: var(--light-green);
        transform: scale(1.05);
    }

.draggable-item {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2px 5px;
    margin: 5px;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    font-weight: 500;
    transition: transform 0.1s;
    user-select: none;
    min-width: 80px;
    text-align: center;
}

    .draggable-item:active {
        cursor: grabbing;
        transform: scale(0.95);
    }

    .draggable-item.dragging {
        opacity: 0.5;
    }

/* Validation Styles */
.drop-zone.correct {
    border-color: var(--primary-green);
    background-color: var(--light-green);
}

    .drop-zone.correct .draggable-item {
        border-color: var(--primary-green);
        color: var(--primary-green);
        background-color: transparent;
        box-shadow: none;
    }

.drop-zone.incorrect {
    border-color: var(--danger-red);
    background-color: var(--light-red);
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

    .drop-zone.incorrect .draggable-item {
        border-color: var(--danger-red);
        color: var(--danger-red);
        background-color: transparent;
        box-shadow: none;
    }

@keyframes shake {
    10%, 90% {
        transform: translate3d(-2px, 0, 0);
    }

    20%, 80% {
        transform: translate3d(3px, 0, 0);
    }

    30%, 50%, 70% {
        transform: translate3d(-5px, 0, 0);
    }

    40%, 60% {
        transform: translate3d(5px, 0, 0);
    }
}

/* Custom Radio Buttons */
.custom-radio input {
    display: none;
}

.custom-radio .radio-content {
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
}

.custom-radio .radio-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.custom-radio input:checked + .radio-content {
    border-color: #279b71 !important;
}

    .custom-radio input:checked + .radio-content .radio-circle {
        border-color: #279b71;
    }

        .custom-radio input:checked + .radio-content .radio-circle::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 10px;
            height: 10px;
            background-color: #279b71;
            border-radius: 50%;
        }
/*.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    min-height: 50px;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}
.step-circle {
    background: var(--primary-light);
    color: var(--primary);
}*/

.step-active .step-circle {
    color: var(--primary-light);
    background-color: var(--primary);
    /*border-color: #0d6efd;*/
}
/*details*/
.details-panel {
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    background: #fff;
}

.details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    cursor: pointer;
    /*background: #f8f9fa;*/
    list-style: none;
}

    .details-header::-webkit-details-marker {
        display: none;
    }

.summary-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.arrow {
    transition: transform 0.2s ease;
}

.details-panel[open] .arrow {
    transform: rotate(180deg);
}

.summary-actions {
    display: flex;
    gap: 8px;
}

    .summary-actions button {
        border: 1px solid #ccc;
        background: #fff;
        padding: 4px 10px;
        border-radius: 6px;
        cursor: pointer;
    }

.details-body {
    padding: 16px;
    border-top: 1px solid;
}


.activity-box {
    background: var(--primary-light);
    border: none;
    border-radius: 16px;
    min-height: 300px;
}

.activity-grid {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 32px;
    align-items: stretch;
    direction: inherit;
}

.image-placeholder {
    /* height: 258px;
    background: #fff;*/
    border-radius: 22px;
    padding: 2px;
    display: grid;
    place-items: center;
    position: relative;
}

/*    .image-placeholder::before {
        content: "";
        width: calc(100% - 30px);
        height: calc(100% - 30px);
        background: #f1f3f7;
        border-radius: 18px;
        position: absolute;
    }*/

.mountain {
    z-index: 1;
    color: #e6e9ef;
    /*font-size: 34px;*/
    max-height:250px;
    padding: 2px;
    display: grid;
    place-items: center;
    position: relative;
}

    .mountain :is(video, audio,img) {
        width: 100%;
        border-radius: 22px;
    }

.answers {
    display: grid;
    gap: 14px;
}

.answer {
    border-radius: 15px;
    min-height: 120px;
    display: grid;
    place-items: center;
    position: relative;
}

    .answer.dark {
        background: linear-gradient(135deg, #4fa487, #166044);
        border: 4px solid #fff;
        color: #fff;
    }

    .answer.light {
        background: #fff;
        border: 4px solid #4ba085;
        color: #1f2937;
        min-height: 100px;
    }

.big-letter {
    font-size: 68px;
    line-height: 1;
    font-weight: 700;
}

.playButton {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 72px;
    height: 72px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    /* background: rgba(255, 255, 255, 0.92);*/
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

    .playButton:hover {
        transform: scale(1.08);
    }

    .playButton.hidden {
        opacity: 0;
        pointer-events: none;
    }

.fa-circle-play {
    font-size: 70px;
}

.tsTable {
    counter-reset: rowNumber;
}

    .tsTable tbody tr {
        counter-increment: rowNumber;
    }

        .tsTable tbody tr td:first-child::before {
            content: counter(rowNumber);
        }

@media (max-width: 800px) {
    .lesson-card {
        width: 100%;
    }

    .activity-grid {
        grid-template-columns: 1fr;
    }

    .image-placeholder {
        height: 220px;
    }
}

.step-panel .active .delayitem {
    opacity: 0;
    transform: translateY(16px);
    animation: showItem 0.5s ease forwards;
}

.step-panel .active .item-1 {
    animation-delay: 0.2s;
}

.step-panel .active .item-2 {
    animation-delay: 0.5s;
}

.step-panel .active .item-3 {
    animation-delay: 0.8s;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-height: 500px;
    display: flex;
    justify-content: center !important;
}

.video {
    width: 100%;
    border-radius: 30px;
}

.quiz-box {
    background-color: var(--primary-light);
    padding: 1rem;
    margin: .5rem;
    border-radius: 1rem;
}

.img-wrapper {
    max-width: 300px;
    display: flex;
    justify-content: center;
    padding: .5rem;
    margin: .5rem;
}

.chat-item:nth-child(even) {
    background-color: var(--primary-light);
    /* border:2px solid var(--primary);*/
    border-radius: 1rem;
}

.chat-item:nth-child(odd) {
    background-color: var(--bs-info);
    margin-inline-start: 2rem;
    /* border: 2px solid #5cb1fa;*/
    border-radius: 1rem;
}
/*.btn-check:active + .btn-outline-primary, .btn-check:checked + .btn-outline-primary, .btn-outline-primary.active, .btn-outline-primary.dropdown-toggle.show, .btn-outline-primary:active{

    background:var(--primary-light);
}*/
@keyframes showItem {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/*القائمة*/
.nav .dropdown-menu a {
    display: block;
    padding: 5px;
    text-align: start;
    padding-inline-start: 12px;
}

.nav .dropdown-menu.show {
    border-radius: 10px;
    transform: translateY(0);
}

.nav-link {
    display: block;
    padding: .5rem 1rem;
    color: var(--nav-color);
    text-decoration: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.sidebar > .navbar-nav > .nav-item > .nav-link, .navbar-nav > .nav-item > .dropdown > .nav-link {
    color: var(--nav-color) !important;
}

.sidebar > .navbar-nav {
    padding-inline-start: 0px !important;
}

/* ⭐ `display: block !important` هنا كان يكسر شبكة أزرار مجموعات التنقّل
   (`.zb-nav__toggle` تستعمل display:grid)، و`padding: 5px` يزاحم إزاحتها.
   الاستثناء يُبقي القاعدة عاملةً لأي زرّ آخر في الشريط. */
.sidebar .navbar-nav button:not(.zb-nav__link) {
    color: #555;
    text-decoration: none;
    padding: 5px 5px;
    display: block !important;
    width: 100%;
    text-align: start;
    border-radius: 8px;
}

    .sidebar .navbar-nav button:not(.zb-nav__link).active,
    .sidebar .navbar-nav button:not(.zb-nav__link):hover {
        background: #e9f5ee;
        color: #198754;
    }

.correct {
    border-color: #198754 !important;
    background-color: #e9f5ee !important;
    color: #198754 !important;
}

.incorrect {
    border-color: #dc3545 !important;
    background-color: #fdf2f2 !important;
    color: #dc3545 !important;
}

.selectes-ans {
    background-color: var(--secondary) !important;
}

.accordion-button {
    text-align: start;
}

.cover-img{
    display:block;
    max-height:600px;
    width:auto;
    text-align:center;
}
/* غلاف محتوى الموجّه — يحجز ارتفاع الشاشة كي لا يطفو الـ footer إلى أعلاها
   في الإطار الذي يفرغ فيه Blazor محتوى <Routes/> أثناء التسليم من الـ prerender
   إلى الوضع التفاعلي. بدونه كان يُقاس CLS = 1.33 مصدره الـ footer وحده. */
.app-shell {
    min-height: 100vh;
}

/* ── حقل رقم الهاتف مع رمز الدولة (PhoneNumberInput.razor) ──
   dir="ltr" على الحاوية لأن الأرقام والرمز يُقرآن يساراً حتى في صفحة عربية.
   الرمز عرضٌ ثابت لا ينكمش، والرقم يأخذ ما بقي. */
.zb-phone {
    display: flex;
    align-items: stretch;
    gap: 0;
}

    .zb-phone .zb-phone__code {
        flex: 0 0 10.5rem;
        max-width: 10.5rem;
        border-start-end-radius: 0;
        border-end-end-radius: 0;
        border-inline-end: 0;
        background-color: #f9fafb;
        font-size: 0.9rem;
    }

    .zb-phone .zb-phone__number {
        flex: 1 1 auto;
        min-width: 0;
        border-start-start-radius: 0;
        border-end-start-radius: 0;
        text-align: left;
        direction: ltr;
    }

    .zb-phone .zb-phone__code:focus,
    .zb-phone .zb-phone__number:focus {
        z-index: 3;
    }

@media (max-width: 575.98px) {
    .zb-phone .zb-phone__code {
        flex-basis: 7.5rem;
        max-width: 7.5rem;
        font-size: 0.8rem;
    }
}

/* ── قائمة منسدلة قابلة للبحث (SearchableSelect.razor) ── */
.zb-select {
    position: relative;
    width: 100%;
}

.zb-select__control {
    position: relative;
    display: flex;
    align-items: center;
}

.zb-select__input {
    padding-inline-end: 3.75rem; /* مكان زرّ المسح والسهم */
    cursor: pointer;
    text-overflow: ellipsis;
}

    .zb-select__input::placeholder {
        color: #9ca3af;
    }

.zb-select__caret {
    position: absolute;
    inset-inline-end: 0.85rem;
    width: 0;
    height: 0;
    border-inline-start: 5px solid transparent;
    border-inline-end: 5px solid transparent;
    border-top: 6px solid #6b7280;
    pointer-events: none;
    transition: transform 0.15s ease;
}

.zb-select--open .zb-select__caret {
    transform: rotate(180deg);
}

.zb-select__clear {
    position: absolute;
    inset-inline-end: 2rem;
    width: 1.4rem;
    height: 1.4rem;
    line-height: 1;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #e5e7eb;
    color: #4b5563;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .zb-select__clear:hover {
        background: #d1d5db;
        color: #111827;
    }

.zb-select__menu {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 4px);
    z-index: 1080; /* فوق محتوى نافذة Blazorise */
    max-height: 16rem;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    padding: 0.25rem;
}

.zb-select__option {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.95rem;
}

    .zb-select__option:hover,
    .zb-select__option.is-active {
        background: #f3f4f6;
    }

    .zb-select__option.is-chosen {
        background: rgba(16, 138, 91, 0.10);
        font-weight: 700;
    }

.zb-select__option-label {
    flex: 1 1 auto;
    min-width: 0;
}

.zb-select__option-note {
    flex: 0 0 auto;
    color: #9ca3af;
    font-size: 0.8rem;
    direction: ltr;
    unicode-bidi: isolate;
}

.zb-select__empty {
    padding: 0.85rem 0.75rem;
    color: #9ca3af;
    font-size: 0.9rem;
    text-align: center;
}

/* داخل نافذة: تُمنع النافذة من قصّ القائمة المنسدلة */
.modal-body:has(.zb-select--open) {
    overflow: visible;
}

/* ══════════════════════════════════════════════════════════════
   صفحة إنشاء حساب الطالب (Pages/Registration/Register.razor)

   كانت الصفحة عمودين بنصفين متساويين، والنموذج فيها شريطٌ واحد من
   خمسة عشر حقلاً بلا عناوين ولا تجميع، فلا يعرف الطالبُ أين هو منه
   ولا أيّ الحقول إلزامي. صارت: عمودٌ جانبي يعرّف بما يحصل عليه،
   ونموذجٌ مقسَّم ثلاثة أقسام مرقّمة بشبكة عمودين.
   ══════════════════════════════════════════════════════════════ */
.reg-page {
    --reg-green: var(--primary, #108a5b);
    --reg-ink: #111827;
    --reg-muted: #6b7280;
    --reg-line: #e5e7eb;
    background: #f7f9fa;
    min-height: 100vh;
}

.reg-shell {
    display: grid;
    /* في تخطيط RTL يقع العمود الأوّل يميناً. والنموذج هو المهمّة، فيبدأ من
       حيث تبدأ القراءة ويأخذ العرض الأكبر، والعمود الجانبي مساندٌ يساراً. */
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    max-width: 1240px;
    margin: 0 auto;
    align-items: start;
}

.reg-main {
    order: 1;
}

.reg-aside {
    order: 2;
}

/* ── العمود الجانبي ── */
.reg-aside {
    position: sticky;
    /* 72px ارتفاع الشريط العلوي الثابت. بدون خصمه يتوسّط المحتوى في ارتفاع
       يشمل ما تحت الشريط، فتُقصّ آخر ميزة في القائمة — قِيس فعلاً. */
    top: 72px;
    align-self: stretch;
    background: linear-gradient(160deg, #0f7a51 0%, #0b5c3c 100%);
    color: #fff;
    padding: 2.75rem 2.5rem;
    min-height: calc(100vh - 72px);
    max-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    overflow-y: auto;
}

.reg-aside__inner {
    position: relative;
    width: 100%;
}

.reg-aside__badge {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.reg-aside__title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.reg-aside__lead {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.reg-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: grid;
    gap: 1rem;
}

.reg-perk {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.reg-perk__icon {
    flex: 0 0 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.reg-perk strong {
    display: block;
    font-size: 0.98rem;
    margin-bottom: 0.15rem;
}

.reg-perk small {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ── لوحة الصورة وشرحها ──
   الصورة كانت معلّقة أسفل العمود بلا نصّ يربطها بشيء، وكانت تُحذف كلّياً
   عند ضيق الارتفاع. صارت وحدةً واحدة: إطارٌ يحدّها وسطرٌ تحتها يفسّرها،
   ولا تُحذف بل ينكمش ارتفاعها. */
.reg-figure {
    margin: 0 0 1.75rem;
}

.reg-figure__frame {
    position: relative;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* الارتفاع يتكيّف مع الشاشة بدل أن تُخفى الصورة عند ضيقها */
    height: clamp(120px, 24vh, 230px);
    overflow: hidden;
}

    .reg-figure__frame img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
    }

.reg-figure__caption {
    margin-top: 0.7rem;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
}

/* شاشة قصيرة جداً: يبقى النصّ وتذهب الصورة وحدها لا شرحها */
@media (max-height: 620px) {
    .reg-figure {
        display: none;
    }
}

/* ── العمود الرئيسي ── */
.reg-main {
    padding: 3rem 2.5rem 4rem;
}

.reg-form-wrap {
    max-width: 620px;
    margin-inline: auto;
}

.reg-head {
    margin-bottom: 1.75rem;
}

.reg-head__eyebrow {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(16, 138, 91, 0.10);
    color: var(--reg-green);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.reg-head__title {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--reg-ink);
    margin-bottom: 0.35rem;
}

.reg-head__sub {
    color: var(--reg-muted);
    margin: 0;
}

    .reg-head__sub a {
        color: var(--reg-green);
        font-weight: 700;
        text-decoration: none;
    }

/* ── أزرار المزوّدين ── */
.reg-social {
    display: grid;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.reg-social__btn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--reg-line);
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
}

    .reg-social__btn:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

.reg-social__soon {
    margin-inline-start: auto;
    font-style: normal;
    font-size: 0.72rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: #9ca3af;
}

.reg-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: #9ca3af;
    font-size: 0.85rem;
    margin: 1.5rem 0;
}

    .reg-divider::before,
    .reg-divider::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--reg-line);
    }

/* ── الأقسام ── */
.reg-section {
    background: #fff;
    border: 1px solid var(--reg-line);
    border-radius: 14px;
    padding: 1.4rem;
    margin-bottom: 1.1rem;
}

.reg-section__head {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1.15rem;
}

    .reg-section__head h2 {
        font-size: 1.05rem;
        font-weight: 800;
        color: var(--reg-ink);
        margin: 0 0 0.15rem;
    }

    .reg-section__head p {
        font-size: 0.85rem;
        color: var(--reg-muted);
        margin: 0;
    }

.reg-section__num {
    flex: 0 0 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: rgba(16, 138, 91, 0.10);
    color: var(--reg-green);
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reg-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
}

.reg-field--full {
    grid-column: 1 / -1;
}

.reg-field label {
    display: block;
    font-size: 0.87rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

    .reg-field label b {
        color: #dc2626;
        font-weight: 700;
    }

.reg-hint {
    display: block;
    color: var(--reg-muted);
    font-size: 0.78rem;
    margin-top: 0.3rem;
}

.reg-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

/* ── اختيار قناة التفعيل ── */
.reg-choice {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.reg-choice__item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem;
    border: 1.5px solid var(--reg-line);
    border-radius: 11px;
    cursor: pointer;
    margin: 0;
    transition: border-color 0.15s, background-color 0.15s;
}

    .reg-choice__item.is-on {
        border-color: var(--reg-green);
        background: rgba(16, 138, 91, 0.05);
    }

    .reg-choice__item input {
        margin-top: 0.2rem;
        accent-color: var(--reg-green);
    }

.reg-choice__icon {
    font-size: 1.1rem;
    line-height: 1.2;
}

.reg-choice__text strong {
    display: block;
    font-size: 0.9rem;
    color: var(--reg-ink);
}

.reg-choice__text small {
    display: block;
    font-size: 0.76rem;
    color: var(--reg-muted);
    line-height: 1.5;
}

/* ── الصورة ── */
.reg-avatar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.reg-avatar__preview {
    flex: 0 0 3.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: #f3f4f6;
    border: 1px solid var(--reg-line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    overflow: hidden;
}

    .reg-avatar__preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ── الشروط والإرسال ── */
.reg-terms {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--reg-line);
    border-radius: 12px;
    background: #fff;
    font-size: 0.87rem;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 0.9rem;
    cursor: pointer;
}

    .reg-terms.is-bad {
        border-color: #fca5a5;
        background: #fef2f2;
    }

    .reg-terms input {
        margin-top: 0.25rem;
        accent-color: var(--reg-green);
        flex: 0 0 auto;
    }

    .reg-terms a {
        color: var(--reg-green);
        font-weight: 700;
        text-decoration: none;
    }

.reg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem 1.25rem;
    border: 1.5px solid transparent;
    border-radius: 11px;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    transition: background-color 0.15s, transform 0.08s;
}

    .reg-btn:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }

    .reg-btn:active:not(:disabled) {
        transform: scale(0.99);
    }

.reg-btn--primary {
    background: var(--reg-green);
    color: #fff;
}

    .reg-btn--primary:hover:not(:disabled) {
        background: var(--primary-dark, #0b5c3c);
        color: #fff;
    }

.reg-btn--ghost {
    background: #fff;
    border-color: var(--reg-line);
    color: #374151;
}

    .reg-btn--ghost:hover:not(:disabled) {
        background: #f9fafb;
    }

.reg-btn--link {
    background: transparent;
    color: var(--reg-green);
}

.reg-btn--warn {
    background: #f59e0b;
    color: #fff;
}

    .reg-btn--warn:hover:not(:disabled) {
        background: #d97706;
        color: #fff;
    }

.reg-btn--lg {
    padding: 0.95rem 1.25rem;
    font-size: 1.05rem;
}

.reg-foot {
    text-align: center;
    color: #9ca3af;
    font-size: 0.8rem;
    margin: 0.9rem 0 0;
}

/* ── شاشة ما بعد التسجيل ── */
.reg-done {
    background: #fff;
    border: 1px solid var(--reg-line);
    border-radius: 16px;
    padding: 2.5rem 1.75rem;
    text-align: center;
}

.reg-done__mark {
    font-size: 3.25rem;
    line-height: 1;
    margin-bottom: 0.85rem;
}

.reg-done__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--reg-green);
    margin-bottom: 1.25rem;
}

.reg-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: start;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
}

.reg-note--info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a5f;
}

.reg-note--ok {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.reg-note__icon {
    font-size: 1.25rem;
    line-height: 1.3;
}

.reg-note p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.reg-note__target {
    display: inline-block;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 7px;
    padding: 0.15rem 0.6rem;
    margin-bottom: 0.35rem;
    unicode-bidi: isolate;
}

.reg-devcard {
    margin-top: 1.1rem;
    text-align: start;
    border: 1.5px dashed #f59e0b;
    background: #fffbeb;
    border-radius: 12px;
    padding: 1rem;
}

.reg-devcard__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 0.4rem;
}

.reg-devcard__body {
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.7;
    margin-bottom: 0.85rem;
}

/* ── تبويبا صفحة الدخول ── */
.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    padding: 0.3rem;
    margin-bottom: 1.25rem;
    background: #f1f5f9;
    border-radius: 12px;
}

.login-tab {
    border: 0;
    border-radius: 9px;
    background: transparent;
    padding: 0.6rem 0.5rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

    .login-tab:hover:not(.is-on) {
        color: #334155;
    }

    .login-tab.is-on {
        background: #fff;
        color: #15803d;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
    }

/* سطر «أرسلنا الرمز إلى» — بارز لا هامشيّ، لأنّ أول ما يفحصه
   من لم يصله الرمز هو الرقم الذي أُرسل إليه. */
.otp-sent-to {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    font-size: 0.88rem;
    color: #166534;
}

    .otp-sent-to i {
        color: #16a34a;
        font-size: 1.05rem;
    }

    .otp-sent-to strong {
        font-weight: 800;
        letter-spacing: 0.02em;
        unicode-bidi: isolate;
    }

/* قائمة رمز الدولة — مقيّدة العرض كي لا تبتلع حقل الرقم.
   أسماء الدول العربية طويلة، والقائمة بلا قيد تأخذ ثلثي الصفّ. */
.phone-dial {
    flex: 0 0 auto;
    max-width: 10.5rem;
    font-size: 0.88rem;
}

/* حقل الرمز في صفحة الدخول — أرقام متباعدة مقروءة فرادى */
.login-otp {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    unicode-bidi: isolate;
}

/* ── خطأ الحفظ الملاصق لزرّ الإنشاء ── */
.reg-submit-error {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    padding: 0.7rem 0.85rem;
    border: 1.5px solid #fca5a5;
    /* inline-start لا left: في تخطيط عربي يجب أن يقع الشريط المميّز
       عند بداية القراءة أي اليمين، و left يضعه في نهايتها. */
    border-inline-start: 4px solid #dc2626;
    border-radius: 10px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.7;
}

.reg-submit-error__icon {
    flex: 0 0 auto;
    line-height: 1.5;
}

/* ── إدخال رمز التفعيل (قناة الواتساب) ── */
.reg-otp {
    margin-top: 1.1rem;
    text-align: start;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    border-radius: 12px;
    padding: 1rem;
}

.reg-otp__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.reg-otp__label {
    font-weight: 700;
    font-size: 0.92rem;
    margin: 0;
}

/* التلميح خارج الحقل لا داخله: الحقل ltr بتباعد أحرف واسع،
   فأي نصّ عربي داخله يظهر مبعثراً. */
.reg-otp__hint {
    font-size: 0.78rem;
    color: #6b7280;
}

.reg-otp__resend {
    display: block;
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.35rem;
    background: none;
    border: 0;
    font-size: 0.86rem;
    font-weight: 700;
    color: #1d7a4c;
    cursor: pointer;
}

    .reg-otp__resend:hover:not(:disabled) {
        text-decoration: underline;
    }

    .reg-otp__resend:disabled {
        color: #9ca3af;
        cursor: default;
    }

.reg-otp__input {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    padding: 0.6rem 0.9rem;
    font-size: 1.45rem;
    font-weight: 800;
    text-align: center;
    /* تباعد الأرقام يجعل الستّ خانات تُقرأ فرادى لا ككتلة واحدة.
       والإزاحة تعوّض الفراغ الذي يضيفه التباعد بعد آخر رقم فيبقى النصّ متمركزاً. */
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    /* عزل الاتجاه: الرمز أرقام لاتينية داخل صفحة عربية، وبدون العزل
       قد ينقلب ترتيب ظهوره على بعض المتصفّحات. */
    unicode-bidi: isolate;
}

.reg-otp__input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.reg-otp__msg {
    margin-top: 0.55rem;
    font-size: 0.86rem;
    line-height: 1.6;
}

.reg-otp__msg--error {
    color: #b91c1c;
}

.reg-otp .reg-btn {
    margin-top: 0.85rem;
}

.reg-done__actions {
    display: grid;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

/* ── الاستجابة ── */
@media (max-width: 991.98px) {
    .reg-shell {
        grid-template-columns: 1fr;
    }

    /* عمودٌ واحد: التعريف أوّلاً ثمّ النموذج */
    .reg-aside {
        order: 1;
        position: static;
        min-height: 0;
        max-height: none;
        padding: 2rem 1.5rem;
    }

    .reg-main {
        order: 2;
    }

    .reg-aside__art {
        display: none;
    }

    .reg-perks {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    }

    .reg-main {
        padding: 2rem 1.25rem 3rem;
    }
}

@media (max-width: 575.98px) {
    .reg-grid,
    .reg-choice {
        grid-template-columns: 1fr;
    }

    .reg-aside__title {
        font-size: 1.5rem;
    }

    .reg-head__title {
        font-size: 1.5rem;
    }

    .reg-section {
        padding: 1.1rem;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   تنقّل الشريط الجانبي (ZbNavMenu / ZbNavItem)

   حلّ محلّ القوائم الطافية من Blazorise. القياس قبل الاستبدال:
       menu 160x100 · item padding 1px · leaf class "text-black" بلا hover

   ⭐ المحدِّد الشامل `.sidebar a { padding: 1px }` يبقى في الملفّ لأن
      عناصر أخرى تعتمده، فكل قاعدة هنا تُثبِّت قيمها صراحةً ولا تتّكل
      على الوراثة.
   ══════════════════════════════════════════════════════════════════════ */
.zb-nav,
.zb-nav__sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.zb-nav__item {
    margin-bottom: 2px;
}

/* الصفّ نفسه: ارتفاع مريح للنقر، وشبكة ثابتة تُحاذي الأيقونات */
.sidebar .zb-nav__link,
.offcanvas .zb-nav__link {
    display: grid;
    grid-template-columns: 1.5rem 1fr auto;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.7rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #4b5563;
    font-size: 0.925rem;
    font-weight: 500;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.13s ease, color 0.13s ease;
}

.sidebar .zb-nav__link:hover,
.offcanvas .zb-nav__link:hover {
    background: #f3f4f6;
    color: #111827;
}

.zb-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
    color: #9ca3af;
    transition: color 0.13s ease;
}

.sidebar .zb-nav__link:hover .zb-nav__icon,
.offcanvas .zb-nav__link:hover .zb-nav__icon {
    color: #6b7280;
}

.zb-nav__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── الصفحة الحالية ──
   شريط على حافّة البداية بدل تلوين الصفّ كلّه: يُميّز الموضع بلا أن
   يزاحم اللونُ الأخضر معناه في بقيّة الواجهة. */
.sidebar .zb-nav__link.is-active,
.offcanvas .zb-nav__link.is-active {
    position: relative;
    background: rgba(16, 138, 91, 0.09);
    color: #0b5c3c;
    font-weight: 700;
}

    .sidebar .zb-nav__link.is-active .zb-nav__icon,
    .offcanvas .zb-nav__link.is-active .zb-nav__icon {
        color: #108a5b;
    }

    .sidebar .zb-nav__link.is-active::before,
    .offcanvas .zb-nav__link.is-active::before {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 20px;
        border-radius: 0 3px 3px 0;
        background: #108a5b;
    }

/* مجموعة تحوي الصفحة الحالية وهي مطويّة: تُلمَّح بلون النصّ لا بخلفية */
.sidebar .zb-nav__toggle.has-active,
.offcanvas .zb-nav__toggle.has-active {
    color: #0b5c3c;
    font-weight: 700;
}

/* ── سهم الطيّ ── */
.zb-nav__chevron {
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.18s ease;
}

.zb-nav__item--group.is-open > .zb-nav__link .zb-nav__chevron {
    transform: rotate(180deg);
}

/* ── القائمة الفرعية: تُطوى في مكانها لا تطفو فوق المحتوى ── */
.zb-nav__sub {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.2s ease;
}

.zb-nav__item--group.is-open > .zb-nav__sub {
    grid-template-rows: 1fr;
}

.zb-nav__sub > * {
    min-height: 0;
}

/* خطّ الشجرة على حافّة البداية يربط الأبناء ببعضهم بصرياً */
.zb-nav__sub .zb-nav__item {
    position: relative;
    /* خفّت من 1.35rem+0.7rem إلى 0.75rem+0.5rem: الإزاحة تتراكم عبر ثلاثة
       مستويات (الإدارة > إدارة الهوية > المستخدمون) فتأكل ~66px من العرض
       وتقصّ النصّ. الخطّ الرأسي يكفي وحده للدلالة على العمق. */
    margin-inline-start: 0.75rem;
    padding-inline-start: 0.5rem;
    border-inline-start: 1.5px solid #e5e7eb;
}

.zb-nav__sub .zb-nav__link {
    min-height: 36px;
    font-size: 0.875rem;
    font-weight: 500;
    grid-template-columns: 1.15rem 1fr auto;
    gap: 0.55rem;
}

.zb-nav__sub .zb-nav__icon {
    font-size: 0.9rem;
}

/* أوّل عنصر فرعي يأخذ مسافة تفصله عن رأس المجموعة */
.zb-nav__item--group.is-open > .zb-nav__sub {
    padding-top: 2px;
}

/* ── عنوان قسم التنقّل ── */
.sidebar-nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #9ca3af;
    padding: 0 0.7rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* ── التركيز بلوحة المفاتيح ──
   مرئيّ ومحصور: الشريط الجانبي يُستعمل بالـ Tab كثيراً. */
.sidebar .zb-nav__link:focus-visible,
.offcanvas .zb-nav__link:focus-visible {
    outline: 2px solid #108a5b;
    outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
    .zb-nav__sub,
    .zb-nav__chevron,
    .sidebar .zb-nav__link,
    .offcanvas .zb-nav__link {
        transition: none;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   الشريط الجانبي — النسخة الثانية: ميزانية رأسية محسوبة

   القياس قبل التعديل على ارتفاع 1000px:
       الشعار 46 + بطاقة المستخدم 127 + بطاقة النصائح 157 = 347px
       التنقّل يحتاج 1156px ولا يجد إلا 623px

   أي أن 35% من الشريط لغير التنقّل، ونصف الروابط خارج الشاشة دائماً.
   الإصلاح على ثلاثة محاور: حذف بطاقة النصائح · بطاقة مستخدم في صفّ واحد ·
   إيقاع أضيق للصفوف مع عناوين أقسام تُعوّض قِصر الارتفاع بسهولة المسح.
   ══════════════════════════════════════════════════════════════════════ */

/* ── هوية المستخدم: صفّ واحد بدل ثلاثة ── */
.sidebar-user {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid #eef0f2;
    border-radius: 12px;
    background: #fafbfc;
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #108a5b;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: #9ca3af;
}

.sidebar .sidebar-user-action {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color 0.13s ease, color 0.13s ease;
}

    .sidebar .sidebar-user-action:hover {
        background: #eef0f2;
        color: #374151;
    }

/* ── عنوان القسم ──
   يُعوّض عن طول القائمة: العين تقفز إلى القسم ثم تمسح ثلاثة عناصر،
   بدل مسح سبعة وعشرين صفّاً متشابهاً. */
.zb-nav__section {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    /* #b0b6bf كان باهتاً حدَّ الاختفاء على الأبيض؛ العنوان يجب أن يُقرأ
       بلا تدقيق لأنه هو ما يُختصر به مسحُ سبعة وعشرين صفّاً. */
    color: #97a1ad;
    padding: 0 0.7rem;
    margin: 0.85rem 0 0.3rem;
}

    .zb-nav__section:first-child {
        margin-top: 0;
    }

/* ── إيقاع أضيق: 42px صارت 36px ──
   الفرق 6px في الصفّ الواحد يساوي 162px عبر 27 صفّاً. */
.sidebar .zb-nav__link,
.offcanvas .zb-nav__link {
    min-height: 36px;
    padding: 0.4rem 0.7rem;
    font-size: 0.875rem;
    gap: 0.6rem;
    grid-template-columns: 1.3rem 1fr auto;
}

.zb-nav__item {
    margin-bottom: 1px;
}

.zb-nav__icon {
    font-size: 0.98rem;
}

.sidebar .zb-nav__sub .zb-nav__link,
.offcanvas .zb-nav__sub .zb-nav__link {
    min-height: 32px;
    font-size: 0.83rem;
    padding: 0.3rem 0.6rem;
}

/* عنوان «التنقّل» القديم لم يعد له معنى بعد أن صار لكل قسم عنوانه */
.sidebar-nav-label {
    display: none;
}

/* ── شريط التمرير: رفيع وباهت حتى لا يزاحم المحتوى بصرياً ── */
.sidebar-scroll {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dfe3e8 transparent;
}

    .sidebar-scroll::-webkit-scrollbar {
        width: 5px;
    }

    .sidebar-scroll::-webkit-scrollbar-thumb {
        background: #dfe3e8;
        border-radius: 3px;
    }

    .sidebar-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

/* الشعار: ارتفاع أقلّ داخل لوحة الإدارة — هويّةٌ لا لافتة */
.sidebar .logo {
    padding: 0 0 0.5rem;
    margin-bottom: 0.25rem;
}

    .sidebar .logo .logo-img {
        height: 34px;
        width: auto;
    }

/* ══════════════════════════════════════════════════════════════════════
   الشريط الجانبي — النسخة الثالثة

   ما قبلها كان عناوين أقسام جامدة فوق قائمةٍ مفتوحة كاملةً: تُنظّم البصر
   ولا تُقصّر القائمة. الآن الأقسام مجموعاتٌ تُطوى — ستّة رؤوس بدل سبعة
   وعشرين صفّاً، ولا يُفتح إلا القسم الذي أنت فيه.

   وهذه القواعد تُلغي ما قبلها في الملفّ (متأخّرةٌ عنه فتفوز عند التساوي).
   ══════════════════════════════════════════════════════════════════════ */

/* عنوان القسم الجامد لم يعد يُستعمل — صار كل قسم مجموعةً */
.zb-nav__section {
    display: none;
}

/* ── الصفّ الأساسي ── */
.sidebar .zb-nav__link,
.offcanvas .zb-nav__link {
    display: grid;
    grid-template-columns: 1.4rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 40px;
    padding: 0.45rem 0.6rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #5b6572;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

    .sidebar .zb-nav__link:hover,
    .offcanvas .zb-nav__link:hover {
        background: #f4f6f8;
        color: #1f2937;
    }

.zb-nav__item {
    margin-bottom: 1px;
}

.zb-nav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.02rem;
    line-height: 1;
    color: #a8b0ba;
    transition: color 0.12s ease;
}

.sidebar .zb-nav__link:hover .zb-nav__icon,
.offcanvas .zb-nav__link:hover .zb-nav__icon {
    color: #6b7480;
}

/* ── رأس المجموعة: أثقل قليلاً وأدكن ليُقرأ عنواناً لا خياراً ── */
.sidebar .zb-nav__toggle,
.offcanvas .zb-nav__toggle {
    color: #3f4956;
    font-weight: 650;
}

/* المجموعة المفتوحة: خلفية باهتة جداً تربط رأسها بأبنائها بصرياً */
.zb-nav__item--group.is-open > .zb-nav__link {
    background: #f7f9fa;
}

/* ── الصفحة الحالية ── */
.sidebar .zb-nav__link.is-active,
.offcanvas .zb-nav__link.is-active {
    position: relative;
    background: rgba(16, 138, 91, 0.10);
    color: #0b5c3c;
    font-weight: 700;
}

    .sidebar .zb-nav__link.is-active .zb-nav__icon,
    .offcanvas .zb-nav__link.is-active .zb-nav__icon {
        color: #108a5b;
    }

    .sidebar .zb-nav__link.is-active::before,
    .offcanvas .zb-nav__link.is-active::before {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 18px;
        border-radius: 0 3px 3px 0;
        background: #108a5b;
    }

/* مجموعةٌ مطويّة تحوي الصفحة الحالية: نقطةٌ تدلّ عليها بلا فتحها */
.sidebar .zb-nav__toggle.has-active,
.offcanvas .zb-nav__toggle.has-active {
    color: #0b5c3c;
}

    .sidebar .zb-nav__item--group:not(.is-open) > .zb-nav__toggle.has-active .zb-nav__text::after,
    .offcanvas .zb-nav__item--group:not(.is-open) > .zb-nav__toggle.has-active .zb-nav__text::after {
        content: "";
        display: inline-block;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: #108a5b;
        margin-inline-start: 0.4rem;
        vertical-align: middle;
    }

/* ── سهم الطيّ ── */
.zb-nav__chevron {
    font-size: 0.62rem;
    color: #b6bec8;
    transition: transform 0.18s ease;
}

.zb-nav__item--group.is-open > .zb-nav__link .zb-nav__chevron {
    transform: rotate(180deg);
}

/* ── الأبناء ── */
.zb-nav__sub {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.18s ease;
}

.zb-nav__item--group.is-open > .zb-nav__sub {
    grid-template-rows: 1fr;
    padding-block: 2px;
}

/* الغلاف الوحيد داخل الشبكة — عليه ينطبق 0fr فيُطوى المحتوى كلّه */
.zb-nav__sub-list {
    min-height: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.zb-nav__sub .zb-nav__item {
    position: relative;
    margin-inline-start: 1.35rem;
    padding-inline-start: 0.6rem;
    border-inline-start: 1.5px solid #e8ebee;
}

.sidebar .zb-nav__sub .zb-nav__link,
.offcanvas .zb-nav__sub .zb-nav__link {
    min-height: 34px;
    padding: 0.35rem 0.55rem;
    font-size: 0.845rem;
    font-weight: 500;
    grid-template-columns: 1.1rem minmax(0, 1fr) auto;
    gap: 0.5rem;
}

.zb-nav__sub .zb-nav__icon {
    font-size: 0.88rem;
}

/* ── التمرير: شريط رفيع لا يزاحم المحتوى ── */
.sidebar-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    padding-inline-end: 2px;
    scrollbar-width: thin;
    scrollbar-color: #e2e6ea transparent;
}

    .sidebar-scroll::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar-scroll::-webkit-scrollbar-thumb {
        background: #e2e6ea;
        border-radius: 2px;
    }

    .sidebar-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

/* ── حدّ الشريط: خطّ واحد باهت بدل ظلّ ── */
.sidebar {
    border-left: 1px solid #edf0f2;
}

/* ── التركيز بلوحة المفاتيح ── */
.sidebar .zb-nav__link:focus-visible,
.offcanvas .zb-nav__link:focus-visible {
    outline: 2px solid #108a5b;
    outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
    .zb-nav__sub,
    .zb-nav__chevron,
    .sidebar .zb-nav__link,
    .offcanvas .zb-nav__link {
        transition: none;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   لوحة المدير (Pages/Dashboards/AdminDashboard.razor)

   حلّت محلّ صورةٍ بملء الارتفاع بلا رقم ولا رابط.

   ⭐ والألوان هنا أقوى عمداً: الشكوى كانت أنّ اللوحة «باهتة». السبب أن كل
   شيء كان رماديّاً على أبيض بفوارق ضئيلة، فلا شيء يتقدّم على شيء. الحلّ
   ليس زيادة الألوان بل **إعطاء اللون معنىً**: أخضرٌ للهويّة، وكهرمانٌ
   لما ينتظر تدخّلاً، وأحمرٌ نابض للبثّ الجاري، ورماديّ لكل ما عداه.
   ══════════════════════════════════════════════════════════════════════ */
.adash {
    --a-green: #0f7a51;
    --a-green-soft: #e7f4ee;
    --a-amber: #b45309;
    --a-amber-soft: #fef3c7;
    --a-red: #dc2626;
    --a-ink: #0f172a;
    --a-muted: #64748b;
    --a-line: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* ── الترويسة ── */
.adash__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.adash__title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--a-ink);
    margin: 0;
}

.adash__sub {
    color: var(--a-muted);
    font-size: 0.9rem;
    margin: 0.15rem 0 0;
}

.adash__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    background: var(--a-green);
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

    .adash__cta:hover {
        background: #0b5c3c;
        color: #fff;
    }

/* ── بطاقات الأرقام ── */
.adash__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 0.8rem;
}

.astat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    background: #fff;
    border: 1px solid var(--a-line);
    border-radius: 13px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.08s ease;
}

a.astat:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.astat__icon {
    flex: 0 0 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 1.15rem;
}

.astat__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.astat__value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--a-ink);
    font-variant-numeric: tabular-nums;
}

.astat__label {
    font-size: 0.82rem;
    color: var(--a-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* لكل بطاقة لونها — التمييز بالمعنى لا بالتزيين */
.astat--people .astat__icon { background: var(--a-green-soft); color: var(--a-green); }
.astat--staff .astat__icon { background: #e0f2fe; color: #0369a1; }
.astat--programs .astat__icon { background: #ede9fe; color: #6d28d9; }
.astat--enroll .astat__icon { background: #f1f5f9; color: #475569; }
.astat--upcoming .astat__icon { background: #fef3c7; color: var(--a-amber); }

/* البثّ الجاري: النبضة هي الشيء الوحيد المتحرّك في الصفحة */
.astat--live {
    border-color: #fecaca;
    background: #fff5f5;
}

.astat--live .astat__icon {
    background: #fee2e2;
}

.astat__pulse {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--a-red);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.55);
    animation: adash-pulse 1.9s infinite;
}

@keyframes adash-pulse {
    70% { box-shadow: 0 0 0 11px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* ── الألواح ── */
.adash__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.1rem;
}

.apanel {
    background: #fff;
    border: 1px solid var(--a-line);
    border-radius: 14px;
    padding: 1.1rem;
}

.apanel--alert {
    border-color: #fcd34d;
    background: #fffdf7;
}

.apanel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.apanel__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--a-ink);
    margin: 0;
}

.apanel--alert .apanel__title i {
    color: var(--a-amber);
}

.apanel__count {
    min-width: 26px;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--a-amber);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
}

.apanel__link {
    font-size: 0.83rem;
    font-weight: 700;
    color: var(--a-green);
    text-decoration: none;
}

.apanel__more {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: var(--a-muted);
    text-align: center;
}

.apanel__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.6rem 1rem;
    color: #94a3b8;
    font-size: 0.88rem;
}

    .apanel__empty i {
        font-size: 1.6rem;
        color: #cbd5e1;
    }

/* ── قوائم اللوح ── */
.alist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.alist__row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f1f5f9;
}

    .alist__row:last-child {
        border-bottom: 0;
    }

.alist__row--link {
    cursor: pointer;
    border-radius: 9px;
    padding-inline: 0.45rem;
    margin-inline: -0.45rem;
    transition: background-color 0.12s ease;
}

    .alist__row--link:hover {
        background: #f8fafc;
    }

.alist__avatar {
    flex: 0 0 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 0.85rem;
}

.alist__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.3;
}

.alist__name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--a-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alist__meta {
    font-size: 0.76rem;
    color: var(--a-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* وقت الحصّة: عمود ثابت العرض حتى تُقرأ الأوقات كعمود لا كنصّ متعرّج */
.alist__when {
    flex: 0 0 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}

.alist__day {
    font-size: 0.74rem;
    color: var(--a-muted);
}

.alist__time {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--a-ink);
}

.alist__when.is-live {
    flex-direction: row;
    gap: 0.35rem;
    color: var(--a-red);
    font-weight: 800;
    font-size: 0.8rem;
}

.alist__livedot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--a-red);
}

/* ── وسم النوع ── */
.atag {
    flex: 0 0 auto;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.atag--student { background: var(--a-green-soft); color: var(--a-green); }
.atag--staff { background: #e0f2fe; color: #0369a1; }
.atag--other { background: #f1f5f9; color: #64748b; }

/* ── الاختصارات ── */
.ashort {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 0.6rem;
}

.ashort__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.95rem 0.6rem;
    border: 1px solid var(--a-line);
    border-radius: 11px;
    background: #fff;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

    .ashort__item i {
        font-size: 1.25rem;
        color: #94a3b8;
        transition: color 0.15s ease;
    }

    .ashort__item:hover {
        border-color: var(--a-green);
        background: var(--a-green-soft);
        color: var(--a-green);
    }

        .ashort__item:hover i {
            color: var(--a-green);
        }

@media (prefers-reduced-motion: reduce) {
    .astat__pulse { animation: none; }
    .astat, .ashort__item, .alist__row--link { transition: none; }
}

@media (max-width: 575.98px) {
    .adash__title { font-size: 1.3rem; }
    .astat__value { font-size: 1.3rem; }
}

/* ═══════════ الطباعة — عامّة للموقع ═══════════
   كانت داخل قواعد مركز التقارير القديمة (rpt-*)، وقد انتقلت صفحاته إلى
   Zad UI (المرحلة 9أ) فحُذفت قواعدها وبقي هذا. ‏#zb-pwa لافتة تثبيت التطبيق
   و blazor-error-ui شريط الخطأ: طبقتان تطفوان فوق الصفحة فتُطبعان فوق
   الجدول — قِيستا في مخرَج طباعة فعليّ. وطباعة الإطار الجديد في zui.css. */
@media print {
  .sidebar, .navbar, .offcanvas, .breadcrumb, footer,
  #zb-pwa, #blazor-error-ui, .blazor-error-ui, #components-reconnect-modal { display: none !important; }

  body { background: #fff !important; }
  .card { border: 0 !important; box-shadow: none !important; }
  .table-responsive { overflow: visible !important; }

  @page { size: A4 portrait; margin: 14mm; }
}
