:root {
    --primary-color: #0056b3;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

body {
    font-family: 'Poppins', 'Tajawal', sans-serif;
    color: #333;
    line-height: 1.6;
}

.rtl {
    direction: rtl;
    text-align: right;
}

/* Header Styles */
header.sticky-top {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

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

.navbar-brand img:hover {
    opacity: 0.9;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    color: var(--dark-color);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.language-switcher select {
    width: auto;
    cursor: pointer;
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: white;
}

footer a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #004494;
    color: white;
}

/* Common Section Styles */
.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-weight: 700;
    position: relative;
    padding-bottom: 15px; /* Increased padding to accommodate the underline */
    margin-bottom: 1px;
    display: inline-block; /* Makes the element only as wide as its content */
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 10px; /* Positioned below the text */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.rtl .section-title:after {
    left: auto;
    right: 0;
}

.section-subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-top: 2px; /* Added space between title and subtitle */
}

/* Button Styles */
.btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #004494;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Page Header */
.page-header {
    padding: 100px 0;
    background-size: cover;
    background-position: center;
    position: relative;
    color: white;
    text-align: center;
}

.page-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    margin-bottom: 20px;
}

.breadcrumb {
    justify-content: center;
    background-color: transparent;
    padding: 0;
}

/* All breadcrumb items - pure white */
.breadcrumb-item,
.breadcrumb-item a {
    color: white !important; /* Force white color */
    text-decoration: none; /* Remove underline */
}

/* Active item - bold white */
.breadcrumb-item.active {
    font-weight: bold !important; /* Force bold */
}

/* Separator (>) - pure white */
.breadcrumb-item + .breadcrumb-item::before {
    color: white !important; /* Force white */
    font-weight: normal; /* Separator not bold */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-header {
        padding: 70px 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Language Switcher Dropdown Fix */
.language-switcher {
    position: relative;
    min-width: 100px;
}

.language-switcher select {
    padding-right: 1.5rem;
    padding-left: 0.5rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 16px 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.rtl .language-switcher select {
    padding-right: 0.5rem;
    padding-left: 1.5rem;
    background-position: left 0.5rem center;
}

/* Active Nav Link Styling */
.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
}

.nav-link.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Navbar Toggler Icon Adjustment */
.navbar-toggler {
    padding: 0.25rem 0.5rem;
    border: none;
}

/* Mobile Menu Adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    
    .language-switcher {
        margin-top: 1rem;
        margin-left: 0 !important;
        width: 100%;
    }
    
    .language-switcher select {
        width: 100%;
    }
    
    .nav-link {
        padding: 0.5rem 0;
    }
    
    .nav-link.active:after {
        display: none;
    }
}

/* Language Switcher Loading State */
.language-switcher.loading select {
    background-image: none;
    position: relative;
    padding-right: 2rem;
}

.language-switcher.loading:after {
    content: '';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.rtl .language-switcher.loading:after {
    right: auto;
    left: 0.75rem;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}