/*
 * استایل مشترک صفحات زندهٔ سمت بازدیدکنندهٔ مدیا (ویدیو/پادکست/کانال)
 * -- تسک task-final-drag-topbar-overview-frontend-ui بخش R قسمت ۲/۳/۴
 * (۲۰۲۶-۰۸-۳۰). ابرمجموعهٔ نسخهٔ قبلی + هم‌ترازِ کاملِ پرداختِ
 * article.blade.php (بخش R قسمت ۱). رنگ‌های وابسته به کانال از طریق
 * متغیرهای CSS ( --mh-primary / --mh-secondary / --mh-accent ) که در
 * خودِ صفحه به‌صورت اینلاین ست می‌شوند -- یعنی این فایل کاملاً استاتیک
 * و قابل‌کش است، بدون نیاز به رندر Blade.
 */
:root { --mh-primary: #16ACB7; --mh-secondary: #F7941D; --mh-accent: #E0326B; }

body { font-family: Tahoma, sans-serif; color: #24333a; }
img { max-width: 100%; }

/* ===== هدر ساده (وقتی توگل هدر سینگل‌پیج خاموش است) ===== */
.hero { background: var(--mh-primary); color: #fff; padding: 30px 0; margin-bottom: 20px; }
.hero a.back-link { color: #fff; opacity: .85; text-decoration: none; }
.hero a.back-link:hover { opacity: 1; text-decoration: underline; }

/* ===== نوار میان‌بر نوع‌رسانه + دسته‌ها ===== */
.mh-sticky-nav { position: sticky; top: 0; z-index: 400; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); padding: 10px 0 4px; margin-bottom: 18px; }
.type-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.type-tab-btn {
    display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 22px;
    background: #f0f3f4; color: #55666b; text-decoration: none; font-size: 13px; font-weight: 600;
    border: 1px solid transparent; transition: .15s;
}
.type-tab-btn.active, .type-tab-btn:hover { background: var(--mh-primary); color: #fff; text-decoration: none; }
.cat-pill-bar { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; padding-bottom: 4px; }
.cat-pill {
    flex-shrink: 0; padding: 9px 18px; border-radius: 8px; color: #fff; text-decoration: none;
    font-size: 13px; font-weight: 600; opacity: .82; transition: opacity .15s;
}
.cat-pill:hover, .cat-pill.active { opacity: 1; text-decoration: none; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.15); }

/* دراپ‌داون «تغییر کانال» -- مکاپ «یو‌آی کانال در سایت» */
.mh-channel-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.mh-channel-switch select { border: 1px solid #cdd8db; border-radius: 8px; padding: 6px 10px; font-size: 13px; background: #fff; max-width: 220px; }
.mh-backtosite { display: inline-flex; align-items: center; gap: 5px; color: var(--mh-primary); text-decoration: none; font-size: 12px; font-weight: 700; }
.mh-backtosite:hover { text-decoration: underline; color: var(--mh-primary); }

/* ===== کاور / پخش‌کننده ===== */
.mh-cover-wrap { position: relative; margin-bottom: 18px; }
.mh-cover-wrap .mh-article-cover { margin-bottom: 0; display: block; }
.mh-article-cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: 12px; margin-bottom: 18px; }
.mh-article-cover-fallback { height: 260px; border-radius: 12px; background: #f0f3f4; display: flex; align-items: center; justify-content: center; font-size: 60px; color: #b7c3c6; margin-bottom: 18px; }
.mh-cover-type-tag { position: absolute; top: 12px; right: 12px; background: var(--mh-primary); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 6px; z-index: 2; }
.mh-cover-watermark { position: absolute; left: 14px; bottom: 12px; color: rgba(255,255,255,.85); font-size: 12px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.6); pointer-events: none; z-index: 2; }

.mh-player-wrap { position: relative; margin-bottom: 18px; }
.mh-video-embed { border-radius: 12px; overflow: hidden; }
.mh-video-native { width: 100%; aspect-ratio: 16 / 9; max-height: 78vh; height: auto; object-fit: contain; background: #000; border-radius: 12px; display: block; }
.mh-podcast-cover { position: relative; border-radius: 12px; overflow: hidden; }
.mh-podcast-cover img { width: 100%; max-height: 380px; object-fit: cover; display: block; }
.mh-player-watermark { position: absolute; bottom: 14px; left: 14px; max-width: 110px; max-height: 50px; opacity: .85; pointer-events: none; z-index: 2; }

/* پخش‌کنندهٔ صوتی پادکست + موج صوتی تزئینی (بدون کتابخانهٔ بیرونی) */
.mh-podcast-player { background: linear-gradient(135deg, var(--mh-primary), var(--mh-accent)); border-radius: 14px; padding: 18px; margin-bottom: 18px; color: #fff; }
.mh-podcast-player .mh-pod-head { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 12px; }
.mh-waveform { display: flex; align-items: flex-end; gap: 3px; height: 46px; margin-bottom: 12px; opacity: .9; }
.mh-waveform span { flex: 1; background: rgba(255,255,255,.75); border-radius: 2px; animation: mhWave 1.1s ease-in-out infinite; }
.mh-podcast-player.is-paused .mh-waveform span { animation-play-state: paused; }
@keyframes mhWave { 0%,100% { height: 22%; } 50% { height: 100%; } }
.mh-waveform span:nth-child(3n) { animation-delay: .15s; }
.mh-waveform span:nth-child(3n+1) { animation-delay: .35s; }
.mh-waveform span:nth-child(4n) { animation-delay: .5s; }
.mh-audio-native { width: 100%; }
@media (prefers-reduced-motion: reduce) { .mh-waveform span { animation: none; height: 55%; } }

.mh-kicker { font-size: 13px; font-weight: 600; color: #9aa7ab; letter-spacing: .04em; margin-bottom: 4px; }
.mh-article-title { font-size: 26px; font-weight: 700; margin-bottom: 10px; line-height: 1.5; }
.mh-article-meta { color: #778; font-size: 13px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.mh-article-meta i { margin-left: 3px; }
.mh-article-meta .mh-meta-save { border: none; background: none; color: #778; cursor: pointer; padding: 0; font: inherit; }

/* ===== اشتراک‌گذاری ===== */
.mh-share-row { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.mh-share-row form { display: inline; margin: 0; }
.mh-share-btn { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; font-size: 14px; border: none; cursor: pointer; }
.mh-share-btn:hover { opacity: .85; color: #fff; }
.mh-share-comment-jump { background: #eef3f4 !important; color: var(--mh-primary) !important; }
/* task-sticky-bar-settings-redesign-share-save (۲۰۲۶-۰۹-۰۶) بند ۵/۶ */
.mh-share-btn.mh-share-brand { background: var(--mh-primary); }
.mh-share-btn.mh-share-brand.is-active { background: var(--mh-secondary); }
.mh-share-btn.mh-int-previewonly { background: #b7c3c6; cursor: not-allowed; }

.mh-excerpt { font-size: 15px; color: #445; background: #f7fafb; border-right: 3px solid var(--mh-primary); padding: 12px 16px; border-radius: 6px; margin-bottom: 20px; font-family: Vazirmatn, Tahoma, sans-serif; }
.mh-article-body { font-size: 15.5px; line-height: 2.1; margin-bottom: 24px; }
.mh-article-body:focus { outline: 3px solid var(--mh-secondary); outline-offset: 2px; }

.mh-block-heading { font-size: 20px; font-weight: 800; color: var(--mh-accent); text-align: center; margin: 26px 0 14px; }
.mh-ad-block { text-align: center; margin: 24px 0; }
.mh-ad-block img { border-radius: 8px; }

/* ===== گالری / آلبوم عکس ===== */
.mh-gallery-slider { position: relative; margin-bottom: 24px; }
.mh-gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; border-radius: 10px; }
.mh-gallery-track img { scroll-snap-align: start; width: 85%; flex-shrink: 0; border-radius: 10px; max-height: 380px; object-fit: cover; }
@media (min-width: 768px) { .mh-gallery-track img { width: 32%; } }

.mh-author-box { display: flex; gap: 14px; background: #f7fafb; border-radius: 10px; padding: 16px; margin-bottom: 24px; align-items: flex-start; }
.mh-author-box img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mh-author-box-noimg { width: 64px; height: 64px; border-radius: 50%; background: #e5e9eb; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.mh-link-box { border: 1px solid #e5e9eb; border-radius: 10px; padding: 16px; margin-bottom: 24px; background: #fff; position: relative; }
.mh-link-box::before { content: 'link box'; position: absolute; top: -10px; right: 14px; background: var(--mh-secondary); color: #fff; font-size: 10px; padding: 2px 10px; border-radius: 6px; }
.mh-linkbox-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 18px; border-radius: 8px; background: var(--mh-primary); color: #fff !important; font-weight: 700; text-decoration: none; }
.mh-mustread { background: #fdeef3; border: 1px solid #f6c6d8; border-radius: 12px; padding: 14px 16px 14px 54px; margin: 22px 0; position: relative; font-weight: 700; color: #B02A56; }
.mh-mustread::before { content: '\f030'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--mh-accent); }
.mh-mustread a { color: #B02A56; text-decoration: none; }
.mh-mustread a:hover { text-decoration: underline; }

/* ===== پیوست‌ها ===== */
.mh-attachment-list { list-style: none; padding: 0; margin-bottom: 24px; }
.mh-attachment-list li { border: 1px solid #e5e9eb; border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.mh-attachment-list a { color: var(--mh-primary); text-decoration: none; font-weight: 600; }
.mh-attachment-meta { width: 100%; font-size: 12px; color: #889; margin-top: 4px; }
.mh-attachment-size { display: inline-flex; align-items: center; gap: 4px; color: #2E9E5B; font-weight: 700; }

/* ===== رسانهٔ مرتبط ===== */
.mh-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.mh-related-card { border-radius: 10px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.08); text-decoration: none; color: inherit; display: block; position: relative; transition: transform .15s, box-shadow .15s; }
.mh-related-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.14); }
.mh-related-card img { width: 100%; height: 100px; object-fit: cover; background: #eee; }
.mh-related-card .no-cover-icon { height: 100px; display: flex; align-items: center; justify-content: center; background: #f0f3f4; color: #b7c3c6; font-size: 24px; }
.mh-related-card span { display: block; padding: 8px; font-size: 12px; font-weight: 600; }
.mh-related-badge { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.62); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 5px; }

/* ===== عنوان بخش با نشانگر برند ===== */
.mh-section-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; margin: 24px 0 12px; }
.mh-section-title::before { content: ''; width: 22px; height: 3px; border-radius: 2px; background: var(--mh-primary); }
.mh-diamond-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; margin: 26px 0 12px; }
.mh-diamond-title::before { content: ''; width: 12px; height: 12px; background: var(--mh-accent); transform: rotate(45deg); border-radius: 2px; flex-shrink: 0; }

/* ===== دیدگاه‌ها ===== */
.mh-comments { margin-bottom: 30px; }
.mh-comment { border-bottom: 1px solid #eee; padding: 12px 0; }
.mh-comment-admin { background: #fffbee; padding: 10px; border-radius: 8px; }
.mh-comment-date { color: #999; font-size: 11px; margin-right: 8px; }
.mh-comment-reply-btn { border: none; background: none; color: var(--mh-primary); font-size: 12px; cursor: pointer; padding: 0; }
.mh-comment-replies { margin-right: 24px; margin-top: 10px; }
.mh-reply-form { margin-top: 8px; }
.mh-reply-form .mh-input, .mh-comment-form .mh-input { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; }
.mh-comment-form label { font-size: 13px; font-weight: 700; display: block; margin-bottom: 4px; }
.mh-comment-form .mh-check { font-size: 12px; color: #667; display: flex; gap: 6px; align-items: flex-start; margin-bottom: 8px; font-weight: 400; }
.mh-captcha-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; flex-wrap: wrap; }
.mh-captcha-row input.mh-input { width: 90px; margin-bottom: 0; }
.mh-btn-save { background: var(--mh-primary); color: #fff; border: none; border-radius: 8px; padding: 8px 18px; font-size: 13px; cursor: pointer; }
.mh-btn-save:focus-visible, .mh-share-btn:focus-visible, .cat-pill:focus-visible, .type-tab-btn:focus-visible, .mh-related-card:focus-visible {
    outline: 3px solid var(--mh-secondary); outline-offset: 2px;
}

/* ===== سایدبار تبلیغاتی ===== */
.mh-side-ad { position: sticky; top: 12px; }
.mh-side-ad img { border-radius: 10px; }
@media (max-width: 767px) { .mh-side-ad { position: static; margin-top: 16px; } }

/* ===== دکمهٔ شناور حرکت‌به‌بالا ===== */
.mh-scroll-top { position: fixed; bottom: 22px; left: 22px; width: 46px; height: 46px; border-radius: 12px; border: none; background: var(--mh-primary); color: #fff; font-size: 18px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 1500; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.mh-scroll-top.mh-visible { opacity: 1; pointer-events: auto; }

/* ===== کارت‌های فهرست کانال ===== */
.card-img-top { height: 160px; object-fit: cover; background: #eee; }
.no-cover-icon { height: 160px; display: flex; align-items: center; justify-content: center; background: #f0f3f4; font-size: 42px; color: #b7c3c6; }
.mh-block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.mh-sort-select { border: 1px solid #dde5e7; border-radius: 8px; padding: 6px 10px; font-size: 13px; background: #fff; }
.mh-ch-card { border: 1px solid #e9edee; border-radius: 12px; overflow: hidden; height: 100%; transition: transform .15s, box-shadow .15s; background: #fff; }
.mh-ch-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,.1); }
.mh-ch-card .card-body { padding: 12px 14px; }
.mh-ch-row-card { display: flex; gap: 14px; border: 1px solid #e9edee; border-radius: 12px; overflow: hidden; margin-bottom: 14px; background: #fff; transition: box-shadow .15s; }
.mh-ch-row-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.mh-ch-row-card .mh-ch-row-media { width: 240px; flex-shrink: 0; }
.mh-ch-row-card .mh-ch-row-media img, .mh-ch-row-card .mh-ch-row-media .no-cover-icon { width: 100%; height: 100%; min-height: 150px; object-fit: cover; }
.mh-ch-row-card .card-body { padding: 14px 16px; }
@media (max-width: 575px) {
    .mh-ch-row-card { flex-direction: column; }
    .mh-ch-row-card .mh-ch-row-media { width: 100%; }
}

/* ── task-watermark-burnin-and-media-styles-frontend §2 (2026-08-30) ──
   Per-channel-section column grid, driven by the چیدمان (layout) settings.
   .mh-cols-1 renders identically to the previous hardcoded default. */
.mh-ch-grid { display: grid; gap: 16px; margin-bottom: 8px; }
.mh-ch-grid.mh-cols-1 { grid-template-columns: 1fr; }
.mh-ch-grid.mh-cols-2 { grid-template-columns: repeat(2, 1fr); }
.mh-ch-grid.mh-cols-3 { grid-template-columns: repeat(3, 1fr); }
.mh-ch-grid.mh-cols-4 { grid-template-columns: repeat(4, 1fr); }
.mh-ch-grid > .mh-ch-card, .mh-ch-grid > .mh-ch-row-card { margin-bottom: 0; }
.mh-ch-grid:not(.mh-cols-1) .mh-ch-row-card { flex-direction: column; }
.mh-ch-grid:not(.mh-cols-1) .mh-ch-row-card .mh-ch-row-media { width: 100%; }
.mh-ch-grid:not(.mh-cols-1) .mh-ch-row-card .mh-ch-row-media img,
.mh-ch-grid:not(.mh-cols-1) .mh-ch-row-card .mh-ch-row-media .no-cover-icon { min-height: 140px; }
@media (max-width: 991px) { .mh-ch-grid.mh-cols-3, .mh-ch-grid.mh-cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) {
    .mh-ch-grid { grid-template-columns: 1fr !important; }
    .mh-ch-grid .mh-ch-row-card { flex-direction: column; }
    .mh-ch-grid .mh-ch-row-card .mh-ch-row-media { width: 100%; }
}

/* task-channel-pencils-contradiction-and-new-requirements sec.2 (2026-09-11) --
   real-view "add media" placeholder: reserves proper card-sized space inside
   .mh-ch-grid so the postMessage overlay's dashed-box + centered-plus (same
   visual language as article's empty fixed-field CTA) renders at card scale,
   not a tiny inline sliver. Invisible box for real visitors (admin-overview only). */
.mh-ov-add-slot { min-height: 190px; border-radius: 12px; }

/* band 5 audit -- channel page H1 */
.mh-channel-h1{font-size:22px;font-weight:700;margin:14px 0 4px;color:var(--mh-primary,#16ACB7)}
.mh-channel-h1-desc{font-size:14px;color:#667;margin:0 0 8px}
.mh-hero-h1{font-size:26px;font-weight:700}
