/* ═══════════════════════════════════════════════════════════
   NAT-HERO-FINAL — چیدمان قفل‌شدهٔ Hero با بنر هوشمند
   ═══════════════════════════════════════════════════════════ */

/* ── ۱) Hero Grid — دو ستون با ارتفاع ثابت ── */
.hero {
    padding: 14px 0 28px !important;
}

.hero__grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: stretch !important;
    /* ارتفاع کل توسط Hero Main تعیین می‌شود */
}

@media (min-width: 640px) {
    .hero__grid {
        grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr) !important;
        gap: 18px !important;
    }
}

@media (max-width: 899px) {
    .hero__grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── ۲) Hero Main — ارتفاع قفل‌شده ── */
.hero__main {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    min-height: 0 !important;
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid rgba(15,54,65,.08) !important;
}

/* ارتفاع قفل‌شده: 420px در دسکتاپ */
.hero__main .hero__img {
    display: block !important;
    width: 100% !important;
    height: 260px !important;
    min-height: 260px !important;
    max-height: 260px !important;
    background-size: cover !important;
    background-position: center !important;
    position: relative !important;
    flex-shrink: 0 !important;
    aspect-ratio: auto !important;
}
@media (max-width: 899px) {
    .hero__main .hero__img { height: 220px !important; max-height: 220px !important; }
}

/* محتوا ارتفاع خودکار */
.hero__main .hero__content {
    padding: 18px 20px 22px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
.hero__main .hero__content h1 {
    font-size: 1.35rem !important;
    line-height: 1.45 !important;
    margin: 6px 0 8px !important;
}
.hero__main .hero__content p {
    font-size: .86rem !important;
    line-height: 1.8 !important;
    margin: 0 0 8px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}
.hero__main .read-more-btn {
    align-self: flex-start !important;
    margin-top: auto !important;
}

/* ── ۳) Hero Side — ارتفاع قفل‌شده برابر Hero Main ── */
.hero__side {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr !important; /* picks: auto | ad: باقی‌مانده */
    gap: 14px !important;
    height: 100% !important;
    min-height: 0 !important;
    min-width: 0 !important;
}

/* ── ۴) باکس پیشنهاد ناتمام — ارتفاع ثابت ── */
.hero__side .hero-picks {
    position: relative !important;
    background: #fbf9f3 !important;
    border: 1px solid #d8d2be !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: 235px !important;
    min-height: 235px !important;
    max-height: 235px !important;
}
.hero__side .hero-picks__viewport {
    position: relative !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    min-height: 0 !important;
}

/* ── ۵) بنر تبلیغاتی — باقی ارتفاع را پر می‌کند ── */
.hero__side > div:not(.hero-picks) {
    /* wrapper بنری که در PHP داخل div بدون کلاس است */
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: 100% !important;
}

.hero__side > div:not(.hero-picks) > div,
.hero__side > div:not(.hero-picks) .nat-ad,
.hero__side .nat-ad--home-hero-side,
.hero__side .nat-ad-slot,
.hero__side .hero-ad {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    aspect-ratio: auto !important;
    background: linear-gradient(135deg, #eee9db, #d8d2be) !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* لینک و تصویر داخل بنر — پر کردن کل کادر */
.hero__side .nat-ad a,
.hero__side .nat-ad-slot a,
.hero__side .hero-ad a,
.hero__side .nat-ad--home-hero-side a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    border-radius: inherit !important;
    overflow: hidden !important;
    position: relative !important;
}

.hero__side .nat-ad img,
.hero__side .nat-ad-slot img,
.hero__side .hero-ad img,
.hero__side .nat-ad--home-hero-side img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: inherit !important;
    transition: transform .4s ease !important;
}

/* hover روی بنر */
.hero__side .nat-ad a:hover img,
.hero__side .nat-ad-slot a:hover img,
.hero__side .hero-ad a:hover img {
    transform: scale(1.03) !important;
}

/* ── ۶) موبایل — بنر با نسبت ثابت ── */
@media (max-width: 899px) {
    .hero__side {
        height: auto !important;
        grid-template-rows: auto auto !important;
    }
    .hero__side .hero-picks {
        height: 280px !important;
        min-height: 280px !important;
        max-height: 280px !important;
    }
    .hero__side > div:not(.hero-picks),
    .hero__side .nat-ad,
    .hero__side .nat-ad-slot,
    .hero__side .hero-ad {
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        max-height: none !important;
    }
    .hero__side .nat-ad img,
    .hero__side .nat-ad-slot img,
    .hero__side .hero-ad img {
        height: 100% !important;
        object-fit: cover !important;
    }
}

/* ── ۷) اگر بنر خالی بود، فضای خالی زیبا ── */
.hero__side .nat-ad:empty::after,
.hero__side .nat-ad-slot:empty::after {
    content: 'جایگاه تبلیغاتی';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #8a7d63;
    font-size: .82rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f4f1e6, #e8e2d0);
}