/* ==========================================================================
   Review Showcase — tile grid + hover/autoplay popup
   Drop this component into a WPBakery row/column alongside your own
   heading + text column. This file only styles the grid + popup card.

   Palette: indigo #2E2467 / gold #F2B705 / tile grey #E4E1D2
   ========================================================================== */

.rs-showcase {
	--rs-indigo: #2E2467;
	--rs-gold: #F2B705;
	--rs-tile-grey: #E4E1D2;
	--rs-tile-grey-dark: #D6D2BD;
	--rs-navy: #0F2A35;
	--rs-tooltip-text: #ffffff;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.rs-showcase__grid-wrap {
	position: relative;
}

.rs-showcase__grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 14px;
}

body .rs-showcase .rs-tile,
body[data-button-style] .rs-showcase .rs-tile {
	appearance: none;
	border: none;
	background: var(--rs-tile-grey);
	border-radius: 14px !important;
	padding: 0;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	cursor: pointer;
	position: relative;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rs-tile img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	display: block;
}

.rs-tile__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.rs-tile__placeholder svg {
	width: 38%;
	height: 38%;
	fill: var(--rs-tile-grey-dark);
	display: block;
}
.rs-tile__placeholder.rs-icon--none {
	background: var(--rs-tile-grey-dark);
}

/* Decorative icon tiles are non-interactive: no pointer, no hover lift */
.rs-tile--icon {
	cursor: default;
	pointer-events: none;
}
.rs-tile--icon:hover,
.rs-tile--icon:focus-visible {
	transform: none;
	box-shadow: none;
}

.rs-tile:hover,
.rs-tile:focus-visible,
.rs-tile.is-active {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(15, 42, 53, 0.18);
}

.rs-tile.is-active {
	outline: 3px solid var(--rs-indigo);
	outline-offset: 2px;
}

.rs-tile:focus-visible {
	outline: 3px solid var(--rs-gold);
	outline-offset: 2px;
}

/* ---------- Popup card ---------- */

.rs-popup {
	position: absolute;
	z-index: 20;
	width: min(440px, 90vw);
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
	display: flex;
	flex-direction: column;
}

.rs-popup.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.rs-popup__arrow {
	width: 0;
	height: 0;
	border-left: 12px solid transparent;
	border-right: 12px solid transparent;
	border-bottom: 12px solid var(--rs-indigo); /* matches tooltip_bg */
	margin-left: 28px;
}

/* When popup is above the tile, flip arrow to point downward */
.rs-popup--above .rs-popup__arrow {
	border-bottom: none;
	border-top: 12px solid var(--rs-indigo);
	order: 1; /* move arrow below the card */
}

.rs-popup__card {
	position: relative;
	background: var(--rs-indigo);
	color: var(--rs-tooltip-text);
	border-radius: 16px;
	padding: 28px 30px;
	box-shadow: 0 18px 40px rgba(15, 10, 50, 0.28);
}


.rs-showcase .rs-popup__title {
	font-family: 'nove', sans-serif !important;
	font-weight: 900;
	text-transform: uppercase;
	font-size: 21px;
	letter-spacing: 0.3px;
	margin: 0 0 16px;
	color: #fff;
}

.rs-showcase .rs-popup__stars {
	color: var(--rs-gold);
	font-size: 24px;
	letter-spacing: 2px;
	margin-bottom: 16px;
}

.rs-showcase .rs-popup__text {
	font-family: 'Mulish', sans-serif !important;
	font-size: 15.5px;
	line-height: 1.55;
	margin: 0 0 16px;
	opacity: 0.95;
	position: relative;
	padding-left: 50px;
}
.rs-showcase .rs-popup__text::before {
	content: '"';
	font-family: 'nove', sans-serif !important;
	position: absolute;
	left: 0;
	top: 0;
	color: var(--rs-gold);
	font-size: 68px;
	line-height: 1;
	display: block;
}

.rs-showcase .rs-popup__reviewer {
	font-family: 'Mulish', sans-serif !important;
	margin: 0;
	font-weight: 700;
	text-align: right;
	font-size: 15px;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	.rs-tile,
	.rs-popup {
		transition: none;
	}
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.rs-showcase__grid {
		grid-template-columns: repeat(5, 1fr);
	}
	.rs-popup {
		width: min(420px, 92vw);
	}
	/* The fixed icon pattern is designed around 8 columns; below that it
	   stops reading as an intentional pattern, so icon tiles are dropped
	   and only real review tiles remain. */
	.rs-tile--icon,
	.rs-tile--mobile-hidden {
		display: none;
	}
}

@media (max-width: 560px) {
	.rs-showcase__grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 10px;
	}
	.rs-popup__card {
		padding: 20px 20px;
	}
	.rs-showcase .rs-popup__title {
		font-size: 18px;
	}
}
