/* ========== Article list page ========== */
/* هم‌سبک با صفحه اصلی و لیست پروژه‌ها (کانواس مشترک در site-dark.css) */

.ar {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 64px 0 88px;
    color: #fff;
}

.ar__glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(95px);
    pointer-events: none;
}

.ar__glow--1 {
    width: 460px;
    height: 460px;
    top: -160px;
    left: -130px;
    background: var(--page-blue);
    opacity: .35;
}

.ar__glow--2 {
    width: 420px;
    height: 420px;
    bottom: -140px;
    right: -120px;
    background: var(--page-blue);
    opacity: .4;
}

.ar__inner {
    position: relative;
    z-index: 1;
}

/* ---- head ---- */

.ar__head {
    text-align: center;
    margin-bottom: 30px;
}

.ar__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(--page-orange);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
}

.ar__eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--page-orange);
    box-shadow: 0 0 0 0 rgba(253, 182, 20, .55);
    animation: ar-pulse 2.4s ease-out infinite;
}

@keyframes ar-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); }
}

.ar__title {
    margin: 16px 0 10px;
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 800;
    line-height: 1.45;
    color: #fff;
}

.ar__subtitle {
    margin: 0;
    color: var(--page-muted);
    font-size: 15px;
}

.ar__rule {
    display: block;
    width: 72px;
    height: 3px;
    margin: 20px auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--page-orange), transparent);
}

/* ---- filters ---- */

.ar__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    padding-bottom: 4px;
}

.ar__chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    border-radius: 999px;
    border: 1px solid var(--page-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;
}

.ar__chip:hover,
.ar__chip:focus-visible {
    color: #fff;
    border-color: rgba(253, 182, 20, .45);
    background: rgba(253, 182, 20, .08);
    text-decoration: none;
    transform: translateY(-2px);
}

.ar__chip.is-active {
    color: #1a1305;
    background: var(--page-orange);
    border-color: var(--page-orange);
    box-shadow: 0 12px 26px -16px rgba(253, 182, 20, .8);
}

/* ---- grid ---- */

.ar__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

/* ---- card ---- */

.ar-card {
    position: relative;
    min-width: 0;
}

.ar-card__link {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--page-card) 0%, #191d28 100%);
    border: 1px solid var(--page-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;
}

.ar-card__link:hover,
.ar-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;
}

.ar-card__link:focus-visible {
    outline: 2px solid var(--page-orange);
    outline-offset: 3px;
}

.ar-card__frame {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--page-orange));
    transition: width .55s cubic-bezier(.22, .7, .2, 1);
}

.ar-card__link:hover .ar-card__frame,
.ar-card__link:focus-visible .ar-card__frame {
    width: 100%;
}

/* نسبت ثابت 16:9 برای تصویر شاخص */
.ar-card__media {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    background: #12151d;
}

.ar-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;
}

.ar-card__link:hover .ar-card__img,
.ar-card__link:focus-visible .ar-card__img {
    transform: scale(1.1);
    filter: saturate(1.06) contrast(1.05);
}

.ar-card__veil {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(180deg, rgba(16, 19, 28, .08) 0%, rgba(16, 19, 28, .2) 45%, rgba(16, 19, 28, .85) 100%);
    transition: opacity .5s ease;
}

.ar-card__link:hover .ar-card__veil {
    opacity: .82;
}

.ar-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;
}

.ar-card__link:hover .ar-card__shine {
    animation: ar-shine 1.1s cubic-bezier(.3, .1, .3, 1) forwards;
}

@keyframes ar-shine {
    from { right: -140%; }
    to { right: 140%; }
}

.ar-card__cat {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(253, 182, 20, .16);
    border: 1px solid rgba(253, 182, 20, .5);
    backdrop-filter: blur(6px);
    color: var(--page-orange-soft);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.9;
    max-width: calc(100% - 28px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- body ---- */

.ar-card__body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 18px 20px 16px;
}

.ar-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, .5);
    font-size: 12.5px;
    font-weight: 600;
}

.ar-card__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ar-card__date svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    color: rgba(253, 182, 20, .75);
}

.ar-card__dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
}

.ar-card__name {
    margin: 0 0 10px;
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.75;
    color: #fff;
    transition: color .35s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ar-card__link:hover .ar-card__name {
    color: var(--page-orange);
}

.ar-card__text {
    margin: 0 0 16px;
    color: var(--page-muted);
    font-size: 13.5px;
    line-height: 2.05;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ar-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 13px;
    border-top: 1px solid var(--page-line);
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, .6);
    transition: color .35s ease, border-color .35s ease;
}

.ar-card__link:hover .ar-card__more {
    color: var(--page-orange);
    border-color: rgba(253, 182, 20, .3);
}

.ar-card__arrow {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    transition: transform .4s cubic-bezier(.22, .7, .2, 1);
}

.ar-card__link:hover .ar-card__arrow {
    transform: translateX(-6px);
}

/* ---- empty state ---- */

.ar__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(--page-line);
}

.ar__empty-icon {
    display: block;
    width: 62px;
    height: 62px;
    margin: 0 auto 22px;
    border-radius: 50%;
    border: 2px dashed rgba(253, 182, 20, .45);
}

.ar__empty h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.7;
}

.ar__empty p {
    margin: 0 0 26px;
    color: var(--page-muted);
    font-size: 14.5px;
    line-height: 2;
}

/* ---- button ---- */

.ar__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(--page-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;
}

.ar__btn::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(90deg, #e5a000, var(--page-orange) 55%, var(--page-orange-soft));
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .5s cubic-bezier(.22, .7, .2, 1);
}

.ar__btn:hover,
.ar__btn:focus-visible {
    color: #1a1305;
    border-color: var(--page-orange);
    transform: translateY(-3px);
    box-shadow: 0 18px 34px -18px rgba(253, 182, 20, .65);
    text-decoration: none;
}

.ar__btn:hover::before,
.ar__btn:focus-visible::before {
    transform: scaleX(1);
}

.ar__btn-arrow {
    width: 18px;
    height: 18px;
    transition: transform .4s cubic-bezier(.22, .7, .2, 1);
}

.ar__btn:hover .ar__btn-arrow {
    transform: translateX(-6px);
}

/* ---- pagination ---- */

.ar__pagination {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.ar__pagination nav {
    display: flex;
    justify-content: center;
    width: 100%;
}

.ar__pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ar__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(--page-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;
}

.ar__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;
}

.ar__pagination .page-item.active .page-link {
    color: #1a1305;
    background: var(--page-orange);
    border-color: var(--page-orange);
    box-shadow: 0 12px 26px -16px rgba(253, 182, 20, .8);
}

.ar__pagination .page-item.disabled .page-link {
    opacity: .35;
    background: rgba(255, 255, 255, .02);
    color: rgba(255, 255, 255, .45);
}

.ar__pagination .pagination .page-link:focus {
    box-shadow: 0 0 0 3px rgba(253, 182, 20, .25);
}

/* ---- reveal ---- */

[data-ar-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity .7s cubic-bezier(.22, .7, .2, 1) var(--ar-delay, 0ms),
        transform .7s cubic-bezier(.22, .7, .2, 1) var(--ar-delay, 0ms);
    will-change: opacity, transform;
}

[data-ar-reveal].is-in {
    opacity: 1;
    transform: translateY(0);
}

/* ---- responsive ---- */

@media (max-width: 991.98px) {
    .ar {
        padding: 48px 0 64px;
    }
    .ar__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .ar__filters {
        margin-bottom: 30px;
    }
}

@media (max-width: 575.98px) {
    .ar {
        padding: 40px 0 52px;
    }
    .ar__grid {
        grid-template-columns: 1fr;
        gap: 22px;
        max-width: 440px;
        margin: 0 auto;
    }
    .ar__title {
        font-size: 25px;
    }
    .ar__filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .ar__filters::-webkit-scrollbar {
        display: none;
    }
    .ar__empty {
        padding: 40px 20px;
    }
    .ar__btn {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-ar-reveal],
    .ar-card__link,
    .ar-card__img,
    .ar-card__arrow,
    .ar__chip,
    .ar__btn,
    .ar__btn::before,
    .ar__btn-arrow,
    .ar__pagination .page-item .page-link {
        transition: none !important;
    }
    [data-ar-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }
    .ar-card__link:hover {
        transform: none;
    }
    .ar__eyebrow-dot,
    .ar-card__shine {
        animation: none !important;
    }
}
