/* ملف CSS إضافي للتخصيصات - تحديث v3.6 - 2025-01-04 - Cache Buster */

/* PNG Images - Transparent Background */
img[src$=".png"],
img[src*=".png"],
.feature-icon[src$=".png"],
.feature-icon[src*=".png"],
.category-features img[src$=".png"],
.category-features img[src*=".png"],
.feature-item img[src$=".png"],
.feature-item img[src*=".png"],
.marquee-content img[src$=".png"],
.marquee-content img[src*=".png"] {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    mix-blend-mode: normal;
    box-shadow: none !important;
    border: none !important;
}

/* تأكيد الشفافية لجميع حاويات الصور */
.feature-item,
.category-features .feature-item,
.marquee-content .feature-item {
    background: transparent !important;
    background-color: transparent !important;
}

/* إزالة أي خلفية من الحاويات الأب */
.features-marquee .feature-item,
.category-features .feature-item {
    background: none !important;
    background-color: transparent !important;
}

/* تحسينات الفيديو والأداء */
.hero-video {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* تحسين الأداء للأجهزة الضعيفة */
@media (max-width: 768px) and (max-height: 1024px) {
    .hero-video {
        display: none !important;
    }

    .hero-section {
        background: linear-gradient(rgba(198, 171, 123, 0.7), rgba(0, 0, 0, 0.6)),
                    url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80') !important;
        background-size: cover !important;
        background-position: center !important;
    }
}

/* تحسينات للشاشات عالية الدقة */
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
    .hero-video {
        transform: scale(1.1);
        transform-origin: center center;
    }
}

/* تحسينات إضافية للموقع */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* تحسينات شاملة للهواتف المحمولة */
@media (max-width: 768px) {
    /* تحسين بطاقات العقارات */
    .property-card {
        margin-bottom: 20px;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }

    .property-card img {
        height: 180px;
        object-fit: cover;
    }

    .property-card .card-body {
        padding: 12px;
    }

    .property-card .card-title {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .property-card .card-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* تصميم الفئات للهاتف المحمول - نمط الصورة المرفقة - تحديث v3.2 */
    .mobile-categories-container {
        padding: 35px 0 45px 0;
        overflow: visible !important;
        background: transparent !important;
        margin: 0;
        position: relative;
        z-index: 10;
    }

    .mobile-categories-scroll {
        display: flex;
        gap: 15px;
        padding: 15px 20px 25px 20px;
        overflow-x: auto;
        overflow-y: visible !important;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: space-between;
        align-items: center;
        position: relative;
        z-index: 5;
    }

    .mobile-categories-scroll::-webkit-scrollbar {
        display: none;
    }

    .mobile-category-item {
        flex: 1;
        min-width: 75px;
        max-width: 85px;
        text-align: center;
        position: relative;
        z-index: 3;
        overflow: visible !important;
    }

    .mobile-category-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #333;
        transition: all 0.3s ease;
        padding: 15px 10px;
        border-radius: 15px;
        background: rgba(248, 249, 250, 0.95) !important;
        box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -webkit-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -moz-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        position: relative;
        overflow: visible !important;
        z-index: 10;
        isolation: isolate;
        transform: translateZ(0);
    }

    .mobile-category-link:hover,
    .mobile-category-link:active {
        color: #c6ab7b;
        transform: translateY(-3px);
        text-decoration: none;
        box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        -webkit-box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        -moz-box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        background: rgba(255, 255, 255, 0.98) !important;
    }

    .mobile-category-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
        background: linear-gradient(135deg, #c6ab7b 0%, #d4c190 100%) !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 10px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(198, 171, 123, 0.25) !important;
        position: relative;
        z-index: 1;
    }

    .mobile-category-icon i {
        font-size: 20px;
        color: white;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    .mobile-category-text {
        font-size: 12px;
        font-weight: 700;
        color: #666;
        white-space: nowrap;
        font-family: 'Cairo', sans-serif;
        position: relative;
        z-index: 1;
        margin-top: 2px;
        text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    }

    .mobile-category-link:hover .mobile-category-icon {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(198, 171, 123, 0.4) !important;
    }

    .mobile-category-link:hover .mobile-category-text {
        color: #c6ab7b;
    }

    /* إزالة أي قيود على الظلال */
    .mobile-categories-container,
    .mobile-categories-scroll,
    .mobile-category-item {
        overflow: visible !important;
    }

    /* تحسين الأزرار */
    .btn {
        border-radius: 25px;
        padding: 10px 20px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .btn-sm {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* تحسين النصوص */
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    p {
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    /* تحسين المسافات */
    .py-5 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .py-4 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .mb-4 {
        margin-bottom: 2rem !important;
    }

    .mb-3 {
        margin-bottom: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    /* تحسينات للشاشات الصغيرة جداً */
    .property-card .card-title {
        font-size: 1rem;
    }

    .property-card .card-text {
        font-size: 0.85rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* تحسينات إضافية للفئات في الشاشات الصغيرة - تحديث v3.0 */
    .mobile-category-item {
        min-width: 70px;
        max-width: 80px;
        overflow: visible !important;
    }

    .mobile-category-icon {
        width: 45px;
        height: 45px;
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(198, 171, 123, 0.2) !important;
    }

    .mobile-category-link {
        box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -webkit-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -moz-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        background: rgba(248, 249, 250, 0.95) !important;
    }

    .mobile-category-icon i {
        font-size: 18px;
    }

    .mobile-category-text {
        font-size: 11px;
        font-weight: 700;
    }

    .mobile-categories-scroll {
        gap: 12px;
        padding: 0 15px;
        overflow-y: visible !important;
    }

    .mobile-categories-container {
        padding: 20px 0;
        margin: 0;
        overflow: visible !important;
    }

    .mobile-category-link {
        padding: 12px 8px !important;
    }
}

/* تحسينات إضافية للفئات العقارية - تحديث v2.0 */
.mobile-categories-container {
    position: relative;
    overflow: visible !important;
}

/* إزالة التدرجات الجانبية لإظهار الظلال كاملة */

/* تحسين توزيع الفئات للشاشات المختلفة - تحديث v3.0 */
@media (min-width: 375px) and (max-width: 768px) {
    .mobile-categories-scroll {
        justify-content: space-between;
        padding: 0 25px;
        overflow-y: visible !important;
        gap: 18px;
    }

    .mobile-category-item {
        flex: 1;
        max-width: 85px;
        min-width: 75px;
        overflow: visible !important;
    }

    .mobile-category-icon {
        width: 52px;
        height: 52px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(198, 171, 123, 0.25) !important;
    }

    .mobile-category-link {
        box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -webkit-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -moz-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        background: rgba(248, 249, 250, 0.95) !important;
    }

    .mobile-category-text {
        font-size: 12px;
        font-weight: 700;
    }
}

/* تحسينات إضافية للشاشات الكبيرة للهواتف - تحديث v3.0 */
@media (min-width: 414px) and (max-width: 768px) {
    .mobile-category-icon {
        width: 55px;
        height: 55px;
        border-radius: 13px;
        box-shadow: 0 5px 15px rgba(198, 171, 123, 0.3) !important;
    }

    .mobile-category-link {
        box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -webkit-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -moz-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        background: rgba(248, 249, 250, 0.95) !important;
    }

    .mobile-category-icon i {
        font-size: 22px;
    }

    .mobile-category-text {
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-category-link {
        padding: 16px 12px !important;
    }
}

/* تأثير النقر للفئات */
@media (max-width: 768px) {
    .mobile-category-link:active {
        transform: translateY(-1px) scale(0.98);
        transition: all 0.1s ease;
    }

    .mobile-category-link:active .mobile-category-icon {
        transform: scale(1.02);
        box-shadow: 0 3px 10px rgba(198, 171, 123, 0.25) !important;
    }

    .section-title {
        font-size: 1.5rem;
    }

    /* إزالة أي قيود على الحاويات */
    .container,
    .container-fluid,
    section,
    .py-5 {
        overflow: visible !important;
        position: relative;
    }

    /* تأكيد إظهار الظلال في قسم الفئات */
    section.py-5:has(.mobile-categories-container) {
        overflow: visible !important;
        padding-bottom: 4rem !important;
    }

    /* ضمان إظهار الظلال كاملة */
    .mobile-categories-container,
    .mobile-categories-scroll,
    .mobile-category-item,
    .mobile-category-link {
        overflow: visible !important;
        clip: none !important;
        clip-path: none !important;
        -webkit-clip-path: none !important;
        mask: none !important;
        -webkit-mask: none !important;
        contain: none !important;
        isolation: isolate;
    }

    /* إضافة مساحة إضافية للظلال */
    @media (max-width: 768px) {
        .mobile-categories-container {
            margin: 20px 0 30px 0 !important;
        }

        .mobile-categories-scroll {
            padding: 20px 20px 30px 20px !important;
        }
    }

    /* إضافة تأثيرات خاصة للمتصفحات المختلفة - تحديث v3.1 */
    .mobile-category-icon {
        -webkit-box-shadow: 0 4px 12px rgba(198, 171, 123, 0.25) !important;
        -moz-box-shadow: 0 4px 12px rgba(198, 171, 123, 0.25) !important;
        box-shadow: 0 4px 12px rgba(198, 171, 123, 0.25) !important;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform, box-shadow;
    }

    .mobile-category-link:hover .mobile-category-icon {
        -webkit-box-shadow: 0 8px 20px rgba(198, 171, 123, 0.4) !important;
        -moz-box-shadow: 0 8px 20px rgba(198, 171, 123, 0.4) !important;
        box-shadow: 0 8px 20px rgba(198, 171, 123, 0.4) !important;
    }

    /* تحسين ظلال الأزرار - تحديث v3.6 */
    .mobile-category-link {
        -webkit-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -moz-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.08));
        background: rgba(248, 249, 250, 0.95) !important;
    }

    .mobile-category-link:hover {
        -webkit-box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        -moz-box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        filter: drop-shadow(3px 3px 12px rgba(0, 0, 0, 0.12));
        background: rgba(255, 255, 255, 0.98) !important;
    }

    /* ظل إضافي للأيقونات */
    .mobile-category-icon {
        filter: drop-shadow(0 2px 4px rgba(198, 171, 123, 0.3));
    }

    .mobile-category-link:hover .mobile-category-icon {
        filter: drop-shadow(0 4px 8px rgba(198, 171, 123, 0.4));
    }

    /* إضافة تأثيرات خاصة لضمان ظهور التصميم الجديد */
    .mobile-categories-container {
        background: transparent !important;
        background-color: transparent !important;
        background-image: none !important;
    }

    /* تأكيد الألوان الذهبية للأيقونات */
    .mobile-category-icon {
        background: linear-gradient(135deg, #c6ab7b 0%, #d4c190 100%) !important;
        background-color: #c6ab7b !important;
    }

    .mobile-category-text {
        color: #666 !important;
    }

    .mobile-category-link:hover .mobile-category-text {
        color: #c6ab7b !important;
    }

    /* إعادة تعيين أي أنماط متضاربة - تحديث v3.6 */
    .mobile-category-link,
    .mobile-category-link:visited,
    .mobile-category-link:focus {
        background: rgba(248, 249, 250, 0.95) !important;
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
        box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -webkit-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -moz-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        text-decoration: none !important;
    }

    /* ضمان عدم تأثر التصميم بأنماط Bootstrap */
    .mobile-category-item .card,
    .mobile-category-item .card-body {
        display: none !important;
    }

    /* إخفاء التصميم القديم للفئات في الهاتف */
    @media (max-width: 768px) {
        .row.g-4 .col-md-3.col-sm-6 {
            display: none !important;
        }
    }

    /* تحسينات إضافية للشاشات الصغيرة جداً */
    @media (max-width: 360px) {
        .mobile-categories-scroll {
            gap: 10px;
            padding: 0 10px;
        }

        .mobile-category-item {
            min-width: 65px;
            max-width: 75px;
        }

        .mobile-category-icon {
            width: 42px;
            height: 42px;
            border-radius: 10px;
            box-shadow: 0 3px 8px rgba(198, 171, 123, 0.2) !important;
        }

        .mobile-category-link {
            box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
            -webkit-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
            -moz-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
            background: rgba(248, 249, 250, 0.95) !important;
        }

        .mobile-category-icon i {
            font-size: 16px;
        }

        .mobile-category-text {
            font-size: 10px;
            font-weight: 700;
        }

        .mobile-category-link {
            padding: 10px 6px !important;
        }
    }

    /* تحسينات للشاشات الكبيرة للهواتف */
    @media (min-width: 768px) and (max-width: 991px) {
        .mobile-categories-scroll {
            gap: 25px;
            padding: 0 30px;
        }

        .mobile-category-item {
            min-width: 85px;
            max-width: 95px;
        }

        .mobile-category-icon {
            width: 58px;
            height: 58px;
            border-radius: 14px;
            box-shadow: 0 6px 18px rgba(198, 171, 123, 0.3) !important;
        }

        .mobile-category-link {
            box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
            -webkit-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
            -moz-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
            background: rgba(248, 249, 250, 0.95) !important;
        }

        .mobile-category-icon i {
            font-size: 24px;
        }

        .mobile-category-text {
            font-size: 14px;
            font-weight: 700;
        }

        .mobile-category-link {
            padding: 18px 14px !important;
        }
    }
}

/* قواعد إضافية لضمان تطبيق الظلال في جميع المتصفحات - v3.6 */
@media (max-width: 768px) {
    .mobile-category-link,
    .mobile-category-item .mobile-category-link,
    .mobile-categories-scroll .mobile-category-link {
        box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -webkit-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -moz-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -ms-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        -o-box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1) !important;
        background: rgba(248, 249, 250, 0.95) !important;
        background-color: rgba(248, 249, 250, 0.95) !important;
    }

    .mobile-category-link:hover,
    .mobile-category-item .mobile-category-link:hover,
    .mobile-categories-scroll .mobile-category-link:hover {
        box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        -webkit-box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        -moz-box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        -ms-box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        -o-box-shadow: 8px 8px 25px rgba(0, 0, 0, 0.15) !important;
        background: rgba(255, 255, 255, 0.98) !important;
        background-color: rgba(255, 255, 255, 0.98) !important;
    }
}

/* تأثيرات الفيديو المتقدمة */
.hero-video-container {
    position: relative;
    overflow: hidden;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

/* تأثيرات الجسيمات المحسنة */
.particle {
    position: absolute;
    background: rgba(198, 171, 123, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 8s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* تحسينات للخريطة */
.leaflet-popup-content {
    font-family: 'Cairo', sans-serif !important;
    direction: rtl;
    text-align: right;
}

.leaflet-popup-content h6 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* تحسينات للنماذج */
.form-floating > label {
    right: 0;
    left: auto;
    transform-origin: right center;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(.85) translateY(-0.5rem) translateX(0.15rem);
}

/* تحسينات للجداول */
.table-responsive {
    direction: rtl;
}

.table th, .table td {
    text-align: right;
}

/* تحسينات للأزرار */
.btn-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

/* تحسينات للتنبيهات */
.alert-custom {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

.alert-success-custom {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.alert-warning-custom {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: white;
}

.alert-danger-custom {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    color: white;
}

/* تحسينات للبطاقات */
.card-hover {
    transition: all 0.3s ease;
}

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

/* تحسينات للنصوص */
.text-gradient {
    background: linear-gradient(45deg, var(--secondary-color), #d4b87a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* تحسينات للتحميل */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* تحسينات للطباعة */
@media print {
    .navbar,
    .footer,
    .btn,
    .language-toggle,
    .favorites-btn {
        display: none !important;
    }

    .container {
        max-width: none !important;
    }
}

/* تحسينات الملف الشخصي */
.profile-card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.profile-image-container {
    position: relative;
    display: inline-block;
}

.profile-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.profile-image-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.profile-image-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
    border-color: white;
}

.profile-image-overlay i {
    color: white;
    font-size: 10px;
}

.profile-image-overlay label {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.stat-item {
    padding: 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background-color: #f8f9fa00;
}

/* تحسينات إضافية للملف الشخصي */
.container.mt-2 {
    margin-top: 0.5rem !important;
}

.card-body.p-2 {
    padding: 0.5rem !important;
}

.form-label.small {
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
    font-weight: 500;
}

.form-control-sm {
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    height: auto;
}

.card-header.py-1 {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.row.g-2 > * {
    padding-right: 0.375rem;
    padding-left: 0.375rem;
    margin-bottom: 0.5rem;
}

.row.g-3 > * {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.favorites-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Blog Cards - Modern Design */
.blog-card-modern {
    position: relative;
    border-radius: 0; /* بدون border-radius */
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease; /* فقط تأثير على الظل */
    margin-bottom: 30px;
    height: 400px; /* تقليل الارتفاع لتحسين المظهر */
    cursor: pointer;
    background: #fff;
    display: block; /* تأكد من أن البطاقة block */
    transform: none !important; /* منع أي تحويلات */
}

/* إزالة تأثير الهوفر على البطاقة نفسها */
.blog-card-modern:hover {
    transform: none !important; /* إزالة الحركة بقوة */
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1) !important; /* الحفاظ على نفس الظل الأصلي */
}

/* إزالة pointer cursor من البطاقة وإضافته فقط للزر */
.blog-card-modern {
    cursor: default !important;
}

.blog-card-read-more-modern {
    cursor: pointer !important;
}

/* التأكد من عدم تحرك البطاقة في أي حال */
.blog-card-modern,
.blog-card-modern:hover,
.blog-card-modern:focus,
.blog-card-modern:active {
    transform: none !important;
    translate: none !important;
    position: relative !important;
}

.blog-card-image-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important; /* الصورة على كامل البطاقة */
    overflow: hidden;
    z-index: 1;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important; /* بدون border-radius */
}

.blog-card-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important; /* بدون border-radius */
}

/* إزالة تأثير الهوفر على الصورة */
.blog-card-modern:hover .blog-card-image {
    transform: none !important; /* إزالة تكبير الصورة */
}

.blog-card-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 35px; /* ترك مساحة للشريط السفلي المحدث */
    background: linear-gradient(
        to bottom,
        transparent 0%,
        transparent 20%, /* بداية التدرج أعلى */
        rgba(44, 62, 80, 0.3) 40%,
        rgba(44, 62, 80, 0.6) 60%,
        rgba(44, 62, 80, 0.8) 80%,
        rgba(44, 62, 80, 0.95) 100% /* تدرج أقوى */
    );
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px; /* padding أكبر */
    color: white;
    z-index: 2;
}

.blog-card-category-top {
    align-self: flex-start;
}

.category-badge-modern {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 4px 10px; /* صغر الصنف أكثر */
    border-radius: 12px;
    font-size: 0.7rem; /* خط أصغر */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.blog-card-content-bottom {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.blog-card-title-modern {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.blog-card-excerpt-modern {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 16px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* الشريط الرمادي السفلي */
.blog-card-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 35px; /* زيادة الارتفاع قليلاً للنص الأكبر */
    background: #a8b0b7; /* اللون المطلوب */
    border-top: 1px solid #9ca3ab;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px; /* زيادة padding قليلاً */
    z-index: 3;
    border-radius: 0 !important;
    transition: none !important; /* منع التأثيرات */
    transform: none !important; /* منع التحويلات */
}

/* منع تأثر الشريط بالهوفر */
.blog-card-modern:hover .blog-card-bottom-bar {
    transform: none !important;
    transition: none !important;
    background: #a8b0b7 !important; /* الحفاظ على نفس اللون */
    height: 35px !important; /* الارتفاع المحدث */
    bottom: 0 !important;
}

.blog-card-meta-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 0.85rem; /* تكبير الخط */
    color: #2c3e50; /* لون أغمق للوضوح مع الخلفية الجديدة */
    margin: 0;
}

.blog-card-date-modern {
    display: flex;
    align-items: center;
    gap: 6px; /* زيادة المسافة قليلاً */
    color: #2c3e50; /* لون أغمق للوضوح مع الخلفية الجديدة */
}

.blog-card-date-modern i {
    color: #2c3e50;
    font-size: 0.8rem; /* تكبير الأيقونة */
}

.blog-card-views-modern {
    display: flex;
    align-items: center;
    gap: 6px; /* زيادة المسافة قليلاً */
    font-weight: 500;
    color: #2c3e50; /* لون أغمق للوضوح مع الخلفية الجديدة */
}

.blog-card-views-modern i {
    color: #2c3e50;
    font-size: 0.8rem; /* تكبير الأيقونة */
}

.blog-card-read-more-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* تأثير الهوفر المحسن على زر قراءة المزيد فقط */
.blog-card-read-more-modern:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateX(6px) scale(1.05) !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2) !important;
}

.blog-card-read-more-modern i {
    transition: transform 0.3s ease;
}

.blog-card-read-more-modern:hover i {
    transform: translateX(6px) !important;
}

/* إضافة CSS إضافي للتأكد من عمل البطاقة */
.blog-card-modern * {
    box-sizing: border-box;
}

.blog-card-modern .blog-card-image-container,
.blog-card-modern .blog-card-image {
    max-width: none !important;
    min-width: 100% !important;
    min-height: 100% !important;
}

/* تأكد من أن البطاقة في صفحة المدونة تعمل */
#blogPosts .blog-card-modern .blog-card-image-container {
    position: absolute !important;
    inset: 0 !important; /* top: 0, right: 0, bottom: 0, left: 0 */
}

#blogPosts .blog-card-modern .blog-card-image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* تأكد من أن البطاقة في صفحة المقال تعمل */
#relatedPosts .blog-card-modern .blog-card-image-container {
    position: absolute !important;
    inset: 0 !important;
}

#relatedPosts .blog-card-modern .blog-card-image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* إزالة border-radius من جميع عناصر البطاقة بقوة */
.blog-card-modern,
.blog-card-modern *,
.blog-card-modern .blog-card-image-container,
.blog-card-modern .blog-card-image,
article.blog-card-modern,
article.blog-card-modern *,
article.blog-card-modern .blog-card-image-container,
article.blog-card-modern .blog-card-image {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    -ms-border-radius: 0 !important;
    -o-border-radius: 0 !important;
}

/* تأكد من أن البطاقة مربعة تماماً */
.blog-card-modern,
article.blog-card-modern {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    overflow: hidden !important;
}

/* قواعد إضافية للتأكد من إزالة الانحناءات */
#blogPosts .blog-card-modern,
#blogPosts article.blog-card-modern,
#relatedPosts .blog-card-modern,
#relatedPosts article.blog-card-modern {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
}

#blogPosts .blog-card-modern *,
#blogPosts article.blog-card-modern *,
#relatedPosts .blog-card-modern *,
#relatedPosts article.blog-card-modern * {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
}

/* تحسين التدرج للبطاقة الأطول */
.blog-card-content-bottom {
    margin-top: auto;
    padding-top: 20px;
}

/* CSS إضافي لضمان تغطية الصورة لكامل البطاقة */
.blog-card-modern {
    overflow: hidden !important;
}



/* إزالة أي margin أو padding قد يؤثر على الصورة */
.blog-card-modern .blog-card-image-container,
.blog-card-modern .blog-card-image {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
}

/* تأكد من أن الصورة تملأ المساحة بالكامل */
.blog-card-modern .blog-card-image {
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
}

/* قواعد نهائية لإزالة جميع الانحناءات - أولوية عالية جداً */
.blog-card-modern,
.blog-card-modern *,
.blog-card-modern::before,
.blog-card-modern::after,
.blog-card-modern *::before,
.blog-card-modern *::after,
article.blog-card-modern,
article.blog-card-modern *,
article.blog-card-modern::before,
article.blog-card-modern::after,
article.blog-card-modern *::before,
article.blog-card-modern *::after {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    -ms-border-radius: 0 !important;
    -o-border-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    -webkit-border-top-left-radius: 0 !important;
    -webkit-border-top-right-radius: 0 !important;
    -webkit-border-bottom-left-radius: 0 !important;
    -webkit-border-bottom-right-radius: 0 !important;
}

/* قواعد خاصة للصور */
.blog-card-modern img,
.blog-card-modern .blog-card-image,
.blog-card-modern .blog-card-image-container,
article.blog-card-modern img,
article.blog-card-modern .blog-card-image,
article.blog-card-modern .blog-card-image-container {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* قواعد خاصة للحاويات */
div.blog-card-modern,
article.blog-card-modern,
section.blog-card-modern {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
}
