/* ==========================================================================
   CROSOFTFILM WEBCLIENT - HOMEPAGE STREAMING (MOBILE < 992px)
   ========================================================================== */

/* 1. Mobile Home Wrap */
.ns-mobile-home-wrap {
    width: 100%;
    padding-top: var(--header-height, 72px);
    overflow-x: hidden;
}

/* 2. Mobile Cinematic Hero Slider (Edge-to-Edge, KHÔNG bo tròn, Đồng bộ tuyệt đối với Desktop) */
.ns-hero-slider-mobile {
    position: relative;
    width: 100%;
    min-height: 420px;
    height: 56vh;
    max-height: 490px;
    margin-bottom: 14px;
    border-radius: 0 !important;
    border: none !important;
    overflow: hidden;
}

.ns-hero-slider-mobile .ns-hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.ns-hero-slider-mobile .ns-hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
}

.ns-hero-slider-mobile .ns-hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.ns-hero-slider-mobile .ns-hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 25%;
    transform: scale(1.04);
    transition: transform 5s ease-out;
}

.ns-hero-slider-mobile .ns-hero-slide.active .ns-hero-backdrop {
    transform: scale(1);
}

.ns-hero-slider-mobile .ns-hero-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 18, 22, 0.35) 0%, rgba(20, 18, 22, 0.1) 25%, rgba(20, 18, 22, 0.45) 55%, rgba(20, 18, 22, 0.92) 80%, #151314 100%),
        linear-gradient(0deg, transparent 70%, rgba(20, 18, 22, 0.8) 100%);
    pointer-events: none;
}

.ns-hero-content-mobile {
    position: relative;
    z-index: 3;
    width: 100%;
    box-sizing: border-box;
    padding: 0 16px 20px;
}

.ns-hero-slider-mobile .ns-hero-slide.active .ns-hero-content-mobile {
    animation: heroSlideUpMobile 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes heroSlideUpMobile {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ns-mobile-hero-title {
    font-size: clamp(19px, 5vw, 23px);
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
    min-height: 52px;
    max-height: 52px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
}

.ns-mobile-hero-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    min-height: 18px;
    max-height: 18px;
    line-height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

/* Mobile Mini Slider Nav Arrows (Đồng bộ nút Desktop) */
.ns-hero-slider-mobile .ns-slider-btn-mobile {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 6;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.ns-hero-slider-mobile .ns-slider-btn-mobile:active {
    background: var(--accent-gradient, linear-gradient(135deg, #FE4F30 0%, #F5315E 100%));
    transform: translateY(-50%) scale(0.95);
}

.ns-hero-slider-mobile .ns-slider-prev {
    left: 10px;
}

.ns-hero-slider-mobile .ns-slider-next {
    right: 10px;
}

/* Dots Indicator - Căn thẳng hàng góc phải ngang với nút Xem Ngay & Chi Tiết */
.ns-slider-dots-mobile {
    position: absolute;
    bottom: 29px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    margin: 0;
    height: 18px;
}

.ns-slider-dots-mobile .ns-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    padding: 0;
    transition: width 0.3s ease, background 0.3s ease;
    cursor: pointer;
}

.ns-slider-dots-mobile .ns-dot.active {
    width: 20px;
    background: var(--accent-start, #FE4F30);
}

/* 3. Mobile Category Filter Pills */
.ns-mobile-filter-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ns-mobile-filter-pills::-webkit-scrollbar {
    display: none;
}

.ns-filter-pill {
    flex: 0 0 auto;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary, #d1d5db);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ns-filter-pill:active {
    transform: scale(0.93);
}

.ns-filter-pill.active {
    background: var(--accent-gradient, linear-gradient(135deg, #FE4F30 0%, #F5315E 100%));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(245, 49, 94, 0.35);
}

/* 4. Mobile Scroll Row (Hàng phim cuộn ngang di động) */
.ns-mobile-scroll-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.ns-mobile-scroll-row::-webkit-scrollbar {
    display: none;
}

.ns-mobile-movie-card-item {
    flex: 0 0 142px;
    width: 142px;
    min-width: 142px;
}

.ns-mobile-movie-card-item .ns-movie-card {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    margin: 0;
}

.ns-mobile-movie-card-item .ns-poster-wrap {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
}

.ns-mobile-movie-card-item .ns-card-body {
    padding: 8px 2px 0 2px;
}

.ns-mobile-movie-card-item .ns-card-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 3px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ns-mobile-movie-card-item .ns-card-title a {
    color: #ffffff;
    text-decoration: none;
}

.ns-mobile-movie-card-item .ns-card-meta {
    font-size: 11px;
    color: var(--text-muted, #9ca3af);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}