/* PhimHDC HOME V3.0 - typography, source SVG icons and hover states.
   Loaded after phdc-home-v2.css. Homepage-only; does not touch Admin or XPF subpages.
   Font: the reference site's normal UI uses CSS sans-serif. No fonts are bundled. */
body.phdc-home {
  font-family: sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.phdc-home button,
body.phdc-home input { font-family: inherit; }

/* Navigation alignment: 24px SVG assets and ~5px icon/text gap, like the supplied HTML. */
.phdc-nav-link {
  gap: 5px;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  padding-left: 3px;
  padding-right: 23px;
  transition: color .2s ease, background-color .2s ease;
}
.phdc-nav-icon {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}
.phdc-nav-icon img {
  width: 24px;
  height: 24px;
  max-width: none;
  object-fit: contain;
  display: block;
}
.phdc-nav-icon .phdc-nav-icon-selected { display: none; }
.phdc-nav-link.is-current .phdc-nav-icon-default { display: none; }
.phdc-nav-link.is-current .phdc-nav-icon-selected { display: block; }
.phdc-nav-link.is-current { color: #fff !important; font-weight: 700; }
.phdc-nav-link:not(.is-current):hover,
.phdc-nav-link:not(.is-current):focus-visible { color: #fff !important; font-weight: 400; }
.phdc-nav-disabled { opacity: 1; }

/* Reference: arrow appears from a right offset when hovering a sidebar row.
   Use CSS (rather than JS) so keyboard focus also sees the affordance. */
.phdc-nav-arrow {
  position: absolute;
  right: 8px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  color: #e1e3e5;
  opacity: 0;
  visibility: hidden;
  transform: translate(-17px, -50%);
  transition: transform .22s ease, opacity .22s ease, visibility .22s;
  pointer-events: none;
}
.phdc-nav-arrow svg { display: block; width: 19px; height: 19px; stroke-width: 1.7; }
@media (min-width: 801px) {
  /* The extra transparent 26px makes room for the slide-in arrow at the edge.
     Main page/content still use the unchanged --phdc-nav offset from V2. */
  .phdc-sidebar { width: calc(var(--phdc-nav) + 26px); }
  .phdc-nav-link { min-height: 51px; }
  .phdc-nav-link:not(.is-current):hover .phdc-nav-arrow,
  .phdc-nav-link:not(.is-current):focus-visible .phdc-nav-arrow {
    opacity: 1;
    visibility: visible;
    transform: translate(0, -50%);
  }
}

/* Header and titles use the same lighter, less compact sans-serif metrics. */
.phdc-search input { font-size: 16px; line-height: 1.6; }
.phdc-history-link { font-size: 14px; font-weight: 600; }
.phdc-login-button { font-size: 15px; font-weight: 500; }
.phdc-hero-thumb-title {
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.6;
  color: #aaaab1;
}
.phdc-hero-thumb.is-active .phdc-hero-thumb-title,
.phdc-hero-thumb:hover .phdc-hero-thumb-title,
.phdc-hero-thumb:focus-visible .phdc-hero-thumb-title {
  color: #fff;
  font-weight: 500;
}

/* Reference slider: inactive posters fade; highlighted poster gets turquoise outline.
   No lift-on-hover, so the row stays aligned like the screenshot. */
.phdc-hero-thumb-art {
  border: 3px solid transparent;
  border-radius: 11px;
  filter: brightness(.69);
  transform: none;
  transition: border-color .22s ease, filter .22s ease, box-shadow .22s ease;
}
.phdc-hero-thumb.is-active .phdc-hero-thumb-art,
.phdc-hero-thumb:hover .phdc-hero-thumb-art,
.phdc-hero-thumb:focus-visible .phdc-hero-thumb-art {
  border-color: #168fb2;
  box-shadow: 0 0 0 1px rgba(12,145,182,.19);
  filter: brightness(1);
  transform: none;
}

/* Other reference type adjustments. Keep the V2 card/section layout intact. */
.phdc-welcome-text strong { font-size: 16px; letter-spacing: 0; }
.phdc-welcome-text p { line-height: 1.55; font-weight: 500; }
.phdc-topics h2,
.phdc-section-heading h2 { font-family: inherit; }
.phdc-movie-title { font-size: 13px; font-weight: 400; }
.phdc-movie-landscape .phdc-movie-title { font-size: 12px; }
.phdc-rank-number {
  font-family: Impact, "Arial Narrow", "Helvetica Neue", sans-serif;
  font-style: normal;
  font-weight: 900;
  letter-spacing: -.025em;
}

/* At laptop sizes retain the compact sidebar from V2 but use 24px source icons. */
@media (min-width: 801px) and (max-width: 1500px) {
  .phdc-nav-link { font-size: 16px; min-height: 45px; gap: 5px; }
}
@media (min-width: 801px) and (max-width: 1100px) {
  .phdc-nav-link { font-size: 15px; min-height: 43px; }
}
/* Mobile uses a slide-in menu. Taps show a focus state without a hover arrow. */
@media (max-width: 800px) {
  .phdc-sidebar { width: 270px; }
  .phdc-nav-link { font-size: 16px; min-height: 46px; gap: 7px; }
  .phdc-nav-arrow { display: none; }
  .phdc-login-button { font-size: 12px; }
}
@media (max-width: 520px) {
  .phdc-hero-thumb-title { font-size: 10px; }
  .phdc-movie-title { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .phdc-nav-link, .phdc-nav-arrow, .phdc-hero-thumb-art { transition: none !important; }
}

/* V3.1 — Sidebar/content collision fix.
   V3 added +26px to the fixed sidebar for the hover arrow, but the
   main content still starts at --phdc-nav. At desktop sizes that placed
   the sidebar ABOVE the first 26px of welcome, topics and movie lists.
   Reserve the arrow INSIDE the sidebar; keep a small reference-like gutter.
   Hero/thumbnail overlays intentionally remain full-bleed. */
@media (min-width: 801px) {
  .phdc-sidebar {
    width: var(--phdc-nav);
  }
  .phdc-main,
  .phdc-footer {
    margin-left: calc(var(--phdc-nav) + 8px);
  }
  .phdc-nav-link {
    padding-right: 27px;
  }
  .phdc-nav-arrow {
    right: 3px;
  }
}

/* PhimHDC HOME V3.2 - 8-item menu and topic cards matched to the user-supplied
   HotPhimVN HTML/CSS: .row-topic, .mask, .intro, .heading-md, .btn-outline.
   This is scoped to the homepage; it leaves V3.1 sidebar width/gutter intact. */
.phdc-nav-link.phdc-nav-disabled {
  opacity: .62;
  cursor: default !important;
}
/* Show the provided highlighted icon when a user hovers or tabs to a link. */
.phdc-nav-link:not(.phdc-nav-disabled):hover .phdc-nav-icon-default,
.phdc-nav-link:not(.phdc-nav-disabled):focus-visible .phdc-nav-icon-default { display: none; }
.phdc-nav-link:not(.phdc-nav-disabled):hover .phdc-nav-icon-selected,
.phdc-nav-link:not(.phdc-nav-disabled):focus-visible .phdc-nav-icon-selected { display: block; }

/* Headline in the reference: 1.8rem, bold, generous 3.5rem line box. */
.phdc-topics h2 {
  font-family: sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 3.5rem;
  margin: 20px 0 0;
}
/* Reference .topics-list uses 10px gutters and 6 visible cards + one extra row. */
.phdc-topics-grid { column-gap: 10px; row-gap: 10px; }
.phdc-topics .phdc-topic {
  min-height: 149px;
  height: auto;
  padding: 1.2rem 2.5rem 1.2rem 1.5rem;
  border-radius: .75rem;
  justify-content: flex-end;
  background: #202127;
  box-shadow: none;
  transform: none;
  transition: transform .3s ease, box-shadow .3s ease;
}
/* Same base tints as supplied HTML. The mask darkens gradually toward the bottom
   rather than the arbitrary dual gradients used in V2. */
.phdc-topics .phdc-topic::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--phdc-topic-tint, #2a2b34);
  -webkit-mask-image: linear-gradient(180deg,#000 -10%,rgba(0,0,0,.1));
  mask-image: linear-gradient(180deg,#000 -10%,rgba(0,0,0,.1));
  pointer-events: none;
}
.phdc-topics .phdc-topic-lilac { --phdc-topic-tint: #a5b4fc; }
.phdc-topics .phdc-topic-coral { --phdc-topic-tint: #fca5a5; }
.phdc-topics .phdc-topic-mint  { --phdc-topic-tint: #56eba3; }
.phdc-topics .phdc-topic-amber { --phdc-topic-tint: #a16207; }
.phdc-topics .phdc-topic-rose  { --phdc-topic-tint: #802727; }
.phdc-topics .phdc-topic-slate { --phdc-topic-tint: #000000; background:#111217; }
.phdc-topics .phdc-topic-plum  { --phdc-topic-tint: #9c88c6; }
.phdc-topics .phdc-topic-navy  { --phdc-topic-tint: #6ea6db; }
.phdc-topics .phdc-topic-aqua  { --phdc-topic-tint: #54c7c0; }
.phdc-topics .phdc-topic-title,
.phdc-topics .phdc-topic-more,
.phdc-topics .phdc-topic-toggle > span { position: relative; z-index: 1; }
.phdc-topics .phdc-topic-title {
  font-family: sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  margin: 0;
  color: #fff;
}
.phdc-topics .phdc-topic-more {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .7rem;
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  line-height: 1.5;
  transition: color .3s ease;
}
.phdc-topics .phdc-topic-more svg { width: 14px; height: 14px; stroke-width: 2.6; }
.phdc-topics .phdc-topic:hover,
.phdc-topics .phdc-topic:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
}
.phdc-topics .phdc-topic:not(.phdc-topic-toggle):hover .phdc-topic-more,
.phdc-topics .phdc-topic:not(.phdc-topic-toggle):focus-visible .phdc-topic-more {
  color: #ffd700;
}
.phdc-topics .phdc-topic-toggle {
  justify-content: center;
  align-items: center;
  padding: 1.2rem;
  background: #27282f;
  color: #fff;
}
.phdc-topics .phdc-topic-toggle::before { background:#000; opacity:.24; }
.phdc-topics .phdc-topic-toggle > span { font-size: 1.6rem; font-weight: 600; line-height: 1.3; }

@media (max-width: 1100px) {
  .phdc-topics-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .phdc-topics .phdc-topic { padding: 1.1rem 1.3rem; }
}
@media (max-width: 800px) {
  .phdc-topics h2 { font-size: 25px; line-height: 1.4; margin: 13px 0 10px; }
  .phdc-topics .phdc-topic { min-height: 118px; }
  .phdc-topics .phdc-topic-title { font-size: 21px; }
  .phdc-topics .phdc-topic-more { font-size: 12px; margin-top: 7px; }
}
@media (max-width: 520px) {
  .phdc-topics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .phdc-topics .phdc-topic { min-height: 108px; padding: 13px 14px; }
  .phdc-topics .phdc-topic-title { font-size: 18px; }
  .phdc-topics .phdc-topic-toggle > span { font-size: 18px; }
}
@media (prefers-reduced-motion:reduce) {
  .phdc-topics .phdc-topic { transition: none !important; }
}

/* PhimHDC 3.3 – Top fade, welcome removal, reference clock icon.
   The V2 bar stopped its gradient exactly at 65px and switched to an opaque
   background on scroll, creating a straight dark stripe across the slider.
   Instead, let the hero show through, and extend the gradient below the bar. */
.phdc-header,
.phdc-header.is-scrolled {
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.phdc-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(16,17,21,.86) 0%,
    rgba(16,17,21,.72) 16%,
    rgba(16,17,21,.48) 43%,
    rgba(16,17,21,.23) 69%,
    rgba(16,17,21,.07) 88%,
    rgba(16,17,21,0) 100%
  );
}
.phdc-header-inner { z-index: 1; }
.phdc-history-link .phdc-history-icon {
  display: block;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  object-fit: contain;
}
/* With the welcome block removed, put topics immediately after the hero. */
.phdc-main { margin-top: 0; padding-top: 8px; }
.phdc-topics h2 { margin-top: 0; }
@media (max-width: 800px) {
  .phdc-header::before { height: 144px; }
  .phdc-main { margin-top: 0; padding-top: 10px; }
}
