/* ===== 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;
}

.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;
    }

/* 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 {
    width: 260px;
    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 {
    color: #555;
    text-decoration: none;
    padding: 1px 1px;
    display: block;
    border-radius: 8px;
    width: 100%;
    text-align: start;
}

    .sidebar a.active,
    .sidebar a: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 14px 12px;
}

.test-accounts-table th {
    font-size: 0.72rem;
    font-weight: 700;
    color: #6b7280;
    white-space: nowrap;
}

.test-accounts-table td {
    font-size: 0.8rem;
    vertical-align: middle;
}

/* كل حساب tbody مستقلّ: التظليل يشمل صفّي البيانات والفائدة معاً */
.test-account-row {
    cursor: pointer;
    border-top: 1px solid #e5e7eb;
}

    .test-account-row:hover td {
        background-color: #f0fdf4;
    }

    /* صفّ الفائدة يلتصق بصفّه أعلاه: نزع الحدّ العلوي وتقليل الحشو */
    .test-account-row .test-account-purpose td {
        border-top: 0;
        padding-top: 0;
        padding-bottom: 10px;
        line-height: 1.5;
    }

/* أسماء المستخدمين وكلمات المرور لاتينية: تُعرض LTR داخل صفحة RTL */
.test-account-user,
.test-account-pwd {
    direction: ltr;
    display: inline-block;
    text-align: left;
    unicode-bidi: isolate;
}

.test-account-pwd {
    background-color: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    color: #b91c1c;
    white-space: nowrap;
}

/* بديل صورة الطالب حين لا صورة محفوظة — يمنع أيقونة الصورة المكسورة */
.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 {
    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%;
    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;
}

.sidebar .navbar-nav button {
    color: #555;
    text-decoration: none;
    padding: 5px 5px;
    display: block !important;
    width: 100%;
    text-align: start;
    border-radius: 8px;
}

    .sidebar .navbar-nav button.active,
    .sidebar .navbar-nav button: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;
}
