/**
 * Cinergy Growth – New Layout Blocks CSS
 *
 * Covers:
 *   .layout_block.upcoming_event
 *   .layout_block.testimonials_grid
 *
 * Conventions:
 *   - BEM-flavored selectors under spm- prefix
 *   - CSS custom properties aligned to theme palette
 *   - Responsive breakpoints: 1024px (tablet) and 768px (mobile)
 *   - Font: Archivo (variable, 100–900)
 *
 * @package CinergyGrowth
 */

/* =========================================================================
   0. CSS CUSTOM PROPERTIES (theme palette reference)
   ========================================================================= */

:root {
	--spm-color-red:        #de454f;
	--spm-color-yellow:     #ffcb05;
	--spm-color-acid-green: #deda45;
	--spm-color-blue:       #45a7dd;
	--spm-color-light-grey: #f2f2f2;
	--spm-color-dark-grey:  #4c5364;
	--spm-color-near-black: #1b1726;

	/* Block-level spacing */
	--spm-block-padding-v:  80px;
	--spm-block-padding-h:  60px;

	/* Card */
	--spm-card-radius:      12px;
	--spm-card-shadow:      0 4px 24px rgba(0, 0, 0, 0.08);
	--spm-card-shadow-hover:0 8px 40px rgba(0, 0, 0, 0.15);

	/* Transition */
	--spm-transition:       0.25s ease;
}

/* =========================================================================
   1. UPCOMING EVENT BLOCK
   ========================================================================= */

/* --- Container ------------------------------------------------------------ */

.layout_block.upcoming_event {
	position:            relative;
	background-color:    var(--spm-color-near-black);
	background-size:     cover;
	background-position: center center;
	background-repeat:   no-repeat;
	overflow:            hidden;
	padding:             var(--spm-block-padding-v) var(--spm-block-padding-h);
}

/* Dark overlay when a background image is present */
.layout_block.upcoming_event::before {
	content:    '';
	position:   absolute;
	inset:      0;
	background: linear-gradient(
		100deg,
		rgba(27, 23, 38, 0.97) 40%,
		rgba(27, 23, 38, 0.7)  100%
	);
	z-index:    0;
}

.layout_block.upcoming_event > * {
	position: relative;
	z-index:  1;
}

/* --- Inner two-column grid ------------------------------------------------- */

.spm-upcoming-event__inner.columns {
	display:         flex;
	flex-wrap:       wrap;
	align-items:     center;
	gap:             48px;
	max-width:       1200px;
	margin:          0 auto;
}

.spm-upcoming-event__inner.columns > .column {
	width:           auto;
	margin:          0;
}

.spm-upcoming-event__details {
	flex:            0 0 calc(60% - 24px);
	max-width:       calc(60% - 24px);
	color:           #ffffff;
}

.spm-upcoming-event__visual {
	flex:            0 0 calc(40% - 24px);
	max-width:       calc(40% - 24px);
}

/* --- Label ----------------------------------------------------------------- */

.spm-upcoming-event__label {
	display:         inline-block;
	font-family:     'Archivo', sans-serif;
	font-size:       11px;
	font-weight:     700;
	letter-spacing:  0.18em;
	text-transform:  uppercase;
	color:           var(--spm-color-blue);
	margin:          0 0 16px;
	padding:         5px 12px;
	border:          1px solid rgba(69, 167, 221, 0.35);
	border-radius:   4px;
}

/* --- Event title ----------------------------------------------------------- */

.spm-upcoming-event__title {
	font-family:     'Archivo', sans-serif;
	font-size:       clamp(28px, 3.5vw, 48px);
	font-weight:     800;
	line-height:     1.15;
	color:           #ffffff;
	margin:          0 0 24px;
}

/* --- Meta list ------------------------------------------------------------- */

.spm-upcoming-event__meta {
	list-style:  none;
	margin:      0 0 24px;
	padding:     0;
}

.spm-upcoming-event__meta-item {
	display:         flex;
	align-items:     flex-start;
	gap:             10px;
	font-family:     'Archivo', sans-serif;
	font-size:       15px;
	font-weight:     400;
	color:           rgba(255, 255, 255, 0.8);
	margin-bottom:   10px;
	line-height:     1.5;
}

.spm-upcoming-event__meta-icon {
	display:         flex;
	align-items:     center;
	color:           var(--spm-color-blue);
	flex-shrink:     0;
	margin-top:      2px;
}

/* --- Description ----------------------------------------------------------- */

.spm-upcoming-event__description {
	font-family:     'Archivo', sans-serif;
	font-size:       16px;
	font-weight:     400;
	line-height:     1.7;
	color:           rgba(255, 255, 255, 0.7);
	margin-bottom:   32px;
}

.spm-upcoming-event__description p:last-child {
	margin-bottom: 0;
}

/* --- Countdown timer ------------------------------------------------------- */

.spm-upcoming-event__countdown {
	margin-bottom: 36px;
}

.spm-upcoming-event__countdown-units {
	display:         flex;
	align-items:     center;
	gap:             4px;
}

.spm-upcoming-event__countdown-unit {
	display:         flex;
	flex-direction:  column;
	align-items:     center;
	background:      rgba(255, 255, 255, 0.07);
	border:          1px solid rgba(69, 167, 221, 0.2);
	border-radius:   8px;
	padding:         12px 18px;
	min-width:       72px;
}

.spm-upcoming-event__countdown-number {
	display:         block;
	font-family:     'Archivo', sans-serif;
	font-size:       32px;
	font-weight:     800;
	line-height:     1;
	color:           var(--spm-color-blue);
	letter-spacing:  -0.02em;
}

.spm-upcoming-event__countdown-label {
	display:         block;
	font-family:     'Archivo', sans-serif;
	font-size:       10px;
	font-weight:     600;
	letter-spacing:  0.12em;
	text-transform:  uppercase;
	color:           rgba(255, 255, 255, 0.45);
	margin-top:      4px;
}

.spm-upcoming-event__countdown-sep {
	font-family:     'Archivo', sans-serif;
	font-size:       28px;
	font-weight:     800;
	color:           rgba(69, 167, 221, 0.4);
	margin-bottom:   14px;
	user-select:     none;
}

/* Countdown — event has passed / ended */
.spm-upcoming-event__countdown--ended .spm-upcoming-event__countdown-number {
	color: var(--spm-color-acid-green);
}

/* --- CTA button ------------------------------------------------------------ */

.spm-upcoming-event__cta {
	display:         inline-flex;
	align-items:     center;
	gap:             8px;
	/* .spm_buttony handles base bg/color — we only add specifics here */
	font-size:       15px;
	font-weight:     700;
	letter-spacing:  0.03em;
	transition:      transform var(--spm-transition),
	                 box-shadow var(--spm-transition);
}

.spm-upcoming-event__cta:hover,
.spm-upcoming-event__cta:focus-visible {
	transform:   translateY(-2px);
	box-shadow:  0 6px 24px rgba(222, 218, 69, 0.35);
}

.spm-upcoming-event__cta-arrow {
	transition:  transform var(--spm-transition);
}

.spm-upcoming-event__cta:hover .spm-upcoming-event__cta-arrow {
	transform: translateX(4px);
}

/* --- Visual / image -------------------------------------------------------- */

.spm-upcoming-event__image-wrap {
	border-radius:   16px;
	overflow:        hidden;
	box-shadow:      0 20px 60px rgba(0, 0, 0, 0.45);
}

.spm-upcoming-event__graphic {
	display:         block;
	width:           100%;
	height:          auto;
	object-fit:      cover;
}

.spm-upcoming-event__image-placeholder {
	border-radius:   16px;
	overflow:        hidden;
	border:          1px solid rgba(69, 167, 221, 0.2);
}

.spm-upcoming-event__image-placeholder svg {
	display:   block;
	width:     100%;
	height:    auto;
}

/* --- Fallback "Stay Tuned" layout ------------------------------------------ */

.spm-upcoming-event__fallback {
	display:         flex;
	flex-wrap:       wrap;
	align-items:     center;
	gap:             48px;
	max-width:       1200px;
	margin:          0 auto;
}

.spm-upcoming-event__fallback-content {
	flex:       1 1 420px;
	color:      #ffffff;
}

.spm-upcoming-event__fallback-text {
	font-family:     'Archivo', sans-serif;
	font-size:       17px;
	font-weight:     400;
	line-height:     1.7;
	color:           rgba(255, 255, 255, 0.7);
	margin:          0 0 32px;
}

.spm-upcoming-event__fallback-visual {
	flex:            0 0 300px;
}

.spm-upcoming-event__fallback-visual svg {
	display: block;
	width:   100%;
	height:  auto;
}

/* --- Email signup form ----------------------------------------------------- */

.spm-upcoming-event__signup-form {
	width: 100%;
}

.spm-upcoming-event__signup-row {
	display:   flex;
	flex-wrap: wrap;
	gap:       12px;
}

.spm-upcoming-event__signup-input {
	flex:                1 1 220px;
	font-family:         'Archivo', sans-serif;
	font-size:           15px;
	font-weight:         400;
	color:               #ffffff;
	background:          rgba(255, 255, 255, 0.08);
	border:              1px solid rgba(255, 255, 255, 0.2);
	border-radius:       6px;
	padding:             12px 16px;
	outline:             none;
	transition:          border-color var(--spm-transition),
	                     background  var(--spm-transition);
}

.spm-upcoming-event__signup-input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.spm-upcoming-event__signup-input:focus {
	border-color: var(--spm-color-blue);
	background:   rgba(69, 167, 221, 0.08);
}

.spm-upcoming-event__signup-btn {
	flex-shrink:  0;
	font-size:    15px;
	font-weight:  700;
	white-space:  nowrap;
	transition:   transform var(--spm-transition),
	              box-shadow var(--spm-transition);
}

.spm-upcoming-event__signup-btn:hover,
.spm-upcoming-event__signup-btn:focus-visible {
	transform:  translateY(-2px);
	box-shadow: 0 6px 20px rgba(69, 167, 221, 0.35);
}

/* =========================================================================
   2. TESTIMONIALS GRID BLOCK
   ========================================================================= */

/* --- Container ------------------------------------------------------------ */

.layout_block.testimonials_grid {
	background-color: var(--spm-color-light-grey);
	padding:          var(--spm-block-padding-v) var(--spm-block-padding-h);
}

/* --- Section header -------------------------------------------------------- */

.spm-tg__header {
	text-align:    center;
	margin-bottom: 56px;
}

/* Reuse theme's .section_title — inherits 800 weight, 36px, colored span */
.spm-tg__header .section_title {
	margin-bottom: 12px;
}

.spm-tg__title-bar {
	width:        56px;
	height:       4px;
	background:   var(--spm-color-blue);
	border-radius:2px;
	margin:       0 auto;
}

/* --- Grid ------------------------------------------------------------------ */

.spm-tg__grid {
	display:               grid;
	grid-template-columns: repeat(3, 1fr);
	gap:                   28px;
	max-width:             1200px;
	margin:                0 auto 48px;
}

/* --- Individual card ------------------------------------------------------- */

.spm-tg-card {
	position:         relative;
	background:       #ffffff;
	border-radius:    var(--spm-card-radius);
	box-shadow:       var(--spm-card-shadow);
	padding:          36px 32px 28px;
	display:          flex;
	flex-direction:   column;
	transition:       transform var(--spm-transition),
	                  box-shadow var(--spm-transition);

	/* Scroll fade-in: starts hidden, JS adds .spm-tg-card--visible */
	opacity:          0;
	transform:        translateY(24px);
}

/* Cards visible immediately when JS is not available / prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.spm-tg-card {
		opacity:   1;
		transform: none;
		transition: none;
	}
}

.spm-tg-card.spm-tg-card--visible {
	opacity:   1;
	transform: translateY(0);
	transition: opacity 0.5s ease, transform 0.5s ease,
	            box-shadow 0.25s ease;
}

/* Cards that are hidden by Load More start at opacity 0 even after
   the scroll animation has set --visible */
.spm-tg-card.spm-tg-card--hidden {
	display: none;
}

.spm-tg-card:hover {
	transform:  translateY(-4px);
	box-shadow: var(--spm-card-shadow-hover);
}

/* When card is both visible AND hovered */
.spm-tg-card.spm-tg-card--visible:hover {
	transform:  translateY(-4px);
}

/* --- Decorative quote mark ------------------------------------------------- */

.spm-tg-card__quote-mark {
	position:    absolute;
	top:         16px;
	left:        24px;
	font-family: Georgia, 'Times New Roman', serif;
	font-size:   80px;
	line-height: 1;
	color:       var(--spm-color-blue);
	opacity:     0.13;
	user-select: none;
	pointer-events: none;
}

/* --- Star rating ----------------------------------------------------------- */

.spm-tg-card__stars {
	display:       flex;
	align-items:   center;
	gap:           3px;
	margin-bottom: 14px;
}

.spm-tg-card__star {
	display:      inline-flex;
	line-height:  1;
}

/* --- Quote text ------------------------------------------------------------ */

.spm-tg-card__quote {
	flex:          1;
	margin:        0 0 24px;
	padding:       0;
	border:        none;
}

.spm-tg-card__quote p {
	font-family:   'Archivo', sans-serif;
	font-size:     15px;
	font-weight:   400;
	line-height:   1.75;
	color:         var(--spm-color-dark-grey);
	margin:        0;
}

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

.spm-tg-card__footer {
	display:         flex;
	align-items:     center;
	gap:             14px;
	padding-top:     20px;
	border-top:      1px solid rgba(0, 0, 0, 0.07);
	margin-top:      auto;
}

/* --- Avatar: photo --------------------------------------------------------- */

.spm-tg-card__avatar {
	width:         85px;
	height:        85px;
	border-radius: 50%;
	object-fit:    cover;
	flex-shrink:   0;
	border:        2px solid rgba(69, 167, 221, 0.2);
}

/* --- Avatar: initials fallback --------------------------------------------- */

.spm-tg-card__avatar--initials {
	display:          flex;
	align-items:      center;
	justify-content:  center;
	background:       var(--spm-color-near-black);
	color:            var(--spm-color-blue);
	font-family:      'Archivo', sans-serif;
	font-size:        26px;
	font-weight:      800;
	letter-spacing:   -0.02em;
}

/* --- Author text ----------------------------------------------------------- */

.spm-tg-card__author {
	display:        flex;
	flex-direction: column;
	gap:            3px;
	min-width:      0; /* allow text truncation */
}

.spm-tg-card__name {
	display:         block;
	font-family:     'Archivo', sans-serif;
	font-size:       15px;
	font-weight:     700;
	font-style:      normal;
	color:           var(--spm-color-near-black);
	white-space:     nowrap;
	overflow:        hidden;
	text-overflow:   ellipsis;
}

.spm-tg-card__meta {
	display:         block;
	font-family:     'Archivo', sans-serif;
	font-size:       13px;
	font-weight:     400;
	color:           var(--spm-color-dark-grey);
	opacity:         0.8;
	white-space:     nowrap;
	overflow:        hidden;
	text-overflow:   ellipsis;
}

/* --- Load More ------------------------------------------------------------- */

.spm-tg__load-more-wrap {
	text-align:    center;
	margin-top:    16px;
}

.spm-tg__load-more-btn {
	display:        inline-flex;
	align-items:    center;
	gap:            8px;
	transition:     transform var(--spm-transition),
	                box-shadow var(--spm-transition),
	                opacity    var(--spm-transition);
}

.spm-tg__load-more-btn:hover,
.spm-tg__load-more-btn:focus-visible {
	transform:  translateY(-2px);
	box-shadow: 0 6px 20px rgba(69, 167, 221, 0.3);
}

.spm-tg__load-more-btn:disabled,
.spm-tg__load-more-btn[disabled] {
	opacity:      0.5;
	cursor:       not-allowed;
	transform:    none;
	box-shadow:   none;
}

.spm-tg__load-more-count {
	font-weight:  400;
	font-size:    13px;
	opacity:      0.75;
}

/* --- Load More reveal animation ------------------------------------------- */

.spm-tg-card--revealing {
	animation: spmCardReveal 0.45s ease forwards;
}

@keyframes spmCardReveal {
	from {
		opacity:   0;
		transform: translateY(20px);
	}
	to {
		opacity:   1;
		transform: translateY(0);
	}
}

/* =========================================================================
   3. RESPONSIVE — TABLET (max-width: 1024px)
   ========================================================================= */

@media screen and (max-width: 1024px) {

	/* Upcoming Event */
	.layout_block.upcoming_event {
		padding: 60px 40px;
	}

	.spm-upcoming-event__details {
		flex:      0 0 100%;
		max-width: 100%;
	}

	.spm-upcoming-event__visual {
		flex:      0 0 100%;
		max-width: 100%;
		order:     -1; /* image above content on tablet */
	}

	.spm-upcoming-event__image-wrap,
	.spm-upcoming-event__image-placeholder {
		max-width: 480px;
		margin:    0 auto;
	}

	/* Testimonials Grid */
	.layout_block.testimonials_grid {
		padding: 60px 40px;
	}

	.spm-tg__grid {
		grid-template-columns: repeat(2, 1fr);
		gap:                   24px;
	}

	.spm-tg__header {
		margin-bottom: 40px;
	}

	/* Countdown */
	.spm-upcoming-event__countdown-unit {
		min-width:  60px;
		padding:    10px 14px;
	}

	.spm-upcoming-event__countdown-number {
		font-size: 26px;
	}
}

/* =========================================================================
   4. RESPONSIVE — MOBILE (max-width: 768px)
   ========================================================================= */

@media screen and (max-width: 768px) {

	/* Upcoming Event */
	.layout_block.upcoming_event {
		padding: 48px 24px;
	}

	.spm-upcoming-event__inner.columns {
		gap: 32px;
	}

	.spm-upcoming-event__title {
		font-size: 26px;
	}

	.spm-upcoming-event__countdown-units {
		flex-wrap: wrap;
		gap:       8px;
	}

	.spm-upcoming-event__countdown-unit {
		flex:      0 0 calc(50% - 4px);
		min-width: 0;
	}

	.spm-upcoming-event__signup-row {
		flex-direction: column;
	}

	.spm-upcoming-event__signup-input,
	.spm-upcoming-event__signup-btn {
		flex:  0 0 auto;
		width: 100%;
	}

	/* Fallback */
	.spm-upcoming-event__fallback {
		flex-direction: column;
		gap:            32px;
	}

	.spm-upcoming-event__fallback-visual {
		flex:      0 0 auto;
		max-width: 200px;
		margin:    0 auto;
	}

	/* Testimonials Grid */
	.layout_block.testimonials_grid {
		padding: 48px 20px;
	}

	.spm-tg__grid {
		grid-template-columns: 1fr;
		gap:                   20px;
	}

	.spm-tg__header {
		margin-bottom: 32px;
	}

	.spm-tg-card {
		padding: 28px 24px 22px;
	}

	.spm-tg-card__avatar {
		width:  64px;
		height: 64px;
	}

	.spm-tg-card__avatar--initials {
		font-size: 20px;
	}
}

/* =========================================================================
   5. ACCESSIBILITY
   ========================================================================= */

/* Focus rings for keyboard users */
.spm-upcoming-event__cta:focus-visible,
.spm-upcoming-event__signup-btn:focus-visible,
.spm-upcoming-event__signup-input:focus-visible,
.spm-tg__load-more-btn:focus-visible {
	outline:        2px solid var(--spm-color-blue);
	outline-offset: 3px;
}

/* Screen reader only utility (if not already in theme) */
.screen-reader-text {
	clip:       rect(1px, 1px, 1px, 1px);
	clip-path:  inset(50%);
	height:     1px;
	margin:     -1px;
	overflow:   hidden;
	padding:    0;
	position:   absolute;
	width:      1px;
	word-wrap:  normal !important;
}


/* =========================================================================
   MEET THE MEMBER (single rotating client feature)
   ========================================================================= */

.layout_block.meet_the_member .section_header {
	text-align: center;
	margin-bottom: 40px;
}

.layout_block.meet_the_member .pre_title {
	display: inline-block;
	margin: 0 0 8px;
	padding: 4px 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--spm-color-blue, #1e5fa6);
	background: rgba(30, 95, 166, 0.08);
	border-radius: 999px;
}

.layout_block.meet_the_member .section_title {
	margin: 0;
	font-size: 32px;
	line-height: 1.2;
	font-weight: 700;
}

.layout_block.meet_the_member .meet_the_member_card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	padding: 30px 30px 15px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.layout_block.meet_the_member .client_columns {
	display: flex;
	gap: 30px;
	align-items: flex-start;
	font-size: 16px;
}

.layout_block.meet_the_member .column-image {
	flex: 0 0 35%;
	max-width: 35%;
}

.layout_block.meet_the_member .column-description {
	flex: 1 1 auto;
}

.layout_block.meet_the_member .image_container img,
.layout_block.meet_the_member .image_container .image_placeholder {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
	overflow: hidden;
}

.layout_block.meet_the_member .image_container .image_placeholder {
	color: #9aa4b2;
	background: #f4f6f9;
	aspect-ratio: 1 / 1;
}

.layout_block.meet_the_member .header {
	display: flex;
	flex-wrap: wrap;
}

.layout_block.meet_the_member .header .column-primary {
	width: calc(60% - var(--spm-column-gap));
	margin: 0 0 1em;
}

.layout_block.meet_the_member .header .column-contact_information {
	width: calc(40% - var(--spm-column-gap));
	margin: 0 0 1em;
}

.layout_block.meet_the_member .header .column-contact_information i {
	margin-right: 0.3em;
	color: var(--spm-color-dark-grey);
	vertical-align: middle;
	font-size: 1.2em;
}

.layout_block.meet_the_member .title {
	margin: 0 0 8px;
	font-size: 26px;
	line-height: 1.25;
}

.layout_block.meet_the_member .title a {
	color: inherit;
	text-decoration: none;
}

.layout_block.meet_the_member .title a:hover,
.layout_block.meet_the_member .title a:focus {
	color: var(--spm-color-blue, #1e5fa6);
}

.layout_block.meet_the_member .categories,
.layout_block.meet_the_member .address,
.layout_block.meet_the_member .phone_number,
.layout_block.meet_the_member .website,
.layout_block.meet_the_member .map_url {
	margin: 0 0 0.2em;
	font-size: 14px;
	line-height: 1.5;
}

.layout_block.meet_the_member .categories span,
.layout_block.meet_the_member .address span {
	font-weight: 700;
}

.layout_block.meet_the_member .description {
	margin: 0 0 30px;
	color: #4a5562;
	line-height: 1.6;
}

.layout_block.meet_the_member .button_row {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	align-items: center;
}

.layout_block.meet_the_member .button_row .archive_link {
	font-weight: 600;
	text-decoration: none;
}

.layout_block.meet_the_member .button_row .archive_link:hover,
.layout_block.meet_the_member .button_row .archive_link:focus {
	text-decoration: underline;
}

/* Tablet */
@media (max-width: 1024px) {
	.layout_block.meet_the_member .section_title {
		font-size: 28px;
	}

	.layout_block.meet_the_member .title {
		font-size: 22px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.layout_block.meet_the_member {
		padding: 40px 0;
	}

	.layout_block.meet_the_member .client_columns {
		flex-direction: column;
		gap: 20px;
		margin-right: 0; /* override global columns CSS */
	}

	.layout_block.meet_the_member .column-image,
	.layout_block.meet_the_member .column-description {
		flex: 1 1 100%;
		width: 100%; /* override global columns CSS */
		margin-right: 0;
		max-width: 100%;
	}

	.layout_block.meet_the_member .image_container {
		max-width: 280px;
		margin: 0 auto;
	}
}

@media (max-width: 480px) {
	.layout_block.meet_the_member .header {
		display: block;
		margin: 0;
	}
	
	.layout_block.meet_the_member .header .column {
		width: auto !important;
		margin: 0 0 20px;
	}
}
