@import url('/assets/css/reset.css');
@import url('/assets/css/global.css');

body{
    background-color:var(--primary-color);
    
}

body::before{
    content: "";
    background-image: url('/assets/imagens/background/spider-man-background.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    width: 100%;
    height: 100%;
    position: absolute;
    opacity: 0.2;
    transition: background-image 1s ease-in-out, opacity 1s ease-in-out;
}

.s-menu{
    padding: 1rem 0;
    width: 100%;
    text-align: center;
    position: relative;
}

.s-menu__item{
    display: inline-block;
    text-transform: uppercase;
    margin: 0 1.25rem;
}

.menu__icon{
    width: 2.5rem;
    margin: 0 1.25rem;
    vertical-align: middle;
}

.s-container{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.s-card{
    border: 0.5rem solid white;
    width: calc(100% / 3 - 8%);
    height: 70vh;
    position: relative;
    transition: filter .5s ease-in-out;
}

.s-card__background{
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    opacity: 1;
    transition: opacity 1s ease-in-out; /* aqui foi colocado a transição apenas na propriedade opacity */
}

.s-card__image{
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    transition: 1s ease-in-out;
}

.s-card__title{
    font-size: 2rem;
    text-transform: uppercase;
    text-align: center;
    position: absolute;
    width: 100%;
    bottom: 0;
    transition: bottom 1s ease-in-out;
}

.s-controller{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
}

.s-controller__button{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid white;
    border-radius: 50%;
    background-color: var(--primary-color);
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    transition: transform 0.3s ease-in-out;
}

.s-controller__button:hover{
    transform: scale(1.1);
}


.s-controller__button:nth-child(2){
    margin: 0 3.75rem;

}

.s-controller__line{
    background-color: white;
    width: 50%;
    height: 2px;
    position: absolute;
}

/* Animação do hover - hover animation */

.s-card--hovered .s-card__background{
    cursor: pointer;
    opacity: 0;
}

.s-card--hovered .s-card__image{
    transform: scale(1.4);
    filter: drop-shadow(30px 10px 4px rgba(0,0,0, .5));
}

body#spider-man-01-hovered::before{
    background-image: url('/assets/imagens/pic-sm-bg-01.jpg');
}

body#spider-man-02-hovered::before{
    background-image: url('/assets/imagens/pic-sm-bg-02.jpg');
}

body#spider-man-03-hovered::before{
    background-image: url('/assets/imagens/pic-sm-bg-03.jpg');
}

/* Usamos o [] para selecionar um atributo específico, o [id^="spider-man-" é para a gente selecionar todo o id que inicia com spider-man-*/

body[id^="spider-man-"]::before{
    opacity: 1;
}

body[id^="spider-man-"] .s-card:not(.s-card--hovered){
    filter: grayscale(100%)
}

.s-card--hovered .s-card__title{
    bottom: 50%;
}