/* ===== نمدیا - صفحه اصلی (بدون المنتور) ===== */
 
:root{
    --nh-primary-red: #DE0404;
    --nh-bg-dark: #1a0505;
    --nh-white: #FFFFFF;
    --nh-content-width: min(100%, var(--container-max-width, 1140px));
}
 
/* پس‌زمینه کلی صفحه */
body.home,
body.front-page{
    background: var(--nh-bg-dark) !important;
}
 
.nmedia-home{
    direction: rtl;
}
 
.nmedia-home-bg{
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    padding: 30px 0 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
 
.nmedia-home-bg .custom-elementor-widget-wrapper{
    width: 60%;
    max-width: var(--nh-content-width);
    margin: 0 auto;
}
 
@media (max-width: 1023px){
    .nmedia-home-bg .custom-elementor-widget-wrapper{ width: 80%; }
}
@media (max-width: 767px){
    .nmedia-home-bg .custom-elementor-widget-wrapper{ width: calc(100% - 20px); }
    .nmedia-home-bg{ padding: 15px 0 40px; gap: 14px; }
}
 
/* ===== بخش عنوان (کپی/تطبیق از custom-elementor-widget.css) ===== */
.custom-elementor-widget-wrapper{
    font-family: 'IRANYekanX', sans-serif;
    direction: rtl;
}
 
.top-section-title.has-icon{
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    direction: rtl;
    margin-bottom: 20px;
    gap: 12px;
}
 
.top-section-title.has-icon .beeteam368-icon-item{
    width: 50px;
    height: 50px;
    background: var(--nh-primary-red);
    border-radius: 20%;
    border: 2px solid var(--nh-white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
 
.top-section-title.has-icon .icon-svg{
    color: var(--nh-white);
    font-size: 27.5px;
    line-height: 1;
}
 
.top-section-title.has-icon .icon-svg svg{
    display: block;
    width: 1em !important;
    height: 1em !important;
    fill: currentColor !important;
}
 
.text-box{
    display: flex;
    flex-direction: column;
    gap: 4px;
}
 
.sub-title-link{ text-decoration: none; }
 
.sub-title{
    color: var(--nh-white);
    font-size: 14px;
    opacity: .9;
}
 
.main-title-heading{
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
 
.main-title{
    font-size: 22px;
    font-weight: 700;
    color: var(--nh-primary-red);
    line-height: 1.3;
}
 
.hd-line{
    display: inline-block;
    width: 35px;
    height: 2px;
    background: var(--nh-primary-red);
}
 
/* ===== کاروسل ===== */
.custom-elementor-carousel-wrapper{
    position: relative;
    overflow: hidden;
    overscroll-behavior: contain;
    overscroll-behavior-inline: contain;
}
 
.custom-elementor-carousel{
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    direction: rtl;
    padding: 10px 0;
    overscroll-behavior: contain;
    overscroll-behavior-inline: contain;
    touch-action: pan-x;
    scrollbar-width: none;
}
.custom-elementor-carousel::-webkit-scrollbar{ height: 0; }
 
.custom-post{
    flex: 0 0 auto;
    width: 220px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,.4);
    position: relative;
    transition: transform .3s, box-shadow .3s;
}
.custom-post:hover{
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,.6);
}
.custom-post img{
    width: 100%;
    display: block;
    border-radius: 10px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}
.custom-post h4{
    position: absolute;
    bottom: 0; right: 0;
    width: 100%;
    margin: 0;
    padding: 20px 12px 12px;
    background: linear-gradient(to top, rgba(0,0,0,.95) 60%, rgba(0,0,0,.7) 75%, rgba(0,0,0,.3) 90%, rgba(0,0,0,0) 100%);
    color: var(--nh-white);
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    line-height: 1.4;
}
 
.post-type-badge{
    position: absolute;
    top: 10px; left: 10px;
    z-index: 10;
    color: #fff;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}
.post-type-badge.legal-badge{ background-color: var(--nh-primary-red); }
.post-type-badge.free-badge{ background-color: #4CAF50; }
 
/* ===== کنترل‌های کاروسل ===== */
.carousel-control-row{
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    gap: 12px;
}
 
.carousel-nav{ display: flex; gap: 8px; }
 
.carousel-btn{
    background: var(--nh-primary-red);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: .3s;
    position: relative;
    z-index: 20;
    pointer-events: auto;
}
.carousel-btn:hover{ background: #B51F46; }
.carousel-btn[disabled],
.carousel-btn.is-disabled{
    opacity: .45;
    cursor: not-allowed;
    background: #8A8A8A;
    pointer-events: none;
}
 
.carousel-progress{ flex: 1; }
.progress-track{
    height: 4px;
    background: #2A2A2A;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.progress-fill{
    height: 100%;
    width: 0;
    background: var(--nh-primary-red);
    transition: width .15s linear;
}