/* ==========================================================================
   Chasing Atlas — [ca_reviews] grid
   ========================================================================== */

.ca-reviews-grid {
	display: grid;
	grid-template-columns: repeat( var( --ca-rv-cols, 3 ), 1fr );
	gap: 32px;
	padding-top: 28px; /* room for dot overflow */
}

.ca-reviews-grid--1 { --ca-rv-cols: 1; }
.ca-reviews-grid--2 { --ca-rv-cols: 2; }
.ca-reviews-grid--3 { --ca-rv-cols: 3; }
.ca-reviews-grid--4 { --ca-rv-cols: 4; }

@media ( max-width: 960px ) {
	.ca-reviews-grid { --ca-rv-cols: 2; }
}

@media ( max-width: 600px ) {
	.ca-reviews-grid { --ca-rv-cols: 1; }
}


/* Card
--------------------------------------------- */

.ca-review-card {
	position: relative;
	background: #ffffff;
	border-radius: var( --client-radius, 3px );
	box-shadow: 0 2px 24px rgba( 0, 0, 0, 0.08 );
	padding: 40px 28px 32px;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* Red pin dot */
.ca-review-card::before {
	content: '';
	position: absolute;
	top: -18px;
	left: 50%;
	transform: translateX( -50% );
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var( --client-accent, #e82725 );
}


/* Headline
--------------------------------------------- */

.ca-review-headline {
	font-family: fields, sans-serif;
	font-size: 1.3rem;
	font-weight: 400;
	letter-spacing: 0;
	color: var( --ca-dark, #5d564c );
	margin: 0 0 20px;
	line-height: 1.3;
}


/* Review text
--------------------------------------------- */

.ca-review-text {
	font-size: 0.95rem;
	line-height: 1.65;
	color: var( --ca-dark, #5d564c );
	flex: 1;
	margin-bottom: 24px;
}

.ca-review-text p {
	margin: 0 0 0.75em;
}

.ca-review-text p:last-child {
	margin-bottom: 0;
}


/* Byline
--------------------------------------------- */

.ca-review-byline {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: auto;
}

.ca-review-name {
	display: block;
	font-family: lato, sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var( --ca-dark, #5d564c );
}

.ca-review-sub {
	display: block;
	font-family: lato, sans-serif;
	font-size: 0.8rem;
	font-style: italic;
	color: var( --ca-taupe1, #AEABA2 );
}

.ca-review-meta {
	display: block;
}

.ca-review-date {
	display: block;
	font-family: lato, sans-serif;
	font-size: 0.8rem;
	font-style: italic;
	color: var( --ca-taupe1, #AEABA2 );
}


/* ── Review expand / collapse ────────────────────────────────────────────── */

.ca-review-text {
	position: relative;
}

.ca-review-text.is-collapsed {
	max-height: 250px;
	overflow: hidden;
}

/* Gradient fade over last lines when collapsed */
.ca-review-text.is-collapsed::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 80px;
	background: linear-gradient( to bottom, rgba( 255, 255, 255, 0 ) 0%, #ffffff 100% );
	pointer-events: none;
}

/* Expand button */
.ca-review-expand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px 0 0;
	font-family: lato, sans-serif;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var( --client-accent, #e82725 );
	margin: 8px auto 0;
	transition: opacity 0.2s ease;
}

.ca-review-expand:hover { opacity: 0.75; }

.ca-review-expand__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 1.5px solid var( --client-accent, #e82725 );
	border-radius: 50%;
	transition: transform 0.3s ease;
	flex-shrink: 0;
}

.ca-review-expand.is-open .ca-review-expand__icon {
	transform: rotate( 180deg );
}

/* Smooth slide transition */
.ca-review-text {
	transition: max-height 0.4s cubic-bezier( 0.4, 0, 0.2, 1 );
}
