/* Mobile-first enhancements */
:root{
  --mobile-card-bg:#121826;
  --mobile-border:rgba(255,255,255,.08);
  --mobile-shadow:0 12px 30px rgba(0,0,0,.22);
}
.mobile-card-title{
  display:block;
  padding:10px 10px 12px;
  font-size:.92rem;
  font-weight:700;
  color:#fff;
  text-align:center;
  line-height:1.35;
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.06));
}
.mobile-player-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:12px;
}
.mobile-player-actions .mobile-action-btn{
  border:1px solid rgba(255,255,255,.12);
  background:#151a27;
  color:#fff;
  text-decoration:none;
  padding:10px 14px;
  border-radius:12px;
  font-size:.92rem;
  font-weight:700;
}
.mobile-player-actions .mobile-action-btn:active{ transform:scale(.98); }
.mobile-search-note{
  display:none;
  color:#c9d3e5;
  font-size:.82rem;
  text-align:center;
  margin-top:10px;
}
@media (max-width: 900px){
  .nav.container{ gap:12px; }
  .search-box{ max-width:260px; }
}
@media (max-width: 768px){
  body{ padding-bottom:90px; }
  header{ padding:12px 0 0; }
  .container{ width:min(100%, calc(100% - 24px)); }
  .nav{
    display:grid !important;
    grid-template-columns:56px 1fr auto;
    align-items:center;
    gap:10px;
  }
  .user{ order:1; }
  .logo{
    order:2;
    justify-self:start;
    font-size:1.1rem;
    white-space:nowrap;
  }
  .search-box{
    order:4;
    grid-column:1 / -1;
    max-width:100%;
    width:100%;
    border-radius:16px;
    padding:10px 14px;
    min-height:52px;
  }
  .search-box .bx{
    position:static;
    transform:none;
    font-size:1.25rem;
  }
  .search-box input{
    padding-right:0;
    font-size:1rem;
  }
  .navbar{
    position:fixed;
    left:12px;
    right:12px;
    bottom:12px;
    top:auto;
    transform:none;
    justify-content:space-around;
    gap:4px;
    padding:10px 8px calc(10px + env(safe-area-inset-bottom));
    border-radius:20px;
    background:rgba(15,18,28,.96);
    box-shadow:0 10px 30px rgba(0,0,0,.35);
    backdrop-filter:blur(10px);
    z-index:1001;
  }
  .nav-link{
    row-gap:4px;
    min-width:62px;
  }
  .nav-link .bx{ font-size:1.45rem; }
  .nav-link-title{ font-size:.72rem; }
  .home{
    min-height:360px;
    margin-top:7.2rem !important;
    border-radius:22px;
    overflow:hidden;
  }
  .home-text{ padding:22px 18px 18px; }
  .home-title{
    font-size:1.55rem;
    line-height:1.3;
  }
  .home-text p{
    font-size:1rem;
    line-height:1.7;
    margin:8px 0 16px;
  }
  .watch-btn{
    width:100%;
    justify-content:center;
    background:rgba(0,0,0,.45);
    border:1px solid rgba(255,255,255,.12);
    border-radius:16px;
    min-height:52px;
  }
  .watch-btn span{ font-size:1rem; }
  .populer-content{ margin-top:1.1rem; }
  .heading{
    margin-bottom:14px;
    align-items:center;
  }
  .heading-title{ font-size:1.15rem; }
  .swiper-btn,
  .swiper-button-next,
  .swiper-button-prev{ display:none !important; }
  .populer-content .swiper-wrapper{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    transform:none !important;
  }
  .populer-content .swiper-slide{
    width:100% !important;
    margin-right:0 !important;
    height:auto;
    display:block;
  }
  .movie-box{
    height:auto !important;
    border-radius:18px;
    overflow:hidden;
    background:var(--mobile-card-bg);
    border:1px solid var(--mobile-border);
    box-shadow:var(--mobile-shadow);
  }
  .movie-box::after{ display:none !important; }
  .movie-box-img{
    width:100%;
    aspect-ratio:16 / 11;
    object-fit:cover;
    display:block;
    transform:none !important;
  }
  .player-shell{
    width:min(100%, calc(100% - 20px)) !important;
    margin:7rem auto 1rem !important;
  }
  .player-card{
    padding:.8rem !important;
    border-radius:18px !important;
  }
  .player-frame{ border-radius:16px !important; }
  .player-meta{
    gap:12px !important;
    align-items:flex-start !important;
  }
  .player-meta h1, #channel-title{
    font-size:1.2rem;
    line-height:1.35;
  }
  .player-meta p, #channel-description{
    font-size:.95rem;
    line-height:1.7;
  }
  .quick-links{
    width:100%;
    display:flex;
    gap:10px;
  }
  .quick-links a{
    flex:1;
    justify-content:center;
    min-height:46px;
    border-radius:12px;
  }
  .footer{
    margin-top:2rem;
    padding-bottom:100px;
  }
  .footer-col h4{ margin-bottom:20px; }
  .mobile-search-note{ display:block; }
}
@media (max-width: 420px){
  .home{ min-height:330px; }
  .populer-content .swiper-wrapper{ grid-template-columns:1fr; }
  .navbar{ left:10px; right:10px; }
}


/* === FIX RELATED CHANNELS SIZE === */
.related-channels {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 10px 0;
  scroll-behavior: smooth;
}

.related-channel-card {
  min-width: 110px;
  max-width: 110px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  transition: transform 0.2s ease;
}

.related-channel-card:hover {
  transform: scale(1.05);
}

.related-channel-card img {
  width: 100%;
  height: 70px;
  object-fit: cover;
}

.related-channel-card span {
  display: block;
  font-size: 11px;
  text-align: center;
  padding: 5px;
  color: #fff;
}

@media (max-width: 600px) {
  .related-channel-card {
    min-width: 90px;
    max-width: 90px;
  }

  .related-channel-card img {
    height: 60px;
  }
}


/* FIX SLIDER OVERFLOW */
body {
  overflow-x: hidden;
}

.channels-slider,
.related-channels,
.slider-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
}

.channels-slider-track,
.related-track {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  width: 100%;
}

.channel-card,
.related-channel-card {
  flex: 0 0 auto;
  width: 95px;
  max-width: 95px;
  border-radius: 8px;
  overflow: hidden;
}

.channel-card img,
.related-channel-card img {
  width: 100%;
  height: 55px;
  object-fit: cover;
}


/* === Homepage slider stability fix === */
.populer-content.swiper,
.populer-content {
  width: 100%;
  max-width: 100%;
  overflow: hidden !important;
}

.populer-content .swiper-wrapper {
  align-items: stretch;
}

.populer-content .swiper-slide {
  box-sizing: border-box;
  height: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.populer-content .movie-box {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 14px;
}

.populer-content .movie-box-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 769px) {
  .populer-content .swiper-slide {
    transform: none !important;
  }
}


@media (max-width: 768px){
  .populer-content{
    overflow: hidden !important;
    padding-bottom: 2px;
  }
  .populer-content .swiper-wrapper{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    transform:none !important;
  }
  .populer-content .swiper-slide{
    width:100% !important;
    margin-right:0 !important;
    min-width:0 !important;
    display:block !important;
    cursor:pointer;
  }
  .populer-content .movie-box{
    min-height: 150px;
  }
  .mobile-card-title{
    pointer-events:none;
  }
}


.nablus-social-links{
  text-align:center;
  margin:24px auto;
  padding:16px;
  width:min(100%, 1100px);
}
.nablus-social-links h3{
  margin:0 0 12px;
  color:#fff;
  font-size:1.1rem;
}
.nablus-social-buttons{
  display:flex;
  gap:10px;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
}
.nablus-social-buttons .social-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:130px;
  padding:11px 16px;
  border-radius:10px;
  text-decoration:none;
  color:#fff;
  font-weight:700;
  transition:transform .2s ease, opacity .2s ease;
}
.nablus-social-buttons .social-btn:hover{
  transform:translateY(-1px);
  opacity:.95;
}
.nablus-social-buttons .facebook{background:#1877f2;}
.nablus-social-buttons .instagram{background:#e1306c;}
.nablus-social-buttons .whatsapp{background:#25d366;}
@media (max-width:768px){
  .nablus-social-links{padding:12px;margin:18px auto;}
  .nablus-social-buttons{gap:8px;}
  .nablus-social-buttons .social-btn{min-width:110px;padding:10px 14px;font-size:.95rem;}
}


/* poster before playback */
.player-frame{
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  min-height: 240px;
}
.player-poster-overlay{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}
.player-poster-image{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.player-poster-shade{
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.18));
}
.player-poster-content{
  position: absolute;
  inset-inline: 0;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #fff;
}
.player-play-icon{
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(179,0,0,.92);
  font-size: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
}
.player-play-text{
  font-weight: 700;
  font-size: 1rem;
}
.live-video,.live-iframe{
  width:100%;
  aspect-ratio:16/9;
  display:block;
  border:0;
  background:#000;
}



/* === Main page hero poster === */
.home-main-poster-overlay{
  position: absolute;
  inset: 0;
  z-index: 4;
  background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.72));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  border-radius: 14px;
}
.home-main-poster-overlay.is-hidden{
  display:none !important;
}
.home-main-poster-image{
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}
.home-main-poster-content{
  color:#fff;
  max-width: 520px;
}
.home-main-poster-content h2{
  margin:0 0 10px;
  font-size: 2rem;
  line-height: 1.2;
}
.home-main-poster-content p{
  margin:0 0 16px;
  opacity:.92;
  line-height:1.8;
  font-size:1.05rem;
}
.home-main-poster-btn{
  border:none;
  border-radius: 999px;
  padding: 12px 22px;
  background:#ef2222;
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

/* ensure overlay can position correctly */
.home, .hero, .featured, .video-container, .main-video, .play-container{
  position: relative;
}

/* === Home page slider sizing like subpages === */
.populer-content.swiper,
.populer-content{
  width:min(100%, 1200px) !important;
  max-width:1200px !important;
  margin: 1.2rem auto 0 !important;
  overflow:hidden !important;
}

.populer-content .swiper-wrapper{
  display:flex !important;
  align-items:stretch !important;
  gap:12px !important;
}

.populer-content .swiper-slide{
  flex:0 0 220px !important;
  width:220px !important;
  max-width:220px !important;
  min-width:220px !important;
  height:auto !important;
  margin-right:0 !important;
  box-sizing:border-box !important;
}

.populer-content .movie-box{
  width:100% !important;
  height:130px !important;
  min-height:130px !important;
  max-height:130px !important;
  border-radius:14px !important;
  overflow:hidden !important;
  background:#111827 !important;
}

.populer-content .movie-box-img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}

@media (max-width: 768px){
  .home-main-poster-overlay{
    flex-direction: column;
    text-align: center;
    gap: 14px;
    padding: 18px;
  }
  .home-main-poster-image{
    width: 110px;
    height: 110px;
  }
  .home-main-poster-content h2{
    font-size:1.5rem;
  }
  .home-main-poster-content p{
    font-size:.98rem;
    line-height:1.7;
  }

  .populer-content.swiper,
  .populer-content{
    width:min(100%, calc(100% - 20px)) !important;
  }
  .populer-content .swiper-wrapper{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
    transform:none !important;
  }
  .populer-content .swiper-slide{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    flex:none !important;
  }
  .populer-content .movie-box{
    height:auto !important;
    min-height:150px !important;
    max-height:none !important;
  }
  .populer-content .movie-box-img{
    aspect-ratio: 16 / 11;
    height:auto !important;
  }
}



/* === Fix overlap on main home poster === */
.home.container{
  position: relative;
  min-height: 440px;
}
.home-main-poster-overlay{
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px 48px;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.62));
  border-radius: 12px;
}
.home-text{
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 2;
  max-width: 360px;
}
.home-title,
.home-subtext{
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.home-main-poster-content h2{
  margin: 0 0 10px;
  font-size: 2.6rem;
}
.home-main-poster-content p{
  margin: 0 0 16px;
  font-size: 1.2rem;
  line-height: 1.8;
}
.home-main-poster-btn{
  min-width: 130px;
}
@media (max-width: 768px){
  .home.container{
    min-height: 420px;
  }
  .home-text{
    right: 14px;
    left: 14px;
    bottom: 14px;
    max-width: none;
    text-align: center;
  }
  .home-main-poster-overlay{
    padding: 20px 16px 80px;
    gap: 14px;
  }
  .home-main-poster-content h2{
    font-size: 1.7rem;
  }
  .home-main-poster-content p{
    font-size: .98rem;
  }
}



/* ensure hero poster fully disappears after play */
.home-main-poster-overlay.is-hidden{
  display:none !important;
  pointer-events:none !important;
}



/* === live24 final hero fix === */
.home.container{
  position: relative;
  min-height: 440px;
}
.home-main-poster-overlay{
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px 48px;
  background: linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.62));
  border-radius: 12px;
}
.home-main-poster-image{
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}
.home-main-poster-content{
  color:#fff;
  max-width: 520px;
}
.home-main-poster-content h2{
  margin:0 0 10px;
  font-size:2.2rem;
  line-height:1.2;
}
.home-main-poster-content p{
  margin:0 0 16px;
  font-size:1.05rem;
  line-height:1.8;
}
.home-main-poster-link,
.home-main-poster-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:130px;
  padding:12px 22px;
  border:none;
  border-radius:999px;
  background:#ef2222;
  color:#fff !important;
  text-decoration:none;
  font-weight:700;
  cursor:pointer;
}
.home-text{
  position:absolute;
  right:24px;
  bottom:22px;
  z-index:2;
  max-width:340px;
}
.home-title,
.home-subtext{
  text-shadow:0 2px 12px rgba(0,0,0,.45);
}
@media (max-width: 768px){
  .home.container{
    min-height:420px;
  }
  .home-main-poster-overlay{
    flex-direction:column;
    text-align:center;
    gap:14px;
    padding:20px 16px 78px;
  }
  .home-main-poster-image{
    width:110px;
    height:110px;
  }
  .home-main-poster-content h2{
    font-size:1.6rem;
  }
  .home-main-poster-content p{
    font-size:.98rem;
    line-height:1.7;
  }
  .home-text{
    right:14px;
    left:14px;
    bottom:14px;
    max-width:none;
    text-align:center;
  }
}



/* Hide broken ad text/placeholders cleanly */
.global-ad-banner img[alt="Advertisement"],
.global-ad-banner img[alt=""],
.global-ad-banner img[alt="إعلان"]{
  color: transparent;
  font-size: 0;
}
.global-ad-banner:empty{
  display:none !important;
}



/* main poster text cleanup */
.home-main-poster-content{
  position: relative;
  z-index: 5;
}
.home-main-poster-content h2,
.home-main-poster-content p{
  display:block;
}
