:root {
    /* Color Palette */
    --primary-color: #0054b4;
    /* Royal Blue */
    --accent-color: #FFD700;
    /* Golden Yellow */
    --text-dark: #333333;
    --text-light: #555555;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;

    /* Fonts */
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;
    --font-en: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Typography Overrides based on Language */
html[lang="en"] body {
    font-family: var(--font-en);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
}

/* RTL Support Global */
[dir="rtl"] {
    text-align: right;
}

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

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

[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .dropdown-item {
    text-align: right;
}

[dir="rtl"] .dropdown-item i {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .navbar-nav .nav-item.dropdown .dropdown-menu {
    right: 0;
    left: auto;
}

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

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

[dir="rtl"] .ms-1 {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ps-lg-5 {
    padding-right: 3rem !important;
    padding-left: 0 !important;
}

[dir="rtl"] .dropdown-toggle::after {
    margin-right: 0.5rem;
    margin-left: 0;
}

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

/* Accreditation Link Styling */
.nav-link .text-warning {
    color: var(--accent-color) !important;
}

.dropdown-menu .dropdown-item img {
    width: 16px;
    height: 11px;
    object-fit: cover;
    margin-right: 0.5rem;
}

[dir="rtl"] .dropdown-menu .dropdown-item img {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Responsive adjustments for dropdown menus */
@media (max-width: 991.98px) {
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: rgba(255, 255, 255, 0.98);
        border: none;
        box-shadow: none;
    }
    
    .navbar-nav .dropdown-menu {
        padding-left: 1.5rem;
    }
    
    [dir="rtl"] .navbar-nav .dropdown-menu {
        padding-left: 0;
        padding-right: 1.5rem;
    }
}

/* Navbar Styling */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary-color) !important;
    font-size: 1.6rem;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: rotate(5deg) scale(1.1);
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 600;
    padding: 0.6rem 1rem !important;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
    position: relative;
    border-radius: 8px;
    margin: 0 0.2rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(0, 84, 180, 0.08);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

/* Dropdown Menu Styling */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 220px;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 0;
    position: relative;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 84, 180, 0.1));
    transition: width 0.3s ease;
}

[dir="rtl"] .dropdown-item::before {
    right: auto;
    left: 0;
    background: linear-gradient(270deg, transparent, rgba(0, 84, 180, 0.1));
}

.dropdown-item:hover::before {
    width: 100%;
}

.dropdown-item:hover {
    background-color: rgba(0, 84, 180, 0.08);
    color: var(--primary-color);
    padding-right: 2rem;
}

[dir="rtl"] .dropdown-item:hover {
    padding-right: 1.5rem;
    padding-left: 2rem;
}

.dropdown-item.active {
    background-color: rgba(0, 84, 180, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.dropdown-toggle::after {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

[dir="rtl"] .dropdown-toggle::after {
    margin-right: 0;
    margin-left: 0.5rem;
}

.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.navbar-nav .nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

/* Language Toggle */
.lang-switcher {
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    border-radius: 20px;
    padding: 5px 15px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    text-decoration: none;
}

.lang-switcher:hover {
    background-color: var(--primary-color);
    color: #fff !important;
}

.nav-link.lang-switcher {
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    margin: 0 0.2rem;
}

.nav-link.lang-switcher:hover {
    background-color: var(--primary-color);
    color: #fff !important;
}

.nav-link.lang-switcher::after {
    display: none;
}

.dropdown-menu .dropdown-item img {
    width: 16px;
    height: 11px;
    object-fit: cover;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 650px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 84, 180, 0.85), rgba(0, 84, 180, 0.7)),
                url('../images/library.jpeg') no-repeat center center/cover;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 84, 180, 0.85), rgba(0, 84, 180, 0.65));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 900px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease 0.4s both;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease both;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* Buttons */
.btn-gold {
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 50px;
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-gold:hover {
    background-color: transparent;
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-outline-white {
    color: #fff;
    border: 2px solid #fff;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-white:hover {
    background-color: #fff;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Cards */
.custom-card {
    background: #fff;
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.custom-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.card-img-wrapper {
    overflow: hidden;
    height: 250px;
}

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

.custom-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.card-body {
    padding: 2rem;
}

.card-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-padding {
    padding: 100px 0;
    position: relative;
}

/* Modern Section Styling */
.modern-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.modern-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 84, 180, 0.03) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(5%) translateY(-5%);
    }
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color), #003d87);
    color: #fff;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

.stats-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 5s ease-in-out infinite reverse;
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 2rem;
    border-radius: 15px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent-color);
    display: inline-block;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-item p {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.95;
    letter-spacing: 0.5px;
}

/* Donation Modal */
.donation-option {
    border: 2px solid #eee;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.donation-option:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 84, 180, 0.05);
}

.donation-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: #0b1a2b;
    /* Darker Blue */
    color: #a0a0a0;
    padding-top: 80px;
}

.footer-widget h5 {
    color: #fff;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 15px;
}

.footer-widget h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

[dir="rtl"] .footer-widget h5::after {
    left: auto;
    right: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-section {
        height: auto;
        padding: 100px 0;
        text-align: center;
    }

    [dir="rtl"] .hero-section {
        text-align: center;
    }

    .btn-groups {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
}

/* Testimonial Section */
.testimonial-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin: 1rem;
    text-align: center;
    position: relative;
    border: 1px solid #f0f0f0;
}

.testimonial-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid var(--accent-color);
}

.quote-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Video Section */
.video-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-wrapper:hover .video-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.play-btn {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2rem;
    padding-left: 5px;
    /* Visual center adjustment for play icon */
    transition: transform 0.3s ease;
    animation: pulse 2s infinite;
}

[dir="rtl"] .play-btn {
    padding-left: 0;
    padding-right: 5px;
}

.video-wrapper:hover .play-btn {
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* FAQ Accordion */
.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.accordion-button {
    font-weight: 700;
    color: var(--primary-color);
    background-color: #fff;
    padding: 1.25rem;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: rgba(0, 84, 180, 0.05);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Enhancements */
.navbar-toggler {
    border: 2px solid var(--primary-color);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 84, 180, 0.25);
}

.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(0, 84, 180, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, #f0f0f0 0%, #e0e0e0 20%, #f0f0f0 40%, #f0f0f0 100%);
    background-size: 1000px 100%;
}

/* Modern Card Hover Effects */
.feature-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 84, 180, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 84, 180, 0.05), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 84, 180, 0.15);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), #003d87);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(0, 84, 180, 0.3);
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: rotate(5deg) scale(1.1);
}



