/* =========================================================================
   Eastgate Testimonies
   ========================================================================= */

:root {
	--egt-navy: var(--wp--preset--color--navy, #1e3a5f);
	--egt-navy-deep: #0f2340;
	--egt-green: var(--wp--preset--color--green, #00875a);
	--egt-muted: #6b7785;
	--egt-surface: #eef2f7;
	--egt-border: #dde4ec;
	--egt-display: var(--wp--preset--font-family--avenir-condensed, 'Avenir Next Condensed', sans-serif);
	--egt-body: var(--wp--preset--font-family--avenir, 'Avenir Next', sans-serif);
	--egt-radius: 0.75rem;
	--egt-on-dark: #c9d6e4;
	--egt-green-light: #46bf94;
}

/* ---- "On dark background" style toggle (light text) ---- */
.is-style-on-dark .eg-testi__title a { color: #fff; }
.is-style-on-dark .eg-testi__title a:hover { color: var(--egt-green-light); }
.is-style-on-dark .eg-testi__excerpt { color: var(--egt-on-dark); }
.is-style-on-dark .eg-testi__more { color: var(--egt-green-light); }
.is-style-on-dark .eg-testi__more:hover { color: #fff; }
.is-style-on-dark .eg-testi__tag {
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.22);
}
.is-style-on-dark .eg-testi__tag:hover { color: var(--egt-green-light); }

/* When the insertable block is wide/full, keep the cards centered + contained.
   The wrapper can break out wider than the viewport (nested alignfull); constrain
   it and center the inner content so the grid stays symmetric on mobile. */
.wp-block-eastgate-latest-testimonies {
	max-width: 100%;
	margin-inline: auto;
}
.wp-block-eastgate-latest-testimonies .eg-testimonies {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	box-sizing: border-box;
}

.eg-testi-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.25rem, 3vw, 2rem);
}
@media (max-width: 900px) {
	.eg-testi-grid { grid-template-columns: 1fr 1fr; }
	/* Side gutter so cards don't touch the screen edges when the block goes full-bleed. */
	.wp-block-eastgate-latest-testimonies { padding-inline: 1.25rem; }
	/* Same gutter on the single testimony view (title, video, content, tags). */
	.single-testimony main.wp-block-group { padding-inline: 1.25rem; }
}
@media (max-width: 600px) {
	.eg-testi-grid { grid-template-columns: 1fr; }
}

.eg-testi {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.eg-testi__video {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--egt-radius);
	overflow: hidden;
	background: var(--egt-navy);
	cursor: pointer;
}
.eg-testi__video.is-empty { cursor: default; }
.eg-testi__video img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}
.eg-testi__video:hover img { transform: scale(1.03); }
.eg-testi__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--egt-navy) 0%, var(--egt-navy-deep) 100%);
}
.eg-testi__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.eg-testi__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	display: grid;
	place-items: center;
	transition: background 0.15s ease;
}
.eg-testi__play::after {
	content: "";
	width: 0;
	height: 0;
	margin-left: 4px;
	border-style: solid;
	border-width: 9px 0 9px 14px;
	border-color: transparent transparent transparent var(--egt-navy);
}
.eg-testi__video:hover .eg-testi__play { background: var(--egt-green); }
.eg-testi__video:hover .eg-testi__play::after { border-left-color: #fff; }

.eg-testi__title {
	font-family: var(--egt-display);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.15;
	margin: 0.2rem 0 0;
}
.eg-testi__title a {
	color: var(--egt-navy);
	text-decoration: none;
}
.eg-testi__title a:hover { color: var(--egt-green); }

.eg-testi__more {
	align-self: flex-start;
	font-family: var(--egt-display);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	font-size: 0.78rem;
	color: var(--egt-green);
	text-decoration: none;
}
.eg-testi__more:hover { color: var(--egt-navy); }

.eg-testi-filter {
	font-size: 0.95rem;
	color: var(--egt-muted);
	margin: 0 0 0.5rem;
}
.eg-testi-filter a { color: var(--egt-green); }
.eg-testi-empty {
	color: var(--egt-muted);
	padding: 2rem 0;
}
.eg-testi__excerpt {
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--egt-muted);
	margin: 0;
}
.eg-testi__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.15rem;
}
.eg-testi__tag {
	font-family: var(--egt-display);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.66rem;
	font-weight: 700;
	color: var(--egt-navy);
	background: var(--egt-surface);
	border: 1px solid var(--egt-border);
	padding: 0.2rem 0.5rem;
	border-radius: 0.3rem;
	text-decoration: none;
}
.eg-testi__tag:hover { color: var(--egt-green); }

/* ---- archive pagination ---- */
.eg-testi-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-top: clamp(2rem, 4vw, 3rem);
}
.eg-testi-pagination .page-numbers {
	font-family: var(--egt-display);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	font-size: 0.82rem;
	color: var(--egt-navy);
	background: var(--egt-surface);
	border: 1px solid var(--egt-border);
	padding: 0.45rem 0.8rem;
	border-radius: 0.3rem;
	text-decoration: none;
	transition: color 0.15s ease, background 0.15s ease;
}
.eg-testi-pagination a.page-numbers:hover { color: var(--egt-green); }
.eg-testi-pagination .page-numbers.current {
	color: #fff;
	background: var(--egt-navy);
	border-color: var(--egt-navy);
}
.eg-testi-pagination .page-numbers.dots {
	background: transparent;
	border-color: transparent;
}

/* ---- single testimony video ---- */
.eg-testi-single__video {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--egt-radius);
	overflow: hidden;
	background: #000;
	box-shadow: 0 20px 44px -22px rgba(15, 35, 64, 0.5);
}
.eg-testi-single__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
/* Click-to-load facade: poster still + play button until the visitor clicks. */
.eg-testi-single__video[data-video] { cursor: pointer; }
.eg-testi-single__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.eg-testi-single__video:hover .eg-testi__play,
.eg-testi-single__video:focus-visible .eg-testi__play { background: var(--egt-green); }
.eg-testi-single__video:hover .eg-testi__play::after,
.eg-testi-single__video:focus-visible .eg-testi__play::after { border-left-color: #fff; }
