/* ══════════════════════════════════════════
   ARTICLES PAGE — articles.css
   وابسته به متغیرهای style.css
══════════════════════════════════════════ */

/* ── Page Header ── */
.articles-page {
    padding-top: 60px; /* ارتفاع navbar */
    min-height: 100vh;
    background: var(--warm-white);
}

.art-page-header {
    background: linear-gradient(
        135deg,
        var(--brown-dark) 0%,
        var(--brown) 60%,
        #7a4e2d 100%
    );
    padding: 3.5rem 1rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.art-page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(
            circle at 20% 50%,
            rgba(201, 168, 76, 0.12) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(201, 168, 76, 0.08) 0%,
            transparent 40%
        );
    pointer-events: none;
}

.art-page-header-inner {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.art-page-badge {
    display: inline-block;
    background: rgba(201, 168, 76, 0.2);
    border: 1px solid rgba(201, 168, 76, 0.4);
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 1rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.art-page-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.art-page-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ── Controls (Search + Filter) ── */
.art-controls {
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 60px;
    z-index: 50;
}

.art-controls-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* جستجو */
.art-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.art-search-icon {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    pointer-events: none;
}

.art-search {
    width: 100%;
    padding: 0.55rem 2.4rem 0.55rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--warm-white);
    color: var(--text);
    font-family: "Vazirmatn", sans-serif;
    font-size: 0.875rem;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.art-search:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

/* فیلترها */
.art-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.art-filter-btn {
    padding: 0.4rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-family: "Vazirmatn", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.art-filter-btn:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
    background: rgba(201, 168, 76, 0.06);
}

.art-filter-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--brown-dark);
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.35);
}

/* ── Grid ── */
.art-grid-section {
    padding: 2.5rem 1.5rem 4rem;
}

.art-grid-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* ── Card ── */
.art-card-item {
    background: var(--warm-white);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
    cursor: pointer;
}

.art-card-item:hover,
.art-card-item:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(92, 61, 30, 0.12);
    outline: none;
}

/* Thumb */
.art-card-thumb {
    height: 160px;
    background: linear-gradient(
        135deg,
        rgba(201, 168, 76, 0.15),
        rgba(201, 168, 76, 0.05)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.art-thumb--brown {
    background: linear-gradient(
        135deg,
        rgba(92, 61, 30, 0.12),
        rgba(92, 61, 30, 0.04)
    );
}

.art-thumb--red {
    background: linear-gradient(
        135deg,
        rgba(155, 35, 53, 0.1),
        rgba(155, 35, 53, 0.03)
    );
}

.art-thumb--green {
    background: linear-gradient(
        135deg,
        rgba(46, 125, 50, 0.1),
        rgba(46, 125, 50, 0.03)
    );
}

.art-card-emoji {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.art-card-cat-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 254, 249, 0.9);
    border: 1px solid var(--border);
    color: var(--gold-dark);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

/* Body */
.art-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.art-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.art-card-date::before {
    content: "📅 ";
}

.art-card-read::before {
    content: "⏱️ ";
}

.art-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--brown-dark);
    line-height: 1.5;
}

.art-card-excerpt {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.75;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer card */
.art-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.art-card-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.art-author-avatar {
    width: 28px;
    height: 28px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.85rem;
}

.art-card-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold-dark);
    text-decoration: none;
    transition:
        color 0.2s,
        letter-spacing 0.2s;
    white-space: nowrap;
}

.art-card-link:hover {
    color: var(--gold);
    letter-spacing: 0.03em;
}

/* ── Hidden State ── */
.art-card-item.hidden {
    display: none;
}

/* ── Empty State ── */
.art-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

.art-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.art-empty p {
    font-size: 1rem;
    font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .art-controls-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .art-filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.25rem;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .art-filters::-webkit-scrollbar {
        display: none;
    }

    .art-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .art-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
