/*
|--------------------------------------------------------------------------
| Parham Posts Archive
|--------------------------------------------------------------------------
| Independent archive stylesheet
| PARHAM-CMS-ROADMAP-V1
|--------------------------------------------------------------------------
*/

.parham-posts-page {
    --posts-green: #0F4C3A;
    --posts-green-dark: #082D24;
    --posts-gold: #D4AF37;
    --posts-cream: #F8F6F1;
    --posts-text: #17231f;
    --posts-muted: #718078;
    --posts-border: #e5e9e6;
    --posts-white: #ffffff;
    --posts-shadow: 0 16px 45px rgba(8, 45, 36, .07);

    width: 100%;
    background:
        linear-gradient(
            180deg,
            var(--posts-cream) 0,
            #ffffff 420px
        );
    color: var(--posts-text);
    font-family: "Kalameh", "Rokh", sans-serif;
}

.parham-posts-page *,
.parham-posts-page *::before,
.parham-posts-page *::after {
    box-sizing: border-box;
}

.parham-posts-page a,
.parham-posts-page button,
.parham-posts-page input {
    font: inherit;
}

.parham-posts-page a {
    color: inherit;
    text-decoration: none;
}

.parham-posts-page img {
    display: block;
    max-width: 100%;
}

.parham-posts-page .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ================================================================
   TOP AD
================================================================ */

.posts-ad--top {
    width: min(100%, 1400px);
    margin: 28px auto 0;
    overflow: hidden;
    border: 1px solid var(--posts-border);
    border-radius: 22px;
    background: var(--posts-white);
    box-shadow: var(--posts-shadow);
}

.posts-ad__banner-link,
.posts-ad--top > img {
    display: block;
    width: 100%;
    line-height: 0;
}

.posts-ad--top img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.posts-ad__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 36px;
    text-align: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(212, 175, 55, .12), transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(15, 76, 58, .12), transparent 32%),
        var(--posts-white);
}

.posts-ad__empty--wide {
    min-height: 300px;
}

.posts-ad__empty strong {
    margin-top: 8px;
    color: var(--posts-green-dark);
    font-size: 24px;
    font-weight: 800;
}

.posts-ad__empty small {
    margin-top: 8px;
    color: var(--posts-muted);
}

.posts-ad__label {
    color: var(--posts-gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
}


/* ================================================================
   SHELL
================================================================ */

.posts-shell {
    width: min(1380px, calc(100% - 40px));
    margin: 46px auto 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 34px;
    align-items: start;
    direction: ltr;
}

.posts-main,
.posts-sidebar {
    min-width: 0;
    direction: rtl;
}

.posts-main {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
}

.posts-sidebar {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    height: fit-content;
    min-height: 0;
    margin: 0;
    padding: 0;
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transform: none;
}


/* ================================================================
   HEADING
================================================================ */

.posts-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.posts-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--posts-gold);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
}

.posts-heading h1 {
    margin: 0;
    color: var(--posts-green-dark);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.2;
    font-weight: 900;
}

.posts-heading p {
    margin: 10px 0 0;
    color: var(--posts-muted);
    font-size: 15px;
    line-height: 1.8;
}

.posts-count {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border: 1px solid rgba(15, 76, 58, .13);
    border-radius: 20px;
    background: rgba(255, 255, 255, .8);
}

.posts-count strong {
    color: var(--posts-green);
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.posts-count span {
    margin-top: 5px;
    color: var(--posts-muted);
    font-size: 11px;
}


/* ================================================================
   POST CARD
================================================================ */

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.post-card {
    display: grid;
    grid-template-columns: 285px minmax(0, 1fr);
    min-height: 235px;
    overflow: hidden;
    border: 1px solid var(--posts-border);
    border-radius: 24px;
    background: var(--posts-white);
    box-shadow: 0 8px 28px rgba(8, 45, 36, .035);
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
    direction: ltr;
}

.post-card:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 76, 58, .18);
    box-shadow: var(--posts-shadow);
}

.post-card__media {
    position: relative;
    min-height: 235px;
    overflow: hidden;
    direction: rtl;
}

.post-card__media img,
.post-card__placeholder {
    width: 100%;
    height: 100%;
    min-height: 235px;
    object-fit: cover;
    transition: transform .5s ease;
}

.post-card:hover .post-card__media img {
    transform: scale(1.045);
}

.post-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(
            135deg,
            var(--posts-green-dark),
            var(--posts-green)
        );
}

.post-card__placeholder span {
    color: rgba(255, 255, 255, .35);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .12em;
}

.post-card__category {
    position: absolute;
    right: 16px;
    top: 16px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(8, 45, 36, .88);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.post-card__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 27px 30px;
    direction: rtl;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--posts-muted);
    font-size: 11px;
}

.post-card__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--posts-gold);
}

.post-card__title {
    margin: 12px 0 8px;
    font-size: 23px;
    line-height: 1.55;
    font-weight: 850;
}

.post-card__title a {
    color: var(--posts-green-dark);
    transition: color .2s ease;
}

.post-card__title a:hover {
    color: var(--posts-green);
}

.post-card__excerpt {
    margin: 0;
    color: var(--posts-muted);
    font-size: 14px;
    line-height: 1.95;
}

.post-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: auto;
    padding-top: 20px;
}

.post-card__author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--posts-muted);
    font-size: 11px;
}

.post-card__author-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 50%;
    background: var(--posts-cream);
    color: var(--posts-green);
    font-size: 12px;
    font-weight: 900;
}

.post-card__read {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--posts-green);
    font-size: 12px;
    font-weight: 800;
}

.post-card__read span {
    transition: transform .2s ease;
}

.post-card__read:hover span {
    transform: translateX(-4px);
}


/* ================================================================
   INLINE ADS
================================================================ */

.posts-inline-ad {
    overflow: hidden;
    border-radius: 22px;
}

.posts-inline-ad--html {
    border: 1px solid rgba(212, 175, 55, .35);
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(212, 175, 55, .17),
            transparent 28%
        ),
        linear-gradient(135deg, #fff, #f9f7ef);
}

.posts-inline-ad__link {
    display: block;
}

.posts-inline-ad__content {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    min-height: 150px;
    padding: 25px 28px;
}

.posts-inline-ad__sponsor {
    align-self: start;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--posts-gold);
    color: var(--posts-green-dark);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.posts-inline-ad__content h3 {
    margin: 0;
    color: var(--posts-green-dark);
    font-size: 20px;
    font-weight: 850;
}

.posts-inline-ad__content p {
    margin: 6px 0 0;
    color: var(--posts-muted);
    font-size: 13px;
    line-height: 1.8;
}

.posts-inline-ad__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--posts-green);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.posts-inline-ad__cta b {
    font-size: 16px;
}

.posts-inline-ad--banner {
    border: 1px solid var(--posts-border);
    background: var(--posts-white);
}

.posts-inline-ad--banner img {
    width: 100%;
    min-height: 150px;
    max-height: 240px;
    object-fit: cover;
}


/* ================================================================
   SIDEBAR
================================================================ */

.sidebar-card {
    padding: 23px;
    border: 1px solid var(--posts-border);
    border-radius: 22px;
    background: var(--posts-white);
    box-shadow: 0 7px 24px rgba(8, 45, 36, .035);
}

.sidebar-card__heading {
    margin-bottom: 17px;
}

.sidebar-card__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--posts-gold);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .14em;
}

.sidebar-card__heading h2 {
    margin: 0;
    color: var(--posts-green-dark);
    font-size: 18px;
    font-weight: 850;
}


/* Search */

.sidebar-search__form {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--posts-border);
    border-radius: 14px;
    background: #fbfcfb;
}

.sidebar-search__form:focus-within {
    border-color: rgba(15, 76, 58, .4);
    box-shadow: 0 0 0 3px rgba(15, 76, 58, .07);
}

.sidebar-search__form input {
    min-width: 0;
    flex: 1;
    height: 48px;
    padding: 0 13px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--posts-text);
}

.sidebar-search__form input::placeholder {
    color: #9aa59f;
}

.sidebar-search__form button {
    width: 48px;
    flex: 0 0 48px;
    border: 0;
    background: var(--posts-green);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease;
}

.sidebar-search__form button:hover {
    background: var(--posts-green-dark);
}

.sidebar-search__form button span {
    font-size: 22px;
}


/* Sidebar Banner */

.sidebar-ad {
    overflow: hidden;
    border: 1px solid var(--posts-border);
    border-radius: 22px;
    background: var(--posts-white);
}

.sidebar-ad a {
    display: block;
}

.sidebar-ad img {
    width: 100%;
    min-height: 220px;
    object-fit: cover;
}

.sidebar-ad__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    padding: 25px;
    text-align: center;
    background:
        radial-gradient(
            circle at 50% 10%,
            rgba(212, 175, 55, .12),
            transparent 36%
        ),
        var(--posts-cream);
}

.sidebar-ad__placeholder span {
    color: var(--posts-gold);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .16em;
}

.sidebar-ad__placeholder strong {
    margin-top: 8px;
    color: var(--posts-green-dark);
    font-size: 18px;
}

.sidebar-ad__placeholder small {
    margin-top: 6px;
    color: var(--posts-muted);
    font-size: 11px;
}


/* Categories */

.sidebar-category-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-category-list li {
    border-bottom: 1px solid #eef1ef;
}

.sidebar-category-list li:last-child {
    border-bottom: 0;
}

.sidebar-category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
}

.sidebar-category-list__title {
    color: var(--posts-text);
    font-size: 13px;
    font-weight: 650;
    transition: color .2s ease;
}

.sidebar-category-list a:hover .sidebar-category-list__title {
    color: var(--posts-green);
}

.sidebar-category-list__count {
    min-width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--posts-cream);
    color: var(--posts-green);
    font-size: 10px;
    font-weight: 800;
}


/* Clickable HTML Ad */

.sidebar-click-ad {
    position: relative;
    overflow: hidden;
    padding: 25px;
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(212, 175, 55, .2),
            transparent 36%
        ),
        var(--posts-green-dark);
    color: #fff;
}

.sidebar-click-ad::after {
    content: "";
    position: absolute;
    left: -30px;
    bottom: -40px;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
}

.sidebar-click-ad__link {
    display: block;
    position: relative;
    z-index: 1;
}

.sidebar-click-ad__label {
    display: inline-block;
    color: var(--posts-gold);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.sidebar-click-ad h2 {
    margin: 10px 0 7px;
    color: #fff;
    font-size: 20px;
    font-weight: 850;
}

.sidebar-click-ad p {
    margin: 0;
    color: rgba(255, 255, 255, .68);
    font-size: 12px;
    line-height: 1.9;
}

.sidebar-click-ad__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.sidebar-click-ad__cta b {
    color: var(--posts-gold);
}


/* Latest */

.sidebar-post-list {
    display: flex;
    flex-direction: column;
}

.sidebar-post {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid #eef1ef;
}

.sidebar-post:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.sidebar-post:first-child {
    padding-top: 0;
}

.sidebar-post__number {
    color: var(--posts-gold);
    font-size: 12px;
    font-weight: 900;
}

.sidebar-post h3 {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    font-weight: 750;
}

.sidebar-post h3 a {
    color: var(--posts-text);
    transition: color .2s ease;
}

.sidebar-post h3 a:hover {
    color: var(--posts-green);
}

.sidebar-post time {
    display: block;
    margin-top: 5px;
    color: var(--posts-muted);
    font-size: 10px;
}


/* Popular */

.sidebar-popular-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.sidebar-popular {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    padding: 10px;
    border-radius: 12px;
    transition: background .2s ease;
}

.sidebar-popular:hover {
    background: var(--posts-cream);
}

.sidebar-popular__rank {
    color: var(--posts-gold);
    font-size: 16px;
    font-weight: 900;
}

.sidebar-popular__content {
    min-width: 0;
}

.sidebar-popular__content strong {
    display: block;
    color: var(--posts-text);
    font-size: 12px;
    line-height: 1.7;
}

.sidebar-popular__content small {
    display: block;
    margin-top: 4px;
    color: var(--posts-muted);
    font-size: 9px;
}


/* Tags */

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.sidebar-tags a {
    padding: 7px 10px;
    border: 1px solid var(--posts-border);
    border-radius: 999px;
    background: #fbfcfb;
    color: var(--posts-muted);
    font-size: 10px;
    transition:
        color .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.sidebar-tags a:hover {
    border-color: rgba(15, 76, 58, .25);
    background: var(--posts-cream);
    color: var(--posts-green);
}

.sidebar-empty {
    margin: 0;
    color: var(--posts-muted);
    font-size: 12px;
    line-height: 1.8;
}


/* ================================================================
   EMPTY
================================================================ */

.posts-empty {
    padding: 70px 30px;
    border: 1px dashed #d7ded9;
    border-radius: 25px;
    background: rgba(255, 255, 255, .75);
    text-align: center;
}

.posts-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    margin-bottom: 17px;
    border-radius: 50%;
    background: var(--posts-cream);
    color: var(--posts-green);
    font-size: 28px;
}

.posts-empty h2 {
    margin: 0;
    color: var(--posts-green-dark);
    font-size: 23px;
}

.posts-empty p {
    margin: 8px 0 20px;
    color: var(--posts-muted);
    font-size: 13px;
}

.posts-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    background: var(--posts-green);
    color: #fff !important;
    font-size: 12px;
    font-weight: 800;
    transition: background .2s ease;
}

.posts-button:hover {
    background: var(--posts-green-dark);
}


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

.posts-pagination {
    width: 100%;
    margin-top: 34px;
    padding-top: 8px;
}

.posts-pagination__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    direction: rtl;
    flex-wrap: wrap;
}

.posts-pagination__pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    direction: rtl;
}

.posts-pagination__page,
.posts-pagination__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--posts-border);
    border-radius: 12px;
    background: #fff;
    color: var(--posts-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
}

.posts-pagination__arrow {
    gap: 7px;
    min-width: 82px;
}

.posts-pagination__page:hover,
.posts-pagination__arrow:hover {
    border-color: var(--posts-green);
    color: var(--posts-green);
    background: #fff;
    transform: translateY(-1px);
}

.posts-pagination__page--active {
    border-color: var(--posts-green);
    background: var(--posts-green);
    color: #fff;
    box-shadow: 0 5px 14px rgba(15, 76, 58, .16);
}

.posts-pagination__page--active:hover {
    background: var(--posts-green);
    color: #fff;
    transform: none;
}

.posts-pagination__arrow--disabled {
    opacity: .42;
    cursor: default;
    pointer-events: none;
}

.posts-pagination__dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 42px;
    color: var(--posts-muted);
    font-size: 15px;
    font-weight: 700;
}


/* ================================================================
   RESPONSIVE
================================================================ */

@media (max-width: 1100px) {

    .posts-shell {
        grid-template-columns: minmax(0, 1fr) 290px;
        gap: 24px;
    }

    .post-card {
        grid-template-columns: 235px minmax(0, 1fr);
    }

    .post-card__body {
        padding: 22px;
    }

    .post-card__title {
        font-size: 20px;
    }
}


@media (max-width: 850px) {

    .posts-shell {
        display: flex;
        flex-direction: column;
    }

    .posts-main {
        width: 100%;
    }

    .posts-sidebar {
        width: 100%;
        position: static;
        top: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        transform: none !important;
    }

    .sidebar-search,
    .sidebar-click-ad {
        grid-column: span 2;
    }

    .sidebar-ad {
        grid-column: span 1;
    }
}


@media (max-width: 650px) {

    .posts-ad--top {
        width: calc(100% - 24px);
        margin-top: 16px;
        border-radius: 16px;
    }

    .posts-ad--top img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    .posts-ad__empty--wide {
        min-height: 150px;
        padding: 20px;
    }

    .posts-ad__empty strong {
        font-size: 17px;
    }

    .posts-shell {
        width: calc(100% - 24px);
        margin-top: 30px;
        margin-bottom: 50px;
    }

    .posts-heading {
        align-items: flex-start;
    }

    .posts-heading h1 {
        font-size: 30px;
    }

    .posts-heading p {
        font-size: 13px;
    }

    .posts-count {
        width: 62px;
        height: 62px;
        border-radius: 16px;
    }

    .posts-count strong {
        font-size: 19px;
    }

    .post-card {
        display: flex;
        flex-direction: column;
        border-radius: 20px;
    }

    .post-card__media {
        min-height: 210px;
    }

    .post-card__media img,
    .post-card__placeholder {
        min-height: 210px;
        max-height: 250px;
    }

    .post-card__body {
        padding: 20px;
    }

    .post-card__title {
        font-size: 19px;
    }

    .post-card__excerpt {
        font-size: 13px;
    }

    .post-card__footer {
        padding-top: 18px;
    }

    .posts-inline-ad__content {
        grid-template-columns: 1fr;
        gap: 11px;
        min-height: 0;
        padding: 22px;
    }

    .posts-inline-ad__sponsor {
        justify-self: start;
    }

    .posts-sidebar {
        display: flex;
        transform: none !important;
    }

    .sidebar-search,
    .sidebar-click-ad {
        grid-column: auto;
    }

    .sidebar-card,
    .sidebar-click-ad,
    .sidebar-ad {
        width: 100%;
    }
}


@media (max-width: 420px) {

    .posts-heading {
        display: block;
    }

    .posts-count {
        display: none;
    }

    .post-card__media,
    .post-card__media img,
    .post-card__placeholder {
        min-height: 185px;
    }

    .post-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .post-card__read {
        align-self: flex-start;
    }
}