/* =========================
   MOVIE LIST PAGE
========================= */

.movies-page {
    width: 100%;
    min-height: calc(100vh - 96px);
    background: #f3f2ee;
    color: #050505;
}

.movies-page__inner {
    width: min(100% - 32px, 1540px);
    margin: 0 auto;
    padding: clamp(34px, 3.4vw, 58px) 0 clamp(58px, 5vw, 86px);
}

.movies-page.is-loading .movies-results {
    opacity: 0.35;
    pointer-events: none;
}

/* =========================
   TOP
========================= */

.movies-top {
    display: grid;
    grid-template-columns: minmax(360px, 0.72fr) minmax(760px, 1.28fr);
    gap: clamp(34px, 4vw, 72px);
    align-items: start;
    margin-bottom: clamp(34px, 3.4vw, 54px);
}

/* =========================
   HEAD
========================= */

.movies-head {
    min-width: 0;
    padding-top: clamp(4px, 0.6vw, 10px);
}

.movies-head h1 {
    display: inline-block;
    margin: 0;
    color: #050505;
    font-family: var(--font-display);
    font-size: clamp(66px, 6.2vw, 116px);
    font-weight: 400;
    line-height: 0.78;
    letter-spacing: -0.085em;
    text-transform: uppercase;
    transform: scaleX(0.96) scaleY(1.12);
    transform-origin: left bottom;
}

.movies-head p {
    max-width: 690px;
    margin: clamp(20px, 1.45vw, 24px) 0 0;
    color: rgba(5, 5, 5, 0.58);
    font-size: clamp(14px, 0.95vw, 17px);
    font-weight: 800;
    line-height: 1.34;
}

.movies-count {
    display: none !important;
}

/* =========================
   FILTERS
========================= */

.movies-filters {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.movies-filters__actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: clamp(8px, 0.8vw, 12px);
}

.movies-filters__layout {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(13px, 1.25vw, 18px);
    align-items: start;
}

.movies-filters__row {
    min-width: 0;
    display: grid;
    gap: clamp(14px, 1.2vw, 20px);
    align-items: end;
}

.movies-filters__row--main {
    grid-template-columns: minmax(300px, 1.28fr) minmax(210px, 0.82fr);
}

.movies-filters__row--secondary {
    grid-template-columns: minmax(260px, 1fr) minmax(190px, 0.72fr);
}

/* =========================
   FILTER FIELDS
========================= */

.movies-filter-field {
    min-width: 0;
    display: block;
}

.movies-filter-field__label {
    display: block;
    margin-bottom: 7px;
    color: rgba(5, 5, 5, 0.52);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.012em;
    text-transform: uppercase;
}

.movies-filter-field__control {
    position: relative;
    min-height: 39px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(5, 5, 5, 0.38);
    background: transparent;
    transition: border-color 0.18s ease;
}

.movies-filter-field__control::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 5px;
    width: 6px;
    height: 6px;
    border-right: 2px solid rgba(5, 5, 5, 0.74);
    border-bottom: 2px solid rgba(5, 5, 5, 0.74);
    pointer-events: none;
    transform: translateY(-72%) rotate(45deg);
    transition: border-color 0.18s ease;
}

.movies-filter-field--search .movies-filter-field__control::after {
    content: none;
}

.movies-filter-field:hover .movies-filter-field__control {
    border-bottom-color: #050505;
}

.movies-filter-field:hover .movies-filter-field__control::after {
    border-color: #050505;
}

.movies-filter-field:focus-within .movies-filter-field__control {
    border-bottom-color: #ff2118;
}

.movies-filter-field:focus-within .movies-filter-field__control::after {
    border-color: #ff2118;
}

.movies-filter-field input,
.movies-filter-field select {
    width: 100% !important;
    height: 39px !important;
    padding: 0 28px 0 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #050505 !important;
    font-family: inherit !important;
    font-size: clamp(14px, 0.92vw, 16px) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: normal !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.movies-filter-field--search input {
    cursor: text;
}

.movies-filter-field input::placeholder {
    color: rgba(5, 5, 5, 0.42);
    font-weight: 900;
    opacity: 1;
}

.movies-filter-field select::-ms-expand {
    display: none;
}

.movies-filter-field option {
    background: #f3f2ee;
    color: #050505;
    font-size: 14px;
    font-weight: 800;
}

/* =========================
   RESET
========================= */

.movies-reset {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(5, 5, 5, 0.62);
    font-family: var(--font-display);
    font-size: clamp(10px, 0.72vw, 12px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s ease;
}

.movies-reset span {
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.movies-reset:hover {
    color: #ff2118;
}

/* =========================
   RESULTS
========================= */

.movies-results {
    transition: opacity 0.18s ease;
}

/* =========================
   MOVIE GRID
========================= */

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

.movie-card {
    position: relative;
    height: clamp(220px, 16.5vw, 280px);
    display: grid;
    grid-template-columns: 43% minmax(0, 1fr);
    background: #050505;
    color: #ffffff;
    overflow: hidden;
}

/* =========================
   MOVIE IMAGE
========================= */

.movie-card__image {
    position: relative;
    min-width: 0;
    display: block;
    overflow: hidden;
    background: #111111;
}

.movie-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.08) 0%,
            rgba(0, 0, 0, 0.42) 100%
        );
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.movie-card__image img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: grayscale(1) contrast(1.16) brightness(0.58);
    transition:
        transform 0.3s ease,
        filter 0.3s ease;
}

.movie-card:hover .movie-card__image img {
    transform: scale(1.06);
    filter: grayscale(0) saturate(1.14) contrast(1.08) brightness(0.93);
}

.movie-card:hover .movie-card__image::after {
    opacity: 0.35;
}

.movie-card__image span {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    color: rgba(255, 255, 255, 0.15);
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 0.9;
    letter-spacing: -0.07em;
    text-transform: uppercase;
}

/* =========================
   MOVIE CONTENT
========================= */

.movie-card__content {
    min-width: 0;
    padding: clamp(16px, 1.3vw, 22px) clamp(13px, 1.15vw, 19px) 66px;
}

.movie-card__content h3 {
    max-width: 100%;
    margin: 0;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: clamp(26px, 1.85vw, 38px);
    font-weight: 400;
    line-height: 0.84;
    letter-spacing: -0.075em;
    text-transform: uppercase;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card__content p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(11px, 0.8vw, 13px);
    font-weight: 800;
    line-height: 1.28;
}

.movie-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 12px;
}

.movie-card__badges span {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.84);
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

/* =========================
   MOVIE ACTIONS
========================= */

.movie-card__actions {
    position: absolute;
    left: 43%;
    right: 10px;
    bottom: 10px;
    z-index: 6;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.movie-card__btn {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: clamp(9px, 0.68vw, 12px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.movie-card__btn--red {
    border-color: #ff2118;
    background: #ff2118;
}

.movie-card__btn:hover {
    border-color: #ffffff;
    background: #ffffff;
    color: #050505;
}

/* =========================
   EMPTY
========================= */

.movies-empty {
    padding: clamp(28px, 3vw, 44px);
    border: 1px solid rgba(5, 5, 5, 0.14);
    background: rgba(255, 255, 255, 0.22);
}

.movies-empty h2 {
    margin: 0;
    color: #050505;
    font-family: var(--font-display);
    font-size: clamp(38px, 3vw, 58px);
    font-weight: 400;
    line-height: 0.86;
    letter-spacing: -0.075em;
    text-transform: uppercase;
}

.movies-empty p {
    margin: 14px 0 22px;
    color: rgba(5, 5, 5, 0.58);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.movies-empty a {
    width: fit-content;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 0 22px;
    border: 1px solid #050505;
    color: #050505;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.movies-empty a:hover {
    background: #050505;
    color: #ffffff;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1420px) {
    .movies-top {
        grid-template-columns: minmax(330px, 0.68fr) minmax(700px, 1.32fr);
        gap: 34px;
    }

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

    .movie-card {
        height: 245px;
    }
}

@media (max-width: 1180px) {
    .movies-top {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .movies-head p {
        max-width: 620px;
    }

    .movies-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .movies-page__inner {
        width: min(100% - 18px, 1540px);
        padding-top: 26px;
        padding-bottom: 52px;
    }

    .movies-head h1 {
        font-size: clamp(46px, 17vw, 74px);
        transform: scaleX(0.98) scaleY(1.08);
    }

    .movies-head p {
        max-width: 380px;
        font-size: 13px;
    }

    .movies-filters__actions {
        justify-content: flex-start;
        margin-bottom: 12px;
    }

    .movies-filters__row--main,
    .movies-filters__row--secondary {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .movies-filter-field__control {
        min-height: 42px;
    }

    .movies-filter-field input,
    .movies-filter-field select {
        height: 42px !important;
        font-size: 13px !important;
    }

    .movies-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .movie-card {
        height: 205px;
        grid-template-columns: 42% minmax(0, 1fr);
    }

    .movie-card__content {
        padding: 14px 13px 58px;
    }

    .movie-card__content h3 {
        font-size: clamp(24px, 7vw, 34px);
    }

    .movie-card__content p {
        font-size: 11px;
    }

    .movie-card__actions {
        left: 42%;
        right: 9px;
        bottom: 9px;
    }

    .movie-card__btn {
        min-height: 36px;
        font-size: 9px;
    }
}

@media (max-width: 420px) {
    .movies-page__inner {
        width: min(100% - 14px, 1540px);
    }

    .movies-head h1 {
        font-size: 42px;
        transform: none;
    }

    .movies-head p {
        font-size: 12px;
    }

    .movies-filter-field__label {
        margin-bottom: 6px;
        font-size: 9px;
    }

    .movies-filter-field__control {
        min-height: 39px;
    }

    .movies-filter-field input,
    .movies-filter-field select {
        height: 39px !important;
        font-size: 12px !important;
    }

    .movies-grid {
        gap: 8px;
    }

    .movie-card {
        height: 188px;
        grid-template-columns: 40% minmax(0, 1fr);
    }

    .movie-card__content {
        padding: 12px 11px 54px;
    }

    .movie-card__content h3 {
        font-size: 23px;
    }

    .movie-card__content p {
        margin-top: 8px;
        font-size: 10px;
    }

    .movie-card__badges {
        margin-top: 9px;
    }

    .movie-card__badges span {
        min-height: 20px;
        padding: 0 7px;
        font-size: 8px;
    }

    .movie-card__actions {
        left: 40%;
        right: 8px;
        bottom: 8px;
    }

    .movie-card__btn {
        min-height: 34px;
        font-size: 8px;
    }
}

@media (max-width: 340px) {
    .movie-card {
        height: auto;
        min-height: 250px;
        grid-template-columns: 1fr;
        grid-template-rows: 130px minmax(0, 1fr);
    }

    .movie-card__image {
        min-height: 130px;
    }

    .movie-card__content {
        padding: 12px 11px 58px;
    }

    .movie-card__actions {
        left: 11px;
    }
}

/* =========================
   MOVIE LIST TOP ALIGN FIX
========================= */

@media (min-width: 1181px) {
    .movies-head {
        padding-top: clamp(34px, 3.4vw, 58px);
    }
}