/**
 * Cropped Image Block - Frontend Styles
 *
 * @package Quinn
 */

.quinn-cropped-image {
    padding: 72px 0;
    background-color: #fff;
    overflow: hidden;
}

.quinn-cropped-image.big-image + .quinn-cropped-image.big-image {
    padding-top: 0;
}

.quinn-cropped-image-wrapper {
	display: flex;
	align-items: flex-start;
    justify-content: space-between;
}

.quinn-cropped-image.big-image .quinn-cropped-image-wrapper {
    position: relative;
}

.quinn-cropped-image.big-image .quinn-cropped-image__image {
	flex-shrink: 0;
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - 50vw);
    width: 50vw;
    overflow: hidden;
}

.quinn-cropped-image.big-image .quinn-cropped-image__image img {
    height: 100%;
}

.quinn-cropped-image__image img {
    max-width: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
	clip-path: polygon(0 0, 100% 0, calc(100% - 122px) 100%, 0 100%);
}

.quinn-cropped-image__content {
    width: 50%;
    padding: 0 0 0 48px;
}

.quinn-cropped-image.big-image.left .quinn-cropped-image__content {
    margin-left: auto;
}

.quinn-cropped-image.big-image.right .quinn-cropped-image__content {
    margin-right: auto;
    padding: 0 48px 0 0;
}

.quinn-cropped-image.big-image.right .quinn-cropped-image__image {
    left: auto;
    right: calc(50% - 50vw);
}

.quinn-cropped-image.big-image.right .quinn-cropped-image__image img {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 122px 100%);
}

.quinn-cropped-image__content strong,
.quinn-cropped-image__content b {
    color: var(--accent-color, #A91221);
    font-size: 1.33em;
    font-weight: 600;
}

@media (max-width: 768px) {
    .quinn-cropped-image {
        padding: 48px 0;
    }

    .quinn-cropped-image-wrapper {
		flex-direction: column;
    }
	
	.quinn-cropped-image.big-image .quinn-cropped-image__image {
        position: relative;
        top: auto;
        bottom: auto;
        right: auto;
        left: calc(50% - 50vw);
        width: 100vw;
        height: 245px;
	}

    .quinn-cropped-image.big-image.right .quinn-cropped-image__image {
        left: calc(50% - 50vw);
    }

    .quinn-cropped-image.big-image .quinn-cropped-image__image img {
        height: 100%;
        clip-path: polygon(0 0, 100% 0, calc(100% - 60px) 100%, 0 100%);
    }

    .quinn-cropped-image.big-image.right .quinn-cropped-image__image img {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 60px 100%);
    }

    .quinn-cropped-image__content strong,
    .quinn-cropped-image__content b {
        font-size: 1.22em;
    }

    .quinn-cropped-image.big-image .quinn-cropped-image__content {
        width: 100%;
        padding: 32px 0 0;
        margin-left: 0;
        margin-right: 0;
    }

    .quinn-cropped-image.big-image.right .quinn-cropped-image-wrapper {
        flex-direction: column;
    }

    .quinn-cropped-image.big-image.right .quinn-cropped-image__content {
        padding: 32px 0 0;
    }
}

/* Small image template */

.quinn-cropped-image.small-image {
    background-color: unset;
    padding: 0;
    margin: 72px 0;
}

.quinn-cropped-image.small-image .quinn-cropped-image-wrapper {
    background-color: #fff;
}

.quinn-cropped-image.small-image .quinn-cropped-image__image {
    width: 33.33%;
    margin-left: 0;
    position: relative;
    overflow: hidden;
    align-self: stretch;
}

.quinn-cropped-image.small-image .quinn-cropped-image__image img {
    clip-path: none;
    height: 100%;
}

.quinn-cropped-image.small-image .quinn-cropped-image__image::after {
    content: "";
    display: block;
    width: 95px;
    height: calc(100% + 40px);
    position: absolute;
    top: -20px;
    right: -55px;
    background-color: #fff;
    transform: rotate(15deg);
}

.quinn-cropped-image.small-image .quinn-cropped-image__content {
    width: 66.66%;
    padding: 72px 48px;
}

.quinn-cropped-image.small-image.right .quinn-cropped-image-wrapper {
    flex-direction: row-reverse;
}

.quinn-cropped-image.small-image.right .quinn-cropped-image__image::after {
    right: unset;
    left: -55px;
    transform: rotate(-15deg);
}

@media (max-width: 768px) {
    .quinn-cropped-image.small-image {
        margin: 48px 0;
    }

    .quinn-cropped-image.small-image .quinn-cropped-image__image::after {
        width: calc(100% + 40px);
        height: 76px;
        right: unset;
        left: 0;
        bottom: -50px;
        top: unset;
        transform: rotate(-8deg);
    }

    .quinn-cropped-image.small-image.right .quinn-cropped-image__image::after {
        left: 0;
        transform: rotate(-8deg);
    }

    .quinn-cropped-image.small-image .quinn-cropped-image__content {
        padding: 24px 24px 48px;
        width: 100%;
    }

    .quinn-cropped-image.small-image .quinn-cropped-image__image {
        height: 245px;
        width: 100%;
    }

    .quinn-cropped-image.small-image.right .quinn-cropped-image-wrapper {
        flex-direction: column;
    }
}

