/* App Layout Styles - Global Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
    --bs-primary: #0A84FF;
    --bs-secondary: #4F46E5;
    --bs-info: #0A84FF;
    --bs-success: #10B981;
    --bs-body-bg: transparent;
    --bs-body-color: #C7D2FE;
    --bs-border-radius: 0.75rem;
    --bs-link-color: #0A84FF;
    --bs-link-hover-color: #4F46E5;
}

/* Prevent horizontal scroll */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Body - Dark background for all pages like home */
body,
body.bg-light-body {
    background: linear-gradient(135deg, #1E1B4B 0%, #4F46E5 50%, #0A84FF 100%);
    color: #C7D2FE;
    min-height: 100vh;
    padding-top: 0;
    width: 100%;
    max-width: 100vw;
    position: relative;
    font-family: 'Inter', 'Cairo', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

h1,
h2,
h3,
h4,
.display-1,
.display-2,
.display-3,
.section-title h1,
.section-title h2 {
    font-family: 'DM Serif Display', 'Inter', 'Cairo', serif;
    letter-spacing: 0.01em;
}

/* Navbar Styles - Thin and Sleek */
.site-header {
    background-color: rgba(30, 27, 75, 0.65) !important;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 92%;
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
}

/* Header when hidden (scrolled down) */
.site-header.hidden {
    transform: translateY(-100%);
}

/* Header when scrolled - solid background with shadow */
/* Header when scrolled - slightly more opaque */
.site-header.scrolled {
    background-color: rgba(30, 27, 75, 0.85) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    top: 10px;
    /* Slightly tighter to top on scroll */
    padding: 0.3rem 1.5rem;
    /* Slightly smaller */
}

#header-nav {
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
    /* allow header content to be fully visible */
    margin: 0;
    padding: 0.25rem 0;
    min-height: 60px;
    max-height: none;
    /* avoid clipping header content */
    display: flex;
    align-items: center;
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    #header-nav {
        min-height: 50px;
        max-height: none;
        /* avoid clipping header content on tablets */
        padding: 0.2rem 0;
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    #header-nav {
        min-height: 45px;
        max-height: none;
        /* avoid clipping header content on mobile */
        padding: 0.15rem 0;
    }
}

/* Page Hero Section - Separate from Header */
.page-hero {
    position: relative;
    padding-top: 10px;
    /* Space for fixed header + visual spacing */
    padding-bottom: 40px;
    background: linear-gradient(135deg, #1E1B4B 0%, #4F46E5 50%, #0A84FF 100%);
    margin-bottom: 0;
    text-align: center;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
}

.page-hero h1 {
    color: #fff;
    font-size: 3rem;
    font-weight: 200;
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 110px;
    margin: 0 auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-hero {
        padding-top: 140px;
        padding-bottom: 60px;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .page-hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

#header-nav .container-fluid {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin: 0 auto;
    width: 100%;
}

#header-nav .container-fluid>.d-flex {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.site-header.sticky {
    background-color: rgba(30, 27, 75, 0.98) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Logo / Company Name */
.navbar-brand {
    color: #0A84FF !important;
    font-weight: 600;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    margin-right: 0 !important;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    height: 100%;
}

@media (min-width: 768px) and (max-width: 991px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
}

.navbar-brand:hover {
    color: #0A84FF !important;
    opacity: 0.85;
    transform: translateY(-1px);
}

/* Logo image */
.navbar-brand img.logo {
    max-height: 60px;
    /* Reduced to fit within header height to prevent clipping/overflow on desktop */
    width: auto;
    height: auto;
    transition: all 0.3s ease;
    object-fit: contain;
}

/* Tablet logo */
@media (min-width: 768px) and (max-width: 991px) {
    .navbar-brand img.logo {
        max-height: 32px;
    }
}

/* Mobile logo */
@media (max-width: 767px) {
    .navbar-brand img.logo {
        max-height: 28px;
    }
}

.navbar-brand:hover img.logo {
    opacity: 0.85;
    transform: scale(1.02);
}

/* If logo needs to be blue, uncomment this filter */
/* .navbar-brand img.logo {
    filter: brightness(0) saturate(100%) invert(45%) sepia(96%) saturate(2234%) hue-rotate(198deg) brightness(102%) contrast(101%);
} */

/* Navbar Links - Left Aligned Layout */
.navbar-nav {
    gap: 0.3rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex-wrap: nowrap;
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-nav .nav-item {
    margin: 0 !important;
}

.navbar-nav .nav-item a.nav-link {
    color: #C7D2FE !important;
    /* padding: 0.35rem 0.55rem !important; */
    font-weight: 500;
    /* font-size: 0.85rem; */
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 0 !important;
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

@media (min-width: 768px) and (max-width: 991px) {
    .navbar-nav .nav-item a.nav-link {
        padding: 0.3rem 0.65rem !important;
        font-size: 0.8rem;
    }
}

@media (max-width: 767px) {
    .navbar-nav .nav-item a.nav-link {
        padding: 0.25rem 0.6rem !important;
        font-size: 0.8rem;
    }
}

.navbar-nav .nav-item a.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.3rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: #0A84FF;
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.navbar-nav .nav-item a.nav-link:hover,
.navbar-nav .nav-item a.nav-link.active {
    color: #0A84FF !important;
    background: rgba(10, 132, 255, 0.08);
    transform: translateY(-1px);
}

.navbar-nav .nav-item a.nav-link:hover::after,
.navbar-nav .nav-item a.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Language Switcher Styles - Right Aligned */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0;
    margin-left: 0;
    flex-shrink: 0;
}

.language-switcher .lang-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #C7D2FE !important;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    background: rgba(148, 163, 255, 0.05);
    border: 1px solid rgba(148, 163, 255, 0.1);
}

@media (min-width: 768px) and (max-width: 991px) {
    .language-switcher .lang-link {
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 767px) {
    .language-switcher .lang-link {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

.language-switcher .lang-link:hover {
    color: #0A84FF !important;
    background: rgba(10, 132, 255, 0.12);
    border-color: rgba(10, 132, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(10, 132, 255, 0.15);
}

.language-switcher .lang-link.active {
    color: #0A84FF !important;
    background: rgba(10, 132, 255, 0.18);
    border-color: rgba(10, 132, 255, 0.4);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(10, 132, 255, 0.2);
}

.language-switcher .lang-flag {
    font-size: 1rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

@media (min-width: 768px) and (max-width: 991px) {
    .language-switcher .lang-flag {
        font-size: 0.95rem;
    }
}

@media (max-width: 767px) {
    .language-switcher .lang-flag {
        font-size: 0.9rem;
    }
}

.language-switcher .lang-text {
    font-size: 0.85rem;
    font-weight: inherit;
}

.language-switcher .lang-separator {
    color: rgba(199, 210, 254, 0.3);
    margin: 0 0.15rem;
    font-size: 0.875rem;
    font-weight: 300;
}

/* Mobile Language Switcher */
.language-switcher-mobile {
    padding: 1rem 0;
}

.language-switcher-mobile .lang-link {
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    background: rgba(148, 163, 255, 0.08);
    border: 1px solid rgba(148, 163, 255, 0.15);
}

.language-switcher-mobile .lang-link:hover {
    background: rgba(10, 132, 255, 0.15);
    border-color: rgba(10, 132, 255, 0.3);
}

.language-switcher-mobile .lang-link.active {
    background: rgba(10, 132, 255, 0.2);
    border-color: rgba(10, 132, 255, 0.4);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .language-switcher {
        gap: 0.3rem;
        padding: 0.3rem 0.5rem;
    }

    .language-switcher .lang-text {
        display: none;
    }

    .language-switcher .lang-flag {
        font-size: 1.25rem;
    }

    .language-switcher .lang-link {
        padding: 0.5rem 0.7rem;
    }
}

@media (max-width: 575px) {
    .language-switcher {
        gap: 0.2rem;
        padding: 0.25rem 0.4rem;
    }

    .language-switcher .lang-link {
        padding: 0.4rem 0.6rem;
    }

    .language-switcher .lang-flag {
        font-size: 1.1rem;
    }
}

/* Desktop Navbar - Enhanced Spacing */
@media (min-width: 992px) {
    #header-nav .navbar-nav.d-flex {
        gap: 0.5rem;
        margin-left: 0;
        margin-right: 0;
    }

    #header-nav .navbar-nav .nav-item {
        margin: 0;
    }

    #header-nav .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
        max-width: 100%;
    }

    /* Ensure no overflow and proper alignment */
    #header-nav .d-flex.justify-content-between {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Prevent any extra spacing */
    #header-nav .d-flex.align-items-center.gap-3 {
        margin: 0;
        padding: 0;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991px) {
    .navbar-brand {
        margin-right: 0 !important;
    }

    .navbar-brand img.logo {
        max-height: 45px;
    }

    #header-nav .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .navbar-brand {
        margin-right: 0 !important;
    }

    .navbar-brand img.logo {
        max-height: 40px;
    }

    #header-nav .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-header {
        padding: 0.5rem 0;
    }

    /* Ensure proper spacing on mobile */
    #header-nav .d-flex.justify-content-between {
        gap: 0.5rem;
    }
}

/* Dropdown Menu */
.offcanvas-body .dropdown-menu {
    background-color: rgba(30, 27, 75, 0.95) !important;
    border: 1px solid rgba(148, 163, 255, 0.2);
    backdrop-filter: blur(10px);
}

.offcanvas-body .dropdown-menu .dropdown-item {
    color: #C7D2FE !important;
}

.offcanvas-body .dropdown-menu .dropdown-item:hover,
.offcanvas-body .dropdown-menu .dropdown-item:focus,
.offcanvas-body .dropdown-menu .dropdown-item.active {
    background-color: rgba(10, 132, 255, 0.2) !important;
    color: #0A84FF !important;
}

/* Offcanvas (Mobile Menu) */
#header-nav .offcanvas {
    background-color: #1E1B4B !important;
    z-index: 1055 !important;
    /* Keep element rendered but hidden until opened */
    display: block !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#header-nav .offcanvas.show {
    background-color: #1E1B4B !important;
    z-index: 1055 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateX(0) !important;
}

/* Offcanvas Header */
.offcanvas-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 255, 0.15);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.offcanvas-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.offcanvas-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Offcanvas Body */
.offcanvas-body {
    padding: 1rem 1.25rem;
}

@media (max-width: 767px) {
    .offcanvas-body {
        padding: 0.85rem 1rem;
    }
}

/* Mobile Navigation Links in Offcanvas */
.offcanvas-body .navbar-nav {
    flex-direction: column;
    gap: 0.5rem;
}

.offcanvas-body .navbar-nav .nav-item {
    width: 100%;
}

.offcanvas-body .navbar-nav .nav-item .nav-link {
    padding: 0.6rem 0.9rem !important;
    border-radius: 6px;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

/* RTL - Arabic: Mobile menu vertical layout (under each other) */
[dir="rtl"] .offcanvas-body .navbar-nav {
    flex-direction: column !important;
    gap: 0.5rem !important;
}

[dir="rtl"] .offcanvas-body .navbar-nav .nav-item {
    width: 100% !important;
}

[dir="rtl"] .offcanvas-body .navbar-nav .nav-item .nav-link {
    width: 100% !important;
    text-align: right !important;
    padding: 0.6rem 0.9rem !important;
}

@media (max-width: 767px) {
    .offcanvas-body .navbar-nav .nav-item .nav-link {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.85rem;
    }
}

.offcanvas-body .navbar-nav .nav-item .nav-link:hover {
    background-color: rgba(10, 132, 255, 0.15) !important;
    color: #0A84FF !important;
    transform: translateX(5px);
}

/* Navbar Toggler Button */
.navbar-toggler {
    color: #C7D2FE !important;
    z-index: 2001 !important;
    position: relative !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    border-color: rgba(199, 210, 254, 0.3) !important;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-toggler:hover {
    background-color: rgba(10, 132, 255, 0.1);
    border-color: rgba(10, 132, 255, 0.5);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(10, 132, 255, 0.25) !important;
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(199, 210, 254, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

@media (max-width: 767px) {
    .navbar-toggler-icon {
        width: 20px;
        height: 20px;
    }
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    transform: rotate(90deg);
}

/* Search Bar */
#search-bar {
    border-right: 1px solid rgba(148, 163, 255, 0.2) !important;
}

#search-bar input[type="text"] {
    color: #C7D2FE !important;
    background: transparent !important;
}

#search-bar input[type="text"]:focus {
    border-bottom: 1px solid #0A84FF !important;
}

#search-bar input[type="text"]::placeholder {
    color: rgba(199, 210, 254, 0.5) !important;
}

#search-bar a.nav-link {
    color: #C7D2FE !important;
}

#search-bar a.nav-link:hover {
    color: #0A84FF !important;
}

/* CTA Button in Navbar */
.navbar .btn-primary,
.navbar .btn-cta {
    background: #0A84FF !important;
    color: #FFFFFF !important;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.navbar .btn-primary:hover,
.navbar .btn-cta:hover {
    background: #4F46E5 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.4);
}

/* Primary Button */
.btn {
    border-radius: 999px !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.75rem 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.btn-sm {
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 0.85rem 2.25rem;
    font-size: 1.05rem;
}

.btn:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(10, 132, 255, 0.25) !important;
    outline: none;
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary {
    background: #0A84FF !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(10, 132, 255, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #4F46E5 !important;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-primary:active {
    background: #4F46E5 !important;
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary,
.btn-outline-primary {
    background: transparent !important;
    color: #0A84FF !important;
    border: 2px solid #0A84FF !important;
    transition: all 0.3s ease;
}

.btn-secondary:hover,
.btn-outline-primary:hover {
    background: rgba(10, 132, 255, 0.1) !important;
    color: #0A84FF !important;
    border-color: #0A84FF !important;
}

.btn-outline-light {
    color: #C7D2FE !important;
    border: 1px solid rgba(148, 163, 255, 0.4) !important;
    background: rgba(148, 163, 255, 0.12) !important;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    color: #FFFFFF !important;
    border-color: #0A84FF !important;
    background: rgba(10, 132, 255, 0.25) !important;
}

/* Success / Confirm Button */
.btn-success {
    background: #10B981 !important;
    color: #FFFFFF !important;
    border: none !important;
    transition: all 0.3s ease;
}

.btn-success:hover,
.btn-success:focus {
    background: #059669 !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Links */
a {
    color: #0A84FF;
    transition: color 0.3s ease;
}

a:hover {
    color: #4F46E5;
}

/* Footer */
#footer {
    background-color: #0F0C33 !important;
    color: #C7D2FE;
}

#footer-bottom {
    background-color: #0F0C33 !important;
    color: #C7D2FE;
    border-top: 1px solid rgba(148, 163, 255, 0.2);
}

#footer h4,
#footer .widget-title {
    color: #FFFFFF !important;
}

#footer a {
    color: #C7D2FE;
    transition: color 0.3s ease;
}

#footer a:hover {
    color: #0A84FF;
}

#footer hr {
    border-color: rgba(148, 163, 255, 0.2);
}

#footer .copyright {
    color: #C7D2FE;
}

#footer .copyright a {
    color: #0A84FF;
}

#footer .copyright a:hover {
    color: #4F46E5;
}

/* Social Links */
.social-links svg {
    color: #C7D2FE !important;
    transition: color 0.3s ease;
}

.social-links svg:hover {
    color: #0A84FF !important;
}

/* Responsive Navbar */
@media only screen and (max-width: 1450px) {
    .navbar-nav .nav-item a.nav-link {
        margin-right: 40px;
        margin-left: 40px;
    }
}

@media only screen and (max-width: 991px) {
    .navbar-nav .nav-item a.nav-link {
        margin-right: 0;
        margin-left: 0;
    }
}

/* ✅ Hide desktop navbar links on mobile/tablet */
@media (max-width: 991px) {
    .navbar-nav.d-lg-flex {
        display: none !important;
    }
}

/* ✅ Hide mobile toggle (burger icon) on desktop */
@media (min-width: 992px) {
    .navbar-toggler {
        display: none !important;
    }
}

/* ✅ Show offcanvas only on mobile/tablet, hide on desktop */
@media (min-width: 992px) {
    #bdNavbar.offcanvas {
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateX(100%) !important;
        display: none !important;
    }

    #bdNavbar.offcanvas.show {
        visibility: hidden !important;
        pointer-events: none !important;
        display: none !important;
    }
}

/* ✅ Ensure offcanvas is visible and functional on mobile */
@media (max-width: 991px) {
    #bdNavbar.offcanvas {
        visibility: hidden !important;
        pointer-events: none !important;
        opacity: 0 !important;
        z-index: 2000 !important;
        width: 320px !important;
        max-width: 85vw !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out, opacity 0.3s ease-in-out !important;
    }

    #bdNavbar.offcanvas.show {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        z-index: 2000 !important;
        transform: translateX(0) !important;
    }

    /* Offcanvas backdrop */
    .offcanvas-backdrop {
        z-index: 1054 !important;
        background-color: rgba(0, 0, 0, 0.7) !important;
        backdrop-filter: blur(2px);
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .offcanvas-backdrop.show {
        opacity: 1 !important;
    }

    /* Ensure offcanvas body is visible */
    .offcanvas-body {
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Language switcher in mobile menu */
    .language-switcher-mobile {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .language-switcher-mobile .lang-link {
        padding: 0.5rem 1rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .language-switcher-mobile .lang-link:hover,
    .language-switcher-mobile .lang-link.active {
        background-color: rgba(10, 132, 255, 0.15);
        color: #0A84FF !important;
    }
}

/* Text Colors for Dark Background */
.text-dark {
    color: #C7D2FE !important;
}

.text-white {
    color: #FFFFFF !important;
}

.text-muted {
    color: rgba(199, 210, 254, 0.6) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #FFFFFF !important;
}

h1.text-dark,
h2.text-dark,
h3.text-dark,
h4.text-dark,
h5.text-dark,
h6.text-dark {
    color: #C7D2FE !important;
}

p {
    color: #C7D2FE;
}

/* Override default Bootstrap colors for dark theme */
.card {
    background-color: rgba(30, 27, 75, 0.55) !important;
    border: 1px solid rgba(148, 163, 255, 0.2) !important;
    color: #C7D2FE !important;
    backdrop-filter: blur(14px);
}

.card-title,
.card-header {
    color: #FFFFFF !important;
}

.card-body {
    color: #C7D2FE !important;
}

/* Form Controls */
.form-control {
    background-color: rgba(30, 27, 75, 0.5) !important;
    border: 1px solid rgba(148, 163, 255, 0.3) !important;
    color: #C7D2FE !important;
}

.form-control:focus {
    background-color: rgba(30, 27, 75, 0.7) !important;
    border-color: #0A84FF !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 0 0.2rem rgba(10, 132, 255, 0.25) !important;
}

.form-control::placeholder {
    color: rgba(199, 210, 254, 0.5) !important;
}

.form-label {
    color: #C7D2FE !important;
}

/* Breadcrumb */
.breadcrumb {
    background-color: rgba(30, 27, 75, 0.3) !important;
}

.breadcrumb-item a {
    color: #0A84FF !important;
}

.breadcrumb-item.active {
    color: #C7D2FE !important;
}

/* Section Titles */
.title-accent {
    color: #93C5FD !important;
}


/* Header alignment and offcanvas fixes */
@media (min-width: 992px) {

    /* Keep header row left-aligned and push right group flush to the far right */
    #header-nav .header-row {
        justify-content: flex-start !important;
    }

    #header-nav .header-row>.d-none.d-lg-flex.ms-auto {
        margin-left: auto !important;
        justify-content: flex-end !important;
        text-align: right;
    }

    /* LTR - English: Keep links on the right */
    [dir="ltr"] #header-nav .header-row>.d-none.d-lg-flex.ms-auto {
        margin-left: auto !important;
    }

    /* RTL - Arabic: Move links to the left */
    [dir="rtl"] #header-nav .header-row>.d-none.d-lg-flex.ms-auto {
        margin-left: 0 !important;
        margin-right: auto !important;
    }

    #header-nav .navbar-nav {
        margin-left: auto !important;
        justify-content: flex-end !important;
    }

    /* LTR - English: Links on the right */
    [dir="ltr"] #header-nav .navbar-nav {
        margin-left: auto !important;
        justify-content: flex-end !important;
    }

    #header-nav .navbar-nav .nav-link {
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    /* RTL fixes for Arabic - move to left edge */
    [dir="rtl"] #header-nav .navbar-nav {
        margin-left: 0 !important;
        margin-right: auto !important;
        justify-content: flex-start !important;
        gap: 0.3rem !important;
    }

    [dir="rtl"] #header-nav .navbar-nav .nav-link {
        padding-left: 0.55rem !important;
        padding-right: 0.55rem !important;
    }

    [dir="rtl"] #header-nav .header-end {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
    }
}

/* Ensure offcanvas uses viewport and isn't constrained by parent layout */
.offcanvas {
    position: fixed !important;
}

/* Mobile header layout: logo on left, toggler on right */
@media (max-width: 991.98px) {
    .site-header .header-row {
        position: relative;
    }

    .site-header .navbar-brand {
        margin-left: 0;
        margin-right: 0;
    }

    #header-nav .navbar-brand {
        position: relative;
        left: 0;
        transform: none;
    }

    .site-header .navbar-toggler {
        margin-left: 0;
    }
}

/* Force offcanvas above everything even if other CSS overrides z-index */
header.site-header .offcanvas {
    position: fixed !important;
    z-index: 2000 !important;
}

header.site-header .offcanvas-backdrop {
    position: fixed !important;
    z-index: 1999 !important;
}

/* Ensure offcanvas-end opens from right side */
#header-nav .offcanvas-end {
    right: 0 !important;
    left: auto !important;
    transform: translateX(100%) !important;
}

#header-nav .offcanvas-end.show {
    transform: translateX(0) !important;
}

/* Improve mobile logo sizing to avoid overflow */
@media (max-width: 991.98px) {
    .site-header .navbar-brand .logo {
        max-height: 30px;
        height: auto;
        width: auto;
    }
}


/* Header structural layout fixes */
#header-nav .header-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    position: relative;
}

#header-nav .header-start {
    flex: 0 0 auto;
}

#header-nav .navbar-brand {
    flex: 0 0 auto;
    position: relative;
    left: 0;
    transform: none;
}

#header-nav .header-end {
    flex: 0 0 auto;
    margin-left: auto;
}

#header-nav .header-mobile-toggle {
    flex: 0 0 auto;
    margin-left: auto;
}

/* Mobile: hide desktop navigation group, show mobile toggler */
@media (max-width: 991.98px) {
    #header-nav .header-end {
        display: none !important;
    }

    #header-nav .header-mobile-toggle {
        display: flex !important;
    }

    #header-nav .navbar-brand {
        position: relative;
        left: 0;
        transform: none;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Desktop: hide mobile toggler, show desktop navigation */
@media (min-width: 992px) {
    #header-nav .header-mobile-toggle {
        display: none !important;
    }

    #header-nav .header-end {
        display: flex !important;
    }
}

/* Ensure offcanvas overlay sits above header */
#header-nav .offcanvas {
    position: fixed !important;
    z-index: 2000 !important;
}

#header-nav .offcanvas-backdrop {
    position: fixed !important;
    z-index: 1999 !important;
}

/* Hard override Bootstrap offcanvas/backdrop to avoid hidden/transparent states from bootstrap.min.css */
#bdNavbar.offcanvas {
    display: block !important;
    /* keep in DOM so JS can toggle */
    transform: translateX(100%) !important;
    /* start off-screen to the right */
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    background-color: #1E1B4B !important;
    z-index: 2000 !important;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 320px !important;
    max-width: 85vw !important;
    transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out, opacity 0.3s ease-in-out !important;
}

#bdNavbar.offcanvas.show {
    transform: translateX(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: block !important;
}

/* Ensure navbar toggler button is clickable */
.header-mobile-toggle .navbar-toggler {
    z-index: 2001 !important;
    position: relative !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure offcanvas body and content are clickable */
/* Ensure offcanvas body and content are clickable */
#bdNavbar.offcanvas.show .offcanvas-body,
#bdNavbar.offcanvas.show .offcanvas-header,
#bdNavbar.offcanvas.show .offcanvas-body *,
#bdNavbar.offcanvas.show .offcanvas-header * {
    pointer-events: auto !important;
    background-color: #282867;
}

/* Backdrop - show and block clicks on page, but won't close offcanvas (data-bs-backdrop="static") */
.offcanvas-backdrop {
    pointer-events: none !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out !important;
}

.offcanvas-backdrop.show {
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

@media (min-width: 992px) {

    body,
    body.bg-light-body {
        /* padding-top: 80px; */
    }
}

/* ============================================
   RTL Support for Arabic Language
   ============================================ */

[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] body {
    direction: rtl;
}

/* Header RTL */
[dir="rtl"] .site-header {
    direction: rtl;
}

[dir="rtl"] .header-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .navbar-brand {
    margin-left: auto;
    margin-right: 0;
    order: 2;
}

[dir="rtl"] .header-end {
    margin-left: 0;
    margin-right: auto;
    order: 1;
    flex-direction: row;
}

[dir="rtl"] .navbar-nav {
    flex-direction: row !important;
    gap: 0.3rem !important;
    margin-right: 0 !important;
    margin-left: auto !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

[dir="rtl"] .navbar-nav .nav-item {
    margin: 0 !important;
}

[dir="rtl"] .navbar-nav .nav-item a.nav-link {
    padding: 0.35rem 0.55rem !important;
    text-align: right;
}

/* Fix RTL in media queries - ensure links are at left edge for Arabic */
@media (min-width: 992px) {
    [dir="rtl"] #header-nav .navbar-nav.d-flex {
        gap: 0.15rem !important;
        margin-left: 0 !important;
        margin-right: auto !important;
        justify-content: flex-start !important;
    }

    [dir="rtl"] #header-nav .navbar-nav {
        margin-left: 0 !important;
        margin-right: auto !important;
        justify-content: flex-start !important;
        gap: 0.3rem !important;
    }

    [dir="rtl"] #header-nav .navbar-nav .nav-link {
        padding-left: 0.55rem !important;
        padding-right: 0.55rem !important;
    }
}

/* LTR - English: Move links more to the left */
[dir="ltr"] .navbar-nav {
    gap: 0.3rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
}

[dir="ltr"] .header-end {
    justify-content: flex-end !important;
    gap: 1.9rem !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Ensure English header-end is on the right */
[dir="ltr"] #header-nav .header-end {
    margin-left: auto !important;
    margin-right: 0 !important;
}

[dir="rtl"] .header-end {
    justify-content: flex-start !important;
    gap: 0.3rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
}

/* Default header-end gap */
.header-end {
    gap: 0.3rem !important;
}

/* Language Switcher RTL */
[dir="rtl"] .language-switcher {
    margin-left: 0.5rem;
    margin-right: 0;
    order: 0;
}

[dir="rtl"] .header-mobile-toggle {
    margin-left: auto;
    margin-right: 0;
    order: 0;
}

/* Navbar link underline RTL */
[dir="rtl"] .navbar-nav .nav-item a.nav-link::after {
    left: auto;
    right: 50%;
    transform: translateX(50%) scaleX(0);
}

[dir="rtl"] .navbar-nav .nav-item a.nav-link:hover::after,
[dir="rtl"] .navbar-nav .nav-item a.nav-link.active::after {
    transform: translateX(50%) scaleX(1);
}

/* Mobile Menu RTL */
[dir="rtl"] #bdNavbar.offcanvas {
    right: auto !important;
    left: 0 !important;
    transform: translateX(-100%) !important;
}

[dir="rtl"] #bdNavbar.offcanvas.show {
    transform: translateX(0) !important;
}

[dir="rtl"] .offcanvas-end {
    left: 0;
    right: auto;
}

/* Text Alignment RTL */
[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .text-right {
    text-align: left !important;
}

[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Flexbox RTL */
[dir="rtl"] .d-flex {
    direction: rtl;
}

[dir="rtl"] .justify-content-start {
    justify-content: flex-end !important;
}

[dir="rtl"] .justify-content-end {
    justify-content: flex-start !important;
}

/* Margin and Padding RTL */
[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

[dir="rtl"] .me-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

[dir="rtl"] .ms-1,
[dir="rtl"] .ms-2,
[dir="rtl"] .ms-3,
[dir="rtl"] .ms-4,
[dir="rtl"] .ms-5 {
    margin-left: 0 !important;
    margin-right: var(--bs-spacer) !important;
}

[dir="rtl"] .me-1,
[dir="rtl"] .me-2,
[dir="rtl"] .me-3,
[dir="rtl"] .me-4,
[dir="rtl"] .me-5 {
    margin-right: 0 !important;
    margin-left: var(--bs-spacer) !important;
}

[dir="rtl"] .ps-1,
[dir="rtl"] .ps-2,
[dir="rtl"] .ps-3,
[dir="rtl"] .ps-4,
[dir="rtl"] .ps-5 {
    padding-left: 0 !important;
    padding-right: var(--bs-spacer) !important;
}

[dir="rtl"] .pe-1,
[dir="rtl"] .pe-2,
[dir="rtl"] .pe-3,
[dir="rtl"] .pe-4,
[dir="rtl"] .pe-5 {
    padding-right: 0 !important;
    padding-left: var(--bs-spacer) !important;
}

/* Container and Grid RTL */
[dir="rtl"] .container,
[dir="rtl"] .container-fluid {
    direction: rtl;
}

/* Buttons RTL */
[dir="rtl"] .btn {
    text-align: center;
}

/* Forms RTL */
[dir="rtl"] .form-control,
[dir="rtl"] .form-select {
    text-align: right;
}

[dir="rtl"] .form-label {
    text-align: right;
}

/* Cards RTL */
[dir="rtl"] .card {
    direction: rtl;
    text-align: right;
}

/* Breadcrumb RTL */
[dir="rtl"] .breadcrumb {
    flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumb-item+.breadcrumb-item::before {
    content: var(--bs-breadcrumb-divider, "/");
    float: right;
    padding-left: var(--bs-breadcrumb-item-padding-x);
    padding-right: 0;
}

/* Carousel RTL */
[dir="rtl"] .carousel-control-prev {
    left: auto;
    right: 0;
}

[dir="rtl"] .carousel-control-next {
    right: auto;
    left: 0;
}

/* Float RTL */
[dir="rtl"] .float-start {
    float: right !important;
}

[dir="rtl"] .float-end {
    float: left !important;
}

/* Page Hero Section - Separate from Header */
.page-hero {
    position: relative;
    padding-top: 180px;
    /* Space for fixed header + visual spacing */
    padding-bottom: 80px;
    background: linear-gradient(135deg, #1E1B4B 0%, #4F46E5 50%, #0A84FF 100%);
    margin-bottom: 0;
    text-align: center;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
}

.page-hero h1 {
    color: #fff;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-hero {
        padding-top: 140px;
        padding-bottom: 60px;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    .page-hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* Project Card Styles */
.project-card {
    background: linear-gradient(145deg, rgba(18, 16, 52, 0.78), rgba(18, 22, 72, 0.82));
    border: 1px solid rgba(156, 127, 249, 0.25);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(80, 89, 199, 0.3);
    border-color: rgba(156, 127, 249, 0.5);
}

.project-card .image-holder {
    height: 240px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card .image-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .image-holder img {
    transform: scale(1.1);
}

.project-card .card-detail {
    padding: 1.5rem;
}

.project-card .card-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.project-card p {
    color: #C7D2FE;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
}

.project-card .project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.project-card .badge {
    background: rgba(79, 70, 229, 0.2) !important;
    color: #818cf8 !important;
    border: 1px solid rgba(79, 70, 229, 0.3);
    padding: 0.5em 1em;
    font-weight: 500;
}

.project-card .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.85rem;
}