/* ==========================================================================
   قدم دوازدهم — فهرست بلاگ و افزوده‌های صفحه‌ی مقاله
   کنار css/blog.css بار می‌شود و از همان زبان بصری (سبز/نارنجی، فونت
   DM Serif برای عنوان‌ها) پیروی می‌کند.
   ========================================================================== */

/* ---------------- سربرگ فهرست ---------------- */
.bi-hero { max-width: 780px; margin: 0 auto 30px; text-align: center; }

.bi-eyebrow {
    color: #19715c; font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px;
}

.bi-hero h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.15; color: #16352c;
}

.bi-deck {
    margin: 16px auto 0; max-width: 62ch; color: #4d6459;
    font-size: 1rem; line-height: 1.85;
}

/* ---------------- جست‌وجو ---------------- */
.bi-search { display: flex; gap: 8px; max-width: 480px; margin: 26px auto 0; }

.bi-search input {
    flex: 1; padding: 13px 18px; border-radius: 999px;
    border: 1.5px solid rgba(25, 113, 92, 0.25); background: rgba(255, 255, 255, 0.82);
    font-family: 'Poppins', sans-serif; font-size: 0.92rem; color: #25352e;
}

.bi-search input:focus { outline: none; border-color: #19715c; }

.bi-search button {
    padding: 13px 24px; border: none; border-radius: 999px; background: #19715c; color: #fff;
    font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 0.88rem; cursor: pointer;
}

.bi-search button:hover { background: #14604e; }

/* ---------------- دسته‌ها ---------------- */
.bi-cats {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
    margin: 0 auto 34px; max-width: 900px;
}

.bi-cats a {
    padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(25, 113, 92, 0.22);
    color: #2d5347; font-size: 0.8rem; font-weight: 600; text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.bi-cats a:hover { background: rgba(25, 113, 92, 0.08); }
.bi-cats a.is-active { background: #19715c; border-color: #19715c; color: #fff; }

.bi-result-note { text-align: center; margin-bottom: 24px; color: #4d6459; font-size: 0.9rem; }
.bi-result-note a { color: #19715c; font-weight: 700; }

/* ---------------- شبکه‌ی کارت‌ها ---------------- */
.bi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.bi-card {
    background: rgba(255, 255, 255, 0.72); border: 1px solid rgba(25, 113, 92, 0.14);
    border-radius: 20px; overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bi-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(25, 80, 65, 0.14); }

.bi-card-link { display: block; color: inherit; text-decoration: none; height: 100%; }

.bi-card-media { aspect-ratio: 16 / 9; overflow: hidden; background: rgba(25, 113, 92, 0.07); }
.bi-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bi-card-media-blank {
    display: grid; place-items: center;
    background: linear-gradient(135deg, rgba(25, 113, 92, 0.14), rgba(226, 109, 77, 0.14));
}

.bi-card-media-blank span {
    font-family: 'DM Serif Display', Georgia, serif; font-size: 3rem;
    color: #19715c; text-transform: uppercase;
}

.bi-card-body { padding: 20px 22px 24px; }

.bi-card-cat {
    display: inline-block; margin-bottom: 10px; padding-bottom: 3px;
    border-bottom: 2px solid #e26d4d; color: #1c5c4d;
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
}

.bi-card-body h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.32rem; line-height: 1.3; color: #16352c;
}

.bi-card-body p { margin-top: 9px; color: #4d6459; font-size: 0.9rem; line-height: 1.72; }

.bi-card-meta { display: block; margin-top: 14px; color: #7b8f86; font-size: 0.74rem; font-weight: 600; }

/* کارت اول، پهن و برجسته */
.bi-card.is-lead { grid-column: span 2; }
.bi-card.is-lead .bi-card-media { aspect-ratio: 21 / 9; }
.bi-card.is-lead .bi-card-body h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); }
.bi-card.is-lead .bi-card-body p { font-size: 0.97rem; }

/* ---------------- صفحه‌بندی ---------------- */
.bi-pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 44px; }

.bi-pager a {
    padding: 11px 22px; border-radius: 999px; border: 1.5px solid rgba(25, 113, 92, 0.28);
    color: #19715c; font-size: 0.86rem; font-weight: 700; text-decoration: none;
}

.bi-pager a:hover { background: rgba(25, 113, 92, 0.08); }
.bi-pager span { color: #7b8f86; font-size: 0.84rem; font-weight: 600; }

/* ---------------- حالت خالی ---------------- */
.bi-empty {
    max-width: 520px; margin: 30px auto; padding: 46px 30px; text-align: center;
    border-radius: 22px; background: rgba(255, 255, 255, 0.6);
    border: 1px dashed rgba(25, 113, 92, 0.3);
}

.bi-empty-emoji { font-size: 2.6rem; }

.bi-empty h2 {
    margin-top: 12px; font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.6rem; color: #16352c;
}

.bi-empty p { margin-top: 8px; color: #4d6459; line-height: 1.8; font-size: 0.93rem; }

.bi-empty-btn {
    display: inline-block; margin-top: 20px; padding: 12px 26px; border-radius: 999px;
    background: #19715c; color: #fff; font-weight: 700; font-size: 0.86rem; text-decoration: none;
}

/* ==========================================================================
   صفحه‌ی مقاله
   ========================================================================== */

.bp-crumbs { max-width: 880px; margin: 0 auto 20px; font-size: 0.78rem; color: #7b8f86; }
.bp-crumbs a { color: #19715c; text-decoration: none; font-weight: 600; }
.bp-crumbs a:hover { text-decoration: underline; }
.bp-crumbs span { margin: 0 6px; opacity: 0.6; }

.bp-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 270px;
    gap: 46px; align-items: start;
}

.bp-body { max-width: none; }

/* ویدیوی یوتیوب داخل متن — با کد کوتاه [youtube ID] */
.blog-embed {
    position: relative; margin: 28px 0; padding-bottom: 56.25%;
    border-radius: 16px; overflow: hidden; background: #0d1f1a;
}

.blog-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.bp-tags {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 38px;
    padding-top: 24px; border-top: 1px solid rgba(25, 113, 92, 0.16);
}

.bp-tags a {
    padding: 6px 14px; border-radius: 999px; background: rgba(25, 113, 92, 0.08);
    color: #2d5347; font-size: 0.78rem; font-weight: 600; text-decoration: none;
}

.bp-tags a:hover { background: rgba(25, 113, 92, 0.16); }

.bp-share { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 26px; }

.bp-share > span {
    color: #19715c; font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; margin-right: 4px;
}

.bp-share a,
.bp-share button {
    padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(25, 113, 92, 0.24);
    background: rgba(255, 255, 255, 0.7); color: #2d5347;
    font-family: 'Poppins', sans-serif; font-size: 0.78rem; font-weight: 600;
    text-decoration: none; cursor: pointer;
}

.bp-share a:hover,
.bp-share button:hover { background: rgba(25, 113, 92, 0.1); }

.bp-back { max-width: 880px; margin: 46px auto 0; text-align: center; }
.bp-back a { color: #19715c; font-weight: 700; text-decoration: none; font-size: 0.9rem; }

/* نوار پیش‌نمایش پست منتشرنشده */
.bp-preview-bar {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px;
    padding: 11px 18px; background: linear-gradient(135deg, #e26d4d, #19715c); color: #fff;
    font-family: 'Poppins', sans-serif; font-size: 0.8rem; text-align: center;
}

.bp-preview-bar strong { font-weight: 800; letter-spacing: 0.05em; }

.bp-preview-bar a {
    padding: 5px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.24);
    color: #fff; font-weight: 700; text-decoration: none;
}

/* ---------------- ریسپانسیو ---------------- */
@media (max-width: 1000px) {
    .bi-grid { grid-template-columns: repeat(2, 1fr); }
    .bi-card.is-lead { grid-column: span 2; }
    .bp-layout { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 640px) {
    .bi-grid { grid-template-columns: 1fr; }
    .bi-card.is-lead { grid-column: span 1; }
    .bi-card.is-lead .bi-card-media { aspect-ratio: 16 / 9; }
    .bi-search { flex-direction: column; border-radius: 18px; }
    .bi-search input, .bi-search button { width: 100%; }
}