/* Audio hub — a dedicated playlist-style design for the sound library,
   distinct from the video grid: a "now playing" panel + a scannable track
   list instead of a thumbnail grid (audio content doesn't benefit from
   large preview images the way video does). No hero/banner block. */

.audio-hub {
    --ah-ink: #16211a;
    --ah-muted: #626e64;
    --ah-line: rgba(16, 26, 19, .1);
    --ah-paper: #fff;
    --ah-gold: #dec53c;
    --ah-gold-deep: #9d8420;
    --ah-green: #173522;
    --ah-green-deep: #0e1f16;
    padding-block: 40px 90px;
    color: var(--ah-ink);
}

.audio-hub__head {
    margin-bottom: 34px;
}

.audio-hub__crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--ah-muted);
    font-size: .72rem;
    font-weight: 700;
}

.audio-hub__crumbs a {
    color: inherit;
    transition: color .18s ease;
}

.audio-hub__crumbs a:hover,
.audio-hub__crumbs a:focus-visible {
    color: var(--ah-gold-deep);
}

.audio-hub__title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.audio-hub__title-copy {
    max-width: 680px;
}

.audio-hub__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ah-gold-deep);
    font-size: .74rem;
    font-weight: 900;
}

.audio-hub__title-copy h1 {
    margin: 10px 0 10px;
    color: var(--ah-ink);
    font-size: clamp(1.9rem, 3.6vw, 2.9rem);
    font-weight: 800;
    line-height: 1.15;
}

.audio-hub__title-copy p {
    margin: 0;
    max-width: 560px;
    color: var(--ah-muted);
    font-size: .92rem;
    line-height: 1.85;
}

.audio-hub__stats {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-shrink: 0;
    padding: 12px 20px;
    border: 1px solid var(--ah-line);
    border-radius: 14px;
    background: rgba(222, 197, 60, .06);
}

.audio-hub__stats b {
    color: var(--ah-ink);
    font-size: 1.35rem;
    font-weight: 900;
}

.audio-hub__stats span {
    color: var(--ah-muted);
    font-size: .7rem;
}

/* Now-playing panel */
.audio-hub__player {
    display: grid;
    grid-template-columns: minmax(220px, .38fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(24px, 4vw, 46px);
    overflow: hidden;
    padding: clamp(22px, 3vw, 34px);
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 20%, rgba(222, 197, 60, .1), transparent 30%),
        var(--ah-green-deep);
    box-shadow: 0 24px 60px rgba(16, 25, 17, .16);
    margin-bottom: 46px;
    /* Clear the sticky site header when scrollIntoView() brings the
       player into view (see media-library-modern.css for details). */
    scroll-margin-top: 110px;
}

.audio-hub__art {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
}

.audio-hub__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .38);
}

.audio-hub__art i {
    position: absolute;
    inset: auto auto -14px 14px;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--ah-green-deep);
    border-radius: 50%;
    background: var(--ah-gold);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
    font-size: 1.05rem;
}

.audio-hub__now-playing {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
    color: #fff;
}

.audio-hub__status {
    align-self: flex-start;
    padding: 5px 12px;
    color: var(--ah-gold);
    border: 1px solid rgba(222, 197, 60, .35);
    border-radius: 999px;
    font-size: .64rem;
    font-weight: 800;
}

.audio-hub__now-playing h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.2rem, 2.2vw, 1.7rem);
    font-weight: 800;
    line-height: 1.45;
}

.audio-hub__date {
    color: rgba(255, 255, 255, .5);
    font-size: .68rem;
}

.audio-hub__now-playing audio {
    width: 100%;
    margin-top: 6px;
    accent-color: var(--ah-gold);
}

.audio-hub__now-playing audio[hidden] {
    display: none;
}

.audio-hub__unavailable {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, .8);
    border: 1px solid rgba(222, 197, 60, .25);
    border-radius: 12px;
    font-size: .74rem;
}

.audio-hub__unavailable i {
    color: var(--ah-gold);
}

.audio-hub__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.audio-hub__seek {
    display: flex;
    gap: 8px;
}

.audio-hub__seek button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease;
}

.audio-hub__seek button:hover,
.audio-hub__seek button:focus-visible {
    border-color: var(--ah-gold);
    background: rgba(222, 197, 60, .14);
}

.audio-hub__controls > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ah-green-deep);
    padding: 9px 15px;
    border-radius: 999px;
    background: var(--ah-gold);
    font-size: .7rem;
    font-weight: 900;
    white-space: nowrap;
}

/* Catalog / track list */
.audio-hub__catalog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.audio-hub__catalog-head h2 {
    margin: 0;
    color: var(--ah-ink);
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    font-weight: 800;
}

.audio-hub__search {
    display: flex;
    width: min(320px, 100%);
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--ah-muted);
    border: 1px solid var(--ah-line);
    border-radius: 999px;
    background: var(--ah-paper);
}

.audio-hub__search:focus-within {
    border-color: var(--ah-gold-deep);
    box-shadow: 0 0 0 4px rgba(222, 197, 60, .14);
}

.audio-hub__search input {
    width: 100%;
    padding: 0;
    color: var(--ah-ink);
    outline: 0;
    border: 0;
    background: transparent;
    font-size: .82rem;
}

.audio-hub__list {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ah-line);
    border-radius: 18px;
    background: var(--ah-paper);
}

.audio-hub__track {
    position: relative;
    display: flex;
    align-items: center;
}

.audio-hub__track + .audio-hub__track {
    border-top: 1px solid var(--ah-line);
}

.audio-hub__track-select {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 16px;
    padding: 14px 56px 14px 16px;
    color: inherit;
    border: 0;
    background: transparent;
    text-align: right;
    cursor: pointer;
    transition: background-color .18s ease;
}

.audio-hub__track:hover .audio-hub__track-select,
.audio-hub__track.is-active .audio-hub__track-select {
    background: rgba(222, 197, 60, .07);
}

.audio-hub__track-cover {
    position: relative;
    display: block;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    overflow: hidden;
    border-radius: 12px;
    background: #172018;
}

.audio-hub__track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audio-hub__track-play {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    color: var(--ah-green-deep);
    border-radius: 50%;
    background: var(--ah-gold);
    font-size: .78rem;
}

.audio-hub__track-pause-icon {
    display: none;
}

.audio-hub__track.is-active .audio-hub__track-play-icon {
    display: none;
}

.audio-hub__track.is-active .audio-hub__track-pause-icon {
    display: inline;
}

.audio-hub__track-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.audio-hub__track-copy strong {
    overflow: hidden;
    color: var(--ah-ink);
    font-size: .86rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audio-hub__track-copy small {
    color: var(--ah-muted);
    direction: ltr;
    font-size: .62rem;
    text-align: right;
}

.audio-hub__track-details {
    position: absolute;
    inset: 0 auto 0 0;
    display: grid;
    width: 48px;
    place-items: center;
    color: var(--ah-muted);
    opacity: 0;
    transition: opacity .18s ease, color .18s ease;
}

.audio-hub__track:hover .audio-hub__track-details,
.audio-hub__track:focus-within .audio-hub__track-details {
    opacity: 1;
}

.audio-hub__track-details:hover {
    color: var(--ah-gold-deep);
}

.audio-hub__empty {
    padding: 46px;
    color: var(--ah-muted);
    border: 1px dashed var(--ah-line);
    border-radius: 16px;
    text-align: center;
}

@media (max-width: 900px) {
    .audio-hub__player { grid-template-columns: minmax(140px, .34fr) minmax(0, 1fr); }
}

@media (max-width: 650px) {
    .audio-hub { padding-block: 26px 60px; }
    .audio-hub__title-row { align-items: flex-start; }
    .audio-hub__player { grid-template-columns: 1fr; border-radius: 18px; text-align: center; }
    .audio-hub__art { width: min(160px, 50vw); margin-inline: auto; }
    .audio-hub__now-playing { align-items: center; }
    .audio-hub__status { align-self: center; }
    .audio-hub__controls { justify-content: center; }
    .audio-hub__catalog-head { flex-direction: column; align-items: stretch; }
    .audio-hub__search { width: 100%; }
    .audio-hub__track-select { padding-inline-end: 50px; }
    .audio-hub__track-details { opacity: 1; }
}

/* Dark mode */
html.layout-dark .audio-hub {
    --ah-ink: #ece4cf;
    --ah-muted: #93a297;
    --ah-line: rgba(216, 189, 97, .16);
    --ah-paper: #16281f;
}

html.layout-dark .audio-hub__stats {
    background: rgba(216, 189, 97, .08);
}

html.layout-dark .audio-hub__track-cover {
    background: #0d1712;
}

html.layout-dark .audio-hub__empty {
    background: rgba(236, 228, 207, .04);
}
