/* چیدمان صفحه مقاله و بنرها — مستقل از output.css (تیلویند کامپایل‌شده) */

.blog-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-layout__main {
    width: 100%;
    min-width: 0;
}

/* ستون کناری فقط در دسکتاپ؛ در موبایل بنرها داخل مقاله می‌آیند */
.blog-sidebar {
    display: none;
}

.blog-inline-banner {
    margin: 2rem 0;
}

/* بنر */
.blog-banner {
    display: block;
    overflow: hidden;
    border-radius: 1rem;
    border: 2px solid #e5e7eb;
    background: #fff;
    transition: box-shadow .2s ease, transform .2s ease;
}

.blog-banner:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    transform: translateY(-2px);
}

.blog-banner img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    /* جلوگیری از اعمال استایل تصاویر متن مقاله */
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* جایگاه خالی (فقط برای مدیر) */
.blog-banner-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    aspect-ratio: 4 / 5;
    padding: 1rem;
    border: 2px dashed #9ca3af;
    border-radius: 1rem;
    background: #f9fafb;
    color: #6b7280;
    text-align: center;
    font-size: 1rem;
}

.blog-banner-slot small {
    font-size: .8rem;
    line-height: 1.6;
}

/* موبایل و تبلت */
@media (max-width: 1023px) {
    .blog-banner--has-mobile img {
        aspect-ratio: 2 / 1;
    }

    .blog-banner,
    .blog-banner-slot {
        max-width: 480px;
        margin-inline: auto;
    }

    .blog-banner-slot {
        aspect-ratio: 2 / 1;
    }
}

/* دسکتاپ */
@media (min-width: 1024px) {
    .blog-layout--sidebar {
        flex-direction: row;
    }

    .blog-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        width: 320px;
        flex-shrink: 0;
        margin-top: 2rem;
    }

    /* بنر دوم هنگام اسکرول کنار متن می‌ماند (زیر هدر ثابت سایت) */
    .blog-sidebar__sticky {
        position: sticky;
        top: 9.5rem;
    }

    .blog-inline-banner {
        display: none;
    }
}
