/**
 * Blog Grid widget styles.
 *
 * Card styles (.ebs-card, .ebs-notch, .ebs-date, .ebs-card-title, .ebs-excerpt,
 * .ebs-view-blog, .ebs-header etc.) are intentionally NOT redefined here —
 * they're shared with the Blog Stories Carousel widget and already live in
 * efp-style.css. This file only covers what's unique to the grid layout:
 * the grid container itself, the Load More button, and numbered pagination.
 *
 * Elementor's own responsive controls (columns / row_gap / column_gap) output
 * inline/generated CSS per breakpoint, so the values below are just sane
 * fallbacks for before that CSS loads or if the widget is rendered outside
 * Elementor (e.g. inside a shortcode).
 */

.ebg-widget {
	width: 100%;
}

.ebg-category-filter {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 0 0 32px;
}

.ebg-category-filter-btn {
    appearance: none;
    background: transparent;
    padding: 9px 18px;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    font-family: "Lato", Sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #231f1a;
    border: 1px var( --e-global-color-87c7420 ) solid;
    border-radius: 4px;
}

.ebg-category-filter-btn:hover,
.ebg-category-filter-btn:focus,
.ebg-category-filter-btn.is-active {
	background: var( --e-global-color-87c7420 );
	color: #ffffff;
	border-color: var( --e-global-color-87c7420 );
}

.ebg-category-filter-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.ebg-category-filter-btn.is-loading {
	opacity: 0.6;
	cursor: progress;
}

.ebg-no-results {
	grid-column: 1 / -1;
	padding: 24px;
	text-align: center;
	border: 1px dashed #c9a25c;
}

.ebg-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	column-gap: 28px;
	row-gap: 32px;
	align-items: stretch;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ebg-grid {
	transition: opacity 0.2s ease;
}

.ebg-grid.ebg-grid-is-loading {
	opacity: 0.5;
	pointer-events: none;
}

.ebg-grid .ebs-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

@media ( max-width: 1024px ) {
	.ebg-grid {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 600px ) {
	.ebg-grid {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------------ */
/* Load More / View All button                                        */
/* ------------------------------------------------------------------ */

.ebg-load-more-wrap,
.ebg-view-all-wrap {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.efpg-button {
	--button-bg: #a5271f;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 32px;
	background-color: var( --button-bg );
	border: none;
	border-radius: 2px;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.efpg-button:hover,
.efpg-button:focus {
	transform: translateY( -1px );
}

.efpg-button .ecg-button-text {
	color: #ffffff;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 14px;
}

.efpg-button.is-loading {
	cursor: progress;
	opacity: 0.7;
	transform: none;
}

.efpg-button:disabled {
	cursor: not-allowed;
}

/* ------------------------------------------------------------------ */
/* Numbered pagination (wp core paginate_links() markup)               */
/* ------------------------------------------------------------------ */

.ebg-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 40px;
	flex-wrap: wrap;
}

.ebg-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid #a5271f;
	border-radius: 2px;
	color: #a5271f;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ebg-pagination .page-numbers.dots {
	border-color: transparent;
	cursor: default;
}

.ebg-pagination .page-numbers.current,
.ebg-pagination .page-numbers:hover {
	background-color: #a5271f;
	color: #ffffff;
}

.ebg-pagination .page-numbers.prev,
.ebg-pagination .page-numbers.next {
	font-size: 18px;
}
