/* PhimHDC home V3.6 — requested refinements. This layer is loaded after V3.5.
   Does not affect XemPhimFun themes, inner pages, Admin or database. */

/* Root cause of the dim FIRST menu row: header::before from V3.3 extends
   180px downwards while its parent sits ABOVE the sidebar (z-index 90 vs 85).
   Cut that overlay away from the nav column BELOW the header. Leave its
   transparent fade over the hero and over the actual logo/header. */
@media (min-width: 801px) {
  body.phdc-home .phdc-header::before {
    clip-path: polygon(0 0, 100% 0, 100% 100%, var(--phdc-nav) 100%, var(--phdc-nav) var(--phdc-header), 0 var(--phdc-header));
  }
}
@media (max-width: 800px) {
  body.phdc-home:has(#phdc-sidebar.is-open) .phdc-header::before {
    clip-path: inset(0 0 calc(100% - var(--phdc-header)) 0);
  }
}

/* 1. Sidebar: homepage is a real selected entry; Phim moi must remain legible.
   Keep the transparent gradient BEHIND the icons, never over the labels. */
body.phdc-home .phdc-sidebar .phdc-nav {
  position: relative;
  z-index: 1;
  isolation: isolate;
}
body.phdc-home .phdc-sidebar .phdc-nav-link:not(.phdc-nav-disabled),
body.phdc-home .phdc-sidebar .phdc-nav-link:not(.phdc-nav-disabled) .phdc-nav-label {
  opacity: 1 !important;
  filter: none !important;
  -webkit-filter: none !important;
  mix-blend-mode: normal !important;
  color: #f5f5f7 !important;
  text-shadow: none !important;
}
body.phdc-home .phdc-sidebar .phdc-nav-link.is-current,
body.phdc-home .phdc-sidebar .phdc-nav-link.is-current .phdc-nav-label {
  color: #fff !important;
  font-weight: 700 !important;
}
body.phdc-home .phdc-sidebar .phdc-nav-link.is-current .phdc-nav-icon-default { display: none !important; }
body.phdc-home .phdc-sidebar .phdc-nav-link.is-current .phdc-nav-icon-selected { display: block !important; }
body.phdc-home .phdc-sidebar .phdc-nav-link:not(.is-current):hover .phdc-nav-icon-default,
body.phdc-home .phdc-sidebar .phdc-nav-link:not(.is-current):focus-visible .phdc-nav-icon-default { display: block !important; }
body.phdc-home .phdc-sidebar .phdc-nav-link:not(.is-current):hover .phdc-nav-icon-selected,
body.phdc-home .phdc-sidebar .phdc-nav-link:not(.is-current):focus-visible .phdc-nav-icon-selected { display: none !important; }

/* 2. Every movie list: horizontally draggable with mouse or touch. No arrows.
   The hero's own full-width slider controls are intentionally unaffected. */
body.phdc-home .phdc-carousel > .phdc-carousel-prev,
body.phdc-home .phdc-carousel > .phdc-carousel-next { display: none !important; }
body.phdc-home .phdc-carousel .phdc-track {
  cursor: grab;
  scroll-behavior: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: none;
}
body.phdc-home .phdc-carousel .phdc-track::-webkit-scrollbar { display: none; }
body.phdc-home .phdc-carousel .phdc-track.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
  -webkit-user-select: none;
}
body.phdc-home .phdc-carousel .phdc-track.is-dragging a,
body.phdc-home .phdc-carousel .phdc-track.is-dragging img {
  user-select: none;
  -webkit-user-drag: none;
}
body.phdc-home .phdc-carousel .phdc-track:focus-visible {
  outline: 2px solid #ffdc85;
  outline-offset: 3px;
}

/* 3. Animated 3D/xianxia feature — reference uses ~600px panel,
   pale blue-violet base, right-side panorama, wide text area and large controls. */
body.phdc-home .phdc-feature-section {
  margin-top: 18px;
  margin-bottom: 70px;
}
body.phdc-home .phdc-feature {
  height: clamp(440px, 36vw, 610px);
  position: relative;
  isolation: isolate;
  overflow: visible;
  border-radius: 17px;
  background: #2e3244;
}
body.phdc-home .phdc-feature-slide {
  border-radius: 17px;
  overflow: hidden;
  background: #2e3244;
}
body.phdc-home .phdc-feature-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.22) .65px,transparent .8px);
  background-size: 5px 5px;
  opacity: .12;
}
body.phdc-home .phdc-feature-image {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30%;
  width: 70%;
  overflow: hidden;
  z-index: 0;
}
body.phdc-home .phdc-feature-image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: saturate(1.07);
}
body.phdc-home .phdc-feature-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg,#2e3244 0%,rgba(46,50,68,.84) 12%,rgba(46,50,68,.19) 51%,rgba(46,50,68,0) 84%),
              linear-gradient(0deg,rgba(46,50,68,.60) 0%,rgba(46,50,68,0) 30%,rgba(46,50,68,0) 79%,rgba(46,50,68,.12) 100%);
}
body.phdc-home .phdc-feature-shade {
  z-index: 1;
  background: linear-gradient(90deg,#2e3244 0%,rgba(46,50,68,.96) 20%,rgba(46,50,68,.36) 52%,rgba(46,50,68,0) 80%),
              linear-gradient(0deg,rgba(46,50,68,.68),transparent 34%);
}
body.phdc-home .phdc-feature-copy {
  top: 20.5%;
  left: 3.8%;
  width: min(705px,54%);
  max-width: calc(100% - 55px);
  z-index: 3;
  text-shadow: 0 1px 2px rgba(0,0,0,.24);
}
body.phdc-home .phdc-feature-copy h3 {
  font: 700 clamp(27px,2.3vw,40px)/1.35 sans-serif;
  margin: 0 0 19px;
  letter-spacing: 0;
}
body.phdc-home .phdc-feature-tags {
  gap: 10px;
  margin: 0 0 15px;
  font-size: 14px;
  line-height: 1.4;
}
body.phdc-home .phdc-feature-tags span {
  padding: 4px 10px;
  color: #fff;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 4px;
  background: rgba(255,255,255,.09);
}
body.phdc-home .phdc-feature-description {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  max-width: 690px;
  min-height: 83px;
  margin: 0 0 25px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
body.phdc-home .phdc-feature-actions {
  display: flex;
  align-items: center;
  gap: 34px;
}
body.phdc-home .phdc-feature-actions .phdc-feature-play {
  display: inline-flex;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  background: #ffdf90;
  color: #171923 !important;
  box-shadow: none;
  transition: transform .2s, background .2s;
}
body.phdc-home .phdc-feature-actions .phdc-feature-play:hover { transform: scale(1.045); background:#ffe9ad; }
body.phdc-home .phdc-feature-actions .phdc-feature-play svg { width: 33px; height: 33px; }
body.phdc-home .phdc-feature-action-group {
  display: inline-flex;
  align-items: center;
  border: 2px solid rgba(255,255,255,.13);
  border-radius: 38px;
  min-height: 66px;
  overflow: hidden;
  background: rgba(45,49,65,.10);
}
body.phdc-home .phdc-feature-actions .phdc-feature-next,
body.phdc-home .phdc-feature-actions .phdc-feature-details {
  border: 0;
  background: transparent;
  color: #fff !important;
  border-radius: 0;
  width: 70px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, background .2s;
}
body.phdc-home .phdc-feature-actions .phdc-feature-next { border-right: 2px solid rgba(255,255,255,.13); }
body.phdc-home .phdc-feature-actions .phdc-feature-next:hover,
body.phdc-home .phdc-feature-actions .phdc-feature-details:hover {
  background: rgba(255,255,255,.1);
  color: #ffdd85 !important;
}
body.phdc-home .phdc-feature-dots {
  position: absolute;
  z-index: 10;
  bottom: -43px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
}
body.phdc-home .phdc-feature-dots button {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #48453e;
  opacity: 1;
  transition: background .2s, transform .2s;
}
body.phdc-home .phdc-feature-dots button.is-active { background: #ffdc84; opacity: 1; }
body.phdc-home .phdc-feature-dots button:hover { transform: scale(1.12); }

/* 4. Cinema shelf: wide cinematic banner with a second small portrait poster
   overlapping the lower edge, titles aligned to its RIGHT (reference layout). */
body.phdc-home .phdc-section-landscape-large { margin-top: 20px; margin-bottom: 22px; }
body.phdc-home .phdc-section-landscape-large .phdc-track.phdc-cinema-track {
  grid-auto-columns: calc((100% - 3 * 11px) / 4);
  gap: 11px;
  padding: 0 1px 12px;
  align-items: start;
}
body.phdc-home .phdc-cinema-card { min-width: 0; display: block; position: relative; }
body.phdc-home .phdc-cinema-cover {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  height: auto;
  aspect-ratio: 2.13 / 1;
  border-radius: 11px;
  background: #272936;
}
body.phdc-home .phdc-cinema-cover > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform .3s ease,filter .3s ease;
}
body.phdc-home .phdc-cinema-card:hover .phdc-cinema-cover > img { transform: scale(1.035); filter: brightness(.95); }
body.phdc-home .phdc-cinema-detail {
  display: flex;
  position: relative;
  z-index: 2;
  align-items: flex-start;
  gap: 15px;
  margin-top: -56px;
  padding: 0 16px;
  min-width: 0;
}
body.phdc-home .phdc-cinema-poster {
  display: block;
  position: relative;
  flex: 0 0 94px;
  width: 94px;
  height: 144px;
  border-radius: 7px;
  overflow: hidden;
  background: #30313d;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
body.phdc-home .phdc-cinema-poster > img { width: 100%; height: 100%; object-fit: cover; }
body.phdc-home .phdc-cinema-info {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 64px;
  line-height: 1.5;
}
body.phdc-home .phdc-cinema-name,
body.phdc-home .phdc-cinema-original,
body.phdc-home .phdc-cinema-meta { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
body.phdc-home .phdc-cinema-name { font-size: 16px; font-weight: 700; color: #e5e5e9; }
body.phdc-home .phdc-cinema-name:hover { color: #ffdf90; }
body.phdc-home .phdc-cinema-original { font-size: 16px; color: #9a9ba6; margin-top: 2px; }
body.phdc-home .phdc-cinema-meta { font-size: 15px; font-weight: 700; margin-top: 2px; color: #e5e5e9; }
body.phdc-home .phdc-cinema-meta i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #747583; vertical-align: middle; margin: 0 5px; }

@media(max-width: 1400px) {
  body.phdc-home .phdc-feature-copy { width: min(610px,56%); }
  body.phdc-home .phdc-feature-copy h3 { font-size: 31px; }
  body.phdc-home .phdc-feature-description { font-size: 15px; }
  body.phdc-home .phdc-feature { height: clamp(425px,37vw,570px); }
  body.phdc-home .phdc-cinema-poster { flex-basis: 80px; width: 80px; height: 125px; }
  body.phdc-home .phdc-cinema-detail { padding: 0 10px; gap: 10px; }
  body.phdc-home .phdc-cinema-info { padding-top: 60px; }
  body.phdc-home .phdc-cinema-name,body.phdc-home .phdc-cinema-original { font-size:14px; }
  body.phdc-home .phdc-cinema-meta { font-size:13px; }
}
@media(max-width: 1100px) {
  body.phdc-home .phdc-section-landscape-large .phdc-track.phdc-cinema-track { grid-auto-columns: calc((100% - 16px) / 2.55); gap: 8px; }
  body.phdc-home .phdc-feature-copy { top: 17%; width: 60%; }
  body.phdc-home .phdc-feature-image { left: 24%; width: 76%; }
  body.phdc-home .phdc-feature { height: 460px; }
  body.phdc-home .phdc-feature-actions .phdc-feature-play { flex-basis: 67px; width:67px; height:67px; }
  body.phdc-home .phdc-feature-actions .phdc-feature-next,body.phdc-home .phdc-feature-actions .phdc-feature-details {width:54px;height:53px;}
  body.phdc-home .phdc-feature-action-group { min-height:55px; }
}
@media(max-width: 800px) {
  body.phdc-home .phdc-section-landscape-large .phdc-track.phdc-cinema-track { grid-auto-columns: 66%; gap: 10px; }
  body.phdc-home .phdc-feature { height: 395px; }
  body.phdc-home .phdc-feature-copy { top: 17%; left: 21px; width: 68%; }
  body.phdc-home .phdc-feature-copy h3 { font-size: 27px; }
  body.phdc-home .phdc-feature-description { font-size: 14px; margin-bottom: 16px; min-height: 64px; }
  body.phdc-home .phdc-feature-image { left: 24%; width: 76%; }
  body.phdc-home .phdc-feature-shade { background: linear-gradient(90deg,#2e3244 0%,rgba(46,50,68,.94) 26%,rgba(46,50,68,.18) 95%),linear-gradient(0deg,rgba(46,50,68,.6),transparent 45%); }
  body.phdc-home .phdc-feature-section { margin-bottom: 63px; }
}
@media(max-width: 520px) {
  body.phdc-home .phdc-section-landscape-large .phdc-track.phdc-cinema-track { grid-auto-columns: 86%; }
  body.phdc-home .phdc-cinema-poster {flex-basis:85px;width:85px;height:130px;}
  body.phdc-home .phdc-cinema-name,body.phdc-home .phdc-cinema-original {font-size:14px;}
  body.phdc-home .phdc-feature { height: 360px; border-radius: 12px; }
  body.phdc-home .phdc-feature-slide { border-radius: 12px; }
  body.phdc-home .phdc-feature-copy { top: 14%; left: 15px; width: 83%; }
  body.phdc-home .phdc-feature-copy h3 {font-size:24px;margin-bottom:10px;}
  body.phdc-home .phdc-feature-description { font-size: 12px; line-height:1.55; -webkit-line-clamp:3; min-height:0; max-width:90%; }
  body.phdc-home .phdc-feature-tags {margin-bottom:9px;gap:5px;font-size:11px;}
  body.phdc-home .phdc-feature-tags span {padding:2px 6px;}
  body.phdc-home .phdc-feature-actions { gap: 15px; }
  body.phdc-home .phdc-feature-actions .phdc-feature-play {flex-basis:55px;width:55px;height:55px;}
  body.phdc-home .phdc-feature-actions .phdc-feature-next,body.phdc-home .phdc-feature-actions .phdc-feature-details {width:49px;height:49px;}
  body.phdc-home .phdc-feature-action-group {min-height:51px;}
  body.phdc-home .phdc-feature-dots {gap:7px;bottom:-34px;}
  body.phdc-home .phdc-feature-dots button {width:11px;height:11px;flex-basis:11px;}
}
@media(prefers-reduced-motion:reduce) {
  body.phdc-home .phdc-feature-actions *,body.phdc-home .phdc-feature-dots button,body.phdc-home .phdc-cinema-cover > img {transition:none !important;}
}
