/* MATCHSHOCK_TAG_PAGE_V1 */

.ms-tag-archive {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.ms-tag-archive__header {
    position: relative;
    margin-top: 34px;
    padding: 40px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 24px;
    background:
        radial-gradient(
            circle at top right,
            rgba(255, 55, 70, 0.18),
            transparent 42%
        ),
        rgba(255, 255, 255, 0.035);
}

.ms-tag-archive__kicker {
    display: inline-flex;
    margin-bottom: 14px;
    color: #ff4a55;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ms-tag-archive__title {
    max-width: 850px;
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.95;
    letter-spacing: -0.045em;
}

.ms-tag-archive__description {
    max-width: 760px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 17px;
    line-height: 1.65;
}

.ms-tag-archive__stories {
    padding-top: 34px;
    padding-bottom: 54px;
}

.ms-tag-archive__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.ms-tag-archive__heading span {
    color: #ff4a55;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ms-tag-archive__heading h2 {
    margin: 5px 0 0;
    font-size: clamp(28px, 4vw, 42px);
}

.ms-tag-archive__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.ms-tag-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.035);
    transition:
        transform 160ms ease,
        border-color 160ms ease;
}

.ms-tag-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 74, 85, 0.45);
}

.ms-tag-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.ms-tag-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.ms-tag-card:hover .ms-tag-card__media img {
    transform: scale(1.025);
}

.ms-tag-card__fallback {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.ms-tag-card__body {
    display: flex;
    min-height: 215px;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.ms-tag-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 11px;
    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.ms-tag-card h3 {
    margin: 0;
    font-size: 21px;
    line-height: 1.18;
}

.ms-tag-card h3 a {
    color: inherit;
    text-decoration: none;
}

.ms-tag-card__excerpt {
    margin: 13px 0 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
    line-height: 1.55;
}

.ms-tag-card__read {
    display: inline-flex;
    margin-top: auto;
    padding-top: 18px;
    color: #ff6972;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.ms-tag-empty {
    grid-column: 1 / -1;
    padding: 50px 28px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    text-align: center;
}

.ms-tag-empty h2 {
    margin: 0 0 10px;
}

.ms-tag-empty p {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
}

.ms-tag-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 36px;
}

.ms-tag-pagination .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.ms-tag-pagination a,
.ms-tag-pagination span {
    padding: 11px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    color: inherit;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.ms-tag-pagination a:hover {
    border-color: rgba(255, 74, 85, 0.55);
}

@media (max-width: 900px) {
    .ms-tag-archive__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .ms-tag-archive {
        width: min(100% - 20px, 1180px);
    }

    .ms-tag-archive__header {
        margin-top: 18px;
        padding: 28px 22px;
        border-radius: 19px;
    }

    .ms-tag-archive__description {
        font-size: 15px;
    }

    .ms-tag-archive__stories {
        padding-top: 25px;
    }

    .ms-tag-archive__grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ms-tag-card__body {
        min-height: 0;
        padding: 17px;
    }

    .ms-tag-card h3 {
        font-size: 20px;
    }
}

/* MATCHSHOCK_TAG_PAGE_V1_1 */

/* Hide pagination when Ghost only renders "Page 1 of 1". */
.ms-tag-pagination:has(.pagination:not(:has(a))) {
    display: none;
}

@media (max-width: 620px) {
    .ms-tag-archive__title {
        font-size: clamp(38px, 13vw, 54px);
        line-height: 0.98;
    }

    .ms-tag-archive__heading {
        margin-bottom: 15px;
    }

    .ms-tag-archive__heading h2 {
        font-size: 29px;
    }

    .ms-tag-card__media {
        aspect-ratio: 16 / 9;
    }

    .ms-tag-card__meta {
        margin-bottom: 9px;
        font-size: 10px;
    }

    .ms-tag-card__excerpt {
        margin-top: 10px;
        font-size: 13px;
    }

    .ms-tag-card__read {
        padding-top: 15px;
    }
}

/* MATCHSHOCK_ACTIVE_CATEGORY_NAV_V1 */

.ms-header .nav a[data-nav-tag] {
    position: relative;
}

.ms-header .nav a[data-nav-tag].is-active,
.ms-header .nav a[data-nav-tag][aria-current="page"] {
    color: #ffffff;
}

.ms-header .nav a[data-nav-tag].is-active::after,
.ms-header .nav a[data-nav-tag][aria-current="page"]::after {
    position: absolute;
    right: 0;
    bottom: -7px;
    left: 0;
    height: 3px;
    border-radius: 999px;
    background: #ff4a55;
    box-shadow: 0 0 12px rgba(255, 74, 85, 0.55);
    content: "";
}

@media (max-width: 620px) {
    .ms-header .nav a[data-nav-tag].is-active::after,
    .ms-header .nav a[data-nav-tag][aria-current="page"]::after {
        bottom: -5px;
        height: 2px;
    }
}

/* MATCHSHOCK_MOBILE_NAV_SCROLL_V1 */

.ms-header .nav {
    scroll-padding-inline: 22px;
    scroll-snap-type: x proximity;
}

.ms-header .nav a {
    scroll-snap-align: center;
    white-space: nowrap;
}

/* MATCHSHOCK_STICKY_HEADER_V1 */

.ms-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(10, 10, 14, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

@media (max-width: 620px) {
    .ms-header {
        gap: 6px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .ms-header .logo {
        font-size: 21px;
    }

    .ms-header .nav a {
        min-height: 32px;
        padding: 7px 9px;
    }
}

/* MATCHSHOCK_SMART_MOBILE_HEADER_CSS_V1 */

@media (max-width: 620px) {
    .ms-header,
    .ms-header .logo,
    .ms-header .nav a {
        transition:
            min-height 180ms ease,
            padding 180ms ease,
            gap 180ms ease,
            font-size 180ms ease,
            opacity 180ms ease,
            transform 180ms ease;
    }

    .ms-header.is-scroll-compact {
        gap: 3px;
        padding-top: 4px;
        padding-bottom: 4px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    }

    .ms-header.is-scroll-compact .logo {
        font-size: 18px;
        opacity: 0.92;
        transform: translateY(1px);
    }

    .ms-header.is-scroll-compact .nav a {
        min-height: 28px;
        padding: 6px 8px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ms-header,
    .ms-header .logo,
    .ms-header .nav a {
        transition: none;
    }
}
