/* =============================================================================
   FCC Blog Rebuild — blog.css
   All styles scoped to .fcc-blog-* BEM classes.
   Uses existing FCC CSS custom properties — no new colours or fonts.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   HERO
   ----------------------------------------------------------------------------- */

.fcc-blog-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding: 3rem 0 2rem;
}

.fcc-blog-hero__statement {
	flex: 1 1 40%;
}

.fcc-blog-hero__right {
	flex: 1 1 55%;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* Browse-by-topic chips */
.fcc-topic-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.fcc-topic-chip {
	display: inline-block;
	padding: 0.35rem 0.9rem;
	border: 1px solid var(--e-global-color-primary, #1a56a0);
	border-radius: 999px;
	font-size: 0.875rem;
	color: var(--e-global-color-primary, #1a56a0);
	text-decoration: none;
	transition: background-color 0.15s, color 0.15s;
}

.fcc-topic-chip:hover {
	background-color: var(--e-global-color-primary, #1a56a0);
	color: #fff;
}

.facetwp-facet.facetwp-type-search {
	line-height: 1;
	margin-bottom: 0;
}
.facetwp-type-search span.facetwp-input-wrap {
    border: 0;
    border-radius: 10px;
    overflow: hidden;
	width: 100%;
}
.facetwp-facet.facetwp-type-search:has(input.facetwp-search:hover):before {
    background: var(--e-global-color-accent);
    content: '';
    height: 2px;
    left: 20%;
    position: absolute;
    top: calc(100% + 6px);
    width: calc(60% - 50px);
}
.facetwp-facet.facetwp-type-search:has(input.facetwp-search:hover) .facetwp-input-wrap {
	box-shadow :0 6px 24px rgba(0, 0, 0, 0.12);
}
.facetwp-facet.facetwp-type-search:has(input.facetwp-search:is(:focus, :focus-visible)) .facetwp-input-wrap {
    outline: 2px solid #000;
    outline-offset: 2px;
}
.facetwp-facet.facetwp-type-search input.facetwp-search {
    border: 0;
    padding: 12px 60px 12px 16px;
}
.facetwp-facet.facetwp-type-search input.facetwp-search:is(:hover, :focus, :focus-visible) {
	border: 0;
	outline: 0;
}

.facetwp-type-search i.facetwp-icon {
    background-color: var(--e-global-color-accent);
    opacity: 1;
}
.facetwp-type-search i.facetwp-icon:hover {
    background-color: #fff;
    box-shadow: inset 0 0 0px 2px var(--e-global-color-accent);
    border-radius: 0 10px 10px 0;
}
.facetwp-type-search .facetwp-icon:before {
	-webkit-mask: url("../../../../plugins/facetwp/assets/images/icon-search.png") no-repeat center / 16px 16px;
	mask: url("../../../../plugins/facetwp/assets/images/icon-search.png") no-repeat center / 16px 16px;
	background: none;
	background-color: var( --e-global-color-dbe21a8 );
	width: 50px;
}



.e-con.e-parent:has(.fcc-blog-grid-wrap):before {
	background: var(--e-global-color-0dd5c1c);
    content: '';
    display: block;
    height: 100%;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
	transition: background var(--overlay-transition, .3s), border-radius var(--border-transition, .3s), opacity var(--overlay-transition, .3s);
    visibility: hidden;
    width: 100%;
    z-index: 10;
}
.e-con.e-parent:has(.fcc-blog-grid-wrap):has(.facetwp-facet.is-loading)::before,
.e-con.e-parent:has(.fcc-blog-grid-wrap):has(.facetwp-template.e-load-more-pagination-loading):before {
	opacity: 0.7;
	visibility: visible;
}
.e-con.e-parent:has(.fcc-blog-grid-wrap):after {
    background-color: #fff;
    background-image: url('/wp-content/uploads/2026/07/FCC-Logo-Main_Tagline-CMYK_Registered-R.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 70%;
    border-radius: 50%;
    content: '';
    display: block;
    height: 200px;
    left: 50%;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 100px;
    transform: translateX(-50%);
    visibility: hidden;
    width: 200px;
    z-index: 11;
}
@media (prefers-reduced-motion: no-preference) {
	.e-con.e-parent:has(.fcc-blog-grid-wrap):after {
		animation: rotateInfinite 4s linear infinite;
	}
  }
.e-con.e-parent:has(.fcc-blog-grid-wrap):has(.facetwp-facet.is-loading)::after,
.e-con.e-parent:has(.fcc-blog-grid-wrap):has(.facetwp-template.e-load-more-pagination-loading):after {
    opacity: 1;
	visibility: visible;
}

@keyframes rotateInfinite {
	from {
		transform: translateX(-50%) rotate(0deg);
	}

	to {
		transform: translateX(-50%) rotate(360deg);
	}
}

/* -----------------------------------------------------------------------------
   TWO-COLUMN LAYOUT — filter rail + card grid
   ----------------------------------------------------------------------------- */

.fcc-blog-layout {
	display: grid;
	grid-template-columns: 25% 1fr;
	gap: 2.5rem;
	align-items: start;
}

/* -----------------------------------------------------------------------------
   FILTER RAIL (desktop)
   ----------------------------------------------------------------------------- */

.fcc-filter-rail {
	position: sticky;
	top: 2rem;
	font-family: var(--e-global-typography-text-font-family), Sans-serif;
}

.elementor-widget-html:has(>.fcc-filter-rail) .fcc-filter-rail__title {
	font-size: 20px;
	font-weight: 700;
    line-height: 24px;
    text-transform: capitalize;

	color: var( --e-global-color-969937c );
    margin: 0 0 30px;
}
.fcc-filter-rail__heading {
	font-size: 16px;
	font-weight: 700;
    line-height: 24px;
	text-transform: uppercase;

	color: var( --e-global-color-969937c );
    margin: 0 0 10px;
}

.fcc-filter-rail__heading:first-child {
	margin-top: 0;
}

/* FacetWP overrides — rail */

.elementor-widget-html:has(>.fcc-filter-rail) .facetwp-facet {
    margin-bottom: 30px;
}
.elementor-widget-html:has(>.fcc-filter-rail) .facetwp-type-radio {
    display: flex;
    flex-direction: column;
}

.elementor-widget-html:has(>.fcc-filter-rail)  .facetwp-radio {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    margin: 0;
	background-image: none;
    border-left: 3px solid transparent;
	padding: 8px;
}

.elementor-widget-html:has(>.fcc-filter-rail)  .facetwp-radio.checked, .elementor-widget-html:has(>.fcc-filter-rail)  .facetwp-radio:hover {
	background-image: none;
    background-color: #E1ECE9;
    border-color: #0D466C;
}

.elementor-widget-html:has(>.fcc-filter-rail)  .facetwp-checkbox {
	background-image: none;
	display: flex;
	align-items: center;
	gap: 0.4rem;
	cursor: pointer;
	margin-bottom: 0;
	padding: 8px 8px 8px 34px;
	position: relative;
}
.elementor-widget-html:has(>.fcc-filter-rail)  .facetwp-checkbox.checked, .elementor-widget-html:has(>.fcc-filter-rail)  .facetwp-checkbox:is(:hover, :focus, :focus-visible) {
	background-image: none;
	background-color: #E1ECE9;
	color: var(--e-global-color-primary, #1a56a0);
}
.elementor-widget-html:has(>.fcc-filter-rail) .facetwp-checkbox::before {
	content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    border: 1px solid #000000;
    background: #fff;
    box-sizing: border-box;
}
.elementor-widget-html:has(>.fcc-filter-rail) .facetwp-checkbox.checked::after {
	font-weight: 700;
	content: "\2713"/" ";
    position: absolute;
    left: 8px;
    margin-top: -1px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4em;
    line-height: 1;
    color: var(--e-global-color-969937c);
    pointer-events: none;
}


.elementor-widget-html:has(>.fcc-filter-rail)  .facetwp-counter {
	font-size: 0.8rem;
	color: var(--e-global-color-text, #888);
	margin-left: auto;
}

.elementor-widget-html:has(>.fcc-filter-rail)  .facetwp-facet.facetwp-type-reset {
	margin-top: 20px;
	margin-bottom: 0;
}
.elementor-widget-html:has(>.fcc-filter-rail)  button.facetwp-reset {
    font-size: .9em;
    line-height: 1;
    background: none;
    border: 2px solid var(--e-global-color-accent);
    padding: 12px;
    width: 100%;
}
.elementor-widget-html:has(>.fcc-filter-rail)  button.facetwp-reset:is(:hover, :focus, :focus-visible) {
	background-color: var(--e-global-color-accent);
	color: var(--e-global-color-dbe21a8);
}
.elementor-widget-html:has(>.fcc-filter-rail)  button.facetwp-reset:is(:focus, :focus-visible) {
	outline-offset: 2px;
}

/* Mobile filter trigger — hidden on desktop */
.fcc-filter-trigger {
	display: none;
}



/* -----------------------------------------------------------------------------
   MOBILE DRAWER
   ----------------------------------------------------------------------------- */

.fcc-filter-drawer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: #fff;
	border-radius: 1rem 1rem 0 0;
	padding: 1.5rem 1.25rem 2rem;
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
	transform: translateY(100%);
	transition: transform 0.28s ease;
	max-height: 80vh;
	overflow-y: auto;
}

.fcc-filter-drawer.is-open {
	transform: translateY(0);
}

.fcc-filter-drawer__handle {
	width: 2.5rem;
	height: 4px;
	border-radius: 2px;
	background: #ccc;
	margin: 0 auto 1rem;
}

.fcc-filter-drawer .fcc-filter-drawer__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    color: var(--e-global-color-text, #444);
    padding: 10px 17px;
    line-height: 1;
}

/* Overlay when drawer is open */
body.fcc-drawer-open::before {
	content: '';
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 9998;
}

/* -----------------------------------------------------------------------------
   CARD GRID
   ----------------------------------------------------------------------------- */

.fcc-blog-grid,
.fcc-related-posts {
	font-family: var(--e-global-typography-text-font-family), Sans-serif;

	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.75rem;
}

/* Related posts always render 4 cards; only the tablet 2-col layout shows
   all 4 (2 full rows). Desktop (3-col) and mobile (1-col) show just 3. */
.fcc-related-posts > :nth-child(4) {
	display: none;
}

@media ( min-width: 768px ) and ( max-width: 1024px ) {
	.fcc-related-posts > :nth-child(4) {
		display: block;
	}
}

.fcc-blog-grid__no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 3rem 0;
	color: var(--e-global-color-text, #666);
}

/* -----------------------------------------------------------------------------
   POST CARD
   ----------------------------------------------------------------------------- */

.fcc-post-card {
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
	transition: box-shadow 0.2s;
	background: #fff;
	transition: transform 0.3s ease-in-out;
}

.fcc-post-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}
.fcc-post-card:has(.fcc-post-card__link:is(:hover, :focus, :focus-visible)) {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
	transform: translateY(-3%);
}
.fcc-post-card:has(.fcc-post-card__link:is(:focus, :focus-visible)) {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    outline: 2px solid var(--e-global-color-c28e1fe);
}

/* --- Featured image --- */
.fcc-post-card__image {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	position: relative;
	display: flex;
    align-items: center;
    justify-content: center;
}

.fcc-post-card .fcc-post-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	max-height: initial;
}
.fcc-post-card .fcc-post-card__image.fcc-post-card__image--white-header img {
    width: 140%;
    height: 138%;
    position: absolute;
    inset: 0;
    top: -38%;
}
.fcc-post-card .fcc-post-card__image.fcc-post-card__image--white-header-extended img {
    width: 150%;
    height: 148%;
    position: absolute;
    inset: 0;
    top: -48%;
}
.fcc-post-card .fcc-post-card__image.fcc-post-card__image--blue-header img {
    width: 150%;
	height: 150%;
    position: absolute;
    inset: 0;
    top: -50%;
}
.fcc-post-card .fcc-post-card__image.fcc-post-card__image--blue-header-extended img {
    width: 160%;
	height: 160%;
    position: absolute;
    inset: 0;
    top: -60%;
}
.fcc-post-card .fcc-post-card__image.fcc-post-card__image--no-image img {
    height: 90%;
    object-fit: contain;
	width: 90%;
}

/* White text band at top — push image down to hide it */
.fcc-post-card__image--white-header img,
.fcc-post-card__image--white-header-extended img {
	object-position: center 18%;
}

/* Blue (taller) text band — push further */
.fcc-post-card__image--blue-header img,
.fcc-post-card__image--blue-header-extended img {
	object-position: center 28%;
}

/* Clean image — natural crop */
.fcc-post-card__image--clean img {
	object-position: center center;
}

/* --- Card body --- */
.fcc-post-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.125rem 1.25rem 1.25rem;
	gap: 0.5rem;
}

/* Category pill */
.fcc-post-card__category {
    font-size: 10px;
	font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
	text-transform: uppercase;


	background-color: #E1ECE9;
	color: var(--e-global-color-969937c, #1a56a0);
    display: inline-flex;
    align-self: flex-start;
    border-radius: 100px;
    padding: 4px 10px 3px;
}

/* Title */
.fcc-post-card h3.fcc-post-card__title {
    margin: 0 0 6px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Excerpt */
.fcc-post-card__excerpt {
	font-size: 15px;
	line-height: 22px;
	margin: 0;
	color: var(--e-global-color-text, #555);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Meta row */
.fcc-post-card__meta {
	margin-top: auto;
	padding-top: 0.5rem;
	display: flex;
	flex-direction: column;
    align-items: flex-start;
	gap: 0.35rem;
    font-size: 14px;
	color: var(--e-global-color-text, #888);
}

.fcc-post-card__reviewer {
	color: var(--e-global-color-969937c, #1a56a0);
	font-weight: 700;
    line-height: 1.4;

	display: flex;
	flex-direction: column;
	gap: 0;
}

.fcc-post-card__date {
	white-space: nowrap;
}

/* CTA */
.fcc-post-card__cta {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--e-global-color-primary, #1a56a0);
	margin-top: 0.25rem;
}

/* -----------------------------------------------------------------------------
   FACETWP PAGER
   ----------------------------------------------------------------------------- */

.fcc-blog-pager {
	margin-top: 2.5rem;
	display: flex;
	justify-content: center;
}

.fcc-blog-pager .facetwp-pager {
	display: flex;
	gap: 0.35rem;
}

.fcc-blog-pager .facetwp-page {
	min-width: 2.25rem;
	height: 2.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--e-global-color-c28e1fe);
	border-radius: 0.35rem;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
	font-weight: 700;
}

.fcc-blog-pager .facetwp-page.dots {
	border: 0;
    min-width: initial;
    padding: 0;
}
.fcc-blog-pager .facetwp-page:not(.dots):hover {
	background-color: var(--e-global-color-f42da9f);
	color: var(--e-global-color-969937c, #0D466C);
}

.fcc-blog-pager .facetwp-page.active {
	background: var(--e-global-color-969937c, #0D466C);
	border-color: var(--e-global-color-969937c, #0D466C);
	color: #fff;
	pointer-events: none;
}

/* -----------------------------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------------------------- */

@media ( max-width: 1024px ) {
	.fcc-blog-grid,
	.fcc-related-posts {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media ( max-width: 767px ) {

	.fcc-blog-hero {
		flex-direction: column;
		padding: 2rem 0 1.5rem;
	}

	.fcc-blog-layout {
		grid-template-columns: 1fr;
	}

	/* Hide desktop filter rail on mobile */
	.fcc-filter-rail {
		display: none;
	}

	/* Show sticky filter button */
	.fcc-filter-rail + .fcc-filter-trigger {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		background: var( --e-global-color-accent );
	    color: var(--e-global-color-dbe21a8);
		border: none;
		border-radius: 999px;
		cursor: pointer;
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
		font-size: .9em;
		line-height: 1;
		justify-content: center;
		padding: 12px 12px 12px 12px;
		width: 100%;
	}
	.fcc-filter-rail + .fcc-filter-trigger:is(:hover, :focus, :focus-visible) {
		background-color: #DA8527BF;
	    color: var(--e-global-color-dbe21a8);
	}
	.fcc-blog-grid,
	.fcc-related-posts {
		grid-template-columns: 1fr;
	}


	.elementor-widget-html:has(>.fcc-filter-rail) .facetwp-radio {
		padding: 5px 8px;
	}
	.elementor-widget-html:has(>.fcc-filter-rail) .facetwp-facet {
		margin-bottom: 20px;
	}
	.elementor-widget-html:has(>.fcc-filter-rail) .facetwp-checkbox {
		padding: 5px 8px 5px 34px;
	}
}
