/* =================================================================
   Emerald Blog Archive
   ================================================================= */

.elementor-widget-emerald_blog_archive,
.elementor-widget-emerald_blog_archive > .elementor-widget-container {
	width: 100% !important;
	max-width: 100% !important;
	align-self: stretch !important;
}

.emerald-blog {
	--emerald-blog-cols: 3;
	--emerald-blog-gap: 24px;
	--emerald-blog-accent: #1d5f51;
	--emerald-blog-ink: #1f2d2a;
	display: flex;
	flex-direction: column;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	gap: 28px;
}

/* —— Search —— */
.emerald-blog__search {
	position: relative;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	width: min(100%, 560px);
	margin: 0 auto;
	border-radius: 9999px;
	overflow: visible;
}

.emerald-blog__search-input {
	box-sizing: border-box;
	width: 100%;
	height: 56px;
	padding: 0 64px 0 28px;
	border: 0 !important;
	border-radius: 9999px !important;
	background: #ffffff;
	box-shadow: 0 4px 24px 0 rgba(31, 45, 42, 0.08);
	color: var(--emerald-blog-ink);
	font-family: 'Manrope', sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	outline: 0;
	-webkit-appearance: none;
	appearance: none;
}

.emerald-blog__search-input::-webkit-search-decoration,
.emerald-blog__search-input::-webkit-search-cancel-button,
.emerald-blog__search-input::-webkit-search-results-button,
.emerald-blog__search-input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.emerald-blog__search-input::placeholder {
	color: #9aa5a1;
	opacity: 1;
}

.emerald-blog__search-input:focus {
	box-shadow: 0 4px 24px 0 rgba(31, 45, 42, 0.1), 0 0 0 2px rgba(29, 95, 81, 0.25);
}

.emerald-blog__search-btn {
	position: absolute;
	top: 50%;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--emerald-blog-accent);
	color: #ffffff;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.emerald-blog__search-btn:hover {
	background: #174f43;
}

.emerald-blog__search-btn:focus {
	outline: 0;
}

.emerald-blog__search-btn:focus-visible {
	outline: 2px solid var(--emerald-blog-accent);
	outline-offset: 3px;
}

.emerald-blog__search-btn svg {
	display: block;
}

/* —— Tabs (match FAQ) —— */
.emerald-blog__tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	gap: 10px;
	margin: 0;
	padding: 8px 0 16px 0;
	border-bottom: 1px solid #80808060;
}

.emerald-blog__tab {
	margin: 0;
	padding: 10px 22px;
	border: 0;
	border-radius: 999px;
	background-color: #ffffff;
	box-shadow: 0 2px 10px 0 rgba(31, 45, 42, 0.08);
	color: var(--emerald-blog-ink);
	font-family: 'Manrope', sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.emerald-blog__tab:hover {
	color: var(--emerald-blog-accent);
}

.emerald-blog__tab.is-active,
.emerald-blog__tab.is-active:hover {
	background-color: var(--emerald-blog-accent);
	box-shadow: none;
	color: #ffffff;
}

.emerald-blog__tab:focus {
	outline: 0;
}

.emerald-blog__tab:focus-visible {
	outline: 2px solid var(--emerald-blog-accent);
	outline-offset: 3px;
}

/* —— Grid body + loader —— */
.emerald-blog__body {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	min-height: 120px;
}

.emerald-blog__grid {
	display: grid;
	grid-template-columns: repeat(var(--emerald-blog-cols), minmax(0, 1fr));
	gap: var(--emerald-blog-gap);
	width: 100%;
	transition: opacity 0.2s ease;
}

.emerald-blog.is-loading .emerald-blog__grid {
	opacity: 0.35;
	pointer-events: none;
}

.emerald-blog__loader {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: none;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.emerald-blog.is-loading .emerald-blog__loader {
	display: flex;
}

.emerald-blog__spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(29, 95, 81, 0.18);
	border-top-color: var(--emerald-blog-accent);
	border-radius: 50%;
	animation: emerald-blog-spin 0.7s linear infinite;
}

@keyframes emerald-blog-spin {
	to {
		transform: rotate(360deg);
	}
}

.emerald-blog__empty {
	grid-column: 1 / -1;
	margin: 24px 0;
	color: #6b7773;
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	text-align: center;
}

.emerald-blog-card {
	position: relative;
	display: block;
	box-sizing: border-box;
	width: 100%;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border: 0.61px solid #ffffff54;
	border-radius: 24px;
	background-color: #1d5f51;
	box-shadow: 0 4.92px 19.67px 0 #1f2d2a14;
	color: #ffffff;
	text-decoration: none;
}

.emerald-blog-card:hover,
.emerald-blog-card:focus {
	color: #ffffff;
	text-decoration: none;
}

.emerald-blog-card:focus {
	outline: 0;
}

.emerald-blog-card:focus-visible {
	outline: 2px solid var(--emerald-blog-accent);
	outline-offset: 4px;
}

.emerald-blog-card > .emerald-blog-card__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	max-height: none;
	object-fit: cover;
	object-position: center center;
	transition: transform 0.6s ease;
}

.emerald-blog-card__bg--placeholder {
	background: linear-gradient(160deg, #1d5f51 0%, #2a7a6a 100%);
}

.emerald-blog-card:hover .emerald-blog-card__bg {
	transform: scale(1.05);
}

.emerald-blog-card__badge {
	position: absolute;
	top: 18px;
	left: 18px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	padding: 12px 14px;
	border: 1px solid #ffffff34;
	border-radius: 9999px;
	background: #1d5f5126;
	box-shadow: 0 4.92px 19.67px 0 #1f2d2a14;
	-webkit-backdrop-filter: blur(5.28px);
	backdrop-filter: blur(5.28px);
	color: #ffffff;
	font-family: 'Manrope', sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

/* Glass content panel — flush to card edges (no outer inset) */
.emerald-blog-card__glass {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	box-sizing: border-box;
	min-height: 36%;
	padding: 20px 22px 18px;
	border: 0;
	border-top: 0.61px solid #ffffff54;
	border-radius: 16px 16px 0 0;
	background: #1d5f5126;
	box-shadow: 0 4.92px 19.67px 0 #1f2d2a14;
	-webkit-backdrop-filter: blur(5.28px);
	backdrop-filter: blur(5.28px);
	color: #ffffff;
}

.emerald-blog-card__date {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
	color: #ffffff;
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
}

.emerald-blog-card__cal {
	flex: 0 0 auto;
	display: block;
	color: #ffffff;
}

.emerald-blog-card__title {
	display: -webkit-box;
	width: 100%;
	margin: 0;
	overflow: hidden;
	color: #ffffff;
	font-family: 'Manrope', sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.emerald-blog-card__more {
	display: inline-flex;
	align-items: center;
	align-self: flex-end;
	gap: 4px;
	margin-top: auto;
	padding-top: 16px;
	color: #ffffff;
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

/* —— Pagination —— */
.emerald-blog__pager {
	display: flex;
	justify-content: center;
	width: 100%;
	margin-top: 4px;
}

.emerald-blog__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.emerald-blog__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 2px 10px 0 rgba(31, 45, 42, 0.08);
	color: var(--emerald-blog-ink);
	font-family: 'Manrope', sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.emerald-blog__page:hover:not(:disabled):not(.is-active) {
	color: var(--emerald-blog-accent);
}

.emerald-blog__page.is-active,
.emerald-blog__page.is-active:hover {
	background: var(--emerald-blog-accent);
	box-shadow: none;
	color: #ffffff;
	cursor: default;
}

.emerald-blog__page:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.emerald-blog__page:focus {
	outline: 0;
}

.emerald-blog__page:focus-visible {
	outline: 2px solid var(--emerald-blog-accent);
	outline-offset: 3px;
}

.emerald-blog__page--nav {
	font-size: 22px;
	font-weight: 400;
}

.emerald-blog__ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	color: var(--emerald-blog-ink);
	font-family: 'Manrope', sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	user-select: none;
}

@media (max-width: 767px) {
	.emerald-blog {
		--emerald-blog-gap: 16px;
		gap: 20px;
	}

	.emerald-blog__search {
		width: 100%;
	}

	.emerald-blog__search-input {
		height: 52px;
		padding-left: 22px;
		font-size: 14px;
	}

	.emerald-blog__tabs {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		scroll-behavior: smooth;
		padding: 4px 12px 4px 16px;
	}

	.emerald-blog__tabs::-webkit-scrollbar {
		display: none;
	}

	.emerald-blog-card {
		aspect-ratio: 3 / 4;
	}

	.emerald-blog-card__badge {
		top: 14px;
		left: 14px;
	}

	.emerald-blog-card__title {
		font-size: 16px;
	}

	.emerald-blog-card__glass {
		left: 0;
		right: 0;
		bottom: 0;
		min-height: 36%;
		padding: 18px 18px 16px;
		border-radius: 16px 16px 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.emerald-blog-card > .emerald-blog-card__bg,
	.emerald-blog__grid,
	.emerald-blog__spinner {
		transition: none;
		animation: none;
	}
}
