/* ==========================================================================
   Moboplus Theme 2026 — blog (list + article)
   ========================================================================== */

.mp-blog { clear: both; padding-top: 18px; }

/* ---------- Hero ---------- */
.mp-blog-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    padding: 28px 30px;
    border-radius: var(--mp-radius-xl);
    background: var(--mp-grad);
    color: #fff;
    box-shadow: var(--mp-shadow-lg);
}
.mp-blog-hero:after {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    top: -180px;
    left: -40px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, .25), transparent);
    pointer-events: none;
}
.mp-blog-hero__icon {
    flex: 0 0 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .18);
    font-size: 26px;
}
.mp-blog-hero h1 { margin: 0 0 4px; font-size: 26px; font-weight: 600; color: #fff; }
.mp-blog-hero p { margin: 0; font-size: 13.5px; color: rgba(255, 255, 255, .85); }

/* ---------- Layout ---------- */
.mp-blog__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}
.mp-blog__main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.mp-blog__side { display: flex; flex-direction: column; gap: 16px; }

/* featured post */
.mp-post-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    border-radius: var(--mp-radius-xl);
    background: var(--mp-surface);
    box-shadow: var(--mp-shadow-sm);
    overflow: hidden;
    text-decoration: none !important;
    transition: box-shadow .35s var(--mp-ease), transform .35s var(--mp-ease);
}
.mp-post-featured:hover { transform: translateY(-4px); box-shadow: 0 30px 56px -26px rgba(15, 16, 32, .35); }
.mp-post-featured__media { display: block; min-height: 280px; background: var(--mp-surface-2); overflow: hidden; }
.mp-post-featured__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--mp-ease); }
.mp-post-featured:hover .mp-post-featured__media img { transform: scale(1.04); }
.mp-post-featured__body { display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 22px; }
.mp-post-featured__badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--mp-accent-50);
    color: var(--mp-accent-600);
    font-size: 12px;
    font-weight: 600;
}
.mp-post-featured h2 { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.8; color: var(--mp-text); }
.mp-post-featured:hover h2 { color: var(--mp-primary); }
.mp-post-featured p { margin: 0; font-size: 13.5px; line-height: 2.1; color: var(--mp-text-2); }

/* grid of posts */
.mp-post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.mp-post-grid > .mp-post-col { float: none; width: auto; padding: 0; min-width: 0; display: flex; }
.mp-blog .mp-plp__paginate { margin-top: 4px; }
.mp-blog .mp-plp__paginate:empty { display: none; }

/* ---------- Side cards ---------- */
.mp-side-card {
    padding: 18px;
    border-radius: var(--mp-radius-xl);
    background: var(--mp-surface);
    box-shadow: var(--mp-shadow-sm);
}
.mp-side-card--sticky { position: sticky; top: calc(var(--mp-sticky-top) + 140px); }
.mp-side-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--mp-text);
}
.mp-side-card__title i { color: var(--mp-accent); }
.mp-post-mini-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.mp-post-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin: 0 -8px;
    border-radius: 16px;
    text-decoration: none !important;
    transition: background .2s;
}
.mp-post-mini:hover { background: var(--mp-surface-2); }
.mp-post-mini__img {
    flex: 0 0 76px;
    height: 58px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--mp-surface-2);
}
.mp-post-mini__img img { width: 100%; height: 100%; object-fit: cover; }
.mp-post-mini__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mp-post-mini h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.8;
    color: var(--mp-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mp-post-mini:hover h3 { color: var(--mp-primary); }
.mp-post-mini small { display: flex; gap: 10px; font-size: 11px; color: var(--mp-text-3); }
.mp-post-mini small i { margin-left: 4px; }
.mp-side-card .mp-btn--ghost { height: 44px; margin-top: 10px; display: flex !important; }

.mp-social { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mp-social a {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mp-surface-2);
    color: var(--mp-text-2) !important;
    font-size: 18px;
    transition: background .2s, color .2s, transform .2s var(--mp-ease);
}
.mp-social a:hover { background: var(--mp-grad); color: #fff !important; transform: translateY(-2px); }

.mp-side-card--promo { position: relative; overflow: hidden; background: var(--mp-ink); color: #fff; text-align: center; }
.mp-side-card--promo:before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    top: -120px;
    right: -60px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(124, 77, 255, .5), transparent);
}
.mp-side-card--promo > * { position: relative; }
.mp-side-card__promo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
    border-radius: 18px;
    background: var(--mp-grad);
    font-size: 22px;
}
.mp-side-card--promo h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: #fff; }
.mp-side-card--promo p { margin: 0 0 14px; font-size: 12.5px; line-height: 2; color: rgba(255, 255, 255, .7); }

/* ---------- Article ---------- */
.mp-article {
    min-width: 0;
    padding: 30px 34px;
    border-radius: var(--mp-radius-xl);
    background: var(--mp-surface);
    box-shadow: var(--mp-shadow-sm);
}
.mp-article__title.product_detail_title { margin: 0 0 12px; font-size: 27px; font-weight: 600; line-height: 1.7; color: var(--mp-text); }
.mp-article__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.mp-article__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--mp-surface-2);
    font-size: 12.5px;
    color: var(--mp-text-2);
}
.mp-article__meta i { color: var(--mp-primary); }
.mp-article__cover { margin: 0 0 26px; border-radius: var(--mp-radius-lg); overflow: hidden; background: var(--mp-surface-2); }
.mp-article__cover img { display: block; width: 100%; height: auto; }

.mp-article__body.mp-prose { font-size: 15px; line-height: 2.2; color: var(--mp-text-2); text-align: justify; }
.mp-article__body h2, .mp-article__body h3, .mp-article__body h4 {
    margin: 30px 0 12px;
    font-weight: 600;
    line-height: 1.8;
    color: var(--mp-text);
    scroll-margin-top: calc(var(--mp-sticky-top) + 150px);
}
.mp-article__body h2 { font-size: 21px !important; }
.mp-article__body h3 { font-size: 18px !important; }
.mp-article__body h4 { font-size: 16px !important; }
.mp-article__body p { margin: 0 0 16px; }
.mp-article__body img { max-width: 100%; height: auto; margin: 10px 0 20px; border-radius: var(--mp-radius); }
.mp-article__body a { color: var(--mp-primary); text-decoration: underline; text-underline-offset: 4px; }
.mp-article__body ul, .mp-article__body ol { padding-right: 22px; margin: 0 0 18px; }
.mp-article__body li { margin-bottom: 6px; }
.mp-article__body li::marker { color: var(--mp-primary); }
.mp-article__body blockquote {
    margin: 22px 0;
    padding: 16px 20px;
    border: 0;
    border-right: 4px solid var(--mp-primary);
    border-radius: 0 var(--mp-radius) var(--mp-radius) 0;
    background: var(--mp-primary-50);
    color: var(--mp-text);
    font-size: 15px;
}
.mp-article__body table { width: 100%; margin: 0 0 20px; border-collapse: separate; border-spacing: 0; border: 1px solid var(--mp-border); border-radius: var(--mp-radius); overflow: hidden; }
.mp-article__body th, .mp-article__body td { padding: 10px 14px; border-bottom: 1px solid var(--mp-border); }
.mp-article__body th { background: var(--mp-surface-2); color: var(--mp-text); }
/* table of contents generated by App\Libraries\Toc */
.mp-article__body .toc {
    width: auto !important;
    margin: 0 0 26px;
    padding: 16px 20px;
    border: 1px solid var(--mp-border);
    border-radius: var(--mp-radius-lg);
    background: var(--mp-surface-2);
    float: none;
}
.mp-article__body .toc ul { margin: 0; padding-right: 18px; }
.mp-article__body .toc a { color: var(--mp-text-2); text-decoration: none; }
.mp-article__body .toc a:hover { color: var(--mp-primary); }

.mp-article__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--mp-border); }
.mp-article__tags-label { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--mp-text); }
.mp-article__tags-label i { color: var(--mp-primary); }
.mp-article__share.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: var(--mp-radius);
    background: var(--mp-surface-2);
}
.mp-article__share > span { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--mp-text); }
.mp-article__share > span i { color: var(--mp-primary); }
.mp-article__share .mp-pdp__share { margin: 0; }
.mp-article__share .mp-pdp__share a { background: #fff !important; }
.mp-article__section { margin-top: 22px; }
.mp-article__section .mp-plp__section-title small { font-size: 13px; font-weight: 400; color: var(--mp-text-3); }

/* ==========================================================================
   Blog tag page
   ========================================================================== */
.mp-blog-hero--tag { align-items: flex-start; }
.mp-blog-hero__text { position: relative; z-index: 1; min-width: 0; flex: 1; }
.mp-blog-hero__kicker { display: block; margin-bottom: 2px; font-size: 12.5px; color: rgba(255, 255, 255, .75); }
.mp-blog-hero--tag h1 { display: inline-block; margin: 0 0 0 10px; vertical-align: middle; }
.mp-blog-hero--tag .mp-plp__count { vertical-align: middle; }
.mp-blog-hero--tag .mp-plp__summary { max-width: 760px; }

.mp-side-products { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.mp-side-product {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 -8px;
    padding: 8px;
    border-radius: 16px;
    text-decoration: none !important;
    transition: background .2s;
}
.mp-side-product:hover { background: var(--mp-surface-2); }
.mp-side-product__img {
    flex: 0 0 64px;
    height: 64px;
    padding: 6px;
    border-radius: 14px;
    background: var(--mp-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mp-side-product__img img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.mp-side-product.is-out .mp-side-product__img img { filter: grayscale(1); opacity: .55; }
.mp-side-product__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.mp-side-product__name {
    font-size: 13px;
    line-height: 1.8;
    color: var(--mp-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mp-side-product:hover .mp-side-product__name { color: var(--mp-primary); }
.mp-side-product .mp-card__price .price { font-size: 13.5px; }
.mp-blog-tag .mp-plp__about { margin-top: 22px; }

@media (max-width: 767px) {
    .mp-blog-hero--tag h1 { display: block; margin: 0 0 8px; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
    .mp-blog__layout { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 991px) {
    .mp-blog__layout { grid-template-columns: minmax(0, 1fr); }
    .mp-side-card--sticky { position: static; }
    .mp-post-featured { grid-template-columns: minmax(0, 1fr); }
    .mp-post-featured__media { min-height: 0; aspect-ratio: 16 / 9; }
}
@media (max-width: 767px) {
    .mp-blog { padding-top: 12px; }
    .mp-blog-hero { padding: 18px; gap: 14px; border-radius: 24px; }
    .mp-blog-hero__icon { flex-basis: 52px; height: 52px; border-radius: 16px; font-size: 21px; }
    .mp-blog-hero h1 { font-size: 20px; }
    .mp-blog-hero p { font-size: 12.5px; }
    .mp-post-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .mp-post-featured { border-radius: 24px; }
    .mp-post-featured__body { padding: 18px 16px; }
    .mp-post-featured h2 { font-size: 17px; }
    .mp-side-card { border-radius: 24px; }
    .mp-article { padding: 18px 14px; border-radius: 24px; }
    .mp-article__title.product_detail_title { font-size: 20px; }
    .mp-article__body.mp-prose { font-size: 14px; text-align: right; }
    .mp-article__body h2 { font-size: 18px !important; }
    .mp-article__body h3 { font-size: 16px !important; }
    .mp-article__share.share { flex-direction: column; align-items: flex-start; }
}

.mp-blog .mp-empty p { text-align: center; margin: 0 0 18px; }

.mp-article__body .toc:before {
    content: "فهرست مطالب";
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mp-text);
}
.mp-article__body .toc ol { margin: 0; padding-right: 20px; }
.mp-article__body .toc ol ol { margin-top: 4px; }
.mp-article__body .toc li { margin-bottom: 4px; font-size: 14px; }
.mp-article__body ul { list-style: disc; }
.mp-article__body ol { list-style: decimal; }
.mp-article__body .toc ol { list-style: decimal; }

/* ---------- Keep pasted article HTML inside the card ----------
   Content copied from other sites/apps often brings wrappers like Bootstrap's
   `.container` (fixed 1170px width), `.row` negative margins, or wide media. */
.mp-article { overflow-wrap: anywhere; }
.mp-article__body { max-width: 100%; overflow: hidden; }
.mp-article__body .container,
.mp-article__body .container-fluid,
.mp-article__body .row,
.mp-article__body [class*="col-"] {
    width: auto !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    float: none !important;
}
.mp-article__body div,
.mp-article__body section,
.mp-article__body message-content { display: block; max-width: 100% !important; min-width: 0 !important; }
.mp-article__body img,
.mp-article__body video,
.mp-article__body iframe { max-width: 100% !important; height: auto; }
.mp-article__body iframe { aspect-ratio: 16 / 9; width: 100%; }
.mp-article__body table { display: block; overflow-x: auto; }
.mp-article__body pre,
.mp-article__body code { white-space: pre-wrap; word-break: break-word; }
.mp-article__body pre { padding: 14px 16px; border-radius: var(--mp-radius); background: var(--mp-ink); color: #e9e9f2; direction: ltr; text-align: left; overflow-x: auto; }
.mp-article__body li > p { margin: 0; }

/* the TOC library only lists some heading levels; hide its box when it has no items */
.mp-article__body .toc:not(:has(li)) { display: none; }

/* style.css justifies every <p>; on narrow screens that stretches Persian words */
@media (max-width: 767px) {
    .mp-article__body.mp-prose p,
    .mp-article__body.mp-prose li { text-align: right; }
}
@media (max-width: 767px) {
    .mp-blog-hero--tag .mp-plp__summary p { text-align: right; }
}
