/* ========== Portfolio list page ========== */
/* هم‌سبک با صفحه اصلی: کانواس تیره + کارت‌های پروژه */

:root {
    --pf-orange: #fdb614;
    --pf-orange-soft: #ffd970;
    --pf-blue: #1e2958;
    --pf-dark-1: #2a3144;
    --pf-dark-2: #1a1f2e;
    --pf-dark-3: #12151f;
    --pf-card: #1e2330;
    --pf-muted: rgba(255, 255, 255, .66);
    --pf-line: rgba(255, 255, 255, .09);
}

.pf {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 64px 0 88px;
    color: #fff;
}

.pf__glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(95px);
    pointer-events: none;
}

.pf__glow--1 {
    width: 460px;
    height: 460px;
    top: -160px;
    right: -120px;
    background: var(--pf-blue);
    opacity: .35;
}

.pf__glow--2 {
    width: 420px;
    height: 420px;
    bottom: -140px;
    left: -120px;
    background: var(--pf-blue);
    opacity: .4;
}

.pf__inner {
    position: relative;
    z-index: 1;
}

/* ---- head ---- */

.pf__head {
    text-align: center;
    margin-bottom: 30px;
}

.pf__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(253, 182, 20, .28);
    background: rgba(253, 182, 20, .07);
    color: var(--pf-orange);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
}

.pf__eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pf-orange);
    box-shadow: 0 0 0 0 rgba(253, 182, 20, .55);
    animation: pf-pulse 2.4s ease-out infinite;
}

@keyframes pf-pulse {
    0% { box-shadow: 0 0 0 0 rgba(253, 182, 20, .5); }
    70% { box-shadow: 0 0 0 9px rgba(253, 182, 20, 0); }
    100% { box-shadow: 0 0 0 0 rgba(253, 182, 20, 0); }
}

.pf__title {
    margin: 16px 0 10px;
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 800;
    line-height: 1.45;
    color: #fff;
}

.pf__subtitle {
    margin: 0;
    color: var(--pf-muted);
    font-size: 15px;
}

.pf__rule {
    display: block;
    width: 72px;
    height: 3px;
    margin: 20px auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--pf-orange), transparent);
}

/* ---- filters ---- */

.pf__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    padding-bottom: 4px;
}

.pf__chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid var(--pf-line);
    background: rgba(255, 255, 255, .035);
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color .3s ease, background .3s ease, border-color .3s ease, transform .3s ease;
}

.pf__chip:hover,
.pf__chip:focus-visible {
    color: #fff;
    border-color: rgba(253, 182, 20, .45);
    background: rgba(253, 182, 20, .08);
    text-decoration: none;
    transform: translateY(-2px);
}

.pf__chip.is-active {
    color: #1a1305;
    background: var(--pf-orange);
    border-color: var(--pf-orange);
    box-shadow: 0 12px 26px -16px rgba(253, 182, 20, .8);
}

/* ---- grid ---- */

.pf__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

/* ---- card ---- */

.pf-card {
    position: relative;
    min-width: 0;
}

.pf-card__link {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--pf-card) 0%, #191d28 100%);
    border: 1px solid var(--pf-line);
    box-shadow: 0 26px 50px -34px rgba(0, 0, 0, .8);
    text-decoration: none;
    color: inherit;
    transition:
        transform .5s cubic-bezier(.22, .7, .2, 1),
        border-color .4s ease,
        box-shadow .5s ease;
}

.pf-card__link:hover,
.pf-card__link:focus-visible {
    transform: translateY(-10px);
    border-color: rgba(253, 182, 20, .42);
    box-shadow: 0 38px 64px -34px rgba(0, 0, 0, .9), 0 0 0 1px rgba(253, 182, 20, .12);
    text-decoration: none;
    color: inherit;
}

.pf-card__link:focus-visible {
    outline: 2px solid var(--pf-orange);
    outline-offset: 3px;
}

.pf-card__frame {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--pf-orange));
    transition: width .55s cubic-bezier(.22, .7, .2, 1);
}

.pf-card__link:hover .pf-card__frame,
.pf-card__link:focus-visible .pf-card__frame {
    width: 100%;
}

/* نسبت ثابت 4:3 برای همه تصاویر */
.pf-card__media {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 0;
    padding-top: 75%;
    background: #12151d;
}

.pf-card__img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1.02);
    filter: saturate(.88) contrast(1.02);
    transition: transform .9s cubic-bezier(.22, .7, .2, 1), filter .6s ease;
}

.pf-card__link:hover .pf-card__img,
.pf-card__link:focus-visible .pf-card__img {
    transform: scale(1.11);
    filter: saturate(1.06) contrast(1.05);
}

.pf-card__veil {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(180deg, rgba(16, 19, 28, .1) 0%, rgba(16, 19, 28, .18) 45%, rgba(16, 19, 28, .88) 100%);
    transition: opacity .5s ease;
}

.pf-card__link:hover .pf-card__veil {
    opacity: .82;
}

.pf-card__shine {
    position: absolute;
    top: -60%;
    right: -140%;
    width: 55%;
    height: 220%;
    transform: rotate(18deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
    pointer-events: none;
}

.pf-card__link:hover .pf-card__shine {
    animation: pf-shine 1.1s cubic-bezier(.3, .1, .3, 1) forwards;
}

@keyframes pf-shine {
    from { right: -140%; }
    to { right: 140%; }
}

.pf-card__status {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.9;
    backdrop-filter: blur(6px);
    border: 1px solid transparent;
}

.pf-card__status.is-processing {
    background: rgba(253, 182, 20, .16);
    border-color: rgba(253, 182, 20, .5);
    color: var(--pf-orange-soft);
}

.pf-card__status.is-done {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .26);
    color: #fff;
}

.pf-card__status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.pf-card__status.is-processing .pf-card__status-dot {
    animation: pf-blink 1.6s ease-in-out infinite;
}

@keyframes pf-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .25; }
}

.pf-card__body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 18px 18px 16px;
}

.pf-card__cat {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(253, 182, 20, .8);
}

.pf-card__name {
    margin: 0 0 10px;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.6;
    color: #fff;
    transition: color .35s ease;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pf-card__link:hover .pf-card__name {
    color: var(--pf-orange);
}

.pf-card__text {
    margin: 0 0 16px;
    color: var(--pf-muted);
    font-size: 13.5px;
    line-height: 2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pf-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 13px;
    border-top: 1px solid var(--pf-line);
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, .6);
    transition: color .35s ease, border-color .35s ease;
}

.pf-card__link:hover .pf-card__more {
    color: var(--pf-orange);
    border-color: rgba(253, 182, 20, .3);
}

.pf-card__arrow {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    transition: transform .4s cubic-bezier(.22, .7, .2, 1);
}

.pf-card__link:hover .pf-card__arrow {
    transform: translateX(-6px);
}

/* ---- empty state ---- */

.pf__empty {
    max-width: 560px;
    margin: 0 auto;
    padding: 56px 32px;
    text-align: center;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .18));
    border: 1px solid var(--pf-line);
}

.pf__empty-icon {
    display: block;
    width: 62px;
    height: 62px;
    margin: 0 auto 22px;
    border-radius: 50%;
    border: 2px dashed rgba(253, 182, 20, .45);
}

.pf__empty h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.7;
}

.pf__empty p {
    margin: 0 0 26px;
    color: var(--pf-muted);
    font-size: 14.5px;
    line-height: 2;
}

/* ---- button ---- */

.pf__btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 32px;
    border-radius: 999px;
    border: 1px solid rgba(253, 182, 20, .55);
    background: rgba(253, 182, 20, .08);
    color: var(--pf-orange);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: color .35s ease, border-color .35s ease, transform .4s cubic-bezier(.22, .7, .2, 1), box-shadow .45s ease;
}

.pf__btn::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(90deg, #e5a000, var(--pf-orange) 55%, var(--pf-orange-soft));
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .5s cubic-bezier(.22, .7, .2, 1);
}

.pf__btn:hover,
.pf__btn:focus-visible {
    color: #1a1305;
    border-color: var(--pf-orange);
    transform: translateY(-3px);
    box-shadow: 0 18px 34px -18px rgba(253, 182, 20, .65);
    text-decoration: none;
}

.pf__btn:hover::before,
.pf__btn:focus-visible::before {
    transform: scaleX(1);
}

.pf__btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform .4s cubic-bezier(.22, .7, .2, 1);
}

.pf__btn:hover .pf__btn-arrow {
    transform: translateX(-6px);
}

/* ---- pagination ---- */

.pf__pagination {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.pf__pagination nav {
    display: flex;
    justify-content: center;
    width: 100%;
}

.pf__pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf__pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--pf-line);
    background: rgba(255, 255, 255, .035);
    color: rgba(255, 255, 255, .75);
    font-weight: 700;
    transition: color .3s ease, background .3s ease, border-color .3s ease, transform .3s ease;
}

.pf__pagination .page-item .page-link:hover {
    color: #fff;
    border-color: rgba(253, 182, 20, .45);
    background: rgba(253, 182, 20, .1);
    transform: translateY(-2px);
    box-shadow: none;
}

.pf__pagination .page-item.active .page-link {
    color: #1a1305;
    background: var(--pf-orange);
    border-color: var(--pf-orange);
    box-shadow: 0 12px 26px -16px rgba(253, 182, 20, .8);
}

.pf__pagination .page-item.disabled .page-link {
    opacity: .35;
    background: rgba(255, 255, 255, .02);
    color: rgba(255, 255, 255, .45);
}

/* بوت‌استرپ در برخی نسخه‌ها متن «قبلی/بعدی» را داخل span می‌گذارد */
.pf__pagination .pagination .page-link:focus {
    box-shadow: 0 0 0 3px rgba(253, 182, 20, .25);
}

/* ---- reveal ---- */

[data-pf-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity .7s cubic-bezier(.22, .7, .2, 1) var(--pf-delay, 0ms),
        transform .7s cubic-bezier(.22, .7, .2, 1) var(--pf-delay, 0ms);
    will-change: opacity, transform;
}

[data-pf-reveal].is-in {
    opacity: 1;
    transform: translateY(0);
}

/* ---- responsive ---- */

@media (max-width: 991.98px) {
    .pf {
        padding: 48px 0 64px;
    }
    .pf__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .pf__filters {
        margin-bottom: 30px;
    }
}

@media (max-width: 575.98px) {
    .pf {
        padding: 40px 0 52px;
    }
    .pf__grid {
        grid-template-columns: 1fr;
        gap: 22px;
        max-width: 440px;
        margin: 0 auto;
    }
    .pf__title {
        font-size: 25px;
    }
    .pf__filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .pf__filters::-webkit-scrollbar {
        display: none;
    }
    .pf__empty {
        padding: 40px 20px;
    }
    .pf__btn {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-pf-reveal],
    .pf-card__link,
    .pf-card__img,
    .pf-card__arrow,
    .pf__chip,
    .pf__btn,
    .pf__btn::before,
    .pf__btn-arrow,
    .pf__pagination .page-item .page-link {
        transition: none !important;
    }
    [data-pf-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }
    .pf-card__link:hover {
        transform: none;
    }
    .pf__eyebrow-dot,
    .pf-card__status-dot,
    .pf-card__shine {
        animation: none !important;
    }
}
