@import url("main.css");

/*
    HEADER-MOVIES.CSS

    Description: This css file is used for the movie component,
    a component used for involve the movie item from the header
    in index.html. These styles includes all the properties of
    the container like display, size, background, hovers, and
    others.
*/

.movie {
    width: 100%;
    padding: 10px;
}

.movie__container {
    width: 50%;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px 10px;
    overflow: hidden;
}

.movie__container--second {
    width: 100%;
    max-width: 450px;
    height: 600px;
    gap: 5px;
    border-radius: 20px;
    padding: 10px;
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.movie__container--second > div {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 5px;
}

.movie__container--second:hover {
    transform: scale(1.05, 1.05);
}

.movie__container > div {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.movie__container:not(.movie__container--second) {
    justify-content: end;
    height: inherit;
}

.movie__container:not(.movie__container--second) > div:nth-of-type(2) {
    opacity: 1;
    transition: opacity 0.75s ease;
}

.movie__container:not(.movie__container--second):hover > div:nth-of-type(2) {
    opacity: 1;
}

.movie__container--active {
    display: flex;
}

/*
    Component: movie__container--second img, movie__image

    Description: Style for the img of movie__container--second and
    movie__image
*/

.movie__images-container {
    position: relative;
    width: 100%;
    height: 85%;
}

.principal-img {
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: fill;
    border-radius: 20px;
    color: var(--color-white);
    mask-image: linear-gradient(#000 80%, transparent);
}

.qr-img {
    position: absolute;
    width: 25%;
    height: 23%;
    transform: translate(0%, 30%) rotate(-15deg);
}

.movie__image {
    width: 100%;
    height: 125px;
    object-fit: contain;
    color: var(--color-white);
}

/*
    Section: Movie's texts

    Description: Style for all the span, p and other text tags
    for movie component
*/

.movie__container span,
.movie__container p {
    width: 100%;
    text-align: justify;
}

.movie__format {
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1.15em;
    color: var(--color-white);
}

.movie__detail-1,
.movie__gender {
    font-size: 1em;
    letter-spacing: 1px;
    color: var(--color-white);
}

.movie__detail-2 {
    font-size: 1.15em;
    color: var(--color-white);
    font-weight: bold;
}

.movie__description {
    font-size: 1em;
    color: var(--color-white);
    font-weight: 500;
}

.movie__title--small {
    font-size: 1.15em;
    color: var(--color-white);
}

.movie__data-item--small {
    font-size: 1em;
    color: var(--color-white);
}

.movie__title--small,
.movie__container--second > div > p {
    width: 100%;
    text-align: center;
}

.movie__data--small {
    width: 100%;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
}

.movie__data-item--small {
    border-top: 1px solid #8b8b8b;
    border-left: 1px solid #8b8b8b;
}

.movie__data-item--small:nth-child(-n + 2) {
    border-top: none;
}

.movie__data-item--small:nth-child(2n + 1) {
    border-left: none;
}

/*
    Component: movie__buttons, movie__button

    Description: Style for the container and button component
    for the header movies section. It includes spaces, colors,
    backgrounds and other styles.
*/

.movie__buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 20px;
}

.movie__button {
    flex-grow: 1;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    height: 56px;
    font-weight: bold;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.movie__button--white {
    background-color: var(--color-white);
}

.movie__button--white:hover {
    background-color: #b4b4b4;
}

.movie__button--gray,
.movie__button--black:hover {
    background-color: var(--color-gray);
}

.movie__button--black,
.movie__button--gray:hover {
    background-color: var(--color-dark-2);
}

.movie__button--only-icon {
    border-radius: 100%;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    padding: 0;
}

.movie__button--only-icon > img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 100%;
    max-width: none !important;
}

.movie__button > img {
    max-height: 100%;
    object-fit: cover;
    border-radius: 100%;
}

.movie__button > p {
    flex: 5;
    font-size: 1em;
}

.movie__button--white > p {
    color: #000;
}

.movie__button--gray > p {
    color: var(--color-white);
}

/*
    Section: Responsive

    Description: Media queries that change styles from
    the movie container and its children component.
*/

@media (max-width: 1200px) {
    .movie__container:not(.movie__container--second) {
        width: 75%;
    }
}

@media (max-width: 992px) {
    .header__items-container:has(.movie__container) {
        padding: 0 50px;
    }
}

@media (max-width: 800px) {
    .header__items-container:has(.movie__container) {
        padding: 0 25px;
    }
}

@media (max-width: 768px) {
    .movie__container--second {
        display: flex;
    }
}

@media (max-width: 700px) {
    .qr-img {
        width: 27%;
    }
}

@media (max-width: 640px) {
    .header__items-container:has(.movie__container) {
        padding: 0 15px;
    }

    .qr-img {
        width: 30%;
    }
}

@media (max-width: 600px) {
    .header__items-container:has(.movie__container) {
        padding: 0 5px;
    }
}

@media (max-width: 540px) {
    .qr-img {
        width: 32.5%;
    }
}

@media (max-width: 500px) {
    .qr-img {
        width: 35%;
    }

    .movie__data-item--small {
        font-size: 0.9em;
    }
}

@media (max-width: 450px) {
    .qr-img {
        width: 37.5%;
    }
}

@media (max-width: 420px) {
    .qr-img {
        width: 40%;
    }
}

@media (max-width: 400px) {
    .movie__button {
        justify-content: center;
    }

    .movie__button > p {
        display: none;
    }

    .qr-img {
        width: 42.5%;
    }
}

@media (max-width: 370px) {
    .qr-img {
        width: 45%;
    }
}

@media (max-width: 340px) {
    .qr-img {
        width: 47.5%;
    }
}

@media (max-width: 640px), (max-height: 768px) {
    .movie__detail-2 {
        font-size: 1.25em;
    }

    .movie__description,
    .movie__format {
        font-size: 1.1em;
    }

    .movie__detail-1,
    .movie__gender {
        font-size: 1em;
    }
}

@media (max-width: 350px), (max-height: 680px) {
    .movie__detail-2 {
        font-size: 1.15em;
    }

    .movie__description,
    .movie__format {
        font-size: 1em;
    }

    .movie__detail-1,
    .movie__gender {
        font-size: 0.9em;
    }
}

@media (max-width: 300px) {
    .movie__detail-2 {
        font-size: 1em;
    }

    .movie__description,
    .movie__format {
        font-size: 0.9em;
    }

    .movie__detail-1,
    .movie__gender {
        font-size: 0.8em;
    }
}

@media (max-width: 420px) {
    .movie__title--small {
        font-size: 1em;
    }

    .movie__data-item--small {
        font-size: 0.8em;
    }
}

/* RESPONSIVE HEIGHT */

@media (min-height: 501px) {
    .movie__container:not(.movie__container--second) > div:nth-of-type(2) {
        opacity: 0;
    }

    .movie__container:not(.movie__container--second):hover
        > div:nth-of-type(2) {
        opacity: 1;
    }
}
