
/* گرد کردن کانتینر مدیا */
.media-container {
    border-radius: 20px; /* مقدار گردی دلخواه (مثلاً ۱۰ پیکسل) */
    overflow: hidden;    /* بسیار مهم: جلوی بیرون زدن گوشه‌های تیز ویدیو را می‌گیرد */
}

/* اطمینان از گرد بودن خود ویدیو و عکس داخل آن */
.media-container video,
.media-container img {
    border-radius: 20px; /* همان مقدار بالا */
}
  
 

/* ========================================================= */
/* استایل پینترستی (آجری) - نسخه مخصوص موبایل و دکمه‌ها */
/* ========================================================= */
 
 
/* ۱. تنظیم کانتینر مادر (ستون‌بندی) */
.mcenter {
    display: block !important;
    /* پیش‌فرض برای دسکتاپ */
    column-count: 2 !important;
    column-gap: 10px !important;
}


/* ۲. تنظیمات پست‌ها (آجرها) */
.posts, 
.category-video.posts, 
.category-photo.posts {
    width: 100% !important; /* عرض ۱۰۰٪ نسبت به ستون */
    break-inside: avoid !important; /* جلوگیری از نصف شدن */
    page-break-inside: avoid !important;
    display: inline-flex !important;
    flex-direction: column !important;
    float: none !important;
    clear: none !important;
    margin: 0 0 15px 0 !important;
    box-sizing: border-box !important;
    
    /* ظاهری */
    background: #fff !important;
    border: 1px solid #f0f0f0 !important;
    border-radius: 15px !important;
    padding: 10px !important;
}



/* ۳. فیکس کردن دکمه‌های صفحه‌بندی (که کشیده نشوند) */
.pagination-wrapper {
    column-span: all !important; /* کل عرض صفحه را بگیرد */
    -webkit-column-span: all !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin-top: 20px !important;
    padding-bottom: 20px !important;
    clear: both !important;
}

/* ۴. استایل عنوان سایت (که بالا نپرد) */
.sbox.hding {
    column-span: all !important;
    -webkit-column-span: all !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 15px !important;
}

/* ۵. استایل عکس و عنوان پست */
.posts .the_content img,
.category-video .the_content img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 20px !important;
    margin-bottom: 8px !important;
}

.posts header h2,
.category-video header h2 {
    font-size: 11px !important;
    font-weight: bold !important;
    text-align: right !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

/* ۶. مخفی کردن اضافات ویدیو */
.category-video.posts footer,
.category-video.posts p,
.category-video.posts audio,
.category-video.posts .more,
.category-photo.posts footer,
.category-photo.posts p,
.category-photo.posts audio,
.category-photo.posts .more {
    display: none !important;
}






/* ۱. حذف باکس سفید و حاشیه از ویدیو و عکس */
.category-video.posts,
.category-photo.posts {
    background: transparent !important; /* پس‌زمینه شفاف */
    border: none !important;            /* حذف خط دور */
    box-shadow: none !important;        /* حذف سایه */
    padding: 0 !important;              /* حذف فاصله داخلی */
    border-radius: 0 !important;
}

/* ۲. کوچک کردن فونت عنوان برای ویدیو و عکس */
.category-video.posts header h2,
.category-photo.posts header h2 {
    font-size: 11px !important; /* سایز فونت کوچک */
    margin-top: 5px !important; /* کمی فاصله از عکس */
    line-height: 1.3 !important;
    font-weight: bold !important;
}

/* ۳. حذف پس‌زمینه از هدر (عنوان) این پست‌ها */
.category-video.posts header,
.category-photo.posts header {
    background: transparent !important;
    border: none !important;
    padding: 20px 0 !important;
}


/* ۱. حذف فاصله اضافی زیر تصویر */
.category-video .the_content img,
.category-photo .the_content img {
    margin-bottom: 0 !important; /* فاصله زیر عکس را خیلی کم کردیم */
    display: block !important; /* جلوگیری از ایجاد فاصله خطی */
}

/* ۲. حذف فاصله بالای عنوان */
.category-video.posts header h2,
.category-photo.posts header h2 {
    margin-top: 0 !important; /* حذف کامل فاصله بالای عنوان */
    padding-top: 0 !important;
    line-height: 1.3 !important;
}

/* ۳. حذف فاصله داخلی باکس عنوان */
.category-video.posts header,
.category-photo.posts header {
    padding-top: 0 !important; /* حذف فاصله بالای باکس عنوان */
}
 
 
 
 
 
/* ========================================================= */
/* ۱۰. مخفی کردن متن‌ها (روش صحیح برای حفظ عکس) */
/* ========================================================= */

/* ۱. صفر کردن اندازه متن در کل محتوا (متن‌ها نامرئی می‌شوند) */
.posts .the_content {
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important; /* محض اطمینان */
}

/* ۲. صفر کردن پاراگراف‌ها (بدون استفاده از display:none) */
.posts .the_content p,
.posts .the_content span,
.posts .the_content strong,
.posts .the_content b {
    font-size: 0 !important;
    line-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* ۳. بازگرداندن عکس‌ها و پلیر (حیاتی!) */
.posts .the_content img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto 5px auto !important;
    /* این خط باعث می‌شود عکس‌ها دوباره دیده شوند */
    visibility: visible !important; 
    opacity: 1 !important;
}

.posts audio {
    display: block !important;
    width: 100% !important;
    margin-top: 5px !important;
    visibility: visible !important;
} 


/* ========================================================= */
/* ۸. حذف آیکون کنار عنوان برای تمام پست‌ها */
/* ========================================================= */

.posts header a:before {
    display: none !important; /* آیکون را مخفی می‌کند */
    content: none !important; /* محتوای آیکون را خالی می‌کند */
    width: 0 !important;      /* عرض را صفر می‌کند تا فاصله‌ای نماند */
    margin: 0 !important;     /* حاشیه را حذف می‌کند */
}


/* ========================================================= */
/* ۹. کاهش فاصله‌های عنوان (پدینگ و مارجین) */
/* ========================================================= */



/* تنظیم کادر دور عنوان */
.posts header,
.category-video.posts header,
.category-photo.posts header {
    padding: 1px 1px !important; /* فاصله خیلی کم: ۳ پیکسل بالا/پایین */
    min-height: 0 !important;    /* حذف ارتفاع حداقل */
    background: transparent !important; /* اطمینان از حذف پس‌زمینه مزاحم */
    border: none !important;     /* حذف خطوط دور */
}

/* ========================================================= */
/* جابجایی عنوان به زیر تصویر (برای ویدیو و عکس) */
/* ========================================================= */

.category-video.posts,
.category-photo.posts {
    /* تبدیل باکس پست به فلکس برای تغییر ترتیب */
    display: inline-flex !important; 
    flex-direction: column !important; /* چیدمان عمودی */
}

/* ۱. تصویر (محتوا) اول بیاید */
.category-video.posts .the_content,
.category-photo.posts .the_content {
    order: 1 !important; /* اولویت اول */
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ۲. عنوان (هدر) دوم بیاید (زیر تصویر) */
.category-video.posts header,
.category-photo.posts header {
    order: 2 !important; /* اولویت دوم */
    width: 100% !important;
    
}

/* ========================================================= */
/* تغییر رنگ عنوان پست‌های ویدیو و عکس */
/* ========================================================= */

/* رنگ حالت عادی */
.category-video.posts header h2 a,
.category-photo.posts header h2 a
{
    color: #333333 !important; /* کد رنگ دلخواه را اینجا بنویسید (مثلاً مشکی تیره) */
}


/* ۷. تنظیمات موبایل (مهم: تغییر به ۲ ستون) */
@media screen and (max-width: 600px) {
    .mcenter {
        /* اینجا را ۲ کردیم تا در گوشی هم ۲ ستونه باشد */
        column-count: 2 !important; 
        column-gap: 5px !important; /* فاصله کمتر در موبایل */
    }
    
    /* اگر خواستید متن در موبایل ریزتر نشود */
    .posts {
        padding: 5px !important;
    }
}


/* کاهش فاصله داخلی فوتر برای تمام پست‌ها */
.posts footer,
.category-video.posts footer,
.category-photo.posts footer {
    padding: 1px !important; /* فاصله داخلی از همه طرف به ۵ پیکسل کاهش یافت */
    margin-top: 5px !important; /* فاصله خارجی از بالای فوتر */

    margin-bottom: 5px !important;
}

/* ========================================= */
/* استایل دکمه‌های پست و پلیر */
/* ========================================= */
/* کانتینر دکمه‌ها */
.actions-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

/* استایل کلی دکمه (برای دکمه پخش لازم است) */
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.action-btn .svg-icon {
    width: 22px !important;      /* عرض دلخواه */
    height: 22px !important;     /* ارتفاع دلخواه */
    min-width: 22px !important;  /* جلوگیری از له شدن آیکون در موبایل */
    margin: 0 !important;        /* حذف فاصله‌های مزاحم */
    background-color: currentColor; /* هماهنگی رنگ */
}

/* رنگ دکمه پخش (خاکستری) - حتما نگه دارید */
.btn-grey { background: #e0e0e0; color: #333; }
.btn-grey:hover { background: #d4d4d4; }

/* نکته:
   - کلاس .btn-purple را کامل حذف کردیم (چون دکمه دانلود نداریم).
   - کلاس .btn-icon را هم اگر از روش SVG که قبلا فرستادم استفاده می‌کنید، می‌توانید حذف کنید 
     (چون کلاس .svg-icon جایگزین آن شده است).
*/

/* ========================================= */
/* استایل پلیر چسبان (Sticky Player) */
/* ========================================= */
#sticky-player {
    position: fixed;
    bottom: -220px; /* مخفی بودن اولیه */
    left: 0;
    width: 100%;
    z-index: 99999; /* لایه بالاتر از همه */
    transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    font-family: inherit; /* ارث‌بری فونت قالب */
}

#sticky-player.active { bottom: 0; }

.player-floating-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 10px 8px 10px;
    box-sizing: border-box;
    pointer-events: none;
}

.info-toast {
    pointer-events: auto;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    max-width: 80%;
}

.info-toast img {
    width: 40px;
    height: 40px;
    border-radius: 50px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.2);
}

.info-toast-text { text-align: right; line-height: 1.3; }
.info-title { font-size: 12px; font-weight: bold; display: block; color: #fff; }
.info-sub { font-size: 10px; color: #8396A8; display: block; }

.close-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.95);
    
    color: #333;
    width: 32px;
    height: 32px;
    border-radius: 50px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.player-bar {
    width: 100%;
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(15px);

    height: 50px; 
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    direction: ltr; /* جهت چپ چین برای کنترلرها */
}

.progress-container {
    position: absolute;
    top: 0;        /* حالا دقیقاً به سقف می‌چسبد */
    left: 0;
    right: 0;      /* تضمین می‌کند که کل عرض را می‌گیرد */
    width: 100%;
    height: 7px;   /* ارتفاع استاندارد و ظریف */
    background: rgba(255,255,255,0.15); /* این رنگ همان نقش خط جداکننده را بازی می‌کند */
    cursor: pointer;
    z-index: 100;
}

.progress-fill {
    height: 100%;
    background: #8396A8; /* رنگ صورتی نوار */
    width: 0%;
    position: relative;
}

.controls-left { display: flex; align-items: center; gap: 15px; }

.ctrl-btn {
    background: none; border: none;
    color: #ddd; font-size: 18px;
    cursor: pointer; padding: 5px;
}

.btn-main-play {
    /* حذف دایره و حاشیه */
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    
    /* رنگ و چیدمان */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    
    /* ناحیه کلیک (می‌توانید این را کم و زیاد کنید) */
    width: 40px;
    height: 40px;
    cursor: pointer;
}

/* پیشنهاد: چون دایره حذف شد، خود آیکون پخش را کمی بزرگ‌تر کنید تا جلوه بهتری داشته باشد */
.btn-main-play .svg-icon {
    width: 2.5em;  /* سایز آیکون (بزرگ‌تر از دکمه‌های کناری) */
    height: 2.5em;
}

.time-display {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-family: monospace;
}



/* ========================================= */
/* تنظیمات آیکون‌های SVG داخلی */
/* ========================================= */
.svg-icon {
    display: inline-block;
    width: 1em;     /* هم‌اندازه فونت */
    height: 1em;
    vertical-align: middle;
    background-color: currentColor; /* رنگ آیکون از رنگ متن ارث‌بری می‌کند */
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    margin-left: 5px; /* فاصله از متن */
}

/* آیکون پخش (Play) */
.icon-play {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}

/* آیکون توقف (Pause) */
.icon-pause {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 19h4V5H6v14zm8-14v14h4V5h-4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 19h4V5H6v14zm8-14v14h4V5h-4z'/%3E%3C/svg%3E");
}


/* آیکون بستن (Close/Times) */
.icon-close {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
}

/* آیکون جلو (Forward) */
.icon-forward {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z'/%3E%3C/svg%3E");
}

/* آیکون عقب (Backward) */
.icon-backward {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 18V6l-8.5 6 8.5 6zm.5-6l8.5 6V6l-8.5 6z'/%3E%3C/svg%3E");
}

/* تنظیم سایز آیکون‌های عقب و جلو */
.icon-forward, 
.icon-backward {
    width: 1.5em;  /* سایز پیش‌فرض 1em است، اینجا کردیم 1.5 */
    height: 1.5em;
    vertical-align: -0.2em; /* برای تراز شدن دقیق با دکمه وسط */
}



/* ========================================= */
/* اصلاح وسط‌چین آیکون‌های پلیر و دکمه بستن */
/* ========================================= */

/* حذف فاصله‌های اضافی از تمام آیکون‌های داخل پلیر چسبان */
#sticky-player .svg-icon,
.close-btn .svg-icon {
    margin: 0 !important; /* حذف فاصله ۵ پیکسلی قبلی */
}

/* تنظیم دقیق نوری برای آیکون Play */
/* آیکون مثلث چون تقارن ندارد، اگر ریاضی وسط باشد، چشمی کج دیده می‌شود */
/* با این کد کمی آن را تنظیم می‌کنیم که دقیقاً در دایره بنشیند */
.btn-main-play .icon-play {
    margin-left: 2px !important; /* یک مقدار جزئی هل دادن به راست برای تعادل نوری */
}

/* اگر آیکون Play در حالت Pause بود، باید کاملا وسط باشد */
.btn-main-play .icon-pause {
    margin: 0 !important;
}