* {
    box-sizing: border-box;
    font-family: Segoe UI;
}

.indi-container {
    max-width: max(calc(100% - 400px), 840px);
    margin: 1rem auto;
    padding: 1rem;
}

.indi-info-container {
    margin: 4rem 0;

    p, h1 {
        margin: 0;
    }

    display: flex;
    gap: 100px;

    .indi-pictures {
        display: flex;
        flex-direction: column;
        width: 35%;

        .indi-cover img {
            border-radius: 4px;
            box-shadow: 0 4px 10px -5px rgba(0, 0, 0, 0.5);
            width: 100%;
        }
    }

    .indi-main-info {
        flex: 1;

        .indi-title {
            display: flex;
            flex-direction: column;
            gap: 1rem;

            font-family: Segoe UI;
            
            p, h1 {
                font-size: 30px;
            }
            
            .title {
                font-weight: bold;
            }
        }

        .stats {
            display: flex;
            flex-direction: column;
            gap: 2.5rem;

            margin-top: 3rem;

            .stat {
                display: flex;
                align-items: center;
                gap: 1rem;

                font-size: 24px;

                .stat-name {
                    font-weight: bold;
                    color: #EE579D;
                }
            }
        } 
    }
}

.indi-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 5rem;
    
    a {
        /* In design theres 60 px gap, both of the buttons have 15px padding so thats 30px gap */
        width: calc(50% - 15px);

        img {
            width: 100%;
        }
    }
}

.indi-previews {
    margin-top: 40px;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;

    div {
        border: 1px solid #63ccf5 ;
        box-shadow: 0 4px 10px -5px rgba(0, 0, 0, 0.5);
        aspect-ratio: 1/1;
        overflow: hidden;

        cursor: pointer;
        
        img {
            width: 100%;
            height: 100%;

            object-fit: cover;
        }
    }
}



.overflow-container {
    max-width: 100%;
    overflow: hidden;
}


.indi-description {
    font-size: 20px;
    font-family: Segoe UI;
    margin: 1rem 0;
}


.similar-banner {
    width: 100%;
}

#indi-preview-overlay {
    opacity: 0;

    display: none;
    position: fixed;
    top: 0;
    left: 0;

    width: 100vw;
    height: 100dvh;

    background-color: #00000025;
    backdrop-filter: blur(2px);

    button {
        cursor: pointer;

        position: absolute;
        top: 1rem;
        right: 1rem;

        background-color: #63ccf5;
        color: white;
        font-weight: bold;
        font-size: 30px;

        aspect-ratio: 1/1;
        width: 50px;
        border-radius: 100%;
        border: 2px solid transparent;

        display: grid;
        place-items: center;

        z-index: 100;

        svg {
            transition: 250ms;
        }

        transition: 250ms;
        &:hover {
            border: 2px solid white;

            svg {
                scale: 0.7;
                transform: rotate(180deg);
            }
        }
    }

    place-items: center;

    transition: 250ms ease-in-out;

    #preview-image {
        transition: 250ms ease-in-out;
        opacity: 0;
        scale: 0.8;

        max-height: 100dvh;
        max-width: 100vw;
        object-fit: contain;
        border-radius: 0.5rem;
    }
}

.preview-image-in {
    scale: 1 !important;
    opacity: 1 !important;
}

.overlay-image-in {
    opacity: 1 !important;
}

/* ------------ Mobile version ------------ */

@media (max-width: 1300px) {
    .indi-previews {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .social-footer {
        margin: 3rem 0;
        gap: 2.5rem;

        justify-content: center;
        p {
            display: none;
        }
    }
}

@media (max-width: 900px) {
    .indi-info-container {
        gap: 1rem;
        flex-direction: column;
    }


    .indi-description {
        text-align:justify;
    }

    .indi-title {
        margin-top: 2rem;
    }
    
}

@media (max-width: 900px) and (min-width: 560px) {
    .indi-info-container .indi-pictures {
        width: 100%;
        flex-direction: row;
        gap: 2rem;

        picture {
            min-width: 300px;
        }
    }

    .indi-previews {
        margin-top: 0;
        height: 100%;
        
        div {
            aspect-ratio: auto;
            max-height: 150px;
        }
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 560px) {
    .indi-info-container {
        margin: 40px 0;
    }

    .indi-info-container .indi-pictures {
        width: 100%;
    }

    .indi-previews {
        margin-top: 20px;
        gap: 20px ;

        div {
            aspect-ratio: auto;
        }
        grid-template-columns: repeat(3, 1fr);
    }

    .indi-buttons {
        margin: 0 -15px;
        margin-top: 40px;

        a {
            width: 100%;
        }
    }
}

@media (max-width: 480px) {

    .similar-title {
        font-size: 22px;
    }
}

@media (max-width: 320px) {
    .indi-book-previews {
        display: flex;
        flex-direction: column;

        .preview:last-child {
            width: 100%;
        }
    }
}
