/*
-------------------------------------------
CSS for Component Styling
-------------------------------------------
*/
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f4f4f4; /* Light mode default */
    color: #333; /* Light mode default */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for theme change */
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #f4f4f4;
}

body.dark-mode .navbar {
    background-color: #000;
}

body.dark-mode .navbar .search-bar {
    background-color: #333;
    border-color: #666;
}

body.dark-mode .navbar .search-bar input {
    background-color: #333;
    color: #f4f4f4;
}

body.dark-mode .navbar .search-bar input::placeholder {
    color: #ccc;
}

body.dark-mode .navbar .search-bar button {
    background-color: #ffb400; /* Use accent color */
    color: #000; /* Dark text for contrast */
}

body.dark-mode .navbar .nav-links a {
    color: #f4f4f4;
}

body.dark-mode .navbar .nav-links a:hover {
    color: #ffb400;
}

body.dark-mode .navbar-actions .btn-language {
    background-color: #555;
    color: #fff;
}

body.dark-mode .navbar-actions .btn-language:hover {
    background-color: #ffb400;
    color: #000;
}

body.dark-mode .dropdown-content {
    background-color: #000;
    box-shadow: 0px 8px 16px 0px rgba(255,255,255,0.2);
}

body.dark-mode .dropdown-content a {
    color: #f4f4f4;
}

body.dark-mode .dropdown-content a:hover {
    background-color: #333;
    color: #ffb400;
}

body.dark-mode .section-title {
    color: #f4f4f4;
}

body.dark-mode .category-card {
    background-color: #2c2c2c;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

body.dark-mode .category-card h3 {
    color: #f4f4f4;
}

body.dark-mode .category-card:hover {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

body.dark-mode .sidebar,
body.dark-mode .listing-card,
body.dark-mode .blog-post-card,
body.dark-mode .contact-seller-whatsapp,
body.dark-mode .newsletter-signup-section,
body.dark-mode .main-content-area,
body.dark-mode .truck-info-details,
body.dark-mode .detail-card,
body.dark-mode .description-card {
    background-color: #2c2c2c;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.05);
    color: #f4f4f4;
}

body.dark-mode .sidebar h3,
body.dark-mode .listing-card-content h4,
body.dark-mode .blog-post-content h4,
body.dark-mode .contact-seller-whatsapp h3,
body.dark-mode .newsletter-signup-section h3,
body.dark-mode .truck-info-details h3 {
    color: #f4f4f4;
    border-bottom-color: #444;
}

body.dark-mode .listing-card-content p,
body.dark-mode .blog-post-content p,
body.dark-mode .newsletter-signup-section p {
    color: #ccc;
}

body.dark-mode .listing-card-content .price {
    color: #ffb400;
}

body.dark-mode .listing-card-content .details-btn,
body.dark-mode .newsletter-form button[type="submit"] {
    background-color: #555;
    color: #fff;
}

body.dark-mode .listing-card-content .details-btn:hover,
body.dark-mode .newsletter-form button[type="submit"]:hover {
    background-color: #ffb400;
    color: #000;
}

body.dark-mode .blog-post-content .read-more {
    color: #ffb400;
}

body.dark-mode .blog-post-content .read-more:hover {
    color: #e67e22;
}

body.dark-mode .main-footer {
    background-color: #000;
    color: #f4f4f4;
}

body.dark-mode .footer-right h4 {
    color: #ffb400;
}

body.dark-mode .footer-right ul li a {
    color: #f4f4f4;
}

body.dark-mode .footer-right ul li a:hover {
    color: #ffb400;
}

body.dark-mode .custom-alert {
    background-color: #333;
    color: #fff;
}

body.dark-mode .custom-alert.success {
    background-color: #28a745;
}

body.dark-mode .custom-alert.error {
    background-color: #dc3545;
}

body.dark-mode .custom-alert.warning {
    background-color: #ffc107;
}

body.dark-mode .truck-info-details h3 {
    color: #f4f4f4;
}

body.dark-mode .detail-card strong {
    color: #ccc;
}

body.dark-mode .detail-card span {
    color: #f4f4f4;
}

body.dark-mode .price-card {
    background-color: #0056b3;
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}
body.dark-mode .price-card strong,
body.dark-mode .price-card span {
    color: #fff;
}

body.dark-mode .detail-card.full-width-card li {
    color: #ccc;
}
body.dark-mode .detail-card.full-width-card li::before {
    color: #28a745; /* Green checkmark remains */
}

body.dark-mode .description-card p {
    color: #ccc;
}

body.dark-mode .whatsapp-button {
    background-color: #1DA851;
}
body.dark-mode .whatsapp-button:hover {
    background-color: #158341;
}

body.dark-mode .contact-icon-btn.whatsapp-icon-btn {
    background-color: #1DA851;
}
body.dark-mode .contact-icon-btn.whatsapp-icon-btn:hover {
    background-color: #158341;
}
body.dark-mode .contact-icon-btn.call-icon-btn {
    background-color: #0056b3;
}
body.dark-mode .contact-icon-btn.call-icon-btn:hover {
    background-color: #003d82;
}


/*
-------------------------------------------
CSS for Component Styling (Existing styles)
-------------------------------------------
*/
/* Body and general elements */
/* (Existing body styles are now defaults for light mode) */


/* Navbar */
.navbar {
    background-color: #000;
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between; /* Distribute items */
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-left {
    flex-basis: 20%; /* Takes a portion of space for the logo */
    display: flex;
    align-items: center;
}

.navbar .logo {
    font-size: 28px; /* Fallback font size if logo image doesn't load */
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
}

.navbar .logo-img {
    height: 40px; /* Adjust logo height as needed */
    width: auto;
    display: block;
}

.search-bar-container {
    flex-grow: 1; /* Allows search bar to take available space */
    display: flex;
    justify-content: center; /* Center the search bar */
}

.navbar .search-bar {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #555;
    width: 100%; /* Take full width of its container */
    max-width: 400px; /* Limit max width for a cleaner look */
}

.navbar .search-bar input {
    border: none;
    padding: 10px 15px;
    outline: none;
    font-size: 16px;
    flex-grow: 1; /* Input takes up most of the space */
}

.navbar .search-bar button {
    background-color: #ffb400;
    border: none;
    padding: 10px 15px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.navbar .search-bar button:hover {
    background-color: #d08000;
}

.navbar-right {
    flex-basis: 40%; /* Adjust as needed, remaining space */
    display: flex;
    justify-content: flex-end; /* Push links and actions to the right */
    align-items: center;
    gap: 20px; /* Space between nav-links and navbar-actions */
}

.navbar .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px; /* Adjust gap between main links */
}

.navbar .nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
}

.navbar .nav-links a:hover {
    color: #ffb400;
    transform: translateY(-2px);
}

/* Dropdown specific styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    visibility: hidden; /* Changed from display: none */
    opacity: 0; /* Changed from display: none */
    position: absolute;
    background-color: #000; /* Dropdown background color */
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden; /* Ensures rounded corners */
    right: 0; /* Align dropdown to the right of the parent link */
    padding-top: 5px; /* Small space at the top */
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Smooth transition */
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #333;
    color: #ffb400;
}

.dropdown:hover .dropdown-content {
    visibility: visible; /* Changed from display: block */
    opacity: 1; /* Changed from display: block */
}

.dropdown .fas.fa-caret-down {
    margin-left: 8px; /* Space between text and caret icon */
    font-size: 14px;
    transition: transform 0.3s ease;
}

.dropdown:hover .fas.fa-caret-down {
    transform: rotate(180deg); /* Rotate caret on hover */
}


.navbar-actions {
    display: flex;
    gap: 15px;
}

.navbar-actions .btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* New style for language button */
.navbar-actions .btn-language {
    background-color: #555; /* A neutral color, or you can use #ffb400 */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-actions .btn-language:hover {
    background-color: #ffb400; /* Changes to the main accent color on hover */
    color: #000;
}
        
/* Header (Slider) */
.header-slider {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background-color: #222;
}

.slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-image.active {
    opacity: 1;
}

.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.slider-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* LTR Direction for Slider Buttons */
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Slider Indicators (Strips) */
.slider-indicators {
    position: absolute;
    bottom: 20px; /* Adjust vertical position */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px; /* Space between indicators */
    z-index: 10; /* Ensure they are above the slider images */
}

.indicator {
    width: 40px; /* Width of the strip */
    height: 6px; /* Height of the strip */
    background-color: rgba(255, 255, 255, 0.5); /* Light grey for inactive */
    border-radius: 3px; /* Slightly rounded corners */
    cursor: pointer;
    transition: background-color 0.3s ease, width 0.3s ease; /* Smooth transition */
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.indicator.active-indicator {
    background-color: #ffb400; /* Orange for active */
    width: 60px; /* Slightly wider when active */
}


/* Main Content Container */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 4px;
    background-color: #ffb400;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.categories-section {
    display: flex;
    justify-content: space-between; /* Changed from space-around to space-between for 4 columns */
    flex-wrap: wrap;
    gap: 30px; /* Keep gap as is */
    margin-bottom: 60px;
}

.category-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    /* Adjusted for 4 columns to ensure fitting */
    width: calc(25% - 25px); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex; /* Added for image centering */
    flex-direction: column; /* Added for image centering */
    align-items: center; /* Added for image centering */
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* New style for category images */
.category-card .category-img {
    width: 150px; /* Adjust as needed */
    height: 100px; /* Adjust as needed */
    object-fit: contain; /* Changed from 'cover' to 'contain' to scale without cropping */
    border-radius: 50%; /* Make images circular */
    margin-bottom: 20px;
}


.category-card h3 {
    font-size: 24px;
    color: #333;
    margin: 0;
}

/* Main Content Area and Sidebar */
.main-content-area {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.listings-blog-section {
    flex: 3;
    min-width: 70%;
}

/* Sidebar Styling - الافتراضي لأجهزة الكمبيوتر المكتبية والشاشات الكبيرة */
.sidebar {
   display: grid;
    /* على الشاشات الكبيرة (أكبر من 992 بكسل تقريباً)، عرض 4 عناصر في الصف */
    grid-template-columns: repeat(4, 1fr);
    /* المسافة بين العناصر */
     /* مسافة داخلية علوية وسفلية للقسم نفسه */
    /* هذا يقوم بمركزة الشبكة بأكملها أفقياً داخل العنصر الأب */
    /* ملاحظة: إذا كان هذا الـ aside جزءًا من تخطيط عمود جانبي ثابت، فقد تحتاج إلى ضبط الـ max-width والـ margin: auto; */
    /* إذا كنت تريد فقط توسيط العناصر داخل المساحة المتاحة لـ aside، فاستخدم justify-items: center; */
width: 100%; /* العرض الافتراضي للشريط الجانبي */
    padding: 1px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.sidebar h3 {
    width: 100%; /* العنوان سيأخذ العرض الكامل للشريط الجانبي */
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* تنسيقات top-seller-item العامة (تطبق في كل مكان) */
/* هذه التنسيقات هي التي تحدد كيفية ظهور الصورة والنص داخل كل عنصر ماركة */
.top-seller-item {

    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}
.top-seller-item:hover {
    transform: translateY(-5px);
}


/* استجابة التصميم: لشاشات الموبايل (عرض 767 بكسل وأقل) */
@media (max-width: 767px) {
    .sidebar {
        width: 100%; /* الشريط الجانبي يأخذ عرض الشاشة بالكامل على الموبايل */
        margin-bottom: 20px;
        /* تفعيل الـ Flexbox لترتيب العناصر في صفوف على الموبايل */
        display: flex;
        flex-direction: row; /* ترتيب العناصر أفقياً */
        flex-wrap: wrap; /* السماح للعناصر بالنزول إلى سطر جديد */
        gap: 0px; /* المسافة بين العناصر (أفقيًا وعموديًا) */
        justify-content: center; /* توسيط العناصر إذا لم تملأ الصف */
    }
    
    .sidebar h3 {
        width: 100%; /* التأكد من أن العنوان يأخذ العرض الكامل حتى مع تفعيل الـ flex على sidebar */
    }

    .sidebar .top-seller-item {
        flex: 0 0 calc(50% - 10px); /* عرض عنصرين في الصف مع مسافة 20 بكسل بينهما */
        max-width: calc(50% - 10px);
    }
}

/* استجابة التصميم: لشاشات الموبايل الصغيرة جداً (عرض 480 بكسل وأقل) */
@media (max-width: 480px) {
    .sidebar .top-seller-item {
        flex: 2 0 30%; /* عنصر واحد في الصف على الشاشات الصغيرة جداً */
        max-width: 100%;
    }
}

.top-seller-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.top-seller-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}


    .top-seller-item img {
    width: 60px; /* تحديد عرض ثابت للصورة */
    height: 60px; /* تحديد ارتفاع ثابت للصورة لإنشاء مربع */
    
    object-fit: contain; /* هذه الخاصية تضمن أن الصورة تتناسب بالكامل داخل الحجم المحدد دون قص */
    object-position: center; /* توسيط الصورة داخل مساحتها */
    
    /* خصائص الـ Flexbox لضمان عدم تصغير الصورة أو تكبيرها بشكل غير مرغوب */
    flex-shrink: 0; /* تمنع الصورة من أن تتقلص إلى ما هو أقل من حجمها المحدد */
    flex-grow: 0;   /* تمنع الصورة من أن تتمدد إلى ما هو أكبر من حجمها المحدد */

    border-radius: 4px; /* (اختياري) لإضافة حواف دائرية خفيفة للصور */


    
}

.seller-info h4 {
    margin: 0;
    font-size: 18px;
    color: #555;
}

.seller-info p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #777;
}

/* Available Listings Section */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.listing-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Media Query for Mobile and smaller screens (adjust max-width as needed) */
@media (max-width: 992px) { /* أو 768px إذا كنت تعتبر 768px هو الحد الأقصى للموبايل */
    /* ... (احتفظ بأي كود آخر موجود هنا لـ 992px) ... */

    /* قسم Latest Available Listings - فقط للموبايل */
    .listings-grid {
        display: flex; /* تحويل إلى Flexbox على الموبايل */
        /* إزالة grid-template-columns و gap هنا إذا كانت موجودة، أو لا تؤثر لأن display: flex سيلغيها */
        gap: 20px; /* يمكن تعديل الـ gap ليتناسب مع التمرير الأفقي */
        overflow-x: auto; /* يجعل التمرير الأفقي ممكنًا */
        white-space: nowrap; /* يمنع العناصر من النزول لسطر جديد */
        padding-bottom: 10px; /* لإعطاء مساحة لمقبض السكرول إذا ظهر */
        -webkit-overflow-scrolling: touch; /* لتحسين السكرول على iOS */
        scrollbar-width: thin; /* لمتصفحات فايرفوكس */
        scrollbar-color: #ff8c00 #f1f1f1; /* لون مقبض السكرول ومساره لفايرفوكس */
    }

    /* تخصيص مقبض السكرول لـ WebKit (Chrome, Safari) */
    .listings-grid::-webkit-scrollbar {
        height: 8px; /* ارتفاع مقبض السكرول */
    }

    .listings-grid::-webkit-scrollbar-track {
        background: #f1f1f1; /* لون مسار السكرول */
        border-radius: 10px;
    }

    .listings-grid::-webkit-scrollbar-thumb {
        background: #ff8c00; /* لون مقبض السكرول */
        border-radius: 10px;
    }

    .listings-grid::-webkit-scrollbar-thumb:hover {
        background: #e67e22; /* لون المقبض عند التحويم */
    }

    .listing-card {
        flex-shrink: 0; /* يمنع الكروت من الانكماش */
        width: 280px; /* تحديد عرض ثابت لكل كارت على الموبايل */
        /* يمكنك تعديل هذا العرض حسب ما تراه مناسبًا على شاشات الموبايل */
    }

    /* ... (احتفظ بأي كود آخر موجود هنا لـ 992px) ... */
}

/* يمكنك إضافة Media Query آخر إذا كنت تريد سلوكًا مختلفًا لأجهزة أصغر جداً (مثال: max-width: 480px) */
@media (max-width: 480px) {
    .listing-card {
        width: 250px; /* عرض أصغر للكروت على الشاشات الأصغر */
    }
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.listing-card img {
        width: 100%;
    height: 200px; /* يمكنك الاحتفاظ بارتفاع ثابت هنا أو ضبطه ليناسب تصميمك */
    object-fit: contain; /* هذا هو التغيير الرئيسي: الصورة ستناسب نفسها داخل الصندوق */
    /* background-color: #f0f0f0; /* اختياري: لإظهار خلفية إذا كانت الصورة أصغر من الصندوق */
    display: block; /* لضمان عدم وجود مسافات إضافية */
    /* ... خصائص أخرى مثل border-radius, etc. */
}

.listing-card-content {
    padding: 20px;
}

.listing-card-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
    color: #333;
}

.listing-card-content p {
    margin: 5px 0;
    font-size: 15px;
    color: #666;
}

.listing-card-content .price {
    font-size: 22px;
    font-weight: bold;
    color: #ffb400;
    margin-top: 15px;
    display: block;
}

.listing-card-content .details-btn {
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 10px 18px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.listing-card-content .details-btn:hover {
    background-color: #333;
}

/* Blog Section */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-post-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.blog-post-content {
    padding: 20px;
}

.blog-post-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
    color: #333;
}

.blog-post-content p {
    margin: 5px 0;
    font-size: 14px;
    color: #777;
    line-height: 1.6;
}

.blog-post-content .read-more {
    display: inline-block;
    color: #ffb400;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.blog-post-content .read-more:hover {
    color: #d08000;
}

/* Footer Styling */
.main-footer {
    background-color: #000;
    color: #fff;
    padding: 40px 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-left {
    flex: 1; /* Takes up available space */
    min-width: 300px; /* Minimum width for the left section */
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Align items to the left */
}

.footer-logo {
    height: 50px; /* Adjust logo height */
    width: auto;
    margin-bottom: 20px;
}

.copyright {
    font-size: 14px;
    margin-bottom: 20px;
    text-align: left;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #fff;
    font-size: 24px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffb400;
}

.footer-divider {
    width: 2px;
    background-color: #fff;
    margin: 0 40px; /* Space around the divider */
}

.footer-right {
    flex: 2; /* Takes up more space */
    min-width: 300px; /* Minimum width for the right section */
}

.footer-right h4 {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #ffb400; /* Highlighted title */
}

.footer-right ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-right ul li {
    margin-bottom: 10px;
}

.footer-right ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.footer-right ul li a:hover {
    color: #ffb400;
}


/* Media Queries for Responsiveness */
@media (max-width: 1200px) { /* Adjust for larger screens with three columns */
    .navbar .nav-links {
        gap: 15px;
    }
}

/* Hide menu toggle by default on larger screens */
.menu-toggle {
    display: none;
}


@media (max-width: 992px) {
    body {
        padding-top: 0px; /* Added to push content down from fixed mobile navbar */
    }

    .navbar {
        display: grid; /* Use grid for more control */
        grid-template-columns: 1fr auto; /* Two columns: logo takes space, toggle is auto */
        grid-template-rows: auto auto; /* Two rows: logo/toggle, then search bar */
        gap: 10px 20px; /* Row gap, column gap */
        padding: 15px 20px;
        align-items: center;
    }

    .navbar-left {
        grid-column: 1 / 2; /* First column */
        grid-row: 1 / 2; /* First row */
        margin-right: 0; /* Reset margin */
        justify-content: flex-start; /* Align logo to the left */
    }

    /* Show menu toggle button on mobile and position it */
    .menu-toggle {
        display: block; 
        grid-column: 2 / 3; /* Second column */
        grid-row: 1 / 2; /* First row */
        background: none;
        border: none;
        font-size: 24px;
        color: #fff;
        cursor: pointer;
        padding: 5px;
        margin-left: auto; /* Push to the right */
        z-index: 1002; /* Ensure it's above the sliding menu when open */
    }

    /* Keep search bar visible on mobile and position it */
    .search-bar-container {
        display: flex; /* Ensure it's visible */
        grid-column: 1 / 3; /* Span both columns */
        grid-row: 2 / 3; /* Second row */
        width: 100%; /* Take full grid width */
        margin: 0; /* Reset margins */
        justify-content: center;
        max-width: none; /* Remove max-width constraint */
    }

    /* Close button for mobile menu - REMOVED */
    /* .close-menu-btn { ... } */


    /* Mobile Menu (Slide from Right) */
    .navbar-right {
        position: fixed; /* Use fixed for full viewport height */
        top: 0;
        right: 0; /* Slide from right */
        height: 100vh; /* Full viewport height */
        width: 70%; /* Adjust width of the side menu */
        background-color: #000;
        flex-direction: column;
        align-items: flex-end; /* Align menu items to the right */
        justify-content: flex-start; /* Align content to the top of the flex container */
        gap: 0;
        transition: transform 0.3s ease-out; /* Smooth slide-in effect */
        transform: translateX(100%); /* Start hidden off-screen to the right */
        z-index: 1001; /* Higher z-index than navbar */
        padding-top: 0; /* Removed padding that was for the close button */
        overflow-y: auto; /* Enable scrolling for long menus */
    }

    .navbar-right.active {
        transform: translateX(0); /* Slide into view */
    }

    .nav-links-wrapper {
        width: 100%;
    }

    .navbar .nav-links {
        flex-direction: column;
        align-items: flex-end; /* Align links to the right within the menu */
        gap: 0;
        width: 100%;
    }

    .navbar .nav-links li {
        width: 100%; /* Full width for clickable area */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separator */
        text-align: left; /* Ensure text is right-aligned */
    }

    .navbar .nav-links li:last-child {
        border-bottom: none;
    }

    .navbar .nav-links a {
        padding: 12px 20px; /* More padding for mobile clicks */
        display: block; /* Make links take full width */
    }

    .navbar-actions {
        flex-direction: column;
        width: 100%;
        justify-content: flex-end; /* Align actions to the right */
        align-items: flex-end;
        margin-top: 10px;
        padding-right: 20px; /* Padding for the button */
    }

    .navbar-actions .btn-language {
        width: auto; /* Let button take natural width */
        text-align: center;
        margin: 25px; /* Reset margin */
    }

    /* Dropdown specific styles for mobile menu */
    .dropdown .fas.fa-caret-down {
        margin-left: 0;
        margin-right: 8px; /* Space between text and caret icon on right side */
    }

    .dropdown-content {
        position: static; /* Make dropdown content flow naturally */
        width: 100%;
        box-shadow: none;
        background-color: #1a1a1a; /* Darker background for nested dropdown */
        border-radius: 0;
        padding-top: 0;
        max-height: 0; /* New: Collapse height for animation */
        overflow: hidden; /* New: Hide overflowing content */
        transition: max-height 0.3s ease-out; /* New: Smooth height transition */
    }

    .dropdown-content a {
        padding-right: 40px; /* Indent dropdown items more from right */
        padding-left: 20px; /* Ensure some left padding */
    }

    .dropdown.active .dropdown-content {
        max-height: 500px; /* New: Expand height (ensure sufficient height) */
    }

    .category-card {
        width: calc(50% - 35px); /* 2 columns on medium screens */
    }
    .main-content-area {
        flex-direction: column;
    }
    .listings-blog-section, .sidebar {
        min-width: unset;
        width: 100%;
    }

    /* Footer responsiveness */
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-left, .footer-right {
        min-width: unset;
        width: 100%;
        align-items: center; /* Center items when stacked */
    }
    
    .copyright {
        text-align: center;
    }

    .footer-divider {
        width: 50%; /* Horizontal divider */
        height: 2px;
        margin: 30px 0; /* Adjust vertical margin */
    }
}

@media (max-width: 768px) {
    /* No additional changes to navbar specific elements needed if 992px uses grid properly */
    .category-card {
        width: calc(50% - 30px); /* 1 column for 768px and smaller */
    }
    .header-slider {
        height: 300px; /* Make slider shorter on mobile */
    }
    .slider-nav-btn {
        padding: 10px 8px; /* Smaller buttons */
        font-size: 20px;
    }
    .slider-indicators {
        bottom: 10px; /* Move indicators up slightly */
    }

    .dropdown-content {
        position: static; /* Make dropdown content flow naturally */
        width: 100%;
        box-shadow: none;
        background-color: #1a1a1a; /* Darker background for nested dropdown */
        border-radius: 0;
        padding-top: 0;
    }

    .dropdown-content a {
        padding-right: 30px; /* Indent dropdown items */
        padding-left: 20px; /* Ensure some left padding */
    }
    .container {
        padding: 0 15px; /* Reduce container padding on small screens */
    }
    .section-title {
        font-size: 28px;
    }
    .listings-grid, .blog-posts-grid {
        grid-template-columns: 1fr; /* Single column for listings and blog on very small screens */
    }
}

/* Optional: Even smaller screen adjustments if needed */
@media (max-width: 480px) {
    .navbar {
        padding: 10px 15px;
    }
    .navbar .search-bar input {
        padding: 8px 10px;
        font-size: 14px;
    }
    .navbar .search-bar button {
        padding: 8px 10px;
        font-size: 14px;
    }
    .navbar .nav-links a {
        font-size: 15px;
    }
    .navbar-actions .btn-language {
        padding: 8px 15px;
        font-size: 14px;
    }
    .header-slider {
        height: 250px;
    }
    .indicator {
        width: 30px; /* Smaller strips */
        height: 5px;
    }
    .indicator.active-indicator {
        width: 45px; /* Smaller active strip */
    }
    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    .category-card {
        padding: 10px;
        width: calc(50% - 35px); /* Full width minus container padding */
    }
    .category-card h3 {
        font-size: 20px;
    }
    .listing-card-content h4, .blog-post-content h4 {
        font-size: 18px;
    }
    .listing-card-content p, .blog-post-content p {
        font-size: 13px;
    }
    .listing-card-content .price {
        font-size: 20px;
    }
   
    .top-seller-item img {
        width: 50px;
        height: 50px;


    }
    .seller-info h4 {
      
    font-size: 1.1em;
    color: #333;
    margin: 0;

    }
    .seller-info p {
        font-size: 13px;
    }
    .main-footer {
        padding: 30px 15px;
    }
    .footer-right h4 {
        font-size: 20px;
    }
    .footer-right ul li a {
        font-size: 14px;
    }
}

/* WhatsApp Button Style */
.contact-seller-whatsapp {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    margin-top: 30px; /* لترك مسافة عن العناصر العلوية */
}

.contact-seller-whatsapp h3 {
    color: #007bff;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.whatsapp-btn {
    display: inline-block;
    background-color: #25D366; /* لون واتساب الأخضر */
    color: #fff;
    padding: 15px 30px;
    border-radius: 50px; /* جعل الزر دائري الأطراف */
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-top: 15px;
}

.whatsapp-btn i {
    margin-right: 10px;
    font-size: 1.4em; /* حجم أكبر لأيقونة واتساب */
}

.whatsapp-btn:hover {
    background-color: #1DA851; /* لون أغمق عند التمرير */
    transform: translateY(-2px); /* تأثير ارتفاع بسيط عند التمرير */
}

.whatsapp-note {
    font-size: 0.9em;
    color: #777;
    margin-top: 15px;
}

/* Newsletter Signup Section */
.newsletter-signup-section {
    background-color: #f8f8f8; /* لون خلفية فاتح */
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-top: 30px; /* مسافة من العنصر الذي يسبقه */
    text-align: center;
    border: 1px solid #eee;
}

.newsletter-signup-section h3 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.newsletter-signup-section p {
    color: #555;
    font-size: 1em;
    margin-bottom: 20px;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    flex-direction: column; /* الأزرار والحقول فوق بعضها البعض افتراضياً */
    gap: 10px;
    max-width: 400px; /* للتحكم في عرض الفورم */
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    width: 100%; /* اجعل الحقل يأخذ العرض الكامل داخل الفورم */
    box-sizing: border-box; /* لضمان أن العرض يشمل البادينغ والبوردير */
}

.newsletter-form button[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%; /* اجعل الزر يأخذ العرض الكامل داخل الفورم */
    box-sizing: border-box;
}

.newsletter-form button[type="submit"]:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Media Queries for Responsiveness */
@media (min-width: 768px) {
    .newsletter-form {
        flex-direction: row; /* على الشاشات الأكبر، اجعل الحقول والأزرار في صف واحد */
        justify-content: center;
        align-items: center;
    }

    .newsletter-form input[type="email"] {
        flex-grow: 1; /* اجعل حقل البريد يأخذ المساحة المتاحة */
        margin-right: 10px; /* مسافة بين الحقل والزر */
    }

    .newsletter-form button[type="submit"] {
        width: auto; /* ارجع الزر إلى عرضه التلقائي */
    }
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}
.warning-message {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
}

/* Custom Alert Styling */
.custom-alert {
    position: fixed; /* لتثبيته في الشاشة */
    bottom: 20px; /* مسافة من الأسفل */
    left: 20px; /* مسافة من اليسار */
    background-color: #4CAF50; /* لون افتراضي للنجاح */
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0; /* مخفي في البداية */
    visibility: hidden; /* مخفي في البداية */
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    z-index: 10000; /* لضمان ظهوره فوق كل شيء */
    min-width: 250px;
    text-align: center;
}

.custom-alert.show {
    opacity: 1;
    visibility: visible;
}

/* Alert types */
.custom-alert.success {
    background-color: #4CAF50; /* أخضر للنجاح */
}

.custom-alert.error {
    background-color: #f44336; /* أحمر للخطأ */
}

.custom-alert.warning {
    background-color: #ff9800; /* برتقالي للتحذير */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .custom-alert {
        left: 50%;
        transform: translateX(-50%);
        bottom: 15px;
        width: calc(100% - 40px); /* يغطي معظم عرض الشاشة مع مسافة */
        min-width: unset;
    }
}

.whatsapp-button-container {
    position: fixed;
    bottom: 20px; /* المسافة من الأسفل */
    right: 20px;  /* المسافة من اليمين */
    z-index: 1000; /* لضمان ظهوره فوق العناصر الأخرى */
}

.whatsapp-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: #25D366; /* لون واتساب الأخضر */
    color: white;
    border-radius: 50%; /* لجعل الزر دائريًا */
    font-size: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.whatsapp-button:hover {
    background-color: #1DA851; /* لون أغمق عند التحويم */
}

/* Theme Toggle Button Style */
.theme-toggle-button {
    position: fixed;
    bottom: 90px; /* Adjust as needed to avoid WhatsApp button */
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #555; /* Default for light mode */
    color: #fff;
    border: none;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.theme-toggle-button:hover {
    transform: scale(1.05);
    background-color: #333;
}

/* Icon adjustment for better centering */
.theme-toggle-button i {
    line-height: 1; /* Helps vertical alignment of font awesome icons */
}

/* Responsive adjustment for theme button to not overlap on small screens */
@media (max-width: 600px) {
    .theme-toggle-button {
        bottom: 80px; /* Adjust if needed to not overlap with other fixed elements */
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}
/* إضافة هذه الأنماط في قسم Dark Mode Styles */
body.dark-mode .sidebar {
    background-color: #2c2c2c;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.05);
}

body.dark-mode .top-seller-item {
    background-color: #3c3c3c;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

body.dark-mode .seller-info h4 {
    color: #f4f4f4;
}

body.dark-mode .top-seller-item:hover {
    background-color: #4c4c4c;
    transform: translateY(-5px);
}
/* إضافة هذه الأنماط في قسم Dark Mode Styles */
body.dark-mode .blog-post-content .read-more-btn {
    color: #ffb400;
}

body.dark-mode .blog-post-content .read-more-btn:hover {
    color: #e67e22;
}

/* البحث عن هذا الكود وتعديله */
body.dark-mode .listing-card-content .details-btn,
body.dark-mode .newsletter-form button[type="submit"] {
    background-color: #555;
    color: #fff;
}

body.dark-mode .listing-card-content .details-btn:hover,
body.dark-mode .newsletter-form button[type="submit"]:hover {
    background-color: #ffb400;
    color: #000;
}

/* إضافة هذه الأنماط في قسم Dark Mode Styles */
body.dark-mode .sidebar h3 {
    color: #ffb400;
    border-bottom-color: #444;
}

body.dark-mode .top-seller-item {
    border-bottom-color: #444;
}

/* إضافة هذه الأنماط في قسم Dark Mode Styles */
body.dark-mode .listing-card-content p,
body.dark-mode .blog-post-content p,
body.dark-mode .newsletter-signup-section p {
    color: #ccc;
}

body.dark-mode .seller-info p {
    color: #aaa;
}
/* Dark Mode Styles for truck cards */
body.dark-mode .truck-card {
    background-color: #2c2c2c;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.08);
}

body.dark-mode .truck-card:hover {
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.12);
}

body.dark-mode .truck-title,
body.dark-mode .truck-title a {
    color: #4da6ff;
}

body.dark-mode .truck-price {
    color: #4caf50;
}

body.dark-mode .truck-location,
body.dark-mode .truck-status {
    color: #ccc;
}

body.dark-mode .view-details-btn {
    background-color: #555;
    color: #fff;
}

body.dark-mode .view-details-btn:hover {
    background-color: #4da6ff;
    color: #000;
}

body.dark-mode .status-new {
    background-color: #2e7d32;
    color: #d4edda;
}

body.dark-mode .status-used {
    background-color: #856404;
    color: #fff3cd;
}

body.dark-mode .alert-info {
    background-color: #004085;
    color: #cce5ff;
    border-color: #b8daff;
}
/* تحسين تنسيق كروت الشاحنات */
.truck-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-align: right;
    border: 1px solid #eee;
}

.truck-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.truck-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.truck-title {
    font-size: 1.4em;
    color: #007bff;
    margin-bottom: 5px;
    line-height: 1.3;
    font-weight: 600;
}

.truck-price {
    font-size: 1.3em;
    color: #28a745;
    font-weight: bold;
    margin: 5px 0;
}

.truck-location, .truck-status {
    font-size: 0.95em;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.view-details-btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 15px;
    align-self: flex-start;
    text-align: center;
    border: none;
    cursor: pointer;
}

.view-details-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}
@media (max-width: 768px) {
    .truck-card {
        margin: 0 10px;
    }
    
    .truck-info {
        padding: 15px;
    }
    
    .truck-title {
        font-size: 1.2em;
    }
    
    .truck-price {
        font-size: 1.1em;
    }
    
    .view-details-btn {
        width: 100%;
        align-self: center;
        padding: 10px 15px;
    }
}


/* Dark Mode Styles for About Us Page */
body.dark-mode .about-section {
    background-color: #2c2c2c;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
    color: #f4f4f4;
}

body.dark-mode .about-section p {
    color: #ccc;
}

body.dark-mode .about-section h3 {
    color: #ffb400;
    border-bottom-color: #444;
}

body.dark-mode .about-section ul li {
    color: #ccc;
}

body.dark-mode .reason-card {
    background-color: #3c3c3c;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

body.dark-mode .reason-card h4 {
    color: #f4f4f4;
}

body.dark-mode .reason-card p {
    color: #aaa;
}

/* Dark Mode Styles for Contact Page */
body.dark-mode .contact-info-section p {
    color: #ccc;
}

body.dark-mode .contact-details,
body.dark-mode .contact-form-container {
    background-color: #2c2c2c;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

body.dark-mode .contact-details h3,
body.dark-mode .contact-form-container h3 {
    color: #ffb400;
}

body.dark-mode .contact-form-container input,
body.dark-mode .contact-form-container textarea {
    background-color: #3c3c3c;
    color: #f4f4f4;
    border-color: #555;
}

body.dark-mode .contact-form-container input::placeholder,
body.dark-mode .contact-form-container textarea::placeholder {
    color: #aaa;
}

body.dark-mode .contact-form-container button {
    background-color: #555;
    color: #fff;
}

body.dark-mode .contact-form-container button:hover {
    background-color: #ffb400;
    color: #000;
}

/* Dark Mode Styles for About Us Page */
body.dark-mode .about-section {
    background-color: #2c2c2c !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05) !important;
    color: #f4f4f4 !important;
}

body.dark-mode .about-section p {
    color: #ccc !important;
}

body.dark-mode .about-section h3 {
    color: #ffb400 !important;
    border-bottom-color: #444 !important;
}

body.dark-mode .about-section ul li {
    color: #ccc !important;
}

body.dark-mode .reason-card {
    background-color: #3c3c3c !important;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .reason-card h4 {
    color: #f4f4f4 !important;
}

body.dark-mode .reason-card p {
    color: #aaa !important;
}

/* Dark Mode Styles for Contact Page */
body.dark-mode .contact-info-section p {
    color: #ccc !important;
}

body.dark-mode .contact-details,
body.dark-mode .contact-form-container {
    background-color: #2c2c2c !important;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05) !important;
}

body.dark-mode .contact-details h3,
body.dark-mode .contact-form-container h3 {
    color: #ffb400 !important;
}

body.dark-mode .contact-form-container input,
body.dark-mode .contact-form-container textarea {
    background-color: #3c3c3c !important;
    color: #f4f4f4 !important;
    border-color: #555 !important;
}

body.dark-mode .contact-form-container input::placeholder,
body.dark-mode .contact-form-container textarea::placeholder {
    color: #aaa !important;
}

body.dark-mode .contact-form-container button {
    background-color: #555 !important;
    color: #fff !important;
}

body.dark-mode .contact-form-container button:hover {
    background-color: #ffb400 !important;
    color: #000 !important;
}

/* Dark Mode Styles for Blog Page */
body.dark-mode .blog-grid {
    background-color: transparent;
}

body.dark-mode .blog-card {
    background-color: #2c2c2c;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

body.dark-mode .blog-card:hover {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

body.dark-mode .blog-card-img {
    border-bottom-color: #444;
}

body.dark-mode .blog-card-title,
body.dark-mode .blog-card-title a {
    color: #4da6ff;
}

body.dark-mode .blog-card-title a:hover {
    color: #ffb400;
}

body.dark-mode .blog-card-meta {
    color: #aaa;
}

body.dark-mode .blog-card-meta i {
    color: #ffb400;
}

body.dark-mode .blog-card-snippet {
    color: #ccc;
}

body.dark-mode .read-more-btn {
    background-color: #555;
    color: #fff;
}

body.dark-mode .read-more-btn:hover {
    background-color: #ffb400;
    color: #000;
}

body.dark-mode .no-posts-found {
    background-color: #2c2c2c;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
    color: #ccc;
}

body.dark-mode .section-description {
    color: #ccc;
}



/* CSS خاص بصفحة blog_post.php */
.blog-post-detail {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.post-title {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 2.2em;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    text-align: right; /* محاذاة لليمين للعنوان العربي */
    transition: color 0.3s ease, border-color 0.3s ease;
}

.post-meta {
    font-size: 0.95em;
    color: #777;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-end; /* محاذاة لليمين للبيانات الوصفية العربية */
    transition: color 0.3s ease;
}

.post-meta span {
    display: flex;
    align-items: center;
}

.post-meta i {
    margin-left: 8px; /* مسافة على اليسار للأيقونة في النص العربي */
    color: #007bff;
    transition: color 0.3s ease;
}

.post-image {
    text-align: center;
    margin-bottom: 30px;
}

.post-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.post-content {
    line-height: 1.8;
    color: #444;
    font-size: 1.1em;
    margin-bottom: 40px;
    text-align: right; /* محاذاة لليمين للمحتوى العربي */
    transition: color 0.3s ease;
}

.back-to-blog {
    text-align: center;
}

.back-to-blog .btn-primary {
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.back-to-blog .btn-primary:hover {
    background-color: #0056b3;
}

.back-to-blog .btn-primary i {
    margin-right: 0; /* إزالة الهامش الأيمن الافتراضي */
    margin-left: 8px; /* إضافة هامش أيسر للأيقونة */
}

/* أنماط الوضع الليلي لصفحة المقالة */
body.dark-mode .blog-post-detail {
    background-color: #2c2c2c;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

body.dark-mode .post-title {
    color: #4da6ff;
    border-bottom-color: #444;
}

body.dark-mode .post-meta {
    color: #aaa;
}

body.dark-mode .post-meta i {
    color: #4da6ff;
}

body.dark-mode .post-content {
    color: #ddd;
}

body.dark-mode .error-message {
    background-color: #dc3545;
    color: #fff;
    border-color: #c82333;
}

body.dark-mode .error-message a {
    color: #a6d5fa;
}

body.dark-mode .error-message a:hover {
    color: #fff;
}
