/* ═══════════════════════════════════════════════════════════
   NAT-HERO-EMPTY-FIX — وقتی بنر نیست، پیشنهاد کل ارتفاع را پر کند
   ═══════════════════════════════════════════════════════════ */

/* ── ۱) اگر Hero Side فقط یک فرزند داشت (بدون بنر) ── */
.hero__side.is-single-child {
    grid-template-rows: 1fr !important;
}
.hero__side.is-single-child .hero-picks {
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}
.hero__side.is-single-child .hero-picks__viewport {
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

/* ── ۲) در موبایل، ارتفاع خودکار ── */
@media (max-width: 899px) {
    .hero__side.is-single-child .hero-picks {
        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   NAT-POST-ADS — ظاهر بنرها در صفحه‌های مستقل
   ═══════════════════════════════════════════════════════════ */

/* ── کانتینر بنر در صفحه‌های پست ── */
.nat-page-ad {
    width: 100%;
    max-width: 968px;
    margin: 28px auto;
    padding: 0 4px;
    box-sizing: border-box;
    display: block;
}

.nat-page-ad--flush-top {
    margin-top: 16px;
    margin-bottom: 24px;
}

.nat-page-ad--flush-bottom {
    margin-top: 32px;
    margin-bottom: 16px;
}

.nat-page-ad__box {
    position: relative;
    width: 100%;
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #f4f1e6, #e8e2d0);
    box-shadow: 0 2px 12px rgba(15,54,65,.06);
    text-decoration: none;
    line-height: 0;
    transition: transform .3s ease, box-shadow .3s ease;
}

.nat-page-ad__box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15,54,65,.12);
}

.nat-page-ad__box img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: inherit;
}

/* ── نسبت‌های استاندارد ── */
.nat-page-ad__box--lb   { aspect-ratio: 728/90;  max-width: 728px; margin: 0 auto; }
.nat-page-ad__box--sb   { aspect-ratio: 970/90;  max-width: 970px; margin: 0 auto; }
.nat-page-ad__box--bb   { aspect-ratio: 970/250; max-width: 970px; margin: 0 auto; }
.nat-page-ad__box--rect { aspect-ratio: 300/250; max-width: 300px; margin: 0 auto; }
.nat-page-ad__box--sq   { aspect-ratio: 1/1;     max-width: 250px; margin: 0 auto; }
.nat-page-ad__box--auto { aspect-ratio: auto; }

/* ── عنوان کوچک روی بنر در پست ── */
.nat-page-ad__label {
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(15,31,56,.55);
    color: #fff;
    font-size: .6rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 100px;
    letter-spacing: .04em;
    line-height: 1.6;
    z-index: 5;
    backdrop-filter: blur(4px);
}

/* ── اگر بنر نبود، پنهان ── */
.nat-page-ad:empty,
.nat-page-ad__box:empty {
    display: none !important;
}

/* ── موبایل ── */
@media (max-width: 640px) {
    .nat-page-ad {
        margin: 18px auto;
        padding: 0 8px;
    }
    .nat-page-ad__box--bb,
    .nat-page-ad__box--sb,
    .nat-page-ad__box--lb {
        max-width: 100%;
    }
}

/* ── اگر داخل مقاله، عرض را با متن هماهنگ کن ── */
.nat-article-content .nat-page-ad,
article .nat-page-ad,
.post-content .nat-page-ad,
.entry-content .nat-page-ad {
    max-width: 100%;
    margin: 22px 0;
    padding: 0;
}