/*
Theme Name: Past Due Perfect
Theme URI: https://pastduereviews.com
Author: James
Description: Hip hop & R&B album review blog with rating chart front page.
Version: 1.0
Text Domain: past-due-perfect
*/

/* ==========================================================
   UNIFIED IMAGE CROP FIX (Prevents Squishing Across All Grids)
========================================================== */
.pdr-featured-series-card img, 
.pdr-card img, 
.pdr-rec-card img {
    width: 100%;
    height: 220px !important; /* Unified height for all grid cards */
    object-fit: cover !important; /* The magic fix for squishing */
    object-position: center;
    border-radius: 8px;
    display: block;
    margin-bottom: 12px;
}

/* ==========================================================
   GLOBAL
========================================================== */
body {
    margin: 0;
    font-family: Inter, Helvetica, Arial, sans-serif;
    background: #050505;
    color: #f5f5f5;
}

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3 {
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* ==========================================================
   LAYOUT
========================================================== */
.pdr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================
   HEADER + NAV
========================================================== */
.pdr-header {
    background: #0b0b0b;
    border-bottom: 3px solid #d7263d;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.pdr-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pdr-site-title {
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
}

.pdr-nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.pdr-nav a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: 0.2s ease;
}

.pdr-nav a:hover {
    border-bottom-color: #d7263d;
    color: #d7263d;
}

/* NAV DROPDOWN */
.pdr-nav ul li { position: relative; }
.pdr-nav ul .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #111;
    padding: 10px 0;
    list-style: none;
    min-width: 240px;
    border: 1px solid #222;
    border-radius: 6px;
    z-index: 999;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-height: 350px;
    overflow-y: auto;
}
.pdr-nav ul li:hover > .sub-menu { display: block; opacity: 1; transform: translateY(0); }
.pdr-nav ul .sub-menu li a { display: block; padding: 10px 15px; color: #f2f2f2; white-space: nowrap; font-size: 0.95rem; transition: background 0.2s ease, padding-left 0.2s ease; }
.pdr-nav ul .sub-menu li a:hover { background: #d32f2f; color: #fff; padding-left: 20px; }
.pdr-nav ul .sub-menu::-webkit-scrollbar { width: 6px; }
.pdr-nav ul .sub-menu::-webkit-scrollbar-thumb { background: #d32f2f; border-radius: 3px; }
.pdr-nav ul .sub-menu::-webkit-scrollbar-track { background: #222; }

/* ==========================================================
   HERO
========================================================== */
.pdr-hero {
    padding: 60px 20px 40px;
    text-align: center;
    background: linear-gradient(180deg, #101010 0%, #050505 100%);
}

.pdr-hero h1 {
    font-size: 2.6rem;
    margin-bottom: 10px;
}

.pdr-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ==========================================================
   EDITOR'S SPOTLIGHT
========================================================== */
.pdr-spotlight-image-wrap {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: radial-gradient(circle at center, #ffffff18 0%, #000000 75%);
    box-shadow: 0 0 35px rgba(255, 75, 92, 0.35), 0 0 18px rgba(255, 255, 255, 0.08) inset;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdr-spotlight-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    filter: brightness(0.92) contrast(1.1) saturate(1.05);
    transition: 0.35s ease;
}

.pdr-spotlight-image-wrap:hover .pdr-spotlight-image {
    transform: scale(1.06);
    filter: brightness(1) contrast(1.2) saturate(1.15);
}

/* ==========================================================
   FEATURED SERIES GRID
========================================================== */
.pdr-featured-series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pdr-featured-series-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.35);
    transition: 0.25s ease;
    display: flex;
    flex-direction: column;
}

.pdr-featured-series-card:hover {
    transform: translateY(-3px);
    border-color: #d7263d;
}

.pdr-featured-series-card h3 {
    font-size: 1rem;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.pdr-featured-series-card h3 a { color: #fff; text-decoration: none; }
.pdr-featured-series-card h3 a:hover { color: #d7263d; }

/* ==========================================================
   RECENT REVIEWS GRID (CATEGORY/HOME)
========================================================== */
.pdr-section { margin: 40px 0; }
.pdr-section h2 { margin-bottom: 20px; }

.pdr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.pdr-card {
    background: #101010;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    animation: pdrFadeIn 0.5s ease forwards;
}

.pdr-card:hover {
    border-color: #d7263d;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.pdr-card h3 a { color: #fff; font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.pdr-card h3 a:hover { color: #d7263d; }
.pdr-card .pdr-rating-badge { margin-top: 8px; display: inline-block; }

@keyframes pdrFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   RECOMMENDED ALBUMS (CLICKABLE GRID)
========================================================== */
.pdr-recommended h2 { color: var(--pdr-text); margin-bottom: 20px; }
.pdr-rec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }

.pdr-rec-card {
    position: relative;
    background: #111;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 12px;
    transition: 0.25s ease;
    text-align: center;
    width: 100%;
}

.pdr-rec-card:hover {
    border-color: var(--pdr-accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.pdr-rec-card a { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; }
.pdr-rec-card img, .pdr-rec-card h3 { position: relative; z-index: 1; }
.pdr-rec-card h3 { color: var(--pdr-text); font-size: 1rem; margin-top: 10px; transition: 0.2s ease; }
.pdr-rec-card:hover h3 { color: var(--pdr-accent); }

/* ==========================================================
   HOMEPAGE RATING SYSTEM
========================================================== */
.pdr-rating-home {
    margin: 60px auto;
    padding: 40px 20px;
    max-width: 1000px;
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
}

.pdr-rating-title { font-size: 2.4rem; font-weight: 800; color: #fbc02d; text-align: center; margin-bottom: 10px; }
.pdr-rating-subtitle { text-align: center; color: #ccc; margin-bottom: 40px; font-size: 1.1rem; }
.pdr-rating-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 25px; }

.pdr-rating-card {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #222;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.pdr-rating-card:hover { transform: translateY(-4px); border-color: #d32f2f; }
.pdr-rating-card h3 { color: #d32f2f; font-size: 1.4rem; margin-bottom: 10px; }
.pdr-rating-card p { color: #e6e6e6; line-height: 1.6; font-size: 0.95rem; }

/* RATING CHART & COLORS */
.pdr-rating-chart { margin: 40px auto 60px; background: #101010; border-radius: 12px; padding: 24px; box-shadow: 0 6px 20px rgba(0,0,0,0.6); }
.pdr-rating-chart h2 { margin-bottom: 16px; }
.pdr-rating-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.pdr-rating-table th, .pdr-rating-table td { padding: 10px 8px; border-bottom: 1px solid #2a2a2a; }
.pdr-rating-table th { text-align: left; font-weight: 700; }
.pdr-rating-label { font-weight: 700; text-transform: uppercase; }

.pdr-rating-past-due { color: #4caf50; }
.pdr-rating-on-time { color: #f5f5f5; }
.pdr-rating-early { color: #4b7bec; }
.pdr-rating-slightly-late { color: #f7b731; }
.pdr-rating-delayed { color: #fa8231; }
.pdr-rating-missed { color: #eb3b5a; }
.pdr-rating-archival { color: #8854d0; }

/* ==========================================================
   ARTICLE PAGE — GLOBAL BASE
========================================================== */
.single-post .pdr-article-content,
.single-post .pdr-article-content p { color: var(--pdr-text); line-height: 1.75; font-size: 1.15rem; margin-bottom: 1.4rem; }
.single-post h1, .single-post h2, .single-post h3, .single-post h4 { color: var(--pdr-text); font-weight: 800; letter-spacing: -0.5px; }

.single-post .pdr-article-content a { color: var(--pdr-accent); font-weight: 600; text-decoration: none; border-bottom: 1px solid transparent; transition: 0.25s ease; }
.single-post .pdr-article-content a:hover { color: var(--pdr-text); border-bottom-color: var(--pdr-accent); }

.pdr-article-hero { padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 40px; }
.pdr-article-hero h1 { font-size: 2.8rem; color: var(--pdr-text); }
.pdr-article-hero .pdr-card-meta { color: color-mix(in srgb, var(--pdr-text) 70%, transparent); }

.pdr-featured-image img { width: 100%; height: 360px; object-fit: cover; border-radius: 14px; display: block; box-shadow: 0 0 40px rgba(0,0,0,0.6), 0 0 20px color-mix(in srgb, var(--pdr-accent) 40%, transparent); }

.single-post blockquote { margin: 40px 0; padding: 25px 30px; border-left: 5px solid var(--pdr-accent); background: rgba(255,255,255,0.04); border-radius: 8px; font-size: 1.3rem; line-height: 1.6; color: var(--pdr-text); font-weight: 600; }
.single-post .pdr-article-content mark { background: color-mix(in srgb, var(--pdr-accent) 35%, transparent); padding: 2px 6px; border-radius: 4px; color: var(--pdr-text); }

.single-post h2 { position: relative; padding-bottom: 8px; margin-top: 50px; }
.single-post h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 60px; height: 3px; background: var(--pdr-accent); border-radius: 2px; }

.single-post .pdr-article-content img { width: 100%; border-radius: 12px; margin: 30px 0; box-shadow: 0 0 25px rgba(0,0,0,0.45); }

.pdr-post-nav a { color: var(--pdr-accent); font-weight: 700; transition: 0.25s ease; }
.pdr-post-nav a:hover { color: var(--pdr-text); }

/* ==========================================================
   COMMENTS + STAR RATING
========================================================== */
.pdr-comments { margin-top: 60px; padding: 40px; background: #111; border: 1px solid #222; border-radius: 12px; }
.pdr-comments-title { color: var(--pdr-accent); font-weight: 800; font-size: 1.6rem; margin-bottom: 25px; }

.pdr-average-rating { margin-bottom: 40px; padding: 20px; background: #1a1a1a; border-radius: 10px; border: 1px solid #222; }
.pdr-average-stars { font-size: 1.4rem; color: #fbc02d; }
.pdr-average-number { color: #ccc; font-size: 1rem; }

.pdr-star-input { margin-bottom: 25px; }
.pdr-star-input label { display: block; margin-bottom: 8px; color: #fff; font-weight: 600; }
.pdr-stars span { font-size: 2rem; cursor: pointer; color: #444; transition: 0.2s; margin-right: 5px; }
.pdr-stars span.active { color: #fbc02d; }

.pdr-comment-rating { font-size: 1.2rem; color: var(--pdr-accent); margin-bottom: 8px; }
.comment-list { list-style: none; padding: 0; }
.comment { margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px solid #222; }
.comment-content { color: #ddd; }

#commentform textarea, #commentform input[type="text"], #commentform input[type="email"], #commentform input[type="url"] {
    width: 100%; background: #1a1a1a; border: 1px solid #333; color: #fff; padding: 10px; border-radius: 6px; margin-bottom: 15px;
}
#commentform input[type="submit"] {
    background: #ff4b5c; color: #fff; padding: 10px 20px; border-radius: 6px; border: none; font-weight: 700; cursor: pointer; transition: 0.2s;
}
#commentform input[type="submit"]:hover { background: #ff2f45; }

/* ==========================================================
   SUBSCRIBE BOX
========================================================== */
.pdr-subscribe-box {
    margin: 60px 0 40px;
    padding: 35px;
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    text-align: center;
}

.pdr-subscribe-box h3 {
    margin: 0 0 10px;
    font-size: 1.4rem;
    color: var(--pdr-accent, #ff4b5c);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pdr-subscribe-box p { margin: 0 0 20px; opacity: 0.8; font-size: 1rem; }
.pdr-subscribe-form { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pdr-subscribe-form input { padding: 12px 14px; border-radius: 6px; border: 1px solid #333; background: #1a1a1a; color: #fff; width: 260px; }
.pdr-subscribe-form button { padding: 12px 24px; background: #ff4b5c; border: none; border-radius: 6px; color: #fff; font-weight: 600; cursor: pointer; transition: 0.25s ease; }
.pdr-subscribe-form button:hover { background: transparent; border: 1px solid #ff4b5c; color: #ff4b5c; }

/* ==========================================================
   RECORD STACK ANIMATION
========================================================== */
.pdr-stack-container { display: flex; justify-content: center; padding: 50px 0; }
.pdr-record-stack { position: relative; width: 200px; height: 200px; }
.pdr-record-card {
    position: absolute; top: 0; left: 0; width: 200px; height: 200px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.5); cursor: pointer;
}
.pdr-record-card img { width: 100%; height: 100%; object-fit: cover; }
.pdr-record-stack:hover .pdr-record-card:nth-child(1) { transform: rotate(-15deg) translateX(-120px); }
.pdr-record-stack:hover .pdr-record-card:nth-child(2) { transform: rotate(-10deg) translateX(-80px); }
.pdr-record-stack:hover .pdr-record-card:nth-child(3) { transform: rotate(-5deg) translateX(-40px); }
.pdr-record-stack:hover .pdr-record-card:nth-child(4) { transform: rotate(0deg) translateX(0px); }
.pdr-record-stack:hover .pdr-record-card:nth-child(5) { transform: rotate(5deg) translateX(40px); }
.pdr-record-stack:hover .pdr-record-card:nth-child(6) { transform: rotate(10deg) translateX(80px); }
.pdr-record-stack:hover .pdr-record-card:nth-child(7) { transform: rotate(15deg) translateX(120px); }

/* ==========================================================
   MISC (ABOUT, PLAYLIST, LOAD MORE)
========================================================== */
.pdr-about-container { max-width: 800px; margin: 60px auto; padding: 0 20px; background: #111; color: #f2f2f2; }
.pdr-about-hero { text-align: center; margin-bottom: 50px; padding: 40px 20px; background: #1a1a1a; border-radius: 12px; border: 1px solid #222; }
.pdr-about-hero h1 { font-size: 3rem; font-weight: 800; color: #fbc02d; }
.pdr-about-tagline { font-size: 1.2rem; color: #ccc; margin-top: 10px; }
.pdr-about-section { margin-top: 50px; padding-bottom: 40px; border-bottom: 1px solid #333; }
.pdr-about-section h2 { font-size: 1.8rem; font-weight: 700; color: #d32f2f; margin-bottom: 15px; }
.pdr-dropcap:first-letter { float: left; font-size: 3.5rem; line-height: 1; padding-right: 10px; padding-top: 5px; font-weight: 700; color: #fbc02d; }
.pdr-about-section p { line-height: 1.7; color: #e6e6e6; font-size: 1.05rem; }
.pdr-about-list { list-style: none; padding-left: 0; }
.pdr-about-list li { margin-bottom: 12px; padding-left: 20px; position: relative; color: #e6e6e6; }
.pdr-about-list li::before { content: "•"; position: absolute; left: 0; color: #d32f2f; font-size: 1.4rem; line-height: 1; }

.pdr-playlist { margin: 80px auto; padding: 50px 20px; max-width: 900px; background: #111; border: 1px solid #222; border-radius: 14px; text-align: center; }
.pdr-playlist-title { font-size: 2rem; font-weight: 800; color: #fbc02d; margin-bottom: 25px; }
.pdr-playlist-frame iframe { width: 100%; height: 320px; border: none; border-radius: 12px; box-shadow: 0 0 25px rgba(0,0,0,0.45); }

.pdr-artist-dropdown { max-height: 350px; overflow-y: auto; }
.pdr-artist-search input { background: #111 !important; color: #fff !important; border: 1px solid #333 !important; }

#pdr-load-more { padding: 14px 34px; background: #111; border: 2px solid #d7263d; color: #fff; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer; margin: 40px auto; display: block; transition: all 0.25s ease; }
#pdr-load-more:hover { background: #d7263d; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(215,38,61,0.4); }
#pdr-load-more:disabled { opacity: 0.4; cursor: not-allowed; }

.pdr-footer { text-align: center; padding: 24px 20px; font-size: 0.85rem; opacity: 0.7; border-top: 1px solid #1a1a1a; }

/* ==========================================================
   RESPONSIVE MEDIA QUERIES
========================================================== */
@media (max-width: 900px) {
    .pdr-rec-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .pdr-header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .pdr-hero h1 { font-size: 2.1rem; }
}

@media (max-width: 500px) {
    .pdr-rec-grid { grid-template-columns: 1fr; }
}

/* Style the View All button */
.pdr-view-all-item {
    margin: 5px 10px 10px 10px !important;
}

.pdr-view-all-item a {
    display: block !important;
    background: #d7263d !important;
    color: #fff !important;
    text-align: center !important;
    padding: 8px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
}

.pdr-view-all-item a:hover {
    background: #ff4b5c !important;
    padding-left: 8px !important; /* Prevents the sub-menu hover shift */
}

/* ===== Base Article Wrapper ===== */
.review-article {
  max-width: 900px;
  margin: 0 auto 80px auto;
  padding: 0 20px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111;
}

/* Optional subtle fade-in */
.review-article.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: reviewFadeIn 0.6s ease-out forwards;
}

@keyframes reviewFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Hero Section ===== */
.review-hero {
  position: relative;
  padding: 60px 0 40px 0;
  text-align: left;
}

.review-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #000 0%, #222 40%, #444 100%);
  opacity: 0.08;
  pointer-events: none;
}

.review-title {
  position: relative;
  font-size: 2.4rem;
  line-height: 1.2;
  margin: 0 0 10px 0;
}

.review-title em {
  font-style: italic;
}

.review-subtitle {
  position: relative;
  font-size: 1rem;
  color: #555;
  max-width: 650px;
  margin: 0;
}

/* ===== Content Body ===== */
.review-content {
  position: relative;
  margin-top: 20px;
  font-size: 1rem;
  line-height: 1.7;
}

.review-content p {
  margin: 0 0 18px 0;
}

/* Headings inside content */
.review-content h2 {
  font-size: 1.4rem;
  margin: 32px 0 12px 0;
  font-weight: 600;
}

.review-content h3 {
  font-size: 1.2rem;
  margin: 24px 0 10px 0;
  font-weight: 600;
}

/* ===== Blockquotes / Pull Quotes ===== */
.review-quote {
  margin: 28px 0;
  padding: 18px 20px;
  border-left: 3px solid #000;
  background: #fafafa;
}

.review-quote p {
  margin: 0;
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* ===== Divider ===== */
.review-divider {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid #eee;
}

/* ===== Tracklist Directory ===== */
.tracklist-directory {
  list-style-position: inside;
  line-height: 1.8;
  padding-left: 0;
  margin-top: 20px;
}

.tracklist-directory li {
  margin-bottom: 6px;
}

.tracklist-directory li strong {
  font-weight: 600;
}

/* ===== Footer Section ===== */
.review-footer {
  margin-top: 40px;
  border-top: 2px solid #eee;
  padding-top: 20px;
  font-size: 0.9rem;
  color: #555;
}

/* Artist bio link */
.artist-bio-link a {
  text-decoration: none;
  color: #000;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1px solid #000;
}

.artist-bio-link a:hover {
  color: #333;
  border-bottom-color: #333;
}

/* Tags */
.post-tags span {
  display: inline-block;
  margin-bottom: 4px;
}

/* ===== Links in content ===== */
.review-content a {
  color: #0066cc;
  text-decoration: underline;
  font-weight: 500;
}

.review-content a:hover {
  color: #004999;
}

/* ===== Responsive Tweaks ===== */
@media (max-width: 768px) {
  .review-title {
    font-size: 2rem;
  }

  .review-subtitle {
    font-size: 0.95rem;
  }

  .review-article {
    padding: 0 16px;
  }
}

/* ==========================================================
   RATING HEATMAP
========================================================== */
.pdr-heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 4px;
    padding: 20px;
    background: #0a0a0a;
    border-radius: 12px;
    border: 1px solid #222;
}

.heatmap-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease, z-index 0.2s ease;
    background: #1a1a1a;
}

.heatmap-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hover Effect: Pop out of the grid */
.heatmap-item:hover {
    transform: scale(1.6);
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0,0,0,0.9);
    border: 2px solid #fff;
    border-radius: 6px;
}

/* 
   Dynamic Color Tinting
   Applies a multiply blend to tint the album cover based on its rating 
*/
.heatmap-item::after {
    content: '';
    position: absolute;
    inset: 0;
    mix-blend-mode: multiply;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Remove tint on hover so they can see the original cover */
.heatmap-item:hover::after {
    opacity: 0;
}

/* Map the sanitized custom ratings to your existing theme colors */
.rating-past-due::after { background: #4caf50; }
.rating-on-time::after { background: #ffffff; mix-blend-mode: overlay; opacity: 0.3; } /* Overlay works better for white */
.rating-early::after { background: #4b7bec; }
.rating-slightly-late::after { background: #f7b731; }
.rating-delayed-delivery::after { background: #fa8231; }
.rating-missed-the-moment::after { background: #eb3b5a; }
.rating-archival-only::after { background: #8854d0; }

/* Versus Tool Styling */
.pdr-versus-grid {
    padding: 20px;
    background: #111;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .pdr-versus-grid {
        grid-template-columns: 1fr;
    }
}
/* Unified Featured Album Cover Sizing */
.pdr-featured-series-card img, 
.pdr-versus-card img {
    width: 100%;
    height: 300px !important; /* Set your preferred uniform height */
    object-fit: cover !important; /* This prevents squishing */
    object-position: center;
    border-radius: 8px;
    display: block;
    margin-bottom: 15px;
}

/* ==========================================================
   HEATMAP FILTER UI & GRID BEHAVIOR
========================================================== */

.filter-btn {
    background: #111;
    border: 1px solid #333;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s ease;
}

.filter-btn:hover {
    border-color: #ff4b5c;
    color: #ff4b5c;
}

.filter-btn.active {
    border-color: #ff4b5c;
    background: #222; /* Active button lift */
    color: #ff4b5c;
}

.heatmap-item {
    transition: opacity 0.3s ease; /* Smooth filtering transition */
    cursor: pointer;
}

/* When an item is dimmed by the filter, disable mouse clicks */
.heatmap-item[style*="opacity: 0.1"] {
    pointer-events: none;
}

/* Scrollable Articles Dropdown */
.menu-item-has-children .sub-menu {
    max-height: 70vh; /* Limits height to 70% of the viewport height */
    overflow-y: auto; /* Adds a scrollbar only when content exceeds the limit */
    scrollbar-width: thin; /* Clean scrollbar for Firefox */
}

/* Optional: Customizing the scrollbar for Chrome/Safari/Edge */
.menu-item-has-children .sub-menu::-webkit-scrollbar {
    width: 6px;
}
.menu-item-has-children .sub-menu::-webkit-scrollbar-thumb {
    background-color: #333;
    border-radius: 4px;
}