.maqalat-category-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: clamp(230px, 34vw, 400px);
	padding: 96px 16px 24px;
	background: #eee url("../../uploads/2026/04/Frame-17.png") center / cover no-repeat;
	text-align: center;
}

.maqalat-category-hero h1 {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	font-size: clamp(24px, 3.2vw, 32px);
	font-weight: 700;
}

.maqalat-category-hero h1 svg {
	flex: none;
	width: clamp(24px, 4vw, 40px);
	height: auto;
}

.maqalat-category-hero h1 span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.maqalat-category-breadcrumb ol,
.maqalat-category-breadcrumb li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.maqalat-category-breadcrumb a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.maqalat-category-hero ~ .ct-container .hero-section .page-title,
.search .maqalat-category-hero ~ .ct-container .hero-section {
	display: none;
}

.maqalat-category-hero ~ .ct-container {
	--content-vertical-spacing: clamp(24px, 4vw, 48px);
}

@media (max-width: 767px) {
	.maqalat-category-hero {
		justify-content: end;
		padding-bottom: 40px;
	}
}

.maqalat-directory {
	display: grid;
	gap: clamp(32px, 5vw, 60px);
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
}

.maqalat-directory-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-block-end: 16px;
}

.maqalat-directory-heading h2,
.maqalat-directory-card-title {
	margin: 0;
}

.maqalat-directory-grid,
.category .maqalat-category-hero ~ .ct-container .entries {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(12px, 2vw, 24px);
}

.maqalat-directory-card,
.category .maqalat-category-hero ~ .ct-container .entries > article:has(> .maqalat-directory-card-link) {
	overflow: hidden;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 16px;
	overflow-wrap: anywhere;
}

.maqalat-directory-card-link {
	display: block;
	color: inherit;
}

.maqalat-directory-card-link:focus-visible {
	outline-offset: -3px;
}

.maqalat-directory-image {
	aspect-ratio: 16 / 10;
	background: #f0f1f2;
}

.maqalat-directory-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.maqalat-directory-card-title {
	padding: 16px 16px 0;
	font-size: 19px;
	line-height: 1.5;
}

.maqalat-directory-card-excerpt {
	margin: 8px 0 0;
	padding: 0 16px 16px;
	color: #49515a;
	font-size: 15px;
	line-height: 1.65;
}

.maqalat-directory-more,
.maqalat-directory-pagination .page-numbers:not(ul) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 44px;
	min-height: 44px;
	padding: 6px 14px;
	border: 1px solid #dedfe0;
	border-radius: 12px;
	background: #fff;
	color: #181818;
}

.maqalat-directory-more,
.maqalat-directory-more:hover,
.maqalat-directory-pagination .page-numbers.current,
.maqalat-directory-pagination a.page-numbers:hover {
	background: #181818;
	color: #fff;
}

.maqalat-directory-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 850px) {
	.maqalat-directory-grid,
	.category .maqalat-category-hero ~ .ct-container .entries {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 540px) {
	.maqalat-directory-grid,
	.category .maqalat-category-hero ~ .ct-container .entries {
		grid-template-columns: minmax(0, 1fr);
	}
}
