/**
 * Court Marriage Pakistan — blog index (/blogs/).
 *
 * Loaded only by the three index widgets (B20–B22), on top of courtm-blog.css,
 * whose --cmb-* tokens it uses. Every selector is a new class name, so nothing
 * here can change an existing block.
 */

/* ========================================================================== *
 * B21 — Card grid
 * ========================================================================== */

.cmb-index:not(#_) {
	padding-block: clamp(3rem, 6vw, 5rem);
	background: var(--cmb-paper);
}

.cmb-guide-grid:not(#_) {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.cmb-guide-grid:not(#_) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1025px) {
	.cmb-index--cols-3 .cmb-guide-grid:not(#_) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.cmb-index--cols-4 .cmb-guide-grid:not(#_) {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.cmb .cmb-guide:not(#_) {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--cmb-rule);
	border-radius: var(--cmb-r-lg);
	background: #fff;
	box-shadow: var(--cmb-shadow);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cmb .cmb-guide:hover:not(#_),
.cmb .cmb-guide:focus-within:not(#_) {
	transform: translateY(-4px);
	box-shadow: var(--cmb-shadow-lift);
}

.cmb .cmb-guide-media:not(#_) {
	position: relative;
	height: 12rem;
	overflow: hidden;
	background: var(--cmb-navy);
}

.cmb .cmb-guide-media:not(#_)::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(22, 24, 38, 0.5), transparent);
	pointer-events: none;
}

.cmb .cmb-guide-img:not(#_) {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.cmb .cmb-guide:hover .cmb-guide-img:not(#_) {
	transform: scale(1.05);
}

.cmb .cmb-guide-ph:not(#_) {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: rgba(255, 255, 255, 0.35);
	background: radial-gradient(40rem 20rem at 100% 0%, rgba(184, 31, 40, 0.35), transparent 70%), var(--cmb-navy);
}

.cmb .cmb-guide-ph svg:not(#_) {
	width: 3rem;
	height: 3rem;
}

.cmb .cmb-guide-cat:not(#_) {
	position: absolute;
	top: 1rem;
	left: 1rem;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	background: rgba(248, 244, 236, 0.95);
	color: var(--cmb-red);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.4;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.cmb .cmb-guide-cat--inline:not(#_) {
	position: static;
	align-self: flex-start;
	margin-bottom: 0.75rem;
	background: var(--cmb-red-soft);
	box-shadow: none;
}

.cmb .cmb-guide-body:not(#_) {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 1.5rem;
}

.cmb .cmb-guide-title:not(#_) {
	margin: 0;
	font-family: var(--cmb-font-display);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--cmb-navy);
	text-wrap: balance;
}

.cmb .cmb-guide-title a:not(#_) {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
}

/* One link:not(#_), whole card clickable. */
.cmb .cmb-guide-title a:not(#_)::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
}

.cmb .cmb-guide:hover .cmb-guide-title a:not(#_),
.cmb .cmb-guide-title a:focus-visible:not(#_) {
	color: var(--cmb-red);
}

.cmb .cmb-guide-title a:focus-visible:not(#_) {
	outline: none;
}

.cmb .cmb-guide:focus-within:not(#_) {
	outline: 2px solid var(--cmb-red);
	outline-offset: 2px;
}

.cmb .cmb-guide-excerpt:not(#_) {
	flex: 1;
	margin: 0.75rem 0 0;
	font-size: 0.875rem;
	line-height: 1.65;
	color: var(--cmb-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cmb .cmb-guide-meta:not(#_) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.75rem;
	color: var(--cmb-muted);
}

.cmb .cmb-guide-meta li:not(#_) {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
}

.cmb .cmb-guide-meta .cmb-i:not(#_) {
	width: 0.95em;
	height: 0.95em;
	color: var(--cmb-red);
	opacity: 0.75;
}

.cmb .cmb-guide-more:not(#_) {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--cmb-rule);
	color: var(--cmb-red);
	font-size: 0.875rem;
	font-weight: 700;
}

.cmb .cmb-guide-more .cmb-i:not(#_) {
	transition: transform 0.2s;
}

.cmb .cmb-guide:hover .cmb-guide-more .cmb-i:not(#_) {
	transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
	.cmb .cmb-guide:not(#_),
	.cmb .cmb-guide-img:not(#_),
	.cmb .cmb-guide-more .cmb-i:not(#_) {
		transition: none;
	}

	.cmb .cmb-guide:hover:not(#_),
	.cmb .cmb-guide:focus-within:not(#_) {
		transform: none;
	}

	.cmb .cmb-guide:hover .cmb-guide-img:not(#_) {
		transform: none;
	}
}

/* ---- Empty state --------------------------------------------------------- */

.cmb .cmb-index-empty:not(#_) {
	max-width: 40rem;
	margin-inline: auto;
	padding: 2.5rem 2rem;
	border: 1px dashed var(--cmb-rule);
	border-radius: var(--cmb-r-lg);
	background: var(--cmb-cream);
	text-align: center;
	color: var(--cmb-muted);
}

.cmb .cmb-index-empty > .cmb-i:not(#_) {
	width: 2.25rem;
	height: 2.25rem;
	color: var(--cmb-red);
}

.cmb .cmb-index-empty-title:not(#_) {
	margin: 0.75rem 0 0.25rem;
	font-family: var(--cmb-font-display);
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--cmb-navy);
}

.cmb .cmb-index-empty p:not(#_) {
	margin: 0.4rem 0 0;
}

.cmb .cmb-index-empty .cmb-index-empty-note:not(#_) {
	font-size: 0.8125rem;
	font-style: italic;
}

/* ---- Pagination ---------------------------------------------------------- */

.cmb .cmb-pager:not(#_) {
	margin-top: 2.5rem;
}

.cmb .cmb-pager ul:not(#_) {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cmb .cmb-pager li:not(#_) {
	margin: 0;
}

.cmb .cmb-pager .page-numbers:not(#_) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.9rem;
	border: 1px solid var(--cmb-rule);
	border-radius: var(--cmb-r-sm);
	background: #fff;
	color: var(--cmb-navy);
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
}

.cmb .cmb-pager a.page-numbers:hover:not(#_) {
	border-color: var(--cmb-navy);
	background: var(--cmb-navy-soft);
}

.cmb .cmb-pager .page-numbers.current:not(#_) {
	border-color: var(--cmb-red);
	background: var(--cmb-red);
	color: #fff;
}

.cmb .cmb-pager .page-numbers.dots:not(#_) {
	border-color: transparent;
	background: none;
}

/* ========================================================================== *
 * B22 — CTA band
 * ========================================================================== */

.cmb-ctaband:not(#_) {
	border-block: 1px solid var(--cmb-rule);
	background: var(--cmb-cream);
}

.cmb-ctaband-inner:not(#_) {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 3rem;
}

@media (min-width: 768px) {
	.cmb-ctaband-inner:not(#_) {
		flex-direction: row;
		align-items: center;
		gap: 2.5rem;
	}
}

.cmb-ctaband-copy:not(#_) {
	max-width: 36rem;
}

.cmb .cmb-ctaband-eyebrow:not(#_) {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1rem;
	color: var(--cmb-red);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.cmb .cmb-ctaband-eyebrow:not(#_)::before {
	content: "";
	width: 2rem;
	height: 1px;
	background: currentColor;
}

.cmb .cmb-ctaband-title:not(#_) {
	margin: 0;
	font-family: var(--cmb-font-display);
	font-size: clamp(1.5rem, 1.1rem + 1.4vw, 1.875rem);
	font-weight: 600;
	line-height: 1.25;
	color: var(--cmb-navy);
}

.cmb .cmb-ctaband-text:not(#_) {
	margin-top: 0.75rem;
	font-size: 0.875rem;
	line-height: 1.7;
	color: var(--cmb-muted);
}

.cmb .cmb-ctaband-text p:not(#_) {
	margin: 0;
}

.cmb .cmb-ctaband-actions:not(#_) {
	flex: none;
	gap: 0.75rem;
}

.cmb .cmb-ctaband-actions .cmb-btn:not(#_) {
	padding: 0.8rem 1.5rem;
}
