/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    text-decoration: none;
    border-radius: 50%;
    font-size: 30px;
}

.whatsapp-float:hover a {
    color: #FFF;
}

.whatsapp-tooltip {
    position: absolute;
    top: 50%;
    left: 70px;
    transform: translateY(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10000;
}

.whatsapp-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-right-color: #333;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    left: 75px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.6);
    }
    100% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
    }
}

/* RTL Support for WhatsApp Button */
[dir="rtl"] .whatsapp-float {
    left: auto;
    right: 30px;
}

[dir="rtl"] .whatsapp-tooltip {
    left: auto;
    right: 70px;
}

[dir="rtl"] .whatsapp-tooltip::before {
    left: auto;
    right: -8px;
    border-left-color: #333;
    border-right-color: transparent;
}

[dir="rtl"] .whatsapp-float:hover .whatsapp-tooltip {
    left: auto;
    right: 75px;
}

/* Mobile Responsive - Enhanced */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px !important;
        height: 55px !important;
        font-size: 26px !important;
        bottom: 30px !important;
        left: 20px !important;
        z-index: 9999 !important;
        position: fixed !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    [dir="rtl"] .whatsapp-float {
        left: auto !important;
        right: 20px !important;
    }

    .whatsapp-tooltip {
        font-size: 12px;
        padding: 6px 10px;
        display: none; /* Hide tooltip on mobile for better UX */
    }

    /* Ensure it's above mobile navigation */
    .whatsapp-float {
        bottom: 100px !important;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
        bottom: 30px !important;
        left: 15px !important;
    }

    [dir="rtl"] .whatsapp-float {
        left: auto !important;
        right: 15px !important;
    }
}

/* Force visibility on all screen sizes */
@media screen {
    .whatsapp-float {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Header Height Reduction for Desktop */
@media (min-width: 992px) {
    .header.header-primary {
        padding: 8px 0 !important;
        height: auto !important;
        min-height: auto !important;
    }

    .header.header-primary .main-header__menu-box {
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
    }

    .header.header-primary .navbar {
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
        align-items: center !important;
    }

    .header.header-primary .navbar-logo {
        height: auto !important;
        line-height: 1 !important;
    }

    .header.header-primary .navbar-logo img {
        height: 50px !important;
        max-height: 50px !important;
        width: auto !important;
    }

    .header.header-primary .navbar__list {
        height: 70px !important;
        align-items: center !important;
        display: flex !important;
        margin: 0 !important;
    }

    .header.header-primary .navbar__item {
        height: auto !important;
        line-height: 60px !important;
    }

    .header.header-primary .navbar__options {
        height: 70px !important;
        align-items: center !important;
        display: flex !important;
    }

    .header.header-primary .btn--primary {
        height: 77px !important;
        min-height: 77px !important;
        max-height: 77px !important;
        padding: 0 20px !important;
        margin-top: -7px !important;
        font-size: 14px !important;
        line-height: 70px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .header.header-primary .navbar-country-select {
        height: 32px !important;
        font-size: 13px !important;
        padding: 4px 8px !important;
    }
}



/* Donate Now Floating Button */
.donate-float {
    position: fixed;
    right: 30px;
    bottom: 30px;
    background: linear-gradient(135deg, #046a58, #059862);
    color: #FFF;
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(4, 106, 88, 0.3);
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s ease;
    animation: donateGlow 3s infinite;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.donate-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(4, 106, 88, 0.4);
    background: linear-gradient(135deg, #059862, #046a58);
}

.donate-float a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFF;
    text-decoration: none;
    width: 100%;
    justify-content: center;
}

.donate-float:hover a {
    color: #FFF;
}

.donate-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.donate-float i {
    font-size: 18px;
    animation: heartBeat 2s infinite;
}

.donate-tooltip {
    position: absolute;
    top: 50%;
    right: 150px;
    transform: translateY(-50%);
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10000;
}

.donate-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #333;
}

.donate-float:hover .donate-tooltip {
    opacity: 1;
    visibility: visible;
    right: 155px;
}

@keyframes donateGlow {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(4, 106, 88, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(4, 106, 88, 0.6);
    }
}

@keyframes heartBeat {
    0%, 14%, 28%, 42%, 70% {
        transform: scale(1);
    }
    7%, 21%, 35% {
        transform: scale(1.2);
    }
}

/* RTL Support for Donate Button */
[dir="rtl"] .donate-float {
    right: auto;
    left: 30px;
}

[dir="rtl"] .donate-tooltip {
    right: auto;
    left: 150px;
}

[dir="rtl"] .donate-tooltip::before {
    right: auto;
    left: -8px;
    border-right-color: #333;
    border-left-color: transparent;
}

[dir="rtl"] .donate-float:hover .donate-tooltip {
    right: auto;
    left: 155px;
}

/* Mobile Responsive for Donate Button */
@media (max-width: 768px) {
    .donate-float {
        right: 20px !important;
        bottom: 160px !important;
        padding: 10px 16px !important;
        min-width: 120px !important;
        font-size: 14px !important;
        z-index: 9998 !important;
        position: fixed !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    [dir="rtl"] .donate-float {
        right: auto !important;
        left: 20px !important;
    }

    .donate-text {
        font-size: 12px !important;
    }

    .donate-float i {
        font-size: 16px !important;
    }

    .donate-tooltip {
        display: none; /* Hide tooltip on mobile */
    }
}

@media (max-width: 480px) {
    .donate-float {
        right: 15px !important;
        bottom: 35px !important;
        padding: 8px 12px !important;
        min-width: 100px !important;
    }

    [dir="rtl"] .donate-float {
        right: auto !important;
        left: 15px !important;
    }

    .donate-text {
        font-size: 11px !important;
    }

    .donate-float i {
        font-size: 14px !important;
    }
}

/* Force visibility for donate button */
@media screen {
    .donate-float {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}



/* تحسين أنيميشن قائمة الموبايل - تقليل مدة الأنيميشن */
.mobile-menu {
    -webkit-transition: all 200ms ease !important;
    transition: all 200ms ease !important;
}

.mobile-menu .mobile-menu__wrapper {
    -webkit-transition: all 200ms ease !important;
    transition: all 200ms ease !important;
}

.show-menu .mobile-menu__wrapper {
    -webkit-transition-delay: 100ms !important;
    transition-delay: 100ms !important;
}

.mobile-menu .nav-fade {
    -webkit-transition: all 0.2s ease-in-out !important;
    transition: all 0.2s ease-in-out !important;
}

.show-menu .nav-fade {
    -webkit-animation: navLinkFade 0.3s ease forwards !important;
    animation: navLinkFade 0.3s ease forwards !important;
    -webkit-transition: all 0.2s ease-in-out !important;
    transition: all 0.2s ease-in-out !important;
}

.nav-fade-active {
    animation: navLinkFade 0.3s ease reverse !important;
}

/* أو لإلغاء الأنيميشن بالكامل، قم بإلغاء تعليق الكود التالي: */
/*
.mobile-menu,
.mobile-menu .mobile-menu__wrapper,
.mobile-menu .nav-fade {
    -webkit-transition: none !important;
    transition: none !important;
    -webkit-animation: none !important;
    animation: none !important;
}

.show-menu .mobile-menu__wrapper {
    -webkit-transition-delay: 0ms !important;
    transition-delay: 0ms !important;
}

.show-menu .nav-fade {
    -webkit-animation: none !important;
    animation: none !important;
    opacity: 1 !important;
    -webkit-transform: translateY(0) !important;
    transform: translateY(0) !important;
}
*/

@media only screen and (min-width: 768px) {
    .header .navbar-logo img {
        max-width: 190px;
        height: 60px;
    }


}

.header .navbar__item a
{
    font-weight: 900;
}

.filter-campaigns input
{
    border: 1px solid var(--quaternary-color);;
}

.filter-campaigns .nice-select
{
    border-radius: 20px;
    padding: 11px 70px;
    border: 1px solid green;
}



/* حل المشكلة الأولى: جعل الفلاتر responsive */
.filter-campaigns {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-campaigns form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-campaigns input {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 1px solid var(--quaternary-color);
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.filter-campaigns input:focus {
    border-color: var(--primary-color);
}

/* حل مشكلة Nice Select - responsive */
.filter-campaigns .nice-select {
    flex: 1;
    min-width: 200px;
    border-radius: 25px !important;
    padding: 12px 40px 12px 15px !important;
    border: 1px solid var(--quaternary-color) !important;
    background: white !important;
    position: relative !important;
    /* الحل الأهم: z-index عالي */
    z-index: 9999 !important;
}

/* حل مشكلة z-index للقائمة المنسدلة */
.filter-campaigns .nice-select.open .list {
    z-index: 99999 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15) !important;
    border: 1px solid var(--quaternary-color) !important;
    border-radius: 10px !important;
    margin-top: 5px !important;
    background: white !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

.filter-campaigns .nice-select .list li {
    padding: 10px 15px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: background-color 0.2s !important;
}

.filter-campaigns .nice-select .list li:hover,
.filter-campaigns .nice-select .list li.focus {
    background-color: #f8f9fa !important;
}

.filter-campaigns .nice-select .list li:last-child {
    border-bottom: none !important;
}



/* Responsive Design */
@media (max-width: 768px) {
    .filter-campaigns {
        padding: 15px;
    }

    .filter-campaigns form {
        flex-direction: column;
        gap: 12px;
    }

    .filter-campaigns input,
    .filter-campaigns .nice-select {
        width: 100% !important;
        min-width: auto !important;
        flex: none !important;
    }



    /* تأكد من أن القائمة المنسدلة تعمل على الموبايل */
    .filter-campaigns .nice-select.open .list {
        max-height: 200px !important;
        overflow-y: auto !important;
    }

    .filter-campaigns .btn--primary {
        width: 100%;
        padding: 12px;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .filter-campaigns {
        margin: 0 -10px;
        border-radius: 0;
    }

    .filter-campaigns input,
    .filter-campaigns .nice-select {
        font-size: 16px; /* منع الزوم على iOS */

    }
}

/* حل إضافي لمشكلة z-index */
.filter-campaigns {
    position: relative !important;
    z-index: 10 !important;
}

/* إذا كان هناك عناصر أخرى تتداخل */
.section.cause.cause-three-alt {
    position: relative;
}

.section.cause.cause-three-alt .filter-campaigns {
    z-index: 1000;
}

.filter-campaigns input
{
    border-radius: 25px !important;
}

/* Navbar Language Selector Styling */
.navbar-language-selector {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.navbar-country-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 35px;
}

.navbar-country-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.navbar-country-select:focus {
    outline: none;
    border-color: #059862;
    box-shadow: 0 0 0 3px rgba(5, 152, 98, 0.1);
}

.navbar-country-select option {
    background: #fff;
    color: #333;
    padding: 8px;
}

/* RTL Support for Navbar Language Selector */
[dir="rtl"] .navbar-language-selector {
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .navbar-country-select {
    background-position: left 8px center;
    padding-right: 12px;
    padding-left: 35px;
}

/* Mobile adjustments */
@media (max-width: 1199px) {
    .navbar-language-selector {
        display: none !important;
    }
}

/* Topbar Center Text Styling */
.topbar-center-text {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0;
}

.topbar-center-link {
    color: #fff !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 0;
}

.topbar-center-link:hover {
    color: #059862 !important;
    text-decoration: none;
}

.topbar-center-link i {
    color: #059862;
    font-size: 14px;
}

/* Remove old topbar styles that are no longer needed */
.topbar-cta,
.topbar-link {
    display: none;
}


.topbar
{
    padding-top: 12px !important;
    background-color: rgba(0, 0, 0, 0.8) !important; /* Temporary for visibility */
}

/* Force topbar to show on all devices including mobile */
.topbar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999 !important;
    padding-bottom: 12px !important;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .topbar {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        background-color: rgba(0, 0, 0, 0.9) !important; /* More visible on mobile */
    }

    .topbar-center-text {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .topbar-center-link {
        display: flex !important;
        font-size: 13px !important;
        gap: 6px !important;
        color: #fff !important;
    }
}

@media (max-width: 480px) {
    .topbar {
        display: block !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    .topbar-center-link {
        font-size: 12px !important;
        gap: 5px !important;
        color: #fff !important;
    }
}

/* Ensure header appears below topbar on mobile */
@media (max-width: 768px) {
    .header.header-primary {
        margin-top: 0 !important;
        padding-top: 15px !important;
    }

    /* Add space between topbar and header content */
    .topbar + .header {
        margin-top: 5px !important;
    }
}

@media (max-width: 480px) {
    .header.header-primary {
        padding-top: 12px !important;
    }

    .topbar + .header {
        margin-top: 3px !important;
    }
}

/* Topbar text-only styling (when no link is provided) */
.topbar-center-text-only {
    color: #fff !important;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0;
}

.topbar-center-text-only i {
    color: #059862;
    font-size: 14px;
}

/* Mobile adjustments for text-only */
@media (max-width: 768px) {
    .topbar-center-text-only {
        font-size: 13px !important;
        gap: 6px !important;
    }

    .topbar-center-text-only i {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .topbar-center-text-only {
        font-size: 12px !important;
        gap: 5px !important;
    }

    .topbar-center-text-only i {
        font-size: 12px !important;
    }
}

/* تلوين أيقونات الإشعارات في صفحة تفاصيل الحملة */
.warning p i.fa-info-circle {
    color: #00796b !important; /* اللون الأخضر الأساسي الجديد للموقع */
    margin-left: 5px;
    margin-right: 5px;
}

.warning p i.fa-envelope {
    color: #004d40 !important; /* درجة أغمق من الأخضر الجديد */
    margin-left: 5px;
    margin-right: 5px;
}



.warning p:hover i.fa-info-circle {
    color: #004d40 !important;
    transform: scale(1.1);
}

.warning p:hover i.fa-envelope {
    color: #00796b !important;
    transform: scale(1.1);
}

/* تحسين عرض القيم المالية في تفاصيل الحملة على الموبايل */
.progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.progress-details .raised-amount,
.progress-details .target-amount {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* دعم RTL للقيم المالية */
[dir="rtl"] .progress-details {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .progress-details .raised-amount,
[dir="rtl"] .progress-details .target-amount {
    text-align: right;
}

/* للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .progress-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .progress-details .raised-amount,
    .progress-details .target-amount {
        width: 100%;

    }

    /* دعم RTL للشاشات الصغيرة */
    [dir="rtl"] .progress-details {
        align-items: flex-end;
    }
}


/* Mobile Language Switcher Styles */
.mobile-menu__language {
    padding: 0 40px;
    margin-bottom: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 30px;
    padding-bottom: 30px;
}

.mobile-language-switcher h6 {
    color: var(--black);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.language-options {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 25px;
    background: #f8f9fa;
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--black);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.language-option:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(4, 106, 88, 0.3);
}

.language-option.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 3px 10px rgba(4, 106, 88, 0.2);
}

.flag-icon {
    font-size: 16px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.language-option:hover .flag-icon,
.language-option.active .flag-icon {
    opacity: 1;
    transform: scale(1.1);
}

.language-option span {
    font-size: 14px;
    font-weight: 600;
}

/* توسيط نص الأزرار */



/* توسيط زر التبرع في صفحة تفاصيل الحملة */
#donate-now-button {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
    align-items: center !important;
}

@media only screen and (min-width: 768px) {
    .community .warning {
        margin: 0px 0px !important;
    }
}

@media only screen and (min-width: 992px) {
    .community .community-donation__inner {
        max-width: fit-content !important;
    }
}


/* تحسين عرض صورة الحملة في صفحة التفاصيل */
@media (min-width: 992px) {
    .cm-details__poster {
        max-width: 600px !important;
        margin: 0 auto !important;
    }

    .cm-details__poster img {
        width: 100% !important;
        height: auto !important;
        border-radius: 12px !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    }
}

@media (max-width: 991px) {
    .cm-details__poster {
        max-width: 500px !important;
        margin: 0 auto !important;
    }
}

@media (max-width: 767px) {
    .cm-details__poster {
        max-width: 100% !important;
    }
}

/* ==============================================
   حل مشكلة توازن ارتفاع بطاقات الحملات
   ============================================== */

/* ضمان ارتفاع متساوي لجميع البطاقات */
.cause__slider-single {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px; /* ارتفاع أدنى ثابت */
}

/* جعل المحتوى يتمدد لملء المساحة المتاحة */
.cause__slider-single .content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* تحديد ارتفاع ثابت للعناوين */
.cause__slider-single .content h6 {
    min-height: 3.2em; /* يسمح بـ سطرين كحد أقصى */
    line-height: 1.6 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* يحدد الحد الأقصى بسطرين */
    -webkit-box-orient: vertical; 
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 15px !important;
}

/* تحديد ارتفاع ثابت للوصف */
.cause__slider-single .content p {
    min-height: 4.2em; /* يسمح بـ 3 أسطر كحد أقصى */
    line-height: 1.4 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* يحدد الحد الأقصى بـ 3 أسطر */
    -webkit-box-orient: vertical; 
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 15px !important;
}

/* ضمان أن جميع الصور لها نفس الارتفاع */
.cause__slider-single .thumb img {
    height: 200px !important;
    object-fit: cover;
}

/* إصلاح تنسيق أزرار التقدم والأهداف */
.cause__slider-cta {
    margin-top: auto; /* يدفع هذا القسم إلى أسفل البطاقة */
    min-height: 120px; /* ارتفاع ثابت لقسم معلومات التبرع */
}

/* تحسين تنسيق الأرقام والعملة */
.cause-progress__goal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.cause-progress__goal p {
    margin: 0;
    flex: 1;
    min-width: 120px;
    font-size: 14px;
}

/* تحسين أزرار الـ CTA */
.cause__cta {
    margin-top: 15px;
}

.cause__cta a {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    display: block;
}

/* تحسين المظهر للحملات بدون هدف محدد */
.cause-no-target .cause__slider-single .cause__slider-cta {
    min-height: 100px; /* ارتفاع أقل للحملات بدون أهداف */
}

/* تحسين التجاوب للشاشات الصغيرة */
@media (max-width: 768px) {
    .cause__slider-single {
        min-height: 450px;
    }
    
    .cause__slider-single .content h6 {
        min-height: 2.8em;
        font-size: 16px;
    }
    
    .cause__slider-single .content p {
        min-height: 3.8em;
        font-size: 14px;
    }
    
    .cause__slider-cta {
        min-height: 100px;
    }
    
    .cause-no-target .cause__slider-single .cause__slider-cta {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .cause__slider-single {
        min-height: 400px;
    }
    
    .cause__slider-single .content h6 {
        min-height: 2.4em;
        font-size: 15px;
    }
    
    .cause__slider-single .content p {
        min-height: 3.2em;
        font-size: 13px;
    }
    
    .cause__slider-cta {
        min-height: 90px;
    }
}

/* تحسين مظهر الـ Swiper للحملات */
.cause__slider-wrapper .swiper-slide {
    height: auto;
    display: flex;
}

.cause__slider-wrapper .swiper-slide .cause__slider-inner {
    width: 100%;
    display: flex;
}

/* ضمان التناسق في اتجاه النص للغة العربية */
[dir="rtl"] .cause__slider-single .content h6,
[dir="rtl"] .cause__slider-single .content p {
    text-align: right;
    direction: rtl;
}

[dir="ltr"] .cause__slider-single .content h6,
[dir="ltr"] .cause__slider-single .content p {
    text-align: left;
    direction: ltr;
}



/* تحسين التباعد والهوامش */
.cause__slider-single .content {
    padding: 20px;
}

.cause__slider-single .cause__slider-cta {
    margin: 0;
    padding: 20px;
}

/* ضمان الحد الأدنى للارتفاع في جميع البيئات */
.swiper-slide .cause__slider-single {
    min-height: 500px !important;
}

@media (max-width: 768px) {
    .swiper-slide .cause__slider-single {
        min-height: 450px !important;
    }
}

@media (max-width: 480px) {
    .swiper-slide .cause__slider-single {
        min-height: 400px !important;
    }
}

/* ==============================================
   حل مشكلة توازن ارتفاع بطاقات الأخبار
   ============================================== */

/* ضمان ارتفاع متساوي لجميع بطاقات الأخبار */
.blog-two .blog__single-wrapper {
    height: 100%;
    display: flex;
}

.blog-two .blog__single {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 450px; /* ارتفاع أدنى ثابت */
    width: 100%;
}

.blog-two .blog__single-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

/* تحديد ارتفاع ثابت لعناوين الأخبار */
.blog-two .blog__single-content h5 {
    min-height: 3.6em; /* يسمح بـ سطرين كحد أقصى */
    line-height: 1.8 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* يحدد الحد الأقصى بسطرين */
    -webkit-box-orient: vertical; 
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 15px !important;
}

/* ضمان أن جميع صور الأخبار لها نفس الارتفاع */
.blog-two .blog__single-thumb img {
    height: 200px !important;
    object-fit: cover;
    width: 100%;
}

/* تنسيق قسم المعلومات الأساسية (التاريخ والمشاهدات) */


/* تنسيق قسم المحتوى */
.blog-two .blog__single-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 15px;
}

/* تنسيق قسم الصورة */
.blog-two .blog__single-thumb {
    margin-bottom: 15px;
    position: relative;
}

/* تنسيق زر القراءة - يبقى في الأسفل */
.blog-two .blog__single-cta {
    margin-top: auto;
    padding-top: 15px;
}

/* ضمان توحيد ارتفاع الأعمدة */
.blog-two .row.gutter-40 > [class*="col-"] {
    display: flex;
    margin-bottom: 40px;
}

/* تحسين التجاوب للشاشات الصغيرة */
@media (max-width: 768px) {
    .blog-two .blog__single {
        min-height: 400px;
    }
    
    .blog-two .blog__single-content h5 {
        min-height: 3.2em;
        font-size: 18px;
        line-height: 1.6 !important;
    }
    
    .blog-two .blog__single-thumb img {
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    .blog-two .blog__single {
        min-height: 350px;
    }
    
    .blog-two .blog__single-content h5 {
        min-height: 2.8em;
        font-size: 16px;
        line-height: 1.4 !important;
    }
    
    .blog-two .blog__single-thumb img {
        height: 160px !important;
    }
    
    .blog-two .blog__single-meta {
        min-height: 40px;
    }
}

/* ضمان التناسق في اتجاه النص للغة العربية - الأخبار */
[dir="rtl"] .blog-two .blog__single-content h5 {
    text-align: right;
    direction: rtl;
}

[dir="ltr"] .blog-two .blog__single-content h5 {
    text-align: left;
    direction: ltr;
}

/* تحسين مظهر العلامة/التصنيف في الأخبار */
.blog-two .blog__single-thumb .tag {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

[dir="rtl"] .blog-two .blog__single-thumb .tag {
    right: 10px;
    left: auto;
}

[dir="ltr"] .blog-two .blog__single-thumb .tag {
    left: 10px;
    right: auto;
}
