@import "settings/mixins";
@import "settings/variables";
@import "settings/elementor-breakpoints";

.elementor-widget-civi-testimonial {
	text-align: center;

	.testimonial-item {
		position: relative;
		display: inline-block;
		width: 100%;
		max-width: 100%;
	}

	.elementor-carousel {
		.slick-list {
			margin-left: -15px;
			margin-right: -15px;
		}
		.testimonial-inner {
			padding-left: 15px;
			padding-right: 15px;
		}
	}

	&.align-left {
		text-align: left;
	}

	&.align-right {
		text-align: right;
	}

	.testimonial-main-content {
		display: flex;
		justify-content: center;
	}

	.content-wrap {
		position: relative;
		display: inline-block;
		width: 100%;
		max-width: 100%;
	}

	&.layout-image-bottom {
		&.align-center .image img {
			margin-left: auto;
			margin-right: auto;
		}
		.position {
			margin-top: 8px;
		}
		.content {
			margin-top: 24px;
			.text {
				font-size: 20px;
			}
		}
		.image {
			padding-top: 40px;
		}
		.nav-style-03 {
			.swiper-nav-button {
				opacity: 1;
				visibility: unset;
				height: 36px;
				width: 36px;
				margin: 8px;
				font-size: 16px;
			}
			.swiper-nav-buttons {
				@include justify-content-center(important);
				margin-top: 32px;
			}
			.swiper-nav-buttons-wrap {
				position: static;
			}
		}
	}

	&.layout-image-inline {
		.image {
			flex-shrink: 0;
			margin: 0 10px 0 0;
		}

		.info {
			display: inline-flex;
			align-items: center;
			text-align: left;
		}

		.testimonial-rating {
			margin-bottom: 20px;
		}

		&.align-right {
			.info {
				text-align: right;
				flex-direction: row-reverse;
			}

			.image {
				flex-shrink: 0;
				margin: 0 0 0 30px;
			}

			.testimonial-item {
				text-align: right;
			}
		}
	}

	&.layout-image-stacked {
		.image {
			margin: 0 0 28px;
		}

		.info {
			display: inline-block;
		}

		.position {
			margin-top: 3px;
		}
	}

	&.layout-image-above {
		.image {
			margin-bottom: 20px;

			&:before {
				display: none;
			}
		}

		.cite {
			display: block;
			margin-top: 46px;
		}

		.position {
			margin-top: 11px;
		}
	}

	&.layout-image-top {
		.swiper-slide {
			padding: 70px 0 0;
		}

		.testimonial-item {
			padding-top: 100px !important;
		}

		.image {
			position: absolute;
			top: 0;
			left: 50%;
			transform: translate(-50%, -50%);

			img {
				width: 140px;
				height: 140px;
			}
		}

		.info {
			padding: 34px 0 0;
		}
	}

	&.layout-image-top-02 {
		.image {
			margin: 0 0 30px;

			img {
				width: 124px;
				height: 124px;
			}
		}

		.info {
			padding: 21px 0 0;
		}
	}

	&.layout-image-left {
		.testimonial-item {
			display: flex;
		}

		.image {
			flex-shrink: 0;
			margin: 0 30px 0 0;

			img {
				width: 70px;
				height: 70px;
			}
		}

		.info {
			padding: 25px 0 0;
		}
	}

	&.image-position-above {
		.info {
			padding: 0 0 24px;
		}
	}

	&.image-position-below {
		.info {
			padding: 20px 0 0;
		}
	}

	&.image-position-bottom {
		.testimonial-main-content {
			height: 100%;
		}

		.content-wrap {
			display: inline-flex;
			flex-direction: column;
			height: 100%;
			width: 100%;
		}

		.content {
			flex-grow: 1;
		}

		.info {
			padding: 55px 0 0;
			flex-shrink: 0;
		}

		&.align-center {
			.info {
				justify-content: center;
			}
		}
	}

	.image {
		img {
			width: 90px;
			height: 90px;
			border-radius: 50%;
		}
	}

	.cite {
		font-style: normal;
	}

	.title {
		font-size: 18px;
		font-weight: 500;
		margin-bottom: 14px;
	}

	.testimonial-rating {
		font-size: 14px;
		color: #fb0;
		letter-spacing: 2px;
		margin-bottom: 10px;
	}

	.name {
		font-size: 16px;
		font-weight: 500;
		margin-bottom: 0;
	}

	.position {
		display: block;
	}
}

.civi-testimonial-cite-layout-inline {
	.name {
		display: inline-block;
	}

	.position {
		display: inline-block;
		margin: 0 0 0 13px;

		&:before {
			content: "";
			width: 4px;
			height: 4px;
			background-color: #d8d8d8;
			display: inline-block;
			vertical-align: 3px;
			margin-right: 10px;
			border-radius: 10px;
		}
	}
}

.civi-testimonial-style-01 {
	.testimonial-item {
		position: relative;
		padding: 77px 80px 106px;
		background-image: linear-gradient(235deg, #e6eef5 0%, #edeff6 100%);
		border-radius: 5px;

		.testimonial-logo {
			content: "";
			position: absolute;
			top: 58px;
			right: 49px;
		}
	}

	.image {
		img {
			width: 90px;
			height: 90px;
		}
	}

	.text {
		font-size: 24px;
		line-height: 1.5;
		font-weight: 400;
		color: #333;
	}

	&.image-position-below {
		.info {
			padding: 40px 0 0;
		}
	}
}

.civi-testimonial-style-02 {
	.testimonial-item {
		position: relative;
		padding: 56px 40px 55px;
		background-color: #f6fafe;
		border-radius: 5px;

		.testimonial-logo {
			content: "";
			position: absolute;
			top: 44px;
			right: 38px;
		}
	}

	.image {
		img {
			width: 90px;
			height: 90px;
		}
	}

	.title {
		margin-bottom: 21px;
	}

	.text {
		font-size: 18px;
		line-height: 1.67;
		font-weight: 400;
		color: #333;
	}

	&.image-position-below {
		.info {
			padding: 32px 0 0;
		}
	}
}

.civi-testimonial-style-03 {
	&.image-position-above {
		.info {
			&:before {
				top: 8px;
				bottom: auto;
			}
		}
	}
	&.image-position-bottom {
		.text {
			font-size: 24px;
			line-height: 1.25;
			color: $primary_color;
			padding-right: 70px;
		}
		.name {
			font-size: 18px;
			font-weight: 600;
			line-height: 1.3;
		}
		.position {
			display: block;
			font-size: 18px;
		}
	}
	.info {
		@include d-flex(important);
		@include align-items-center();
		position: relative;
		.testimonial-logo {
			content: "";
			position: absolute;
			right: 0;
		}
	}
	.image {
		margin-right: 20px !important;
		margin-bottom: 0 !important;
		img {
			width: 72px;
			height: 72px;
		}
	}
	.testimonial-item {
		background-color: #fff;
		border-radius: 16px;
		padding: 40px 32px;
		border: 1px solid $border_color;
	}
}

.civi-testimonial-style-04{
	.cite{
		margin-bottom: 16px;
		.name{
			font-size: 18px;
		}
	}
	.title{
		margin-bottom: 6px;
	}
}

.civi-testimonial-pagination {
	&.style-01 {
		display: inline-block;
		width: 315px;
		max-width: 100%;
		margin-top: 30px;

		.swiper-slide {
			.image {
				margin-bottom: 0;

				img {
					width: 85px;
					height: 85px;
					border-radius: 50%;
				}
			}

			&:not(.swiper-slide-thumb-active) {
				cursor: pointer;

				img {
					opacity: 0.4;
				}
			}
		}
	}
}

@include elementor-breakpoint-down(md) {
	.elementor-widget-civi-testimonial.civi-testimonial-style-01 {
		.testimonial-item {
			padding: 77px 40px 106px;
		}

		.text {
			font-size: 21px;
		}
	}
}

@media only screen and (max-width: 991px) {
	.testimonial-logo {
		display: none !important;
	}
}

@media only screen and (max-width: 550px) {
	.elementor-widget-civi-testimonial.layout-image-left .testimonial-item {
		display: block;
		text-align: center;

		.image {
			display: inline-block;
			margin: 0 auto 20px;
		}
	}
}

@include elementor-breakpoint-down(sm) {
	.elementor-widget-civi-testimonial.civi-testimonial-style-01 {
		.testimonial-item {
			padding: 77px 30px 106px;
		}

		.text {
			font-size: 18px;
		}
	}

	.elementor-widget-civi-testimonial.civi-testimonial-style-02 {
		.testimonial-item {
			padding: 46px 30px 45px;
		}
	}
}
