/* =========================================================
   5TV Taxonomy Archive
========================================================= */

.ftv-taxonomy-page {
    padding-block:
        clamp(1.4rem, 3vw, 2.5rem)
        4rem;
}

.ftv-taxonomy-container {
    width: min(
        calc(100% - 2rem),
        96rem
    );

    margin-inline: auto;
}


/* Header
--------------------------------------------------------- */

.ftv-taxonomy-head {
    margin-block-end: 1.4rem;
}

.ftv-taxonomy-head__eyebrow {
    display: inline-block;

    margin-block-end: .35rem;

    color: var(--accent);

    font-size: .76rem;
    font-weight: 700;
}

.ftv-taxonomy-head h1 {
    margin: 0;

    font-size: clamp(
        1.7rem,
        3vw,
        2.6rem
    );

    line-height: 1.2;
}

.ftv-taxonomy-head p {
    margin:
        .45rem
        0
        0;

    color: var(--text-muted);

    font-size: .85rem;
}


/* Grid
--------------------------------------------------------- */

.ftv-taxonomy-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: .55rem;
}


/* Card
--------------------------------------------------------- */

.ftv-tax-card {
    min-width: 0;
}

.ftv-tax-card__link {
    display: block;

    color: inherit;
    text-decoration: none;
}

.ftv-tax-card__media {
    position: relative;

    overflow: hidden;

    aspect-ratio: 2 / 3;

    border-radius: .9rem;

    background: var(--surface);

    transform: translateZ(0);
}

.ftv-tax-card__media img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 220ms ease,
        filter 220ms ease;
}

.ftv-tax-card__placeholder {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    background: var(--surface-2);

    color: var(--text-muted);

    font-size: 1.2rem;
    font-weight: 800;
}

.ftv-tax-card__shade {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgb(0 0 0 / 86%) 0%,
            rgb(0 0 0 / 36%) 28%,
            transparent 58%
        );

    pointer-events: none;
}

.ftv-tax-card__year {
    position: absolute;

    inset-block-start: .55rem;
    inset-inline-end: .55rem;

    min-width: 3rem;

    padding: .28rem .5rem;

    border-radius: 999px;

    background: rgb(0 0 0 / 72%);

    color: #fff;

    font-size: .66rem;
    font-weight: 700;

    text-align: center;

    backdrop-filter: blur(8px);
}

.ftv-tax-card__info {
    position: absolute;

    inset-inline: .7rem;
    inset-block-end: .7rem;

    z-index: 2;
}

.ftv-tax-card__info h2 {
    margin: 0;

    color: #fff;

    font-size: .86rem;
    font-weight: 750;

    line-height: 1.35;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    overflow: hidden;

    text-shadow:
        0 1px 8px rgb(0 0 0 / 50%);
}


/* Hover
--------------------------------------------------------- */

@media (hover: hover) {

    .ftv-tax-card__link:hover
    .ftv-tax-card__media img {
        transform: scale(1.035);
        filter: brightness(.9);
    }
}


/* Pagination
--------------------------------------------------------- */

.ftv-taxonomy-pagination {
    margin-block-start: 1.8rem;
}

.ftv-taxonomy-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
}

.ftv-taxonomy-pagination .page-numbers {
    min-width: 2.45rem;
    height: 2.45rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding-inline: .65rem;

    border: 1px solid var(--border);
    border-radius: .65rem;

    background: var(--surface);

    color: var(--text-muted);

    font-size: .76rem;
}

.ftv-taxonomy-pagination .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);

    color: #111;

    font-weight: 700;
}


/* Empty
--------------------------------------------------------- */

.ftv-taxonomy-empty {
    padding: 3rem 1rem;

    border: 1px dashed var(--border);
    border-radius: 1rem;

    color: var(--text-muted);

    text-align: center;
}


/* Responsive
--------------------------------------------------------- */

@media (max-width: 1200px) {

    .ftv-taxonomy-grid {
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
    }
}


@media (max-width: 950px) {

    .ftv-taxonomy-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }
}


@media (max-width: 700px) {

    .ftv-taxonomy-page {
        padding-block-start: .9rem;
        padding-block-end: 6.5rem;
    }

    .ftv-taxonomy-container {
        width: calc(100% - 1rem);
    }

    .ftv-taxonomy-head {
        margin-block-end: .9rem;
    }

    .ftv-taxonomy-head h1 {
        font-size: 1.5rem;
    }

    .ftv-taxonomy-head p {
        font-size: .75rem;
    }

    .ftv-taxonomy-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: .4rem;
    }

    .ftv-tax-card__media {
        border-radius: .7rem;
    }

    .ftv-tax-card__year {
        inset-block-start: .4rem;
        inset-inline-end: .4rem;

        min-width: 2.5rem;

        padding: .24rem .4rem;

        font-size: .58rem;
    }

    .ftv-tax-card__info {
        inset-inline: .5rem;
        inset-block-end: .5rem;
    }

    .ftv-tax-card__info h2 {
        font-size: .7rem;
        line-height: 1.3;
    }
}


@media (max-width: 430px) {

    .ftv-taxonomy-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   ARCHIVE POSTERS — YEAR BADGE TOP RIGHT
   Genres / Years / Quality / Countries / Languages /
   Status / Persons
   ========================================================= */

.ftv-tax-card__year {
    top: 9px !important;
    right: 9px !important;
    left: auto !important;

    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
}


/* Mobile */

@media (max-width: 767px) {

    .ftv-tax-card__year {
        top: 6px !important;
        right: 6px !important;
        left: auto !important;
    }

}


/* YEAR BADGE — MOVE SLIGHTLY LEFT */

.ftv-tax-card__year {
    right: 14px !important;
}

@media (max-width: 767px) {
    .ftv-tax-card__year {
        right: 9px !important;
    }
}


/* =========================================================
   TAXONOMY HEADER — SAME STYLE AS LATEST SERIES/MOVIES
   ========================================================= */

.ftv-taxonomy-head {
    margin-bottom: 24px;
}

.ftv-taxonomy-head__eyebrow {
    display: block;

    margin-bottom: 4px;

    color: #e6b94f;

    font-size: 9px;
    font-weight: 850;
    line-height: 1;
}

.ftv-taxonomy-head h1 {
    margin: 0;

    color: var(--ftv-text, #fff);

    font-size: clamp(
        25px,
        2.2vw,
        34px
    );

    font-weight: 900;
    line-height: 1.3;
}

.ftv-taxonomy-head__accent {
    display: block;

    width: 38px;
    height: 3px;

    margin-top: 7px;

    border-radius: 999px;

    background:
        rgba(
            230,
            185,
            79,
            .58
        );
}


/* Light theme */

html[data-theme="light"]
.ftv-taxonomy-head h1,

body[data-theme="light"]
.ftv-taxonomy-head h1,

body.light-theme
.ftv-taxonomy-head h1,

body.is-light
.ftv-taxonomy-head h1 {
    color: #181b20 !important;
}

html[data-theme="light"]
.ftv-taxonomy-head__eyebrow,

body[data-theme="light"]
.ftv-taxonomy-head__eyebrow,

body.light-theme
.ftv-taxonomy-head__eyebrow,

body.is-light
.ftv-taxonomy-head__eyebrow {
    color: #b48718 !important;
}

html[data-theme="light"]
.ftv-taxonomy-head__accent,

body[data-theme="light"]
.ftv-taxonomy-head__accent,

body.light-theme
.ftv-taxonomy-head__accent,

body.is-light
.ftv-taxonomy-head__accent {
    background:
        rgba(
            180,
            135,
            24,
            .70
        ) !important;
}


/* Mobile */

@media (max-width: 767px) {

    .ftv-taxonomy-head {
        margin-bottom: 17px;
    }

    .ftv-taxonomy-head__eyebrow {
        margin-bottom: 3px;
        font-size: 8px;
    }

    .ftv-taxonomy-head h1 {
        font-size: 22px;
    }

    .ftv-taxonomy-head__accent {
        width: 34px;
        height: 3px;
        margin-top: 6px;
    }

}

