.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.shows-page {
    padding-bottom: 3rem;
}

/* —— Hero —— */
.shows-hero {
    position: relative;
    isolation: isolate;
    padding: 2.6rem 0 3.2rem;
    overflow: hidden;
    background: linear-gradient(100deg, #faf8f5 0%, #f3efe8 55%, #ebe4da 100%);
}

.shows-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.14;
    background:
        url("../../images/portal/hero-national-theater.webp") left 40% / cover no-repeat;
    mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 78%);
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 42%, transparent 78%);
    filter: grayscale(0.15);
}

.shows-hero__inner {
    position: relative;
    text-align: start;
}

.shows-hero h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(2.1rem, 4.4vw, 3rem);
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.shows-hero p {
    margin: 0.65rem 0 0;
    max-width: 36ch;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* —— Toolbar —— */
.shows-toolbar-wrap {
    margin-top: -1.35rem;
    position: relative;
    z-index: 3;
}

.shows-toolbar {
    display: grid;
    grid-template-columns: 1.55fr repeat(3, 0.95fr) 0.95fr;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
}

.shows-toolbar__search,
.shows-toolbar__select {
    position: relative;
    display: block;
}

.shows-toolbar__search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    height: 48px;
    padding: 0 0.9rem;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fbfaf8;
    color: var(--muted);
}

.shows-toolbar__search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-weight: 600;
}

.shows-toolbar__select .shows-toolbar__icon {
    position: absolute;
    top: 50%;
    right: 0.85rem;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    display: grid;
    place-items: center;
    z-index: 1;
}

.shows-toolbar__select select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: #fbfaf8;
    color: var(--ink);
    font-weight: 700;
    padding: 0 2.4rem 0 2rem;
    outline: none;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        14px calc(50% - 2px),
        20px calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.shows-toolbar__select select:focus,
.shows-toolbar__search:focus-within {
    border-color: rgba(122, 24, 36, 0.35);
    box-shadow: 0 0 0 4px rgba(122, 24, 36, 0.08);
    background-color: #fff;
}

/* —— Tabs —— */
.shows-tabs-wrap {
    padding-top: 1.6rem;
}

.shows-tabs {
    display: flex;
    justify-content: center;
    gap: 1.8rem;
    border-bottom: 1px solid var(--line);
}

.shows-tabs__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.2rem 0.85rem;
    color: var(--muted);
    font-weight: 800;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.shows-tabs__link span {
    min-width: 1.4rem;
    height: 1.4rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(114, 103, 95, 0.1);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0 0.35rem;
}

.shows-tabs__link:hover {
    color: var(--maroon);
}

.shows-tabs__link.is-active {
    color: var(--maroon);
}

.shows-tabs__link.is-active::after {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--maroon);
}

.shows-tabs__link.is-active span {
    background: rgba(122, 24, 36, 0.12);
    color: var(--maroon);
}

/* —— Grid & Cards —— */
.shows-results {
    padding: 1.6rem 0 1rem;
}

.shows-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
}

.show-listing-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 100%;
}

.show-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.show-listing-card__media {
    position: relative;
    aspect-ratio: 4 / 5;
    background: #1a1214;
    overflow: hidden;
}

.show-listing-card__image {
    display: block;
    width: 100%;
    height: 100%;
}

.show-listing-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.show-listing-card:hover .show-listing-card__image img {
    transform: scale(1.06);
}

.show-listing-card__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(12, 6, 8, 0.08) 0%, transparent 28%, transparent 42%, rgba(12, 6, 8, 0.78) 100%);
    pointer-events: none;
}

.show-listing-card__fav {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--maroon);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.show-listing-card__fav:hover {
    background: #fff;
    color: var(--maroon-deep);
}

.show-listing-card__type {
    position: absolute;
    top: 0.75rem;
    inset-inline-end: 0.75rem;
    bottom: auto;
    left: auto;
    z-index: 2;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--gold-soft), var(--gold));
    color: #0a0a0a;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.show-listing-card__title {
    position: absolute;
    right: 0.9rem;
    left: 0.9rem;
    bottom: 0.85rem;
    z-index: 2;
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.show-listing-card__title a {
    color: #fff;
}

.show-listing-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.95rem 1rem 1.05rem;
    flex: 1;
}

.show-listing-card__meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.show-listing-card__meta svg {
    flex-shrink: 0;
    color: var(--maroon-soft);
}

.show-listing-card__actions {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 0.45rem;
    margin-top: auto;
    padding-top: 0.55rem;
}

.show-listing-card__primary {
    padding: 0.62rem 0.45rem;
    font-size: 0.82rem;
    border-radius: 10px;
    box-shadow: none;
    gap: 0.3rem;
}

.show-listing-card__primary.is-disabled {
    opacity: 0.55;
    pointer-events: none;
    box-shadow: none;
    background: #8a7d78;
    color: #fff;
    justify-content: center;
}

.show-listing-card__secondary {
    padding: 0.62rem 0.45rem;
    font-size: 0.82rem;
    border-radius: 10px;
    border: 1px solid rgba(122, 24, 36, 0.3);
    background: #fff;
    color: var(--maroon);
    font-weight: 800;
    justify-content: center;
}

.show-listing-card__secondary:hover {
    background: rgba(122, 24, 36, 0.05);
}

/* —— Empty & Pagination —— */
.shows-empty {
    text-align: center;
    padding: 3rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
}

.shows-empty h2 {
    margin: 0 0 0.45rem;
    font-size: 1.3rem;
}

.shows-empty p {
    margin: 0 0 1.2rem;
    color: var(--muted);
}

.shows-empty__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.shows-empty__secondary {
    border: 1px solid rgba(122, 24, 36, 0.28);
    background: #fff;
    color: var(--maroon);
    font-weight: 800;
}

.shows-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2.4rem;
}

.portal-pager {
    width: min(100%, 42rem);
    display: grid;
    gap: 0.9rem;
    justify-items: center;
}

.portal-pager__meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.portal-pager__meta strong {
    color: #fff;
    font-weight: 800;
}

.portal-pager__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    border: 1px solid rgba(197, 160, 89, 0.22);
    border-radius: 999px;
    background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.portal-pager__item {
    list-style: none;
}

.portal-pager__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    min-width: 2.45rem;
    min-height: 2.45rem;
    padding: 0 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-soft);
    font-weight: 800;
    font-size: 0.92rem;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.portal-pager__item:not(.is-disabled):not(.is-current) .portal-pager__btn:hover {
    background: rgba(197, 160, 89, 0.12);
    border-color: rgba(197, 160, 89, 0.28);
    color: var(--gold-soft);
    transform: translateY(-1px);
}

.portal-pager__item.is-current .portal-pager__btn {
    background: var(--maroon);
    border-color: var(--maroon);
    color: #fff;
    box-shadow: 0 8px 18px rgba(109, 14, 14, 0.35);
}

.portal-pager__item.is-disabled .portal-pager__btn {
    opacity: 0.35;
    color: var(--muted);
    cursor: not-allowed;
}

.portal-pager__item.is-ellipsis .portal-pager__btn {
    min-width: 1.8rem;
    padding: 0 0.35rem;
    color: var(--muted);
}

@media (max-width: 640px) {
    .portal-pager__list {
        border-radius: 1.1rem;
        gap: 0.3rem;
        padding: 0.4rem;
    }

    .portal-pager__btn {
        min-width: 2.2rem;
        min-height: 2.2rem;
        padding: 0 0.7rem;
        font-size: 0.86rem;
    }
}

@media (max-width: 1180px) {
    .shows-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .shows-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .shows-toolbar__search,
    .shows-toolbar__sort {
        grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
    .shows-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .shows-hero {
        text-align: center;
    }

    .shows-hero__inner {
        text-align: center;
    }

    .shows-hero p {
        margin-inline: auto;
    }

    .shows-hero__bg {
        opacity: 0.08;
        mask-image: none;
        -webkit-mask-image: none;
    }
}

@media (max-width: 560px) {
    .shows-grid {
        grid-template-columns: 1fr;
    }

    .shows-toolbar {
        grid-template-columns: 1fr;
    }

    .shows-tabs {
        gap: 1.1rem;
    }

    .show-listing-card__actions {
        grid-template-columns: 1fr;
    }
}
