/* V3.5 - fixes scoped to PhimHDC homepage; load AFTER v3 + v4. */
/* The first menu item appeared grey even though it is a working link.
   Inactive links must remain readable on the semi-transparent hero. */
body.phdc-home .phdc-sidebar a.phdc-nav-link,
body.phdc-home .phdc-sidebar a.phdc-nav-link:not(.is-current) {
  color: #f3f3f5 !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
}
body.phdc-home .phdc-sidebar a.phdc-nav-link .phdc-nav-icon,
body.phdc-home .phdc-sidebar a.phdc-nav-link .phdc-nav-icon img {
  opacity: 1 !important;
  filter: none !important;
}
/* Keep the disabled future schedule item distinct from live links. */
body.phdc-home .phdc-sidebar .phdc-nav-disabled { opacity: .65 !important; }

/* The old homepage hardcoded a decorative SVG rather than using the logo
   uploaded in Admin. Retain the reference-sized wrapper while containing
   tall or wide customer logos without distortion. */
body.phdc-home .phdc-logo img.phdc-admin-logo {
  display: block;
  width: auto;
  max-width: 156px;
  height: auto;
  max-height: 49px;
  object-fit: contain;
  object-position: left center;
}
body.phdc-home .phdc-footer-brand img.phdc-admin-logo {
  width: auto;
  max-width: 170px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}

/* Top 10 reference: image itself is cut into a softly rounded slanted
   shape. A separate gold shape BEHIND it appears on hover as the image
   shrinks. A clipped 4px border (old V3.4) created grey wedges and a
   black strip above cards, so remove that old border and parent clipping. */
body.phdc-home .phdc-ranking .phdc-section-heading {
  min-height: 44px;
  padding: 0 0 5px;
}
body.phdc-home .phdc-ranking .phdc-section-heading h2 {
  margin: 0;
  line-height: 1.35;
  font-weight: 600;
}
body.phdc-home .phdc-ranking .phdc-rank-track {
  padding-top: 0;
  grid-auto-columns: calc((100% - 5 * 10px) / 6);
  gap: 10px;
}
body.phdc-home .phdc-ranking .phdc-rank-art {
  position: relative;
  display: block;
  aspect-ratio: 5 / 7;
  background: transparent;
  border: 0 !important;
  border-radius: 0;
  overflow: visible;
  clip-path: none !important;
  isolation: isolate;
}
body.phdc-home .phdc-ranking .phdc-rank-art::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #ffde8a;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
body.phdc-home .phdc-ranking .phdc-rank-art > img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  transform: none;
  transition: transform .3s ease;
}
body.phdc-home .phdc-ranking .phdc-rank-item:nth-child(odd) .phdc-rank-art::before,
body.phdc-home .phdc-ranking .phdc-rank-item:nth-child(odd) .phdc-rank-art > img {
  clip-path: polygon(94.239% 100%,5.761% 100%,5.761% 100%,4.826% 99.95%,3.94% 99.803%,3.113% 99.569%,2.358% 99.256%,1.687% 98.87%,1.111% 98.421%,.643% 97.915%,.294% 97.362%,.075% 96.768%,0 96.142%,0 3.858%,0 3.858%,.087% 3.185%,.338% 2.552%,.737% 1.968%,1.269% 1.442%,1.92% .984%,2.672% .602%,3.512% .306%,4.423% .105%,5.391% .008%,6.4% .024%,94.879% 6.625%,94.879% 6.625%,95.731% 6.732%,96.532% 6.919%,97.272% 7.178%,97.942% 7.503%,98.533% 7.887%,99.038% 8.323%,99.445% 8.805%,99.747% 9.326%,99.935% 9.88%,100% 10.459%,100% 96.142%,100% 96.142%,99.925% 96.768%,99.706% 97.362%,99.357% 97.915%,98.889% 98.421%,98.313% 98.87%,97.642% 99.256%,96.887% 99.569%,96.06% 99.803%,95.174% 99.95%,94.239% 100%);
}
body.phdc-home .phdc-ranking .phdc-rank-item:nth-child(even) .phdc-rank-art::before,
body.phdc-home .phdc-ranking .phdc-rank-item:nth-child(even) .phdc-rank-art > img {
  clip-path: polygon(5.761% 100%,94.239% 100%,94.239% 100%,95.174% 99.95%,96.06% 99.803%,96.887% 99.569%,97.642% 99.256%,98.313% 98.87%,98.889% 98.421%,99.357% 97.915%,99.706% 97.362%,99.925% 96.768%,100% 96.142%,100% 3.858%,100% 3.858%,99.913% 3.185%,99.662% 2.552%,99.263% 1.968%,98.731% 1.442%,98.08% .984%,97.328% .602%,96.488% .306%,95.577% .105%,94.609% .008%,93.6% .024%,5.121% 6.625%,5.121% 6.625%,4.269% 6.732%,3.468% 6.919%,2.728% 7.178%,2.058% 7.503%,1.467% 7.887%,.962% 8.323%,.555% 8.805%,.253% 9.326%,.065% 9.88%,0 10.459%,0 96.142%,0 96.142%,.075% 96.768%,.294% 97.362%,.643% 97.915%,1.111% 98.421%,1.687% 98.87%,2.358% 99.256%,3.113% 99.569%,3.94% 99.803%,4.826% 99.95%,5.761% 100%);
}
body.phdc-home .phdc-ranking .phdc-rank-item:hover .phdc-rank-art::before,
body.phdc-home .phdc-ranking .phdc-rank-item:focus-visible .phdc-rank-art::before {
  opacity: 1;
}
body.phdc-home .phdc-ranking .phdc-rank-item:hover .phdc-rank-art > img,
body.phdc-home .phdc-ranking .phdc-rank-item:focus-visible .phdc-rank-art > img {
  transform: scale(.97);
}
body.phdc-home .phdc-ranking .phdc-rank-art .phdc-poster-meta {
  position: absolute;
  z-index: 3;
  bottom: 0;
}
body.phdc-home .phdc-ranking .phdc-rank-bottom {
  min-height: 78px;
  padding-top: 11px;
  gap: 5px;
}
body.phdc-home .phdc-ranking .phdc-rank-number {
  flex: 0 0 5rem;
  min-width: 5rem;
  font-size: 4.2rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -2px;
}
body.phdc-home .phdc-ranking .phdc-rank-info strong {
  font-size: 16px;
  font-weight: 500;
}
body.phdc-home .phdc-ranking .phdc-rank-info small {
  font-size: 16px;
  margin-top: 5px;
}
@media (min-width: 801px) and (max-width: 1100px) {
  body.phdc-home .phdc-ranking .phdc-rank-track {
    grid-auto-columns: calc((100% - 3 * 10px) / 4);
  }
}
@media (max-width: 800px) {
  body.phdc-home .phdc-ranking .phdc-rank-track {
    grid-auto-columns: calc((100% - 2 * 10px) / 3);
  }
  body.phdc-home .phdc-ranking .phdc-rank-number {
    flex-basis: 3.3rem;
    min-width: 3.3rem;
    font-size: 3rem;
  }
  body.phdc-home .phdc-ranking .phdc-rank-info strong,
  body.phdc-home .phdc-ranking .phdc-rank-info small { font-size: 12px; }
  body.phdc-home .phdc-logo img.phdc-admin-logo { max-width: 140px; max-height: 44px; }
}
@media (max-width: 520px) {
  body.phdc-home .phdc-ranking .phdc-rank-track {
    grid-auto-columns: calc((100% - 10px) / 2);
  }
  body.phdc-home .phdc-ranking .phdc-rank-number {
    flex-basis: 2.7rem;
    min-width: 2.7rem;
    font-size: 2.5rem;
  }
  body.phdc-home .phdc-ranking .phdc-rank-info strong,
  body.phdc-home .phdc-ranking .phdc-rank-info small { font-size: 11px; }
  body.phdc-home .phdc-logo img.phdc-admin-logo { max-width: 122px; max-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  body.phdc-home .phdc-ranking .phdc-rank-art::before,
  body.phdc-home .phdc-ranking .phdc-rank-art > img { transition: none !important; }
}
