﻿:root {
    --ink: #0F2D1F;
    --paper: #f4f1e6;
    --paper-2: #ece6d3;
    --paper-3: #e7f4e6;
    --forest: #1f4d3a;
    --forest-deep: #123526;
    --sage: #7fa78c;
    --sage-light: #c9dcc7;
    --brass: #b6902f;
    --brass-light: #e2c37a;
    --line: rgba(18,38,29,0.14);
    --shadow: 0 10px 30px rgba(18,53,38,0.12);
}

* {
    box-sizing: border-box;
/*    pointer-events: none;
    user-select: none;
*/}

html, body {
    margin: 0;
    padding: 0;
}

body {
    /*background: radial-gradient(1200px 600px at 85% -10%, rgba(31,77,58,0.08), transparent 60%), var(--paper-3);*/
    color: var(--ink);
    font-family: IRANSansfanum !important, sans-serif;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

    /* subtle paper texture */
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image: radial-gradient(rgba(18,38,29,0.035) 1px, transparent 1px);
        background-size: 3px 3px;
        pointer-events: none;
        z-index: 0;
    }

a {
    color: inherit;
}

a:hover h4, p {
    color: var(--forest-deep) !important;
}

.wrap {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ===== Header ===== */
header.top {
    background: linear-gradient(160deg, var(--forest-deep), var(--forest) 70%);
    font-family: IRANSansfanum !important, sans-serif;
    color: var(--paper);
    padding: 46px 30px 64px;
    position: relative;
    overflow: hidden;
}

    header.top::after {
        content: "";
        position: absolute;
        left: -10%;
        bottom: -60%;
        width: 60%;
        aspect-ratio: 1;
        border: 1px solid rgba(244,241,230,0.10);
        border-radius: 50%;
    }

    header.top::before {
        content: "";
        position: absolute;
        left: 2%;
        bottom: -90%;
        width: 80%;
        aspect-ratio: 1;
        border: 1px solid rgba(244,241,230,0.07);
        border-radius: 50%;
    }

.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.seal {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1.5px solid var(--brass-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: radial-gradient(circle at 35% 30%, rgba(226,195,122,0.18), transparent 65%);
}

    .seal svg {
        width: 26px;
        height: 26px;
    }

.brand h1 {
    font-family: IRANSansfanum !important, sans-serif;
    font-weight: 400;
    font-size: 1.9rem;
    letter-spacing: 0.5px;
    margin: 0;
    color: var(--paper);
}

.brand p {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: var(--sage-light);
    letter-spacing: 2px;
}

.today {
    font-size: 0.78rem;
    color: var(--sage-light);
    text-align: left;
    line-height: 1.9;
    white-space: nowrap;
}

    .today b {
        color: var(--brass-light);
        font-weight: 600;
    }

.hero-line {
    position: relative;
    z-index: 2;
    margin-top: 36px;
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex-wrap: wrap;
}

    .hero-line h2 {
        font-family: IRANSansfanum !important, sans-serif;
        font-size: clamp(1.7rem, 4vw, 2.2rem);
        font-weight: 700;
        margin: 0;
        color: var(--paper);
    }

    .hero-line span {
        font-size: 0.95rem;
        color: var(--sage-light);
        border-right: 2px solid var(--brass);
        padding-right: 14px;
    }

/* ===== Search + Filters ===== */
.controls {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius:  16px 16px 0 0;
    box-shadow: var(--shadow);
    margin-top: -38px;
    position: relative;
    z-index: 3;
    padding: 18px 20px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 16px;
}

    .search-box svg {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        color: var(--forest);
        opacity: 0.7;
    }

    .search-box input {
        border: none;
        background: transparent;
        outline: none;
        font-family: inherit;
        font-size: 0.92rem;
        color: var(--ink);
        width: 100%;
    }

        .search-box input::placeholder {
            color: #7a8a80;
        }

/* folder-tab category filters */
.tabs {
    display: flex;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.tab {
    border: 1px solid var(--line);
    border-bottom: none;
    background: var(--paper-2);
    color: var(--ink);
    padding: 8px 18px 9px;
    font-size: 0.83rem;
    font-family: inherit;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    position: relative;
    top: 1px;
    opacity: 0.75;
    transition: all .15s ease;
}

    .tab:hover {
        opacity: 1;
        background: var(--sage-light);
    }

    .tab.active {
        background: var(--forest);
        color: var(--paper);
        opacity: 1;
        border-color: var(--forest);
    }

    .tab .count {
        font-size: 0.72rem;
        opacity: 0.7;
        margin-right: 5px;
    }

/* ===== News list ===== */
.list {
    border: 1px solid var(--line);
    border-top: none;
    background: var(--paper);
    border-radius: 0 0 16px 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.NewsItem {
    min-height: 168px;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 22px 22px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: background .15s ease;
}

/*.EvenBg {
    background-color: aliceblue;
}

.OddBg {
    background-color: transparent;
}
*/
.NewsItem:last-child {
    border-bottom: none;
}

    .NewsItem:hover {
        background: rgba(127,167,140,0.10);
    }

.thumb-wrap {
    position: relative;
    width: 150px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--paper-2);
    border: 1px solid var(--line);
    flex-shrink: 0;
}

    .thumb-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .35s ease;
    }

.NewsItem:hover .thumb-wrap img {
    transform: scale(1.08);
}

.thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(155deg, var(--sage-light), var(--paper-2));
    color: var(--forest);
}

    .thumb-fallback svg {
        width: 28px;
        height: 28px;
        opacity: 0.55;
    }

.date-overlay {
    position: absolute;
    left: 6px;
    bottom: 6px;
    background: rgba(18,38,29,0.82);
    color: var(--paper);
    border: 1px solid rgba(226,195,122,0.5);
    border-radius: 8px;
    padding: 0px 8px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    backdrop-filter: blur(2px);
}

    .date-overlay .day {
        position: relative;
        top: 2px;
        font-family: IRANSansfanum !important, sans-serif;
        font-size: 0.8rem;
        line-height: 1;
        color: var(--brass-light);
    }

    .date-overlay .month {
        position: relative;
        top: 1px;
        font-size: 0.70rem;
        letter-spacing: 0.3px;
        font-weight: 500;
    }

.NewsItem-body h3 {
    margin: 0 0 6px;
    font-size: 1.04rem;
    font-weight: 700;
    color: var(--forest-deep);
    line-height: 1.6;
}

.NewsItem-body p {
    margin: 0 0 10px;
    font-size: 0.87rem;
    color: #4d5c53;
    line-height: 1.85;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.74rem;
    color: #6b7a71;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--sage-light);
    color: var(--forest-deep);
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

    .badge::before {
        content: "";
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--brass);
        display: inline-block;
    }

.archive-no {
    font-family: IRANSansfanum !important;
    letter-spacing: 1px;
    color: var(--sage);
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #6b7a71;
}

    .empty-state svg {
        width: 44px;
        height: 44px;
        opacity: 0.5;
        margin-bottom: 12px;
    }

/* ===== Pagination footer ===== */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.pager-info {
    font-size: 0.82rem;
    color: #5c6d63;
}

    .pager-info b {
        color: var(--forest);
        font-weight: 700;
    }

.pager-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pg-btn {
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
}

    .pg-btn:hover:not(:disabled) {
        border-color: var(--forest);
        color: var(--forest);
    }

    .pg-btn.active {
        background: var(--forest);
        border-color: var(--forest);
        color: var(--paper);
        font-weight: 700;
    }

    .pg-btn:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

    .pg-btn svg {
        width: 16px;
        height: 16px;
    }

.pg-dots {
    color: #8a988f;
    padding: 0 2px;
    font-size: 0.85rem;
}

footer.site-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    color: #7a8a80;
}

@media (max-width: 620px) {
    header.top {
        padding: 34px 0 56px;
    }

    .brand-row {
        align-items: flex-start;
    }

    .today {
        text-align: right;
        white-space: normal;
    }

    .NewsItem {
        grid-template-columns: 88px 1fr;
        gap: 12px;
        padding: 16px;
    }

    .thumb-wrap {
        width: 88px;
        height: 88px;
    }

    .date-overlay .day {
        font-size: 0.82rem;
    }

    .date-overlay .month {
        display: none;
    }

    .pager {
        flex-direction: column;
        align-items: stretch;
    }

    .pager-info {
        text-align: center;
    }

    .pager-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
}

:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}