/* ==========================
PROJECT CARD (Advanced Hover & Overlay)
========================== */
.project-card {
    position: relative;
    width: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
    background-color: var(--white);
    direction: rtl;
}

/* افکت بالا آمدن کارت */
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* لینک اصلی کل کارت را پوشش می‌دهد */
.project-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
}

/* تصویر پروژه */
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s ease;
}

/* تاریک شدن و زوم تصویر در هاور */
.project-card:hover .project-image {
    transform: scale(1.08);
    filter: brightness(0.75);
}

/* لایه توضیحات (Overlay) */
.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 24px 24px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.75) 60%,
        transparent 100%
    );
    backdrop-filter: blur(1px);
    transform: translateY(0);
    transition: padding 0.5s cubic-bezier(0.4,0,0.2,1), background 0.5s ease;
    z-index: 2;
}

/* هاور بدون جابه‌جایی کل Overlay */
.project-card:hover .project-overlay {
    padding-bottom: 28px;
}

/* برچسب دسته‌بندی */
.project-category {
    font-size: 11px;
    background: linear-gradient(135deg, #ff003a, #ff0000);
    color: var(--white);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    align-self: flex-start;
    margin-bottom: 10px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.3);
    display: inline-block;
}

/* عنوان پروژه */
.project-title-card {
    font-size: 22px;
    margin: 0 0 10px 0;
    font-weight: 800;
    color: var(--white);
    line-height: 1.4;
}

/* ==========================
PROJECT EXCERPT
Smooth Expand Hover
========================== */
.project-excerpt {
    color: rgba(255,255,255,0.85);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0 0 15px 0;
    /* ارتفاع دو خط */
    height: 44px;
    overflow: hidden;
    transition:
        height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.3s ease;
}

/* باز شدن متن در هاور */
.project-card:hover .project-excerpt {
    /* حدود ۵ خط */
    height: 110px;
    color: var(--white);
}

/* بخش تاریخ و لوکیشن */
.project-location {
    font-size: 12px;
    visibility:hidden;
    height:20px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    border-top: 1px solid transparent;
    padding-top: 0;
    transition:
        color 0.4s ease,
        border-color 0.4s ease,
        padding-top 0.4s ease;
}

/* نمایش تاریخ و لوکیشن در هاور */
.project-card:hover .project-location {
    color: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    visibility:visible;
    color:rgba(255,255,255,.7);
    padding-top: 12px;
}

.project-location i {
    color: var(--primary);
    font-size: 14px;
}

/* ==========================
PAGINATION STYLES FIX
========================== */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination .btn {
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 1px solid var(--slate-200);
    /* اصلاح رنگ‌ها برای تم سفید */
    background-color: #ffffff;
    color: var(--slate-700); /* رنگ خاکستری تیره برای اعداد */
}

.pagination .btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* استایل دکمه صفحه فعال */
.pagination .btn.active {
    background: var(--primary);
    color: #ffffff !important; /* رنگ سفید برای عدد فعال */
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

.pagination .btn.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}


.project-image-wrapper {
    width:100%;
    height:100%;
    position:absolute;
    inset:0;
}

.project-image-wrapper .project-image {
    width:100%;
    height:100%;
    object-fit:cover;
}


