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

.theaters-page {
    padding-bottom: 2.5rem;
}

/* —— Hero —— */
.page-hero {
    position: relative;
    isolation: isolate;
    padding: 2.2rem 0 2.6rem;
    background: linear-gradient(180deg, #0a0a0a 0%, #121212 100%);
    overflow: hidden;
    text-align: center;
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
}

.page-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.18;
    background:
        url("../../images/portal/hero-national-theater.webp") center 35% / cover no-repeat;
    filter: grayscale(0.35) brightness(0.55);
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.page-hero__inner {
    position: relative;
}

.page-hero__crumbs {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--muted);
}

.page-hero__crumbs a {
    color: var(--gold);
}

.page-hero__crumbs a:hover {
    color: var(--gold-soft);
    text-decoration: underline;
}

.page-hero h1 {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #fff;
}

.page-hero p {
    margin: 0.65rem auto 0;
    max-width: 42ch;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}

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

.theaters-toolbar {
    display: grid;
    grid-template-columns: 1.3fr repeat(4, 0.85fr) 1.1fr;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem;
    background: rgba(22, 22, 22, 0.96);
    border: 1px solid rgba(197, 160, 89, 0.22);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

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

.theaters-toolbar__search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    height: 46px;
    padding: 0 0.85rem;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 11px;
    background: #0e0e0e;
    color: var(--gold);
}

.theaters-toolbar__search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-weight: 600;
}

.theaters-toolbar__search input::placeholder {
    color: #777;
}

.theaters-toolbar__select select {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 11px;
    background: #0e0e0e;
    color: #fff;
    font-weight: 700;
    padding: 0 0.85rem;
    outline: none;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--gold) 50%),
        linear-gradient(135deg, var(--gold) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.theaters-toolbar__select select option {
    background: #161616;
    color: #fff;
}

.theaters-toolbar__select select:focus,
.theaters-toolbar__search:focus-within {
    border-color: rgba(197, 160, 89, 0.45);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

/* —— Results —— */
.theaters-results {
    padding: 1.6rem 0 1rem;
}

.theaters-group + .theaters-group {
    margin-top: 2.2rem;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(197, 160, 89, 0.1);
}

.theaters-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.theaters-group__head h2 {
    margin: 0;
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.theaters-group__head span {
    color: var(--gold-soft);
    font-weight: 800;
    font-size: 0.84rem;
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.22);
    border-radius: 999px;
    padding: 0.32rem 0.7rem;
}

.theaters-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

/* —— Card (compact horizontal) —— */
.theater-listing-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--surface);
    border: 1px solid rgba(197, 160, 89, 0.24);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    min-height: 0;
}

.theater-listing-card:hover {
    transform: translateY(-3px);
    border-color: rgba(197, 160, 89, 0.42);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.theater-listing-card.has-shows {
    border-color: rgba(109, 14, 14, 0.45);
    box-shadow: 0 14px 34px rgba(109, 14, 14, 0.15);
}

.theater-listing-card__media {
    position: relative;
    width: clamp(88px, 26%, 112px);
    flex-shrink: 0;
    aspect-ratio: auto;
    min-height: 100%;
    background: #0e0e0e;
    overflow: hidden;
    display: block;
    border-inline-start: 1px solid rgba(197, 160, 89, 0.12);
}

.theater-listing-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.theater-listing-card:hover .theater-listing-card__media img {
    transform: scale(1.04);
}

.theater-listing-card__badge {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    left: 0.4rem;
    z-index: 2;
    background: linear-gradient(180deg, var(--maroon-soft), var(--maroon));
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 0.22rem 0.45rem;
    text-align: center;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(109, 14, 14, 0.35);
}

.theater-listing-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.7rem 0.8rem;
    flex: 1;
    min-width: 0;
}

.theater-listing-card__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.theater-listing-card__title a {
    color: inherit;
}

.theater-listing-card__title a:hover {
    color: var(--gold-soft);
}

.theater-listing-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.theater-listing-card__city {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--gold);
    font-size: 0.76rem;
    font-weight: 600;
}

.theater-listing-card__type {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.42rem;
    border-radius: 999px;
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.2);
    color: var(--gold-soft);
    font-size: 0.68rem;
    font-weight: 700;
}

.theater-listing-card__shows {
    margin: 0.05rem 0 0.35rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    background: rgba(197, 160, 89, 0.08);
    border: 1px solid rgba(197, 160, 89, 0.16);
}

.theater-listing-card__shows strong {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--gold);
    font-size: 0.72rem;
}

.theater-listing-card__shows ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.2rem;
}

.theater-listing-card__shows li {
    color: #ddd;
    font-size: 0.78rem;
    font-weight: 600;
}

.theater-listing-card__shows a {
    color: inherit;
}

.theater-listing-card__shows a:hover {
    color: var(--gold-soft);
}

.theater-listing-card__desc {
    margin: 0.05rem 0 0.35rem;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.theater-listing-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.theater-listing-card__primary {
    padding: 0.45rem 0.55rem;
    font-size: 0.74rem;
    border-radius: 8px;
    box-shadow: none;
    flex: 1 1 auto;
    min-height: 34px;
}

.theater-listing-card__primary.is-disabled {
    opacity: 0.5;
    pointer-events: none;
    box-shadow: none;
    background: #3a3a3a;
    color: #999;
}

.theater-listing-card__secondary {
    padding: 0.45rem 0.55rem;
    font-size: 0.74rem;
    border-radius: 8px;
    border: 1px solid rgba(197, 160, 89, 0.3);
    background: transparent;
    color: var(--gold-soft);
    font-weight: 700;
    text-align: center;
    flex: 1 1 auto;
    min-height: 34px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theater-listing-card__secondary:hover {
    background: rgba(197, 160, 89, 0.1);
    border-color: var(--gold);
    color: #fff;
}

/* —— Empty —— */
.theaters-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    background: var(--surface);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 16px;
}

.theaters-empty h2 {
    margin: 0 0 0.45rem;
    font-size: 1.2rem;
    color: #fff;
}

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

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

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

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

@media (max-width: 760px) {
    .theaters-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .theaters-toolbar {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }

    .page-hero {
        padding: 1.6rem 0 2rem;
    }

    .page-hero__crumbs {
        justify-content: center;
    }

    .theater-listing-card__actions {
        flex-direction: row;
    }

    .theater-listing-card__media {
        width: 80px;
    }

    .theater-listing-card__body {
        padding: 0.65rem 0.75rem;
    }
}
