/* ========================================
   Albums Index Page
   ======================================== */

/* ========== HERO (Dark Gradient) ========== */
.albums-hero {
  background: linear-gradient(120deg, #0f0e17 0%, #2b1c2e 40%, #3d1a2e 70%, #2b1c2e 100%);
  padding: 3.5rem 0 3rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.albums-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 50%;
  height: 140%;
  background: radial-gradient(circle, rgba(230,57,70,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.albums-hero h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}
.albums-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Frosted Glass Search Bar */
.albums-hero-search {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.albums-hero-search .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.5);
  pointer-events: none;
}
.albums-hero-search .search-icon svg {
  width: 18px;
  height: 18px;
}
.albums-hero-search input {
  width: 100%;
  padding: 12px 20px 12px 48px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.2s;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
}
.albums-hero-search input:focus {
  border-color: var(--vermillion);
  background: rgba(255,255,255,0.15);
}
.albums-hero-search input::placeholder {
  color: rgba(255,255,255,0.45);
}

/* ========== SECTION HEADERS ========== */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary, #1a1a1a);
}
.section-head a {
  font-size: 0.82rem;
  color: var(--vermillion);
  font-weight: 600;
  transition: opacity 0.2s;
}
.section-head a:hover {
  opacity: 0.8;
}

/* ========== HORIZONTAL SCROLL SECTIONS ========== */
.scroll-section {
  margin-bottom: 2.5rem;
  position: relative;
}
.scroll-wrap {
  position: relative;
}
.album-scroll {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: 4px;
}
.album-scroll::-webkit-scrollbar {
  display: none;
}
.album-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Netflix-style Scroll Buttons */
.scroll-wrap:hover .scroll-btn.visible {
  opacity: 1;
}
.scroll-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 5;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.scroll-btn.visible {
  pointer-events: auto;
}
.scroll-btn svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
  transition: transform 0.2s;
}
.scroll-btn:hover svg {
  transform: scale(1.2);
}
.scroll-btn--left {
  left: 0;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(to right, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  padding-right: 12px;
}
.scroll-btn--right {
  right: 0;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(to left, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  padding-left: 12px;
}

/* Scroll Cards */
.scroll-card {
  flex: 0 0 200px;
  max-width: 200px;
  min-width: 0;
  scroll-snap-align: start;
  transition: transform 0.2s;
}
.scroll-card:hover {
  transform: translateY(-4px);
}
.scroll-card--lg {
  flex: 0 0 200px;
  max-width: 200px;
  min-width: 0;
}
.scroll-card-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: var(--bg-secondary, #f5f5f0);
}
.scroll-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-width: 0;
}
.scroll-card-img .badge-new {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--vermillion);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.scroll-card-info {
  padding: 0.6rem 0.15rem 0;
}
.scroll-card-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scroll-card-artist {
  font-size: 0.78rem;
  color: var(--text-muted, #999);
  margin-top: 2px;
}
.scroll-card-meta {
  font-size: 0.72rem;
  color: var(--text-muted, #bbb);
  margin-top: 2px;
}

/* Gradient placeholder for missing cover */
.gradient-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--vermillion), #ff6b6b, #ffb347);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-align: center;
  padding: 1rem;
}

/* ========== A-Z FILTER BAR ========== */
.az-bar--page {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-bottom: 1.5rem;
  padding: 0.75rem 0 1.25rem;
  border-bottom: 1px solid var(--border-color, #e5e5e5);
}
.az-bar--page a {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #555);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary, #f5f5f0);
  transition: all 0.2s;
}
.az-bar--page a:hover,
.az-bar--page a.active {
  background: var(--vermillion);
  color: #fff;
}

/* ========== ALL ALBUMS SECTION ========== */
.albums-main-section {
  margin-bottom: 2.5rem;
}

/* Filter Row */
.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--border-color, #e0e0e0);
  color: var(--text-secondary, #555);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-pill:hover {
  border-color: var(--vermillion);
  color: var(--vermillion);
}
.filter-pill.active {
  background: var(--vermillion);
  color: #fff;
  border-color: var(--vermillion);
}

/* Sort Dropdown */
.sort-dropdown {
  padding: 8px 16px;
  border: 1.5px solid var(--border-color, #e0e0e0);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--text-secondary, #555);
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.sort-dropdown:focus {
  border-color: var(--vermillion);
}

/* Two-Column Layout: Grid + Sidebar */
.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}
.main-col {
  min-width: 0;
}

/* Album Card Grid */
.album-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.album-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  border: 2px solid transparent;
  transition: all 0.25s ease;
}
.album-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  border-color: var(--vermillion);
}
.album-card-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-secondary, #f5f5f0);
}
.album-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.album-card:hover .album-card-img img {
  transform: scale(1.05);
}
.album-card-body {
  padding: 0.7rem 0.5rem 0.85rem;
}
.album-card-body .album-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-card-body .artist-name {
  font-size: 0.78rem;
  color: var(--text-muted, #999);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-card-body .meta {
  font-size: 0.72rem;
  color: var(--text-muted, #bbb);
  margin-top: 3px;
}

/* ========== SIDEBAR ========== */
.sidebar-col {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border-color, #e5e5e5);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.sidebar-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--text-primary, #1a1a1a);
}
.top-artist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.top-artist-row:last-child {
  border-bottom: none;
}
.top-artist-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vermillion), #ff6b6b);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  overflow: hidden;
}
.top-artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.top-artist-info .top-artist-name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-primary, #1a1a1a);
}
.top-artist-info .top-artist-songs {
  font-size: 0.72rem;
  color: var(--text-muted, #999);
}
.sidebar-view-all {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--vermillion);
  font-weight: 600;
}
.sidebar-view-all:hover {
  opacity: 0.8;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .two-col-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-col {
    display: none;
  }
}

@media (max-width: 768px) {
  .albums-hero h1 {
    font-size: 1.8rem;
  }
  .albums-hero p {
    font-size: 0.9rem;
  }
  .album-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .scroll-card {
    flex: 0 0 180px;
    max-width: 180px;
  }
  .scroll-card--lg {
    flex: 0 0 180px;
    max-width: 180px;
  }
  .filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .albums-hero h1 {
    font-size: 1.5rem;
  }
  .albums-hero {
    padding: 2rem 0 1.5rem;
  }
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .scroll-card {
    flex: 0 0 150px;
    max-width: 150px;
  }
  .scroll-card--lg {
    flex: 0 0 150px;
    max-width: 150px;
  }
  .az-bar--page a {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }
}

/* Breadcrumb on albums page — light background needs dark text */
.container > .breadcrumb {
    color: var(--text-muted, #888);
}
.container > .breadcrumb a {
    color: var(--text-secondary, #555);
}
.container > .breadcrumb a:hover {
    color: var(--vermillion);
}
.container > .breadcrumb span {
    color: var(--text-muted, #aaa);
}

/* =================================================================
   IMPROVEMENTS LAYER — additive polish over the existing layout
   ================================================================= */

/* Better cover hover play-circle (shared across scroll & grid cards) */
.scroll-card-img,
.album-card-img { position: relative; overflow: hidden; }
.card-play {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--vermillion, #FF3B5C);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.30);
    opacity: 0;
    transform: translateY(6px) scale(0.92);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    padding-left: 2px;
}
.scroll-card:hover .card-play,
.album-card:hover .card-play {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stronger card lift on hover — subtle shadow, faster transition */
.album-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.album-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}
.album-card-img img {
    transition: transform 0.4s ease;
}
.album-card:hover .album-card-img img {
    transform: scale(1.04);
}

/* Vinyl-style fallback placeholder — only used when no cover exists.
   Spinning groove pattern + centered title chip; much less "empty looking"
   than the flat coral gradient. */
.gradient-placeholder--vinyl {
    position: relative;
    background:
        radial-gradient(circle at center, #1a1a2e 0%, #3d1a2e 35%, #5b1a2e 75%, #1a1a2e 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    aspect-ratio: 1;
}
.gradient-placeholder--vinyl::before {
    content: '';
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background:
        repeating-radial-gradient(circle at center,
            rgba(255,255,255,0.04) 0px,
            rgba(255,255,255,0.04) 1px,
            transparent 2px,
            transparent 5px),
        radial-gradient(circle at center, #0f0f1a 0%, #1a1a2e 80%);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.6);
}
.gradient-placeholder--vinyl::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 22%; height: 22%;
    border-radius: 50%;
    background: var(--vermillion, #FF3B5C);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}
.gradient-placeholder--vinyl span {
    position: relative;
    z-index: 2;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    padding: 0.3rem 0.55rem;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 4px;
    line-height: 1.2;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Sticky A-Z bar — lets readers jump letters while scrolling the list */
.az-bar--page {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* Filter pills — more obvious active state */
.filter-pill.active {
    background: var(--vermillion, #FF3B5C);
    color: #fff;
    border-color: var(--vermillion, #FF3B5C);
    box-shadow: 0 4px 10px rgba(255, 59, 92, 0.28);
}

/* Top Artists sidebar — vermillion→purple gradient ring around avatar */
.top-artist-avatar {
    position: relative;
    padding: 2px;
    background: linear-gradient(135deg, var(--vermillion, #FF3B5C), #7C4DFF);
    border-radius: 50%;
    overflow: visible;
    flex-shrink: 0;
}
.top-artist-avatar img,
.top-artist-avatar > * {
    border: 2px solid #fff;
    border-radius: 50%;
}
.top-artist-row {
    transition: background 0.15s ease, padding 0.15s ease;
    border-radius: 8px;
    padding: 0.45rem 0.55rem !important;
}
.top-artist-row:hover {
    background: rgba(255, 59, 92, 0.06);
    padding-left: 0.85rem !important;
}

/* "View all" sidebar links — vermillion + arrow shift on hover */
.sidebar-view-all {
    transition: color 0.15s ease, transform 0.15s ease;
}
.sidebar-view-all:hover {
    color: var(--vermillion, #FF3B5C);
    transform: translateX(2px);
}

/* Scroll-section card titles — slightly bolder so artist + title hierarchy reads cleanly */
.scroll-card-title { font-weight: 700; }
.scroll-card-artist { font-weight: 500; }

/* Section heads on albums page — light accent rule under the title */
.albums-main-section .section-head h2,
.scroll-section .section-head h2 {
    position: relative;
    padding-bottom: 0.55rem;
}
.albums-main-section .section-head h2::after,
.scroll-section .section-head h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: var(--vermillion, #FF3B5C);
}

/* ============================================================
   Editorial / SEO content (rendered below the album grid)
   ============================================================ */
.albums-editorial {
    margin-top: 8px;
    padding-bottom: 8px;
    color: var(--text-secondary, #475569);
}
.albums-editorial .albums-editorial-lead {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--text-primary, #1a1a1a);
    max-width: 80ch;
    margin: 0 0 8px;
}
.albums-editorial h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-primary, #1a1a1a);
    margin: 32px 0 12px;
}
.albums-editorial p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary, #475569);
    margin: 0 0 14px;
    max-width: 80ch;
}
.albums-editorial a { color: var(--vermillion, #FF3B5C); font-weight: 600; text-decoration: none; }
.albums-editorial a:hover { text-decoration: underline; }

/* Information-gain table */
.albums-editorial-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 18px;
    font-size: 0.94rem;
    background: #fff;
    border: 1px solid var(--border-color, #e6e8ec);
    border-radius: 12px;
    overflow: hidden;
}
.albums-editorial-table th,
.albums-editorial-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color, #ededf2);
    vertical-align: top;
    line-height: 1.55;
}
.albums-editorial-table thead th {
    background: #f4f5f7;
    color: var(--text-primary, #1a1a1a);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.albums-editorial-table tbody tr:last-child td { border-bottom: 0; }
.albums-editorial-table td:first-child { font-weight: 600; color: var(--text-primary, #1a1a1a); white-space: nowrap; }

/* FAQ accordion (uses global details.tribe-faq) */
.albums-editorial-faqh {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary, #1a1a1a);
    margin: 36px 0 14px;
}
.albums-editorial-faq { max-width: 860px; }
.albums-editorial-faq .qa-icon { font-size: 1.25rem; line-height: 1; font-weight: 400; }

@media (max-width: 560px) {
    .albums-editorial-table td:first-child { white-space: normal; }
}
