/********** Template CSS - Modern Dark Theme *********/
:root {
    --primary: #0f4a7d;
    --primary-light: #2396ca;
    --secondary: #f55b49;
    --accent: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.5);
    --dark-bg: #0a0e27;
    --dark-bg-lighter: #151932;
    --dark-card: #1a1f3a;
    --dark-card-hover: #232845;
    
    /* ✅ تحسين الألوان لجعلها أكثر وضوحاً */
    --text-light: #f0f2ff;      /* أصبح أكثر بياضاً */
    --text-white: #ffffff;
    --text-muted: #b8c0d8;      /* أصبح أفتح من السابق */
    --text-secondary: #90cdf4;   /* لون ثانوي جديد (أزرق فاتح) */
    --text-accent: #ffd700;      /* لون مميز (ذهبي) */

    --border-color: rgba(255, 255, 255, 0.15); /* أكثر وضوحاً */
    --gradient-primary: linear-gradient(135deg, #0f4a7d 0%, #2396ca 100%);
    --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #0f4a7d 100%);
    --gradient-glow: linear-gradient(135deg, #00d4ff, #0f4a7d, #f55b49);

    /* شفة/لمعة ناعمة تُستخدم على البطاقات والأزرار الحديثة */
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 24px var(--accent-glow);
    --radius-lg: 18px;
}


* {
    box-sizing: border-box;
}

/* ==========================================================================
   Dynamic Thumbnail (course / lesson / workshop / learning-path cover)
   يعرض الصورة كاملة دون أي قص، مع الحفاظ على نسبة عرض/ارتفاع ثابتة
   لضمان تناسق شبكة البطاقات بصرياً. استبدل height + object-fit:cover
   القديمة بهذا المكوّن المُوحّد.
   ========================================================================== */
.thumb-dynamic {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: linear-gradient(135deg, var(--dark-card) 0%, var(--dark-card-hover) 100%);
}

.thumb-dynamic img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .4s ease;
}

.thumb-dynamic.thumb-round {
    border-radius: var(--radius-lg);
}

.thumb-dynamic.thumb-square {
    aspect-ratio: 1 / 1;
}

a:hover .thumb-dynamic img,
.thumb-dynamic:hover img {
    transform: scale(1.04);
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    font-family: 'Cairo', 'Nunito', sans-serif;
    font-weight: 400;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Nunito', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semi-bold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-extra-bold { font-weight: 800 !important; }

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
    background: var(--gradient-accent);
    border: none;
    border-radius: 50px;
    color: white;
    box-shadow: 0 5px 20px var(--accent-glow);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}
#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

.btn {
    font-family: 'Cairo', 'Nunito', sans-serif;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(15, 74, 125, 0.4);
}

.btn-primary:hover {
    background: var(--gradient-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-square { width: 38px; height: 38px; }
.btn-sm-square { width: 32px; height: 32px; }
.btn-lg-square { width: 48px; height: 48px; }

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 0px;
}

/* Navbar - Glassmorphism */
.navbar {
    background: rgba(10, 14, 39, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar-light .navbar-nav .nav-link {
    margin-inline-end: 14px;
    padding: 25px 0;
    color: var(--text-light);
    font-size: 14.5px;
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
    position: relative;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* إجبار القائمة على سطر واحد على الشاشات الكبيرة وعدم النزول لسطر ثانٍ */
@media (min-width: 992px) {
    .navbar-light .navbar-collapse {
        flex-wrap: nowrap;
    }
    .navbar-light .navbar-nav {
        flex-wrap: nowrap;
    }
    .navbar-light .navbar-nav .nav-link {
        font-size: 13px;
    }
    /* تقليص هوامش الحاوية الجانبية لإفساح مساحة أكبر لعناصر القائمة */
    .navbar-light .container {
        max-width: 100%;
        padding-inline-start: 10px;
        padding-inline-end: 10px;
    }
}

@media (min-width: 1200px) {
    .navbar-light .navbar-nav .nav-link {
        font-size: 15px;
        margin-inline-end: 16px;
    }
}

.navbar-light .navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover::before,
.navbar-light .navbar-nav .nav-link.active::before {
    width: 100%;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--accent);
}

@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }
    .navbar-light .navbar-nav {
        border-top: 1px solid var(--border-color);
    }
}

.navbar-light .navbar-brand,
.navbar-light a.btn {
    height: 75px;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-light);
    font-weight: 500;
}

.navbar-light.sticky-top {
    top: -100px;
    transition: .5s;
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
        background: var(--dark-card);
        border: 1px solid var(--border-color);
        border-radius: 12px;
    }
    .navbar .dropdown-menu.fade-down {
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
    }
    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
    .navbar .dropdown-menu .dropdown-item {
        color: var(--text-light);
        transition: all 0.3s ease;
    }
    .navbar .dropdown-menu .dropdown-item:hover {
        background: var(--dark-card-hover);
        color: var(--accent);
        padding-left: 20px;
    }
}

@media (max-width: 768px) {
    .header-carousel .owl-carousel-item {
        position: relative;
        min-height: 500px;
    }
    .header-carousel .owl-carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.header-carousel .owl-nav {
    position: absolute;
    top: 50%;
    right: 8%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    margin: 7px 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--accent);
    font-size: 22px;
    transition: all 0.3s ease;
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.1);
}

.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    color: var(--text-light);
    background: transparent !important;
    font-weight: 600;
    letter-spacing: 1px;
}

.section-title::before {
    position: absolute;
    content: "";
    width: calc(100% + 80px);
    height: 2px;
    top: 4px;
    left: -40px;
    background: var(--gradient-accent);
    z-index: -1;
}

.section-title::after {
    position: absolute;
    content: "";
    width: calc(100% + 120px);
    height: 2px;
    bottom: 5px;
    left: -60px;
    background: var(--gradient-accent);
    z-index: -1;
}

.section-title.text-start::before {
    width: calc(100% + 40px);
    left: 0;
}

.section-title.text-start::after {
    width: calc(100% + 60px);
    left: 0;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 100px 0;
    background: var(--dark-bg);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 91, 73, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.8;
}

/* Stats Section */
.stats-section {
    background: var(--dark-bg-lighter);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.stat-card {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Custom Service Cards */
.custom-service-card {
    border-radius: 20px;
    overflow: hidden;
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.custom-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: var(--gradient-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.custom-service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 212, 255, 0.3);
}

.custom-service-card:hover::before {
    opacity: 1;
}

.card-top-section {
    padding: 2rem 1rem;
    text-align: center;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
}

.card-top-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transition: all 0.5s ease;
    opacity: 0;
}

.custom-service-card:hover .card-top-section::after {
    opacity: 1;
    top: -25%;
    right: -25%;
}

.card-top-section i {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: inline-block;
    transition: transform 0.4s ease;
}

.custom-service-card:hover .card-top-section i {
    transform: scale(1.2) rotate(5deg);
}

.card-top-section h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff !important;
}

.card-top-section.navy-blue {
    background: linear-gradient(135deg, #0f4a7d, #2a4a9c);
}
.card-top-section.light-blue {
    background: linear-gradient(135deg, #2396ca, #4299e1);
}
.card-top-section.orange {
    background: linear-gradient(135deg, #f55b49, #ed8936);
}

.card-bottom-section {
    background-color: var(--dark-bg-lighter);
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    font-weight: 400;
}

.card-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.card-time.ltr { flex-direction: row; }
.card-time.rtl { flex-direction: row-reverse; justify-content: flex-end; }

.card-time i {
    font-size: 1rem;
    color: var(--accent);
}

.custom-service-card .card-bottom-section a.card-link-btn {
    display: inline-block !important;
    border-radius: 50px !important;
    padding: 0.6rem 1.8rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    margin-top: auto !important;
    align-self: center !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.custom-service-card .card-bottom-section a.card-link-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.custom-service-card .card-bottom-section a.card-link-btn:active::before {
    width: 300px;
    height: 300px;
}

.custom-service-card .card-bottom-section a.card-link-btn.orange {
    background: linear-gradient(135deg, #f55b49, #ed8936) !important;
    box-shadow: 0 4px 15px rgba(245, 91, 73, 0.4);
}
.custom-service-card .card-bottom-section a.card-link-btn.orange:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 91, 73, 0.6);
}

.custom-service-card .card-bottom-section a.card-link-btn.navy-blue {
    background: linear-gradient(135deg, #0f4a7d, #2a4a9c) !important;
    box-shadow: 0 4px 15px rgba(15, 74, 125, 0.4);
}
.custom-service-card .card-bottom-section a.card-link-btn.navy-blue:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(15, 74, 125, 0.6);
}

.custom-service-card .card-bottom-section a.card-link-btn.light-blue {
    background: linear-gradient(135deg, #2396ca, #4299e1) !important;
    box-shadow: 0 4px 15px rgba(35, 150, 202, 0.4);
}
.custom-service-card .card-bottom-section a.card-link-btn.light-blue:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(35, 150, 202, 0.6);
}

/* Announcements Cards */
.announcement-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.announcement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: var(--gradient-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.announcement-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 212, 255, 0.3);
}

.announcement-card:hover::before {
    opacity: 1;
}

.announcement-card .p-4 {
    background: var(--dark-card);
    color: var(--text-light);
}

.announcement-card h5 {
    color: var(--text-light);
    font-weight: 700;
}

.announcement-card .text-muted {
    color: var(--text-muted) !important;
}

.announcement-card .btn {
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.announcement-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.announcement-card .badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
}

/* About Section */
.about-section {
    background: var(--dark-bg-lighter);
    padding: 100px 0;
    position: relative;
}

.about-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 3px;
    background: var(--gradient-glow);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 1;
}

.about-image-wrapper img {
    transition: transform 0.5s ease;
}

.about-image-wrapper:hover img {
    transform: scale(1.05);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-lighter) 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.3;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.5; }
}

.cta-card {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4rem;
    text-align: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}

.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-weight: normal;
    border: 1px solid var(--border-color);
    border-radius: 35px;
    transition: all 0.3s ease;
    background: var(--dark-card);
}

.footer .btn.btn-social:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-3px);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: normal;
    text-transform: capitalize;
    transition: all 0.3s ease;
}

.footer .btn.btn-link:hover {
    color: var(--accent);
    letter-spacing: 1px;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid var(--border-color);
}

.footer .copyright a {
    color: var(--accent);
}

/* Carousel Buttons */
.header-carousel .carousel-btn {
    display: inline-block !important;
    border-radius: 50px !important;
    padding: 0.75rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    border: none !important;
    color: white !important;
    transition: all 0.3s ease !important;
    margin: 0.25rem !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.header-carousel .carousel-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.header-carousel .carousel-btn:active::before {
    width: 300px;
    height: 300px;
}

.header-carousel .carousel-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.header-carousel .carousel-btn.navy-blue {
    background: linear-gradient(135deg, #0f4a7d, #2a4a9c) !important;
}
.header-carousel .carousel-btn.light-blue {
    background: linear-gradient(135deg, #2396ca, #4299e1) !important;
}
.header-carousel .carousel-btn.orange {
    background: linear-gradient(135deg, #f55b49, #ed8936) !important;
}


.header-carousel .carousel-btn.orange:hover {
    background: linear-gradient(135deg, #ed8936, #f55b49) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(245, 91, 73, 0.6) !important;
}
.header-carousel .carousel-btn.success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
}

/* Modal */
.modal-content {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.modal-backdrop.show {
    opacity: 0.9;
    background: rgba(10, 14, 39, 0.95);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-accent);
}

.container-xxl {
    color: var(--text-light);
}

.container-xxl h1, .container-xxl h2, .container-xxl h3, .container-xxl h4, .container-xxl h5, .container-xxl h6 {
    color: var(--text-light);
}

/* Team */
.team-item {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
}

.team-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.team-item img {
    transition: transform 0.5s ease;
}

.team-item:hover img {
    transform: scale(1.1);
}

/* Testimonial */
.testimonial-carousel::before,
.testimonial-carousel::after {
    display: none;
}

.testimonial-item {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    margin: 1rem;
    transition: all 0.4s ease;
}

.testimonial-item:hover {
    border-color: var(--accent);
    box-shadow: 0 15px 35px rgba(0, 212, 255, 0.2);
}

.testimonial-text {
    background: var(--dark-bg-lighter) !important;
    color: var(--text-light) !important;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    font-style: italic;
}

.testimonial-carousel .owl-dot {
    border: 1px solid var(--border-color);
    background: var(--dark-card);
}

.testimonial-carousel .owl-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .stat-number { font-size: 2rem; }
    .cta-card { padding: 2rem; }
}


/* الحاوية الرئيسية - شكل كبسولة */
.split-btn-wrapper {
    border-radius: 50px;
    overflow: hidden;
}

/* إزالة الـ border-radius الافتراضي من الأزرار */
.split-btn-wrapper .btn {
    border-radius: 0 !important;
    border: none;
}

/* ===== في اللغة الإنجليزية (LTR) ===== */
html[dir="ltr"] .split-btn-wrapper .text-part {
    border-top-left-radius: 50px !important;
    border-bottom-left-radius: 50px !important;
}

html[dir="ltr"] .split-btn-wrapper .icon-part {
    border-top-right-radius: 50px !important;
    border-bottom-right-radius: 50px !important;
}

/* ===== في اللغة العربية (RTL) ===== */
html[dir="rtl"] .split-btn-wrapper .text-part {
    border-top-right-radius: 50px !important;
    border-bottom-right-radius: 50px !important;
}

html[dir="rtl"] .split-btn-wrapper .icon-part {
    border-top-left-radius: 50px !important;
    border-bottom-left-radius: 50px !important;
}

/* ===== تحسين وضوح النصوص بشكل عام ===== */

/* النصوص الرئيسية */
body, p, span, li, .text-muted {
    color: var(--text-light) !important;
}

/* النصوص الثانوية (الوصف، التفاصيل) */
.text-secondary, .text-muted, .card-description, .card-time {
    color: var(--text-muted) !important;
}

/* العناوين */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text-light) !important;
}

/* عناوين الأقسام الفرعية */
.section-title {
    color: var(--accent) !important;
}

/* نصوص الكاردات في الأقسام الداكنة */
.announcement-card .text-muted,
.announcement-card .card-description,
.announcement-card .card-time {
    color: var(--text-muted) !important;
}

/* نصوص المدرسين */
.team-item .text-muted {
    color: var(--text-muted) !important;
}

.team-item small {
    color: var(--text-muted) !important;
}

.team-item h5 {
    color: var(--text-light) !important;
}

/* تنسيق خاص للنصوص في السلايدر */
.header-carousel .display-6,
.header-carousel .display-3,
.header-carousel p,
.header-carousel h5,
.header-carousel h1 {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-carousel .badge {
    color: #ffffff !important;
}

/* تنسيق نصوص الأزرار */
.btn {
    color: #ffffff !important;
}

.btn-light {
    color: var(--dark-bg) !important;
}

/* تنسيق النصوص في الفوتر */
.footer, .footer p, .footer span, .footer a, .footer .text-muted {
    color: var(--text-muted) !important;
}

.footer .btn-link {
    color: var(--text-muted) !important;
}

.footer .btn-link:hover {
    color: var(--accent) !important;
}

.footer .copyright {
    color: var(--text-muted) !important;
}

/* نصوص الإعلانات */
.announcement-card h5 {
    color: var(--text-light) !important;
}

.announcement-card .badge {
    color: #ffffff !important;
}

/* نصوص الأصناف (Categories) */
.category-card h5 {
    color: var(--text-light) !important;
}

.category-card .text-muted {
    color: var(--text-muted) !important;
}

/* نصوص التستيمونيال */
.testimonial-item p {
    color: var(--text-light) !important;
}

.testimonial-item h5 {
    color: var(--text-light) !important;
}

.testimonial-item small {
    color: var(--text-muted) !important;
}

/* ===== تحسين وضوح نصوص المدرسين ===== */
.team-item .text-muted {
    color: var(--text-muted) !important;
}

.team-item small {
    color: var(--text-muted) !important;
}

.team-item h5 {
    color: var(--text-light) !important;
}

.team-item .btn-primary {
    color: #ffffff !important;
}

/* نصوص الأيقونات الاجتماعية */
.team-item .btn-sm-square {
    color: #ffffff !important;
}

.team-item .btn-sm-square:hover {
    color: var(--accent) !important;
}

/* ===== زر الفيديو برتقالي ===== */
.header-carousel .carousel-btn.video-orange {
    background: linear-gradient(135deg, #f55b49, #ed8936) !important;
    box-shadow: 0 4px 15px rgba(245, 91, 73, 0.4);
    border: none;
}

.header-carousel .carousel-btn.video-orange:hover {
    background: linear-gradient(135deg, #ed8936, #f55b49) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 91, 73, 0.6);
}

/* ========================================
   تحسينات التصميم - عرض كاردات أكثر
   ======================================== */

/* تقليل المسافات العامة */
.container-xxl {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.container-xxl.py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
}

/* تحسين الكاردات لتكون أصغر */
.custom-service-card {
    border-radius: 16px;
    transition: all 0.3s ease;
}

.custom-service-card .card-top-section {
    padding: 1.2rem 0.8rem !important;
}

.custom-service-card .card-top-section h5 {
    font-size: 1rem !important;
    margin-top: 0.5rem !important;
}

.custom-service-card .card-top-section i,
.custom-service-card .card-top-section img {
    height: 40px !important;
    width: auto !important;
    max-width: 80px !important;
}

.custom-service-card .card-bottom-section {
    padding: 1rem 0.8rem !important;
}

.custom-service-card .card-description {
    font-size: 0.8rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.5 !important;
}

.custom-service-card .card-time {
    font-size: 0.75rem !important;
    margin-bottom: 0.75rem !important;
}

.custom-service-card .card-bottom-section a.card-link-btn {
    padding: 0.4rem 1.2rem !important;
    font-size: 0.75rem !important;
    border-radius: 50px !important;
}

/* تحسين كاردات الإعلانات */
.announcement-card {
    border-radius: 16px;
}

.announcement-card .p-4 {
    padding: 1rem !important;
}

.announcement-card h5 {
    font-size: 0.95rem !important;
}

.announcement-card .text-muted {
    font-size: 0.8rem !important;
    min-height: 40px !important;
}

.announcement-card .btn-sm {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.75rem !important;
}

.announcement-card .badge {
    font-size: 0.65rem !important;
    padding: 0.2rem 0.5rem !important;
}

/* تحسين كاردات المدرسين */
.team-item .overflow-hidden img {
    height: 200px !important;
}

.team-item .p-4 {
    padding: 0.8rem !important;
}

.team-item h5 {
    font-size: 0.95rem !important;
}

.team-item small {
    font-size: 0.75rem !important;
}

.team-item .btn-sm {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.6rem !important;
}

/* تقليل المسافات بين الصفوف */
.row.g-4 {
    --bs-gutter-y: 1.2rem !important;
    --bs-gutter-x: 1.2rem !important;
}

.row.g-4 > * {
    padding-right: calc(var(--bs-gutter-x) * 0.5) !important;
    padding-left: calc(var(--bs-gutter-x) * 0.5) !important;
    margin-top: var(--bs-gutter-y) !important;
}

/* عناوين الأقسام أصغر */
.section-title {
    font-size: 1.8rem !important;
}

.section-title + h1 {
    font-size: 2rem !important;
}

/* تحسين الهيرو */
.hero-title {
    font-size: 2.8rem !important;
}

.hero-subtitle {
    font-size: 1.1rem !important;
}

/* تقليل المسافات في الـ CTA */
.cta-card {
    padding: 2rem !important;
}

.cta-card h2 {
    font-size: 2rem !important;
}

/* تحسين الفوتر */
.footer .container.py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.footer h4 {
    font-size: 1.1rem !important;
}

.footer .btn-link {
    font-size: 0.85rem !important;
    padding: 0.2rem 0 !important;
}

.footer p {
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
}

/* تحسين الكاروسيل */
.header-carousel .owl-carousel-item img {
    height: 400px !important;
}

.header-carousel .col-sm-10.col-lg-8 {
    max-width: 70% !important;
}

.header-carousel h1 {
    font-size: 2rem !important;
}

.header-carousel .display-6 {
    font-size: 1.1rem !important;
}

.header-carousel .carousel-btn {
    padding: 0.5rem 1.5rem !important;
    font-size: 0.85rem !important;
}

/* ========================================
   تحسينات للشاشات المتوسطة والصغيرة
   ======================================== */

/* شاشات كبيرة (أجهزة الكمبيوتر) */
@media (min-width: 1400px) {
    .col-lg-3 {
        flex: 0 0 auto;
        width: 20% !important; /* 5 كاردات في السطر */
    }
}

/* شاشات كبيرة (أجهزة الكمبيوتر) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .col-lg-3 {
        flex: 0 0 auto;
        width: 25% !important; /* 4 كاردات في السطر */
    }
}

/* شاشات متوسطة */
@media (min-width: 768px) and (max-width: 1199px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 33.333% !important; /* 3 كاردات في السطر */
    }
}

/* شاشات صغيرة */
@media (max-width: 767px) {
    .col-lg-3, .col-md-6 {
        flex: 0 0 auto;
        width: 50% !important; /* 2 كاردات في السطر */
    }
    
    .hero-title {
        font-size: 1.8rem !important;
    }
    
    .header-carousel .owl-carousel-item img {
        height: 300px !important;
    }
    
    .header-carousel h1 {
        font-size: 1.3rem !important;
    }
    
    .custom-service-card .card-top-section {
        padding: 0.8rem 0.5rem !important;
    }
    
    .custom-service-card .card-top-section h5 {
        font-size: 0.8rem !important;
    }
}

/* شاشات صغيرة جداً */
@media (max-width: 480px) {
    .col-lg-3, .col-md-6 {
        flex: 0 0 auto;
        width: 100% !important; /* 1 كارد في السطر */
    }
}



/* ===== إصلاح القوائم المنسدلة ===== */

/* 1. تقليل المسافات بين العناصر */
.dropdown-menu .dropdown-item {
    padding: 0.4rem 1rem !important; /* تقليل الـ padding */
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: nowrap;
    transition: all 0.2s ease;
}

/* 2. محاذاة تلقائية حسب اتجاه الصفحة */
/* في الوضع العربي (RTL) */
[dir="rtl"] .dropdown-menu {
    text-align: right;
}

/* في الوضع الإنجليزي (LTR) */
[dir="ltr"] .dropdown-menu {
    text-align: left;
}

/* 3. تأثير Hover محسّن */
.dropdown-menu .dropdown-item:hover {
    background-color: rgba(0, 212, 255, 0.1);
    color: var(--accent, #00d4ff);
    padding-left: 1.2rem; /* حركة بسيطة عند التمرير */
}

/* 4. إصلاح المسافة بين الأيقونة والنص (إن وجدت) */
.dropdown-menu .dropdown-item i {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="ltr"] .dropdown-menu .dropdown-item i {
    margin-right: 0.5rem;
    margin-left: 0;
}

/* 5. تصغير عرض القائمة إذا كانت طويلة */
.dropdown-menu {
    min-width: 180px;
    max-width: 250px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 8px;
    padding: 0.5rem 0;
    /* خلفية داكنة موحّدة مع تصميم الموقع بدل الخلفية البيضاء الافتراضية
       من Bootstrap، حتى لا يختفي النص الفاتح الموروث من التصميم العام */
    background-color: var(--dark-card, #1a1f3a);
}

.dropdown-menu .dropdown-item {
    color: var(--text-light, #f0f2ff) !important;
    background-color: transparent;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: rgba(0, 212, 255, 0.1) !important;
    color: var(--accent, #00d4ff) !important;
}

.dropdown-menu .dropdown-divider {
    border-top-color: var(--border-color, rgba(255,255,255,0.1));
}


///////
.footer-links {
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent, #00d4ff) !important;
    transform: translateX(-5px); /* في RTL سيتحرك لليمين تلقائياً */
}

/* في الوضع العربي */
[dir="rtl"] .footer-links a:hover {
    transform: translateX(5px);
}