/* === montserat google fonts === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

/* === css reset === */
*{
    padding: 0;
    margin: 0;
    text-decoration: none;
    list-style: none;
    border: none;
    outline: none;
    box-sizing: border-box;
}

/* === color variables === */
:root{
    --Blue-50: hsl(240, 78%, 98%);
    --Blue-150: hsl(228, 45%, 44%);
    --Blue-100: hsl(237, 73%, 79%);
    --Gray-650: hsl(233, 13%, 49%);
    --Gray-700: hsl(232, 13%, 33%);
    --Blue-50:hsl(225, 20%, 96%);
    --Linear-gradient: linear-gradient(270deg, hsl(237, 73%, 79%), hsl(238, 63%, 64%)) ;
}

/* === middle card color variables === */
.card:nth-child(2){
    --Gray-650: hsl(240, 78%, 98%);
    --Gray-700: hsl(240, 78%, 98%);
}

/* === general style === */
html{
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.big-text{
    font-size: 3rem;
    color: var(--Gray-700);
}

.lg-text{
    font-size: 1.75rem;
    color: var(--Gray-650);
}

.md-text{
    font-size: .95rem;
    color: var(--Gray-650);
}

.sm-text{
    font-size: .8rem;
    color: var(--Gray-650);
}

li{
    padding: .5rem 2rem;
    border-bottom: 1px solid var(--Gray-650);
}

li:nth-child(1){
    border-top: 1px solid var(--Gray-650);
}

/* === body styling === */
body{
    width: 100%;
    min-height: 100vh;
    max-width: 1440px;
    background: var(--Blue-50);
    display: grid;
    grid-auto-rows: auto 1fr;
    grid-template-areas: 
    "container"
    "attribute";
    place-items: center;
}

.container{
    position: relative;
    grid-area: container;
    width: min(800px, 90%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
}

.bg-top{
    position: absolute;
    top: 0;
    right: 20%;
    width: 15%;
}

.bg-bottom{
    position: absolute;
    bottom: 10%;
    left: 15%;
    width: 15%;
}

.toggle-btn{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.toggle-btn span{
    width: 50px;
    height: 25px;
    border-radius: 15px;
    background-color: var(--Blue-150);
    position: relative;
    cursor: pointer;
    transition: left .5s ease-in;
}

.toggle-btn span::after{
    content: "";
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--Blue-50);
    position: absolute;
    top: 2.5px;
    left: 3.5px;
}

.toggle-btn span.active::after{
    left: 26.5px;
}

.cards{
    width: 100%;
    display: flex;
    flex: 1;
    margin-top: 2rem;
}

.card-component{
    flex: 1;
    display: none;
    justify-content: space-between;
    gap: .5rem;
    animation: change .3s ease-in-out forwards;
}

/* === cards animation on change plan === */
@keyframes change{
    from{
        opacity: 0;
        transform: scale(1.1);
    }
    to{
        opacity: 1;
        transform: scale(1);
    }
}

.card-component.active{
    display: flex;
}

.card{
    flex: 1;
    background: var(--Blue-50);
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem 1.5rem;
    gap: 1.5rem;
    border-radius: .35rem;
}

.card button{
    width: 100%;
    background-color: var(--Blue-150);
    padding: .5rem;
    color: var(--Blue-50);
    cursor: pointer;
    border-radius: .2rem;
    transition: .3s ease-in-out;
}

/* === middle card contents style === */
.card:nth-child(2){
    background-color: var(--Blue-150);
    color: var(--Blue-50);
    transform: scale(1.1);
}
.card:nth-child(2) button{
    background-color: var(--Blue-50);
    padding: .5rem;
    color: var(--Blue-150);
}

/* === button hover state === */
.card button:hover{
    background-color: var(--Blue-50);
    color: var(--Blue-150);
    border: 1px solid var(--Blue-150);
}

.card:nth-child(2) button:hover{
    background-color: var(--Blue-150);
    color: var(--Blue-50);
    border: 1px solid var(--Blue-50);
}

/* === moblie display style === */
@media (max-width:600px){
    .card-component{
        flex-wrap: wrap;
        gap: 2rem;
    }

    .card:nth-child(2){
        transform: scale(1);
    }
    .bg-top{
        position: fixed;
        right: 0;
        width: 40%;
    }

    .bg-bottom{
        position: fixed;
        left: 0;
        width: 40%;
    }
}