/* Sekcja: image_surrounded_by_text - pełny CSS sekcji (zapis zagnieżdżony).
   Kolory gradientu (dawne zmienne SCSS): #e0e0e0 / #ffffff. */

.image-surrounded-by-text-wrapper {
    overflow: hidden;
    --text-color: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;

    .elements-wrapper {
        max-width: 1199.5px;
        display: flex;

        .image-col {
            align-self: center;

            figure {
                display: flex;
                justify-content: center;
                align-items: center;
                width: fit-content;
                height: fit-content;
            }

            img {
                z-index: 1;
                width: auto;
                height: auto;
                max-height: 70svh;
            }
        }

        .text-col {
            width: 100%;
            display: flex;
            flex-direction: column;

            .single-element-wraper {
                margin: 20px 0;
                padding: 20px;
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                align-self: flex-end;

                .photo {
                    box-sizing: content-box;
                    display: flex;
                    align-items: center;
                    flex-direction: row;
                }

                .text {
                    width: 100%;
                }

                .photo,
                .text {
                    width: 100%;
                }

                figure {
                    padding: 10px;
                    box-sizing: content-box;
                }

                figure,
                img {
                    min-width: 40px;
                    max-width: 40px;
                }

                h3,
                p {
                    width: 100%;
                }

                h3 {
                    font-size: 1.125rem;
                    font-weight: 900;
                    text-transform: uppercase;
                    color: var(--element1-title);
                }

                p {
                    font-size: 1rem;
                    font-weight: 500;
                    color: var(--element1-text);
                }
            }
        }
    }

    .buttons {
        .btn-primary {
            background-color: var(--element1-btn1-bg);
            color: var(--element1-btn1-text);
            border-color: var(--element1-btn1-border);

            &:hover {
                background-color: var(--element1-btn1-bg-hover) !important;
                color: var(--element1-btn1-text-hover) !important;
                border-color: var(--element1-btn1-border-hover) !important;
            }
        }

        .btn-secondary {
            background-color: var(--element1-btn2-bg);
            color: var(--element1-btn2-text);
            border-color: var(--element1-btn2-border);

            &:hover {
                background-color: var(--element1-btn2-bg-hover) !important;
                color: var(--element1-btn2-text-hover) !important;
                border-color: var(--element1-btn2-border-hover) !important;
            }
        }
    }

    .text-col:nth-child(1) .single-element-wraper {
        background-image: linear-gradient(-90deg, rgba(255, 255, 255, 0) 0%, rgba(224, 224, 224, 0.44) 100%);
    }

    .text-col:nth-child(3) .single-element-wraper {
        background-image: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(224, 224, 224, 0.44) 100%);
    }

    .text-col:nth-child(1) .single-element-wraper:nth-child(2),
    .text-col:nth-child(3) .single-element-wraper:nth-child(1),
    .text-col:nth-child(3) .single-element-wraper:nth-child(3) {
        align-self: flex-start;
    }
}

@media (max-width: 575.5px) {
    .image-surrounded-by-text-wrapper {
        .single-element-wraper {
            width: 100%;
        }

        .image-col img {
            max-width: 50vw;
        }
    }
}

@media (min-width: 576px) and (max-width: 767.5px) {
    .image-surrounded-by-text-wrapper {
        .single-element-wraper {
            width: 100%;
        }

        .image-col img {
            max-width: 50vw;
        }
    }
}

@media (min-width: 768px) and (max-width: 991.5px) {
    .image-surrounded-by-text-wrapper {
        .elements-wrapper .text-col .single-element-wraper {
            width: 690px;
            margin: 20px auto;
            background-image: linear-gradient(-90deg, rgba(255, 255, 255, 0) 0%, rgba(224, 224, 224, 0.44) 100%);
        }

        .image-col img {
            max-width: 50vw;
        }
    }
}

@media (min-width: 992px) {
    .image-surrounded-by-text-wrapper {
        .single-element-wraper {
            width: 90%;
        }

        .text {
            margin-left: 60px;
            width: calc(100% - 60px) !important;
        }

        .text-col:nth-child(1) {
            transform: translateX(30px);
        }

        .text-col:nth-child(3) {
            transform: translateX(-30px);
        }

        .image-col img {
            max-width: 100%;
        }
    }
}
