/* --- CSS Variables (Theme Definition) --- */
:root {
    --color-primary: #daa520;
    --color-secondary: #17a2b8;
    /* --color-primary: #06cdf8;
    --color-secondary: #daa520; */
    --color-dark: #1e272e;
    --color-dark-text: #343a40; /* Main text color */
    --color-light-text: #e0e0e0; /* Light text on dark background */
    --color-muted-text: #777; /* Muted text color for footer */
    --color-border: #555; /* Border color for social icons */
    --background-light: #f8f9fa;
    --background-footer: #f4f4f4;
    --font-family-base: "Tajawal", sans-serif;
    --header-height: 80px; /* Control header height */
    --menu-transition-speed: 0.4s;
}

/* --- Google Translate Widget Customization --- */
/* Hide the default top frame from Google */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}
body {
    top: 0px !important;
}
body.rtl {
    direction: rtl;
    text-align: right;
}

body.ltr {
    direction: ltr;
    text-align: left;
}

/* Style the dropdown itself */
.goog-te-combo {
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: transparent;
    color: #fff;
    font-family: "Cairo", sans-serif;
    font-weight: 600;
    cursor: pointer;
}

/* Style the options within the dropdown */
.goog-te-combo option {
    background-color: #333;
    color: #fff;
}

/* Hide the "Powered by" text if desired (check Google's policy) */
.goog-logo-link,
.goog-te-gadget span {
    display: none !important;
}
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-ORHb-OEVmcd-ibL1re {
    display: none !important;
}
/* --- Custom Language Switcher - FINAL STYLES --- */
.language-switcher-button {
    background: none;
    border: none;
    color: var(--color-primary);
    padding: 8px 15px;
    font-family: "Cairo", sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    margin: 0 2px;
    font-size: 1.2rem;
}
.top-bar .language-switcher-button {
    /* To match the top-bar style */
    color: var(--color-primary);
    border-color: var(--color-primary);
    border-radius: 30px;
}

#google_translate_element {
    /* Hide it visually but keep it in the DOM for initialization */
    position: absolute;
    top: -1000px;
    left: -1000px;
    z-index: -1;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}
/* Custom Dropdown Menu Styling */
.language-dropdown-menu {
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.language-dropdown-menu .dropdown-item {
    font-weight: 600;
    transition: all 0.2s ease;
}
.language-dropdown-menu .dropdown-item:active,
.language-dropdown-menu .dropdown-item:hover,
.language-dropdown-menu .dropdown-item.active {
    background-color: var(--color-primary) !important;
    color: #fff !important;
}
/* --- Global Styles --- */
body {
    font-family: var(--font-family-base);
    background-color: var(--background-light);
    /* color: var(--color-dark-text); */
}
.body-no-scroll {
    overflow: hidden;
}
a {
    text-decoration: none;
}
.row {
    margin: 0;
    padding: 0;
}
.page-header {
    background-position: left !important;
}
/* Auth Buttons */
.auth-links .btn {
    border-radius: 50px;
    font-weight: bold;
    padding: 0.5rem 1.25rem;
}
.auth-links .btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}
.auth-links .btn-primary:hover {
    background-color: var(--color-primary-darker);
    border-color: var(--color-primary-darker);
}

/* User Dropdown */
.auth-links .dropdown-toggle::after {
    display: none;
}
.auth-links .dropdown-menu {
    border-radius: 12px;
}

@media (max-width: 991.98px) {
    .auth-links {
        padding: 1rem 0;
        justify-content: center;
        border-top: 1px solid #eee;
        margin-top: 1rem;
    }
}
/* --- Header Authentication Links - REFINED STYLES --- */

.auth-links {
    margin-right: -1rem; /* Adjust position to be perfectly aligned on the right */
}

/* For Logged-in User (Dropdown Button) */
.auth-links .dropdown .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border-radius: 50px; /* Fully rounded capsule shape */
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;

    background-color: var(--color-primary, #daa520);
    color: #fff;

    border: 2px solid var(--color-primary, #daa520);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(218, 165, 32, 0.2);
}
.auth-links .dropdown .dropdown-toggle:hover {
    background-color: var(--color-primary-darker, #c59119);
    border-color: var(--color-primary-darker, #c59119);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.3);
}

/* Customizing the dropdown icon for logged-in user */
.auth-links .dropdown .dropdown-toggle i {
    font-size: 1.2rem;
}

/* User Dropdown Menu */
.auth-links .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    border: none;
    margin-top: 0.5rem !important; /* Add space below the button */
    padding: 0.5rem 0;
}
.auth-links .dropdown-item {
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.auth-links .dropdown-item:hover,
.auth-links .dropdown-item:focus {
    background-color: rgba(218, 165, 32, 0.1);
    color: var(--color-primary);
}

/* For Guest Users (Login/Register Buttons) */
.auth-links .btn {
    border-radius: 50px;
    font-weight: bold;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.auth-links .btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}
.auth-links .btn-primary:hover {
    background-color: var(--color-primary-darker);
    border-color: var(--color-primary-darker);
}
.auth-links .btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.auth-links .btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: #fff;
}
/* Styling for logged-in user in mobile side menu */
.mobile-menu-panel .user-info {
    padding: 15px 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.mobile-menu-panel .user-info i {
    font-size: 1.5rem;
}
.mobile-menu-panel .text-danger {
    color: #dc3545 !important;
}
/* --- Header --- */
/* Top Bar Styles */
.top-bar {
    background-color: var(--color-dark);
    color: var(--color-light-text);
    font-size: 0.9rem;
    padding: 8px 0;
}

.top-bar .social-links a {
    color: var(--color-light-text);
    margin: 0 5px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.top-bar .social-links a:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: scale(1.1);
}

.top-bar .social-links span {
    margin-left: 15px;
    font-weight: bold;
}

.date-time {
    direction: ltr;
}

/* --- New Simplified Header --- */
.main-header .navbar {
    height: var(--header-height);
    background-color: var(--background-header);
    border-bottom: 1px solid #eaeaea;
}

.logo-img {
    max-height: 55px; /* Adjust size as needed */
    width: auto;
}

/* Desktop Menu links */
.main-header .nav-link {
    font-weight: 700;
    color: var(--color-dark-text);
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.main-header .nav-link:hover,
.main-header .nav-link:focus {
    color: var(--color-primary);
}

.main-header .nav-link.active {
    color: var(--color-primary);
}

/* Mobile Toggler Icon */
.navbar-toggler {
    border: none;
    font-size: 1.5rem;
    color: var(--color-dark-text);
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* --- Custom Mobile Menu Panel --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden; /* Use visibility instead of display for transitions */
    transition:
        opacity var(--menu-transition-speed) ease,
        visibility var(--menu-transition-speed) ease;
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 320px;
    max-width: 90%;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    transition: right var(--menu-transition-speed)
        cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 20px 0 0 20px; /* Rounded corners on the left */
    display: flex;
    flex-direction: column;
}

.mobile-menu-panel.show {
    right: 0; /* Slide in */
}

.mobile-menu-panel .close-btn {
    position: absolute;
    top: 15px;
    left: 20px; /* Switched to left for close button */
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--color-muted-text);
    cursor: pointer;
}

.mobile-menu-panel .menu-content {
    padding: 60px 25px 25px 25px;
    overflow-y: auto;
}

.mobile-menu-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-panel ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10px;
    text-decoration: none;
    color: var(--color-dark-text);
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.mobile-menu-panel ul li a:hover {
    background-color: #f7f7f7;
}

.mobile-menu-panel ul li a.active-mobile-link {
    color: var(--color-primary);
}

.mobile-menu-panel .separator {
    height: 1px;
    background-color: #ddd;
    margin: 20px 0;
}
/* --- Footer --- */
.site-footer {
    background-color: var(--background-footer);
    padding: 50px 0 20px 0;
    color: var(--color-muted-text);
}

.site-footer h5 {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.site-footer .footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.site-footer ul {
    padding-right: 0;
}

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

.site-footer ul li a {
    color: var(--color-dark-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer ul li a:hover {
    color: var(--color-primary);
}

.footer-socials a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.07);
    color: var(--color-dark-text);
    margin: 0 4px;
    transition: all 0.3s ease;
}

.footer-socials a:hover {
    background-color: var(--color-primary);
    color: white;
}

.site-footer hr {
    margin-top: 30px;
    margin-bottom: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.copyright {
    color: var(--color-muted-text);
    font-size: 0.9rem;
}
/* --- Styling for Footer Icons --- */
.footer-links-with-icons li a i {
    margin-left: 8px; /* Adds space between icon and text */
    min-width: 20px; /* Ensures text alignment even with different icon widths */
    color: var(--color-primary); /* Give icons the primary color to stand out */
}

/* On hover, make the link text primary as well */
.footer-links-with-icons li a:hover {
    color: var(--color-primary);
}
.highlight {
    color: var(--color-primary);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}
.section-header .title-line {
    width: 6px;
    height: 60px;
    background-color: var(--color-primary);
    border-radius: 3px;
}
.section-header .title-container {
    text-align: right;
}
.section-header h2 {
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin: 0 0 10px;
}
.section-header p {
    color: var(--color-dark-text);
    margin: 0;
}

/* --- Custom Pagination Styles --- */
.pagination-wrapper .pagination {
    justify-content: center;
}
.pagination-wrapper .page-item .page-link {
    color: var(--color-dark-text);
    border-radius: 50%;
    margin: 0 5px;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}
.pagination-wrapper .page-item.active .page-link {
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(218, 165, 32, 0.4);
}
.pagination-wrapper .page-item:not(.active) .page-link:hover {
    background-color: #e9ecef;
}
.pagination-wrapper .page-item.disabled .page-link {
    color: #ccc;
}
.pagination-wrapper .page-item:first-child .page-link,
.pagination-wrapper .page-item:last-child .page-link {
    border-radius: 50px; /* Capsule shape for prev/next */
    width: auto;
    padding: 0 1rem;
}
/* --- Accessibility Tools Widget Styles --- */
.accessibility-toolbar {
    position: fixed;
    right: 10px; /* For RTL */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;
}
.accessibility-toolbar .toggle-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(
        --color-secondary,
        #0d47a1
    ); /* Blue for accessibility */
    color: #fff;
    border: none;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}
.accessibility-toolbar .tools-menu {
    display: none; /* Hidden by default */
    position: absolute;
    right: 60px; /* To the left of the button */
    top: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 10px;
    width: 220px;
    flex-direction: column;
    gap: 8px;
}
.accessibility-toolbar.active .tools-menu {
    display: flex; /* Show when active */
}

.accessibility-toolbar .tool-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f3f6;
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    width: 100%;
    text-align: right; /* RTL */
    cursor: pointer;
    transition:
        background-color 0.2s,
        color 0.2s;
}
.accessibility-toolbar .tool-btn:hover {
    background-color: var(--color-primary);
    color: #fff;
}
.accessibility-toolbar .tool-btn i {
    width: 20px;
}

/* Classes to be toggled by JS */
#page-wrapper.high-contrast {
    filter: contrast(175%);
}
#page-wrapper.grayscale {
    filter: grayscale(100%);
}

/* Optional: Ensure the wrapper takes up the full page height */
#page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.main-content {
    flex-grow: 1; /* Makes the main content area expand to fill space */
}
/* --- Voice Assistant Styles --- */
#voice-assistant {
    position: fixed;
    bottom: 20px;
    left: 20px; /* Opposite of accessibility toolbar */
    z-index: 1060;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
#voice-assistant-btn {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.listening-indicator {
    display: flex;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    transition: opacity 0.3s;
}
.listening-indicator .dot {
    width: 10px;
    height: 10px;
    background-color: #fff;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}
.listening-indicator .dot:nth-child(1) {
    animation-delay: -0.32s;
}
.listening-indicator .dot:nth-child(2) {
    animation-delay: -0.16s;
}
@keyframes bounce {
    0%,
    80%,
    100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
/* --- Hero Carousel Caption Enhancements --- */
#heroCarousel .carousel-caption {
    right: 5%;
    left: 5%;
    bottom: 5%; /* Adjusted for more space */
    padding: 1.5rem;
    background: linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0) 100%
    );
    border-radius: 0 0 var(--border-radius-large) var(--border-radius-large);
}
/* Nested dropdown for Bootstrap 5 */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    right: 100%; /* RTL */
    margin-top: -0.25rem;
}
/* --- Custom & Creative Dropdown Menu Styles --- */

/* Main Dropdown Container */
.main-nav .dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    margin-top: 10px !important; /* Add space below the main nav link */
    min-width: 220px; /* Wider dropdown */
}

/* Dropdown Items */
.main-nav .dropdown-item {
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: var(--color-dark-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.main-nav .dropdown-item:hover,
.main-nav .dropdown-item:focus {
    background-color: rgba(218, 165, 32, 0.1); /* Light gold background */
    color: var(--color-primary);
}
.main-nav .dropdown-item:active {
    background-color: var(--color-primary);
    color: #fff;
}
.language-switcher .dropdown-menu-end[data-bs-popper] {
    right: -86px !important;
}
/* ==============================================
   === Dashboard Enhancement Styles           ===
   ============================================== */

/* --- 1. Custom Scrollbar (Webkit browsers like Chrome, Edge, Safari) --- */
/* This will apply to any element with vertical scroll in your entire site */
::-webkit-scrollbar {
    width: 8px; /* Width of the scrollbar */
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f3f6; /* Light grey background of the track */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(
        --color-primary
    ); /* Gold color for the scroll thumb */
    border-radius: 10px;
    border: 2px solid #f1f3f6; /* Creates a nice padding effect */
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(
        --color-primary-darker,
        #c59119
    ); /* Darker gold on hover */
}

/* --- 2. Enhanced & Collapsible Activity List --- */
/* The accordion itself */
.activity-accordion-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px !important; /* Force border radius */
    margin-bottom: 1rem;
    overflow: hidden; /* Important for border radius */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* Accordion Button (The visible part) */
.accordion-button {
    padding: 1rem 1.5rem;
    background-color: #fff;
    box-shadow: none;
    width: 100%;
    color: var(--color-dark-text);
}
.accordion-button:not(.collapsed) {
    background-color: rgba(218, 165, 32, 0.05); /* Light gold bg when open */
    color: var(--color-primary);
}
.accordion-button::after {
    margin-right: auto; /* Push the arrow to the left (for RTL) */
    margin-left: 0;
}

/* Summary row inside the button */
.activity-summary {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 1rem;
}
.activity-title {
    font-weight: 700;
    font-size: 1.1rem;
}
.activity-date {
    /* Already styled, fine as is */
}
.status-badge {
    /* Already styled, fine as is */
}

/* Accordion Body (The hidden part) */
.accordion-body {
    padding: 1.5rem 2rem;
    border-top: 1px solid #eee;
}
.accordion-body h5 {
    font-weight: bold;
    color: var(--color-dark-text);
}
.admin-reply {
    background-color: #f8f9fa;
    border-right: 4px solid var(--color-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
}
/* Reusing .rich-text-content styles for the admin reply */
.admin-reply p:last-child {
    margin-bottom: 0;
}
/* زر البحث في الهيدر */
.header-search-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #daa520;
    cursor: pointer;
    transition: 0.3s;
}

.header-search-btn:hover {
    color: var(--brand-gold, #e1b12c);
    transform: scale(1.1);
}

/* واجهة البحث (The Overlay) */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 39, 46, 0.2); /* لون كحلي غامق شفاف */
    backdrop-filter: blur(15px); /* تأثير الزجاج */
    z-index: 9999;
    display: none; /* مخفي افتراضياً */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.search-overlay.active {
    display: flex;
    opacity: 1;
}

/* زر الإغلاق */
.close-search {
    position: absolute;
    top: 30px;
    left: 40px;
    font-size: 4rem;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* محتوى المودال */
.search-container {
    width: 90%;
    max-width: 800px;
    text-align: center;
    color: #fff;
    animation: fadeInUp 0.5s ease backwards;
}

.search-header-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--brand-gold, #e1b12c);
}

/* الفورم المتميز */
.input-group-premium {
    display: flex;
    background: #fff;
    padding: 8px;
    border-radius: 100px;
    margin-top: 40px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

.input-group-premium input {
    flex-grow: 1;
    border: none;
    padding: 15px 30px;
    font-size: 1.3rem;
    border-radius: 100px 0 0 100px;
    outline: none;
    margin: 0 15px;
}

.modal-submit-btn {
    background: var(--brand-gold, #e1b12c);
    border: none;
    padding: 0 40px;
    border-radius: 50px;
    color: #1e272e;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.modal-submit-btn:hover {
    background: #fff;
    color: #e1b12c;
    box-shadow: inset 0 0 0 2px #e1b12c;
}

/* الكلمات الشائعة */
.search-hints {
    font-size: 0.95rem;
}
.search-hints a {
    color: #fff;
    text-decoration: none;
    margin-right: 15px;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    transition: 0.3s;
}
.search-hints a:hover {
    background: var(--brand-gold, #e1b12c);
    color: #1e272e;
}

/* أنيميشن */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* للموبايل */
@media (max-width: 768px) {
    .search-header-text h2 {
        font-size: 1.8rem;
    }
    .input-group-premium {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
    }
    .input-group-premium input {
        border-radius: 10px;
        margin-bottom: 10px;
        padding: 20px;
    }
    .modal-submit-btn {
        justify-content: center;
        padding: 15px;
    }
}
.language-switcher-button.dropdown-toggle::after {
    display: none;
}
.nav-link {
    font-weight: bold;
}
/* --- إعدادات الصفحة العامة --- */
.main-content {
    background-color: #f4f7f9;
    font-family: "Cairo", sans-serif;
}

/* تحسين الهيدر ليكون فخماً */
.page-header {
    background-color: rgb(30 39 46 / 5%);
    background-size: cover;
    background-position: center;
    padding: 150px 0;
    color: #fff;
    position: relative;
    text-align: center;
    border-bottom: 5px solid #e1b12c;
    background-blend-mode: multiply; /* لدمج الصورة مع اللون الداكن */
}

.page-header h1 {
    font-weight: 900;
    font-size: 3.5rem;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* --- تنسيق شبكة الخدمات --- */
.services-section {
    padding: 80px 0;
}

/* تصميم الكارت الأساسي */
.service-card {
    background: #ffffff;
    border: 1px solid rgba(225, 177, 44, 0.2);
    border-radius: 20px;
    padding: 45px 30px;
    text-align: center;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.02);
}

/* أيقونة الخدمة */
.card-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(225, 177, 44, 0.1);
    color: #e1b12c;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.card-title {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.6;
    margin: 0;
    transition: all 0.3s ease;
}

/* --- تأثيرات التحويم (Hover) --- */
.service-card:hover {
    transform: translateY(-12px);
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(30, 39, 46, 0.2);
}

.service-card:hover .card-icon {
    background-color: #e1b12c;
    color: #fff;
    transform: scale(1.1) rotate(10deg);
}
.service-card:hover .card-icon i {
    color: #fff;
}
.service-card:hover .card-title {
    color: #ffffff;
}

/* --- تمييز الكارت المختار (Highlighted) --- */
/* هذا يجعل الكارت يظهر بالذهبي فوراً دون الحاجة للتحويم */
.service-card-highlight {
    background: linear-gradient(135deg, #e1b12c 0%, #c6991d 100%);
    border-color: #e1b12c;
    box-shadow: 0 15px 30px rgba(225, 177, 44, 0.3);
}

.service-card-highlight .card-icon {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.service-card-highlight .card-title {
    color: #ffffff;
}

/* تأثير لمعان بسيط على الكارت المتميز */
.service-card-highlight::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: 0.8s;
}

.service-card-highlight:hover::after {
    left: 100%;
}

/* تحسين الاستجابة للموبايل */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2.5rem;
    }
    .service-card {
        padding: 30px 20px;
    }
    .card-icon {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
    }
    .card-title {
        font-size: 1.1rem;
    }
}
.page-header::before {
    background: rgb(30 39 46 / 5%);
}
/* تنسيقات الهيدر المثبت */
header.header-main {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999999999999999999; /* ضمان ظهوره فوق جميع العناصر */
    transition: all 0.4s ease-in-out;
}

/* إضافة مساحة كافية لمحتوى الصفحة لكي لا يختفي خلف الهيدر */
body {
    padding-top: 126px; /* اضبط هذا الرقم ليتناسب مع ارتفاع الهيدر الكلي لديك */
}

/* التنسيق عند تمرير الصفحة (Sticky State) */
.header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-scrolled .top-bar {
    height: 0;
    overflow: hidden;
    padding: 0;
    opacity: 0;
    transition: 0.3s ease; /* إخفاء الشريط العلوي عند التمرير لتوفير مساحة */
    z-index: 999999999999999999; /* ضمان ظهوره فوق جميع العناصر */
}

.header-scrolled .main-nav {
    padding: 10px 0; /* تصغير حجم الناف بار قليلاً */
}

.header-scrolled .logo-img {
    height: 45px; /* تصغير اللوجو قليلاً ليعطي شعوراً بالتطور */
    transition: 0.3s ease;
}

/* تحسين شكل الموديل الخاص بالبحث والتوجيهات عند التمرير */
.main-nav {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.98) !important;
}

@media (min-width: 992px) {
    /* 1. إظهار القائمة وإزالة الفجوة المادية */
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block !important;
        margin-top: 0; /* إزالة المارجن لضمان الالتصاق بالهيدر */
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    /* 2. تقنية الجسر الخفي لمنع اختفاء القائمة */
    .nav-item.dropdown > .dropdown-menu::before {
        content: "";
        position: absolute;
        top: -15px; /* يمتد للأعلى ليلمس شريط الناف بار */
        right: 0;
        left: 0;
        height: 15px;
        background: transparent; /* جسر شفاف غير مرئي */
    }

    /* 3. التعامل مع القوائم الفرعية (Submenus) */
    .dropdown-submenu:hover > .dropdown-menu {
        display: block !important;
        right: 100%; /* تظهر بجانب الأب تماماً */
        top: 0;
        margin-right: 0; /* منع أي فجوة جانبية */
    }

    /* 4. جسر خفي جانبي للقوائم الفرعية لمنع الانقطاع العرضي */
    .dropdown-submenu > .dropdown-menu::before {
        content: "";
        position: absolute;
        top: 0;
        right: -10px; /* جسر لجهة اليمين لربط القائمة بالأب */
        bottom: 0;
        width: 15px;
        background: transparent;
    }
}

/* تحسين السهم عند الهوفر */
.nav-item.dropdown:hover > .nav-link::after {
    transform: rotate(180deg);
}

.nav-link::after {
    transition: transform 0.2s ease-in-out;
}
