.eca-widget,
.eca-widget * {
	box-sizing: border-box;
}

.eca-widget {
	width: 100%;
	position: relative;
	direction: rtl;
}

.eca-layout {
	--eca-sidebar-width: 25%;
	display: grid;
	grid-template-columns: minmax(180px, var(--eca-sidebar-width)) minmax(0, 1fr);
	gap: 32px;
	align-items: start;
	direction: rtl;
}

.eca-layout.eca-sidebar-left {
	direction: ltr;
}

.eca-layout.eca-sidebar-left > * {
	direction: rtl;
}

.eca-sidebar {
	min-width: 0;
}

.eca-sidebar.is-sticky {
	position: sticky;
	top: 30px;
}

.eca-sidebar__inner {
	background: #fff;
	border: 1px solid #e7e9ee;
	border-radius: 12px;
	padding: 20px;
}

.eca-sidebar__title {
	margin: 0 0 18px;
	font-size: 20px;
	line-height: 1.5;
	color: #16181d;
}

.eca-search {
	position: relative;
	margin-bottom: 16px;
}

.eca-search__input {
	width: 100%;
	min-height: 44px;
	padding: 10px 42px 10px 12px;
	border: 1px solid #dfe3ea;
	border-radius: 8px;
	outline: none;
	font: inherit;
	color: #23262d;
	background: #fff;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.eca-search__input:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.eca-search__button {
	position: absolute;
	inset-inline-start: 5px;
	top: 50%;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	background: transparent;
	color: currentColor;
	font-size: 22px;
	line-height: 1;
	transform: translateY(-50%);
	cursor: pointer;
}

.eca-term-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.eca-term-button {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
	margin: 0;
	padding: 12px 14px;
	padding-inline-start: calc(14px + (var(--eca-term-depth, 0) * 14px));
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #fff;
	color: #30343b;
	font: inherit;
	text-align: start;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.eca-term-button:hover {
	color: #1d4ed8;
	background: #f4f7ff;
	border-color: #cfdcff;
}

.eca-term-button.is-active {
	color: #fff;
	background: #2563eb;
	border-color: #2563eb;
}

.eca-term-button:focus-visible,
.eca-page-link:focus-visible,
.eca-load-more:focus-visible,
.eca-card__button:focus-visible,
.eca-card a:focus-visible {
	outline: 3px solid rgba(37, 99, 235, .35);
	outline-offset: 2px;
}

.eca-term-name {
	min-width: 0;
	overflow-wrap: anywhere;
}

.eca-term-count {
	flex: 0 0 auto;
	min-width: 28px;
	padding: 2px 7px;
	border-radius: 999px;
	background: rgba(15, 23, 42, .08);
	color: inherit;
	font-size: .82em;
	line-height: 1.6;
	text-align: center;
}

.eca-term-button.is-active .eca-term-count {
	background: rgba(255, 255, 255, .18);
}

.eca-content {
	position: relative;
	min-width: 0;
}

.eca-result-count {
	margin-bottom: 16px;
	color: #667085;
	font-size: 14px;
}

.eca-grid {
	--eca-columns: 3;
	display: grid;
	grid-template-columns: repeat(var(--eca-columns), minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 24px;
	align-items: stretch;
}

.eca-card {
	min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #e7e9ee;
	border-radius: 12px;
	background: #fff;
	transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.eca-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 32px rgba(15, 23, 42, .09);
}

.eca-card__image-link {
	display: block;
	overflow: hidden;
	background: #f2f4f7;
}

.eca-card__image {
	display: block;
	width: 100%;
	height: 210px;
	object-fit: cover;
	transition: transform .35s ease;
}

.eca-card:hover .eca-card__image {
	transform: scale(1.04);
}

.eca-card__image--placeholder {
	display: grid;
	place-items: center;
	color: #98a2b3;
	background: linear-gradient(135deg, #f2f4f7, #e8ecf2);
}

.eca-card__placeholder-icon {
	font-size: 42px;
	line-height: 1;
}

.eca-card__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 18px;
}

.eca-card__taxonomy {
	margin-bottom: 8px;
	color: #2563eb;
	font-size: 13px;
	font-weight: 600;
}

.eca-card__title {
	margin: 0 0 10px;
	color: #16181d;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.55;
}

.eca-card__title a {
	color: inherit;
	text-decoration: none;
}

.eca-card__title a:hover {
	color: #2563eb;
}

.eca-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px 14px;
	margin-bottom: 12px;
	color: #858b98;
	font-size: 12px;
}

.eca-card__author::before {
	content: "•";
	margin-inline-end: 10px;
}

.eca-card__excerpt {
	margin-bottom: 18px;
	color: #606774;
	font-size: 14px;
	line-height: 1.85;
}

.eca-card__button {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: auto;
	padding: 9px 14px;
	border: 1px solid #d6dbe4;
	border-radius: 7px;
	background: transparent;
	color: #1d4ed8;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.eca-card__button:hover {
	border-color: #2563eb;
	background: #2563eb;
	color: #fff;
}

.eca-card__button-icon {
	transition: transform .2s ease;
}

.eca-card__button:hover .eca-card__button-icon {
	transform: translateX(-3px);
}

.eca-empty {
	grid-column: 1 / -1;
	padding: 32px 20px;
	border: 1px dashed #d7dce5;
	border-radius: 10px;
	background: #fafbfc;
	color: #697180;
	text-align: center;
}

.eca-pagination {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

.eca-number-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.eca-page-link,
.eca-load-more {
	min-width: 40px;
	min-height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	border: 1px solid #dce1e8;
	border-radius: 7px;
	background: #fff;
	color: #3a414d;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.eca-page-link:hover,
.eca-page-link.is-current,
.eca-load-more:hover {
	border-color: #2563eb;
	background: #2563eb;
	color: #fff;
}

.eca-page-link:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.eca-page-ellipsis {
	padding: 0 3px;
	color: #8a909b;
}

.eca-load-more {
	min-width: 180px;
}

.eca-infinite-sentinel {
	width: 100%;
	height: 2px;
}

.eca-loader {
	position: absolute;
	z-index: 5;
	inset: 0;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 10px;
	padding-top: 40px;
	background: rgba(255, 255, 255, .72);
	backdrop-filter: blur(1px);
	color: #555d69;
}

.eca-loader[hidden] {
	display: none !important;
}

.eca-loader__spinner {
	width: 22px;
	height: 22px;
	border: 3px solid #dce3ed;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: eca-spin .72s linear infinite;
}

.eca-loader__text {
	font-size: 13px;
	line-height: 22px;
}

.eca-editor-notice {
	padding: 16px;
	border: 1px solid #f2c94c;
	border-radius: 8px;
	background: #fff9df;
	color: #725b00;
	direction: rtl;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

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

@media (max-width: 767px) {
	.eca-layout,
	.eca-layout.eca-sidebar-left {
		grid-template-columns: minmax(0, 1fr);
		direction: rtl;
	}

	.eca-sidebar.is-sticky {
		position: static;
	}

	.eca-mobile-terms-horizontal .eca-term-list {
		flex-direction: row;
		overflow-x: auto;
		overflow-y: hidden;
		padding-bottom: 4px;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
	}

	.eca-mobile-terms-horizontal .eca-term-button {
		flex: 0 0 auto;
		width: auto;
		white-space: nowrap;
		padding-inline-start: 14px;
	}

	.eca-mobile-terms-horizontal .eca-term-count {
		min-width: 24px;
	}

	.eca-loader {
		padding-top: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eca-card,
	.eca-card__image,
	.eca-card__button,
	.eca-card__button-icon,
	.eca-term-button,
	.eca-page-link,
	.eca-load-more {
		transition: none !important;
	}

	.eca-loader__spinner {
		animation-duration: 1.5s;
	}
}

.eca-error {
	margin-bottom: 16px;
	padding: 12px 14px;
	border: 1px solid #f0b8b8;
	border-radius: 8px;
	background: #fff2f2;
	color: #a12626;
	font-size: 13px;
}
