/* Media hub — modern, banner-free redesign of the video/audio library.
   No hero/banner block: the page opens directly into clean typography on
   the page's own background, a theatre-style player, and a card grid. */

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

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

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

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

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

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

.media-hub__title-copy {
    max-width: 720px;
}

.media-hub__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--mh-gold-deep);
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .02em;
}

.media-hub__title-copy h1 {
    margin: 10px 0 10px;
    color: var(--mh-ink);
    font-size: clamp(1.35rem, 1.05rem + .9vw, 1.9rem);
    font-weight: 800;
    line-height: 1.3;
}

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

.media-hub__stats {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.media-hub__stats > div {
    display: grid;
    min-width: 108px;
    gap: 2px;
    padding: 12px 18px;
    border: 1px solid var(--mh-line);
    border-radius: 14px;
    background: rgba(222, 197, 60, .06);
    text-align: center;
}

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

.media-hub__stats span {
    color: var(--mh-muted);
    font-size: .66rem;
}

/* Theatre player — a dark backdrop here is normal, modern video-player
   chrome (YouTube/Netflix use the same convention); it isn't a "banner". */
.media-hub__player {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, .68fr);
    overflow: hidden;
    border-radius: 22px;
    background: var(--mh-green-deep);
    box-shadow: 0 24px 60px rgba(16, 25, 17, .16);
    margin-bottom: 46px;
    /* The site header is sticky (position: sticky; top: 0), so
       scrollIntoView() would otherwise stop with the player's top edge
       hidden behind it. scroll-margin-top makes the browser stop far
       enough down to clear the header in both its expanded and
       scrolled/collapsed states. */
    scroll-margin-top: 110px;
}

.media-hub__stage {
    position: relative;
    display: grid;
    min-height: 420px;
    place-items: center;
    background: #050705;
}

.media-hub__stage video,
.media-hub__stage iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    background: #050505;
    object-fit: contain;
}

.media-hub__stage [hidden] {
    display: none !important;
}

.media-hub__unavailable {
    display: grid;
    max-width: 380px;
    place-items: center;
    gap: 8px;
    padding: 30px;
    color: rgba(255, 255, 255, .78);
    text-align: center;
}

.media-hub__unavailable i {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    color: var(--mh-gold);
    border: 1px solid rgba(222, 197, 60, .4);
    border-radius: 50%;
    font-size: 1.2rem;
}

.media-hub__unavailable small {
    color: rgba(255, 255, 255, .5);
    font-size: .68rem;
}

.media-hub__player-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: clamp(24px, 3vw, 40px);
    color: #fff;
}

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

.media-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;
}

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

.media-hub__seek button i {
    font-size: .68rem;
}

.media-hub__player-status {
    align-self: flex-start;
    padding: 5px 12px;
    color: var(--mh-gold);
    border: 1px solid rgba(222, 197, 60, .35);
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 800;
}

.media-hub__player-info h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 800;
    line-height: 1.5;
}

.media-hub__player-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.media-hub__player-meta span {
    color: rgba(255, 255, 255, .5);
    font-size: .68rem;
}

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

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

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

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

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

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

.media-hub__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.media-hub-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--mh-line);
    border-radius: 18px;
    background: var(--mh-paper);
    box-shadow: 0 8px 24px rgba(16, 26, 19, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.media-hub-card:hover,
.media-hub-card:focus-within,
.media-hub-card.is-active {
    border-color: rgba(157, 132, 32, .5);
    box-shadow: 0 18px 42px rgba(16, 26, 19, .12);
    transform: translateY(-4px);
}

.media-hub-card__select {
    display: block;
    width: 100%;
    padding: 0;
    color: inherit;
    border: 0;
    background: transparent;
    text-align: right;
    cursor: pointer;
}

.media-hub-card__visual {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #172018;
}

.media-hub-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.media-hub-card:hover .media-hub-card__visual img,
.media-hub-card:focus-within .media-hub-card__visual img {
    transform: scale(1.06);
}

.media-hub-card__visual i {
    position: absolute;
    inset: 50% auto auto 50%;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--mh-green-deep);
    border-radius: 50%;
    background: rgba(222, 197, 60, .95);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
    font-size: .95rem;
    font-style: normal;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity .2s ease;
}

.media-hub-card:hover .media-hub-card__visual i,
.media-hub-card:focus-within .media-hub-card__visual i,
.media-hub-card.is-unavailable .media-hub-card__visual i {
    opacity: 1;
}

.media-hub-card__visual em {
    position: absolute;
    inset: auto 10px 10px auto;
    padding: 4px 8px;
    color: #fff;
    background: rgba(86, 28, 24, .85);
    border-radius: 999px;
    font-size: .58rem;
    font-style: normal;
}

.media-hub-card.is-unavailable .media-hub-card__visual img {
    filter: grayscale(1) brightness(.7);
}

.media-hub-card__copy {
    display: grid;
    gap: 6px;
    padding: 14px 16px 12px;
}

.media-hub-card__copy strong {
    display: -webkit-box;
    min-height: 2.7em;
    overflow: hidden;
    color: var(--mh-ink);
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.media-hub-card__copy small {
    color: var(--mh-muted);
    direction: ltr;
    font-size: .62rem;
    text-align: right;
}

.media-hub-card__details {
    position: absolute;
    inset: auto auto 14px 14px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: var(--mh-muted);
    border-radius: 50%;
    background: var(--mh-paper);
    box-shadow: 0 4px 12px rgba(16, 26, 19, .12);
    font-size: .68rem;
    opacity: 0;
    transition: opacity .2s ease, color .2s ease;
}

.media-hub-card:hover .media-hub-card__details,
.media-hub-card:focus-within .media-hub-card__details {
    opacity: 1;
}

.media-hub-card__details:hover {
    color: var(--mh-gold-deep);
}

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

@media (max-width: 1200px) {
    .media-hub__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .media-hub__player { grid-template-columns: 1fr; }
    .media-hub__stage,
    .media-hub__stage video,
    .media-hub__stage iframe { min-height: 320px; }
    .media-hub__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
    .media-hub { padding-block: 26px 60px; }
    .media-hub__title-row { align-items: flex-start; }
    .media-hub__stats { width: 100%; }
    .media-hub__stats > div { flex: 1; min-width: 0; }
    .media-hub__player { border-radius: 16px; }
    .media-hub__stage,
    .media-hub__stage video,
    .media-hub__stage iframe { min-height: 0; aspect-ratio: 16 / 10; }
    .media-hub__catalog-head { flex-direction: column; align-items: stretch; }
    .media-hub__search { width: 100%; }
    .media-hub__grid { grid-template-columns: 1fr; gap: 14px; }
    .media-hub-card__details { opacity: 1; }
}

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

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

html.layout-dark .media-hub-card__visual {
    background: #0d1712;
}

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