/*!*-------------- Projects Page --------------*!*/
.page-title {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(102, 100, 100, 1);
}

.page-subtitle {
    color: #777;
    font-size: 1rem;
}

/* نوار فیلتر - قابل اسکرول افقی در موبایل */
.filter-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.filter-scroll-wrapper::-webkit-scrollbar {
    height: 4px;
}

.filter-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.project-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: max-content;
    min-width: 100%;
}

.filter-link {
    display: inline-block;
    white-space: nowrap;
    transition: all 0.25s ease;
    color: #FDFDFD;
    background-color: #949494;
    border: none;
    border-radius: 50px;
    margin-top: 2rem;
    padding: 0.4rem 2.2rem;
    font-size: 1.05rem;
}

.filter-link:hover,
.filter-link.active {
    background: var(--aral-blue);
    color: #fff;
    border-color: var(--aral-blue);
}


/*!* =========================*/
/*   PROJECT ITEM*/
/*========================= *!*/

.project-grid {
    margin: 4rem 5rem 6rem;
    justify-content: center;
}

.project-item {
    display: flex;
}

.project-card {
    width: 100%;
    overflow: hidden;
    padding: 2rem 3rem 1rem;
    background: rgba(247, 246, 246, 1);
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
}

/* =========================
   PROJECT IMAGE
========================= */

.project-img-wrapper {
    width: 100%;
    aspect-ratio: 5 / 4; /* هم‌نسبت عکس‌های پروژه (حدود ۱۰۸۶×۸۵۸) تا ساختمان کامل دیده شود */
    overflow: hidden;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


/* =========================
   PROJECT NAME
========================= */

.project-info {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    max-height: none !important;
    margin-top: 1.5rem !important;
    padding: 0 !important;
    background: none !important;
}

.project-name {
    width: 100%;
    /*padding: 15px 20px;*/
    font-size: 20px;
    font-weight: 400;
    color: rgba(102, 100, 100, 1);
    text-align: center;
    direction: rtl;
    background: rgba(217, 217, 217, 0.3);
}


/* =========================
   PROJECT DETAILS
========================= */

.project-details {
    width: 100%;
    /*max-width: 300px;*/
    margin: 0 auto;
    text-align: center;
    direction: rtl;
}

/* =========================
   DETAIL ROW
========================= */

.project-detail-row {
    width: 100%;
    display: flex;
    align-items: stretch;
}


/* =========================
   DETAIL ITEM
========================= */

.project-detail-item {
    width: 50%;
    flex: 1;
    display: flex;
    justify-content: center;
    text-align: right;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(149, 148, 148, 1);
}


/* =========================
   DETAIL LABEL
========================= */

.project-detail-item .detail-label {
    display: block;
    margin-bottom: 2px;
}


/* =========================
   VERTICAL DIVIDER
========================= */

.detail-divider {
    width: 1px;
    height: 20px;
    background: rgba(0, 0, 0, 1);
    margin: 15px 18px;
}


/* =========================
   HORIZONTAL DIVIDER
========================= */

.detail-horizontal-line {
    width: 100%;
    height: 1px;

    background: rgb(0, 0, 0);

    margin: 2px 0;
}

/* =========================
   PAGINATION
========================= */

.project-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.75rem;
    direction: ltr;              /* ترتیب مثل تصویر: << ۱ ۲ ۳ ... >> */
    margin-bottom:5rem;
}

.page-btn {
    background: none;
    border: none;
    padding: 0.25rem 0.4rem;
    font-family: inherit;
    font-size: 1.1rem;
    color: rgba(149, 148, 148, 1);
    cursor: pointer;
    transition: color 0.2s ease;
}

.page-btn:hover:not(:disabled),
.page-btn.active {
    color: var(--aral-blue);
}

.page-btn.active {
    font-weight: 700;
}

.page-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.page-dots {
    color: rgba(149, 148, 148, 1);
    font-size: 1.1rem;
    letter-spacing: 2px;
}


/* ================================================== */
/* ریسپانسیو */
/* ================================================== */

@media (max-width: 575.98px) {
    .project-grid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .project-card {
        padding: 1rem 0.75rem 0.75rem;
    }
    .project-pagination {
        gap: 1rem;
    }
}

@media (max-width: 767.98px) {
    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.85rem;
    }

    .project-title {
        font-size: 0.9rem;
    }

    .project-category {
        font-size: 0.68rem;
    }

    .project-info {
        padding: 0.7rem 0.8rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .projects-page {
        padding: 1rem 0 3rem;
    }
}

@media (max-width: 991.98px) {
    .project-grid {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        --bs-gutter-x: 1rem;   /* فاصله‌ی بین دو کارت */
    }

    .project-card {
        padding: 1.25rem 1rem 1rem;
    }

    .project-details {
        max-width: 100%;
    }
}

/* لپ‌تاپ‌های کوچک: 992 تا 1399 */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .project-card {
        padding: 1.5rem 1.25rem 1rem;
    }

    .project-img-wrapper {
        aspect-ratio: 5 / 4;
    }

    .project-name {
        font-size: 17px;
    }

    .project-details {
        max-width: 100%;
    }

    .project-detail-item {
        font-size: 13px;
        white-space: nowrap;
    }

    .detail-divider {
        margin: 15px 8px;
    }
}


/* =========================
   PROJECT META + SPECS (چیدمان جدید توضیحات)
========================= */

.project-card {
    display: flex;
    flex-direction: column;
}

.project-info {
    display: flex !important;
    flex-direction: column;
    flex: 1;
}

.project-name {
    padding: 6px 12px;
    line-height: 1.8;
}

.project-meta {
    margin: 10px 0 0;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(149, 148, 148, 1);
    text-align: center;
    direction: rtl;
}

.project-specs {
    margin: 12px 0 0;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    direction: rtl;
    text-align: right;
}

.project-spec {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0 12px;
    align-items: baseline;
    padding: 6px 0;
}

.project-spec + .project-spec {
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

.project-spec dt {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.8;
    color: rgba(170, 169, 169, 1);
    white-space: nowrap;
}

.project-spec dd {
    margin: 0;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(102, 100, 100, 1);
}

@media (min-width: 992px) and (max-width: 1399.98px) {
    .project-spec {
        grid-template-columns: 4.75rem 1fr;
    }

    .project-spec dd,
    .project-meta {
        font-size: 13px;
    }
}


/* =========================
   زیر ۱۲۰۰: دو ستونه + فاصله‌های کمتر
   (کارت‌ها از ۱۲۰۰ به پایین دو ستونه می‌شن، چون دیتای پروژه چندخطی شده)
========================= */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .project-grid {
        margin: 3rem 0 4rem;
        --bs-gutter-x: 1.5rem;
    }

    .project-card {
        padding: 1.25rem 1.25rem 1rem;
    }

    .project-detail-item {
        white-space: normal;
    }
}
