* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    list-style: none;
    text-decoration: none;
    font-family: var(--fontFamily);
    color: var(--Purple-950);
}

:root {
    --White: hsl(0, 100%, 100%);
    --Purple-100: hsl(275, 100%, 97%);
    --Purple-600: hsl(292, 16%, 49%);
    --Purple-950: hsl(292, 42%, 14%);
    --fontFamily: "Work Sans", sans-serif;
    --active-color: hsl(280.9, 83%, 53.9%);
}

body {
    width: 100vw;
    height: 100vh;
}

main {
    width: 100%;
    height: 100%;
    background-color: var(--Purple-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 20px;
    position: relative;

    &::before {
        position: absolute;
        content: "";
        width: 100%;
        height: 30%;
        background-image: url('../assets/images/background-pattern-desktop.svg');
        left: 0;
        top: 0;

        @media screen and (max-width:576px) {
            background-image: url('../assets/images/background-pattern-mobile.svg');

        }
    }

}

main .container {
    background-color: var(--White);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border-radius: 10px;
    width: 500px;
    z-index: 1;

    @media screen and (max-width:576px) {
        width: 100%;
    }
}

.container .header {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.header img {
    width: 30px;
}

.header h1 {
    font-size: 2.5rem;
}

.questions .q {
    margin-top: 30px;
    position: relative;

    &.active .answer {
        position: relative;
        top: 0;
        visibility: visible;
    }
}

.q h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    width: 100%;

    & span {
        display: block;
        font-size: 16px;
        @media screen and (max-width:576px) {
            width: 70%;
        }
    }

    & span:hover {
        color: var(--active-color);
    }

}

.q h2 .btn {
    cursor: pointer;
    position: relative;
    width: 30px;
    height: 30px;
    background-color: transparent;
    border: none;
}

.q h2 .btn img {
    width: 100%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;

    &.active {
        z-index: 1;
    }

    &:not(.active) {
        display: none;
    }

}


.q .answer {
    font-size: 14px;
    padding: 10px 0;
    color: var(--Purple-600);
    position: absolute;
    top: -10%;
    transition: top .5s ease;
    visibility: hidden;
    margin-top: 10px;
}



.attribution {
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    align-items: center;
    display: flex;
    justify-content: center;
    gap: 5px;

    @media screen and (max-width:577px) {
        flex-direction: column;
    }

    width: 100%;
}

.attribution p {
    font-size: 14px;
    margin-bottom: 5px;
}

.attribution a {
    color: var(--active-color);
    text-decoration: none;
    text-transform: capitalize;
    opacity: .8;
    transition: all .3s ease;

    &:hover {
        opacity: 1;
        font-weight: bolder;
    }


}