/*
 * Quote widget — LAYER 5 (widget styles). Scoped to .redteam-quote* markup only; loaded
 * lazily by Elementor via the widget's get_style_depends(). Design tokens come from
 * style.css; anything local to this widget is named --redteam-quote-*.
 *
 * Two variants share the file: the Default single dark card, and the Carousel repeater
 * (below), whose slide transitions are driven by carousel.js.
 */
.redteam-quote {
	--redteam-quote-icon-width: 70rem;
	position: relative;
	overflow: hidden;
	padding: var(--s7);
	border-radius: var(--s1);
	color: var(--color-white, #fffffd);
	background-image: url('./../../assets/images/bg-framed_container.webp');
	background-position: left top;
	background-size: cover;
	box-sizing: border-box;
}

.redteam-quote__body {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: var(--s7);
}

.redteam-quote__icon {
	flex-shrink: 0;
	width: var(--redteam-quote-icon-width);
	height: var(--redteam-quote-icon-width);
	background-color: var(--color-pearl-100, #f5f2ee);
	mask-image: url("assets/quote-mark.svg");
	mask-repeat: no-repeat;
	mask-size: contain;
	-webkit-mask-image: url("assets/quote-mark.svg");
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
}

.redteam-quote__text {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	color: inherit;
	margin-top: 0 !important;
}

.redteam-quote__text p:first-child {
	margin-top: 0;
}

.redteam-quote__text p:last-child {
	margin-bottom: 0;
}

.redteam-quote__divider {
	position: relative;
	margin-top: var(--s5);
	border-top: 1rem dashed var(--color-walnut-100, #948481);
}

.redteam-quote__footer {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--s3);
	margin-top: var(--s5);
	margin-left: calc(var(--redteam-quote-icon-width) + var(--s7));
}

.redteam-quote__attribution {
	display: flex;
	flex-direction: column;
}

.redteam-quote__name,
.redteam-quote__title {
	margin: 0 !important;
	color: inherit;
}

.redteam-quote__title {
	opacity: 0.8;
}

.redteam-quote__logo-wrap {
	flex-shrink: 0;
	height: 100%;
}

.redteam-quote__logo {
	display: block;
	width: auto;
	height: 80rem;
	object-fit: contain;
}

@media (width <= 960px) {
	.redteam-quote { --redteam-quote-icon-width: 36rem; }
	.redteam-quote { padding: var(--s5) var(--s4); }
	.redteam-quote__body { gap: var(--s2); }
	.redteam-quote__footer { margin-left: calc(var(--redteam-quote-icon-width) + var(--s2)); }
}



/* Carousel variant: JS stacks slides during transitions and animates the track height.
 * Reduced motion swaps immediately; touch swipes use the same navigation as the arrows. */

.redteam-quote--carousel .redteam-quote__slides {
	position: relative;
	overflow: hidden;
	transition: height 0.4s ease;
}

.redteam-quote--carousel .redteam-quote__slide {
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.redteam-quote--carousel .redteam-quote__slide--stack {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
}

.redteam-quote--carousel .redteam-quote__slide--from-right,
.redteam-quote--carousel .redteam-quote__slide--to-right {
	transform: translateX(24rem);
	opacity: 0;
}

.redteam-quote--carousel .redteam-quote__slide--from-left,
.redteam-quote--carousel .redteam-quote__slide--to-left {
	transform: translateX(-24rem);
	opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
	.redteam-quote--carousel .redteam-quote__slides,
	.redteam-quote--carousel .redteam-quote__slide {
		transition: none;
	}
}

.redteam-quote--carousel .redteam-quote {
	background-image: none;
	background-color: var(--color-pearl-100, #f5f2ee);
	color: var(--color-black-300, #555555);
}

.redteam-quote--carousel .redteam-quote__icon {
	background-color: var(--color-pearl-300, #d9d3cc);
}

.redteam-quote--carousel .redteam-quote__divider { margin-top: var(--s8); }

.redteam-quote--carousel .redteam-quote__text {
	color: var(--color-pearl-500, #787673);
	/* Set by carousel.js (measureTallestText()) to the tallest slide's natural
	 * text height, so every slide's quote text occupies the same space instead
	 * of the card resizing slide-to-slide. Falls back to `auto` (a no-op) before
	 * JS runs and if JS is unavailable. */
	min-height: var(--redteam-quote-text-height, auto);
}

.redteam-quote--carousel .redteam-quote__media {
	position: relative;
	display: flex;
	align-items: stretch;
	gap: var(--s5);
	margin-top: var(--s8);
}

.redteam-quote--carousel .redteam-quote__photo {
	flex: 1 1 0;
	min-width: 0;
	aspect-ratio: 688 / 501;
	border-radius: var(--s1);
	overflow: hidden;
}

.redteam-quote--carousel .redteam-quote__photo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.redteam-quote--carousel .redteam-quote__content {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: var(--s5);
}

.redteam-quote--carousel .redteam-quote__arrows {
	display: flex;
	gap: var(--s3);
}

.redteam-quote--carousel .redteam-quote__arrow {
	--arrow-size: 62rem;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--arrow-size);
	height: var(--arrow-size);
	padding: 0;
	border: 1.5rem solid rgba(63, 46, 43, 0.2);
	border-radius: 50%;
	background: none;
	color: var(--color-walnut-400, #3f2e2b);
	cursor: pointer;
}

.redteam-quote--carousel .redteam-quote__arrow-icon {
	width: 16rem;
	height: 16rem;
	background-color: currentColor;
	mask-image: url("assets/icon-arrow-carousel.svg");
	mask-repeat: no-repeat;
	mask-size: contain;
	-webkit-mask-image: url("assets/icon-arrow-carousel.svg");
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	transition: opacity 0.2s;
}

.redteam-quote--carousel .redteam-quote__arrow--prev .redteam-quote__arrow-icon {
	transform: rotate(180deg);
}

.redteam-quote--carousel .redteam-quote__arrow:disabled {
	cursor: not-allowed;
}

.redteam-quote--carousel .redteam-quote__arrow:disabled .redteam-quote__arrow-icon {
	opacity: 0.3;
}

.redteam-quote--carousel .redteam-quote__footer {
	margin-top: 0;
	margin-left: 0;
}

.redteam-quote--carousel .redteam-quote__name {
	color: var(--color-black-500, #000000);
}

.redteam-quote--carousel .redteam-quote__title {
	color: var(--color-black-300, #555555);
	opacity: 1;
}

/* Logo sits below the name/title (inside .redteam-quote__attribution), not beside it — the
 * Default variant's `height: 100%` (sized against a fixed-height footer row) doesn't apply
 * in this stacked context. */
.redteam-quote--carousel .redteam-quote__logo-wrap {
	margin-top: var(--s3);
}

.redteam-quote--carousel .redteam-quote__logo {
	width: auto;
	height: 80rem;
}

.redteam-quote--carousel .redteam-quote__button {
	display: inline-flex;
	align-items: center;
	gap: var(--s2);
	flex-shrink: 0;
	padding: var(--s3) var(--s4);
	border-radius: var(--s05);
	background-color: var(--color-red-200-base, #c8102e);
	color: var(--color-white, #fffffd);
	text-decoration: none;
	white-space: nowrap;
}

.redteam-quote--carousel .redteam-quote__button::after {
	content: "";
	display: block;
	width: 9rem;
	height: 10rem;
	background-color: currentColor;
	mask: var(--icon-arrow-right);
	mask-repeat: no-repeat;
}

@media (width <= 960px) {
	.redteam-quote--carousel .redteam-quote__media { flex-direction: column; margin-top: var(--s5); }

	.redteam-quote--carousel .redteam-quote__divider { margin-top: var(--s5); }

	.redteam-quote--carousel .redteam-quote--carousel { margin-top: var(--s5); }

	.redteam-quote--carousel .redteam-quote__photo { flex: 0 0 auto; }

	.redteam-quote--carousel .redteam-quote__arrow { --arrow-size: 40rem; }

	.redteam-quote--carousel .redteam-quote__content { gap: var(--s4); }
}
