@use "../theme/breakpoints" as *;
@use "../theme/colors" as *;

#program {
    #main-slider {
        width: 100%;

        .splide__slide img {
            height: 100dvh;
        }
    }

    .splide__slide img {
        width: 100%;
        object-fit: cover;
    }

    #details {

        .title-container {
            display: flex;
            justify-content: space-between;
            gap: 1rem;

            @media screen and (max-width: $breakpoints-xl) {
                flex-direction: column;
                justify-content: unset;
            }

            .commercial-offer {
                cursor: pointer;

                img.trigger-modal {
                    width: 250px;
                }
            }
        }


        .preview {
            background: transparent linear-gradient(96deg, #fc8854 0%, #ff3838 100%) 0 0 no-repeat padding-box;
            padding: 0.5rem;
            font-size: 1.1rem;
            font-weight: 600;
        }

        h1 {
            font-size: 3rem;

            .favorite > img {
                width: 1.7rem;
            }
        }

        h2 {
            margin-top: 3rem;
        }

        p {
            font-size: 1.5rem;
            margin: unset;
            font-weight: 500;
        }

        .action-buttons {
            display: grid;
            grid-gap: 1rem;
            grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
            margin: 2rem 0;

            .btn {
                min-width: unset;
                width: 100%;
                max-height: 140px;
                aspect-ratio: 1;
                background: transparent linear-gradient(0, white 0, $linear-light-two 80%) 0 0 no-repeat padding-box;
                position: relative;
                font-size: 0.9rem;
                text-align: center;
                display: flex;
                flex-direction: column;
                justify-content: end;

                img {
                    position: absolute;
                    top: 1rem;
                    margin: auto;
                    height: 40%;
                    width: auto;
                    z-index: 0;
                }

                span {
                    color: black;
                    z-index: 1;
                }
            }

            .modal-content {
                display: none;
            }
        }

        .taxation {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 1rem;

            .tag {
                border-radius: 25px;
                color: #fff;
                text-transform: uppercase;
                font-weight: 700;
                padding: 0.2rem 0.5rem;
                min-width: unset;

                &:not(.btn) {
                    background: #5f6bff;
                }

                span {
                    border: 2px solid white;
                    border-radius: 50%;
                    width: 20px;
                    height: 20px;
                    font-size: 10px;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    font-weight: bold;
                    text-transform: lowercase !important;
                }
            }

            @media screen and (max-width: $breakpoints-md) {
                justify-content: center;
            }
        }

        #lots {
            margin-top: 4rem;

            .coach {
                width: 80%;
                background: white;
                margin: auto;
                position: relative;

                @media screen and (min-width: $breakpoints-xl) {
                    max-width: 800px;
                }

                .head {
                    position: absolute;
                    top: 0;
                    left: calc(50% - 125px);
                    background: $main-color;
                    border-radius: 0 0 1rem 1rem;
                    width: 250px;
                    text-align: center;
                    font-size: 1.2rem;
                    font-weight: 400;
                    padding: 0.4rem;

                    @media screen and (max-width: $breakpoints-md) {
                        font-size: 1rem;
                    }
                }

                .grid {
                    height: 100%;
                    grid-template-columns: 30% 1fr;

                    > div:first-child {
                        background: url('/public/assets/theme/femme_coach_full.jpg') no-repeat center center;
                        background-size: cover;
                        height: 100%;
                        min-height: 270px;
                    }

                    .quiz {
                        padding: 3rem 2rem 2rem;
                        display: flex;
                        gap: 2rem;
                        flex-direction: column;
                        justify-content: space-between;
                        align-items: flex-start;
                        text-align: left;

                        p {
                            color: black;
                            font-weight: 600;
                            font-size: 1.3rem;
                        }

                        @media screen and (max-width: $breakpoints-md) {
                            padding: 2rem 1rem 1rem;

                            p {
                                font-size: 1.1rem;
                            }
                        }
                    }
                }

                &:before {
                    content: "";
                    width: 100%;
                    height: 100%;
                    position: absolute;
                    top: 0;
                    left: 0;
                    z-index: 0;
                    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 20%, rgb(255, 255, 255) 30%, rgb(255, 255, 255) 100%);
                }

                .quiz {
                    z-index: 1;
                }
            }
        }
    }

    @media screen and (max-width: $breakpoints-md) {
        #details {
            text-align: center;

            h1 {
                font-size: 2.5rem;
            }

            > .action-buttons {
                justify-content: center;
            }
        }
    }
}

.modal {
    .modal-body {
        padding: 0;
    }

    .splide__slide img {
        height: 80dvh;
        width: 100%;
        object-fit: cover;

        @media screen and (max-width: $breakpoints-sm) {
            height: 100dvh;
        }
    }
}

#tour-modal {
    .modal-body {
        gap: 0;
    }

    .button-container {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0.2rem;
        justify-content: center;
        position: absolute;
        left: 0;
        right: 0;
    }

    .iframe-container {
        width: 100%;
        height: 100%;

        iframe:not(:first-child) {
            display: none;
        }
    }
}

.modal-2-columns {
    .modal-body {
        overflow: hidden !important;
        height: 100%;
    }

    .grid {
        grid-template-columns: 70% 1fr;
        height: 100%;

        * {
            color: black !important;
        }

        .description {
            font-weight: 500;
            font-size: 1.5rem;
            margin: unset;
        }

        > div:first-child {
            overflow-y: auto;
            padding: 2rem 4rem;

            h2 {
                font-size: 2rem;
            }
        }

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
    }

    @media screen and (max-width: $breakpoints-md) {
        .grid {
            grid-template-columns: 1fr;
            grid-auto-flow: dense;

            > div:first-child {
                order: 2;
            }
        }
    }
}

#description-modal {
    .grid {
        > div:first-child {
            padding: 7rem 4rem 2rem;

            @media screen and (max-width: $breakpoints-md) {
                padding: 2rem 4rem;
            }
        }
    }
}
