/* =====================================================
   GENERAL
===================================================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: white;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
}


/* =====================================================
   CABECERA
===================================================== */

header {
    text-align: center;
    padding: 50px 20px 35px;
}

header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.5px;
}


/* =====================================================
   CONTENIDO PRINCIPAL
===================================================== */

main {
    width: min(1400px, 92%);
    margin: 0 auto;
}


/* =====================================================
   BUSCADOR + ORDENACIÓN
===================================================== */

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
}

.search-box {
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 11px 14px;

    border: 1px solid #ccc;
    border-radius: 6px;

    background: white;

    font-family: inherit;
    font-size: 14px;

    outline: none;
}

.search-box input:focus {
    border-color: #888;
}

.date-filter {
    display: flex;

    align-items: center;

    gap: 8px;
}

.date-filter label {
    font-size: 13px;

    color: #555;

    white-space: nowrap;
}

.date-filter input {
    padding: 11px 12px;

    border: 1px solid #ccc;
    border-radius: 6px;

    background: white;

    font-family: inherit;
    font-size: 14px;
}

.date-filter button {
    padding: 11px 12px;

    border: 1px solid #ccc;
    border-radius: 6px;

    background: white;

    font-family: inherit;
    font-size: 13px;

    cursor: pointer;
}

.date-filter button:hover {
    background: #f5f5f5;
}

.controls select {
    min-width: 220px;

    padding: 11px 12px;

    border: 1px solid #ccc;
    border-radius: 6px;

    background: white;

    font-family: inherit;
    font-size: 14px;
}


/* =====================================================
   PELÍCULAS
===================================================== */

.movies-grid {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    gap: 40px 22px;

    padding-bottom: 70px;
}

.movie-card {
    cursor: pointer;
}

.movie-card img {
    width: 100%;

    aspect-ratio: 2 / 3;

    object-fit: cover;

    display: block;

    border-radius: 3px;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.movie-card:hover img {
    transform: translateY(-3px);
    opacity: 0.92;
}

.movie-card h2 {
    margin: 12px 0 4px;

    font-size: 17px;
    font-weight: 600;

    line-height: 1.25;
}

.movie-card p {
    margin: 0;

    color: #666;

    font-size: 14px;

    line-height: 1.4;
}


/* =====================================================
   SIN RESULTADOS
===================================================== */

.no-results {
    display: none;

    margin: 60px 0;

    text-align: center;

    color: #666;

    font-size: 15px;
}


/* =====================================================
   PÁGINA DE PELÍCULA
===================================================== */

.movie-page {
    width: min(1100px, 92%);

    margin: 0 auto;

    padding: 35px 0 70px;
}

.back-link {
    display: inline-block;

    margin-bottom: 30px;

    color: #555;

    text-decoration: none;

    font-size: 14px;
}

.back-link:hover {
    color: #111;
}


/* =====================================================
   FICHA PRINCIPAL
===================================================== */

.movie-detail {
    display: grid;

    grid-template-columns:
        300px 1fr;

    gap: 50px;

    padding: 35px;

    border: 1px solid #e5e5e5;

    border-radius: 10px;
}

.movie-poster img {
    width: 100%;

    display: block;

    border-radius: 4px;
}

.movie-info h1 {
    margin: 0 0 8px;

    font-size: 32px;

    line-height: 1.15;
}

.original-title {
    margin: 0 0 30px;

    color: #777;

    font-size: 15px;

    font-style: italic;
}


/* =====================================================
   FICHA TÉCNICA
===================================================== */

.technical-info {
    display: grid;

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

    gap: 16px 25px;
}

.technical-item {
    display: flex;

    flex-direction: column;

    gap: 5px;

    padding-bottom: 12px;

    border-bottom: 1px solid #eee;
}

.technical-item strong {
    color: #777;

    font-size: 11px;

    text-transform: uppercase;

    letter-spacing: 0.7px;
}

.technical-item span {
    font-size: 14px;

    line-height: 1.45;
}


/* =====================================================
   SINOPSIS
===================================================== */

.synopsis-block {
    margin-top: 30px;
}

.synopsis-block h2 {
    margin: 0 0 10px;

    font-size: 17px;
}

.synopsis {
    margin: 0;

    color: #444;

    font-size: 15px;

    line-height: 1.7;
}


/* =====================================================
   PROYECCIONES
===================================================== */

.screenings {
    margin-top: 35px;

    padding: 30px 35px;

    border: 1px solid #e5e5e5;

    border-radius: 10px;
}

.screenings > h2 {
    margin: 0 0 28px;

    font-size: 22px;
}

.cinema-group {
    padding: 22px 0;

    border-top: 1px solid #eee;
}

.cinema-group:first-of-type {
    border-top: none;

    padding-top: 0;
}

.cinema-group h3 {
    margin: 0 0 15px;

    font-size: 17px;

    font-weight: 600;
}

.cinema-screenings {
    display: flex;

    flex-direction: column;

    gap: 8px;
}

.screening {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding: 12px 14px;

    background: #f7f7f7;

    border-radius: 6px;

    font-size: 14px;
}

.screening strong {
    text-transform: capitalize;
}

.screening span {
    color: #555;

    text-align: right;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1100px) {

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

    .movie-detail {
        grid-template-columns:
            250px 1fr;
    }
}


/* =====================================================
   MÓVIL
===================================================== */

@media (max-width: 700px) {

    header {
        padding: 35px 20px 25px;
    }

    header h1 {
        font-size: 26px;
    }

    main {
        width: 94%;
    }

    .toolbar {
        flex-direction: column;

        align-items: stretch;

        gap: 10px;

        margin-bottom: 25px;
    }

    .controls select {
        width: 100%;
    }

    .date-filter {
        display: flex;

        width: 100%;
    }

    .date-filter label {
        display: none;
    }

    .date-filter input {
        flex: 1;

        width: 100%;
    }

    .date-filter button {
        white-space: nowrap;
    }

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

        gap: 25px 10px;
    }

.movie-card h2 {
    font-size: 13px;
}

.movie-card p {
    font-size: 10px;
}


    /* FICHA */

    .movie-page {
        width: 94%;

        padding-top: 25px;
    }

    .movie-detail {
        display: grid;

        grid-template-columns:
            105px 1fr;

        gap: 20px;

        padding: 20px;
    }

    .movie-info h1 {
        font-size: 21px;
    }

    .original-title {
        font-size: 13px;

        margin-bottom: 18px;
    }

    .technical-info {
        grid-template-columns:
            1fr;

        gap: 10px;

        font-size: 12px;
    }

    .technical-item {
        padding-bottom: 8px;
    }

    .technical-item strong {
        font-size: 10px;
    }

    .technical-item span {
        font-size: 12px;
    }

    .synopsis-block {
        grid-column: 1 / -1;

        margin-top: 5px;
    }

    .synopsis-block h2 {
        font-size: 16px;
    }

    .synopsis {
        font-size: 14px;
    }


    /* PROYECCIONES */

    .screenings {
        padding: 22px 20px;
    }

    .screenings > h2 {
        font-size: 20px;
    }

    .screening {
        flex-direction: column;

        align-items: flex-start;

        gap: 5px;
    }

    .screening span {
        text-align: left;
    }

    .screening-version {
    display: inline-block;

    margin-left: 8px;
    padding: 3px 7px;

    border: 1px solid #ddd;
    border-radius: 4px;

    color: #555;

    font-size: 10px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.4px;

    vertical-align: middle;
}
}