/**
 * /categories/ index — aligned with student/NHS hub layout.
 */

body.wpv-categories-index-page {
	overflow-x: clip;
}

body.wpv-categories-index-page #page {
	overflow-x: clip;
	max-width: 100%;
}

body.wpv-categories-index-page .site-content .content-area {
	max-width: none;
	width: 100%;
}

body.wpv-categories-index-page .inside-article.wpv-shell {
	padding-left: 0;
	padding-right: 0;
}

.wpv-categories-index-page {
	scroll-behavior: smooth;
	overflow-x: clip;
}

.wpv-categories-index {
	--wpv-categories-index-container: 1280px;
}

.wpv-categories-index-page .wpv-shell.wpv-categories-index {
	max-width: none;
	margin: 0;
	padding: 0;
}

.wpv-categories-index__container {
	max-width: var(--wpv-categories-index-container);
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp(1.25rem, 3vw, 1.5rem);
	padding-right: clamp(1.25rem, 3vw, 1.5rem);
	box-sizing: border-box;
	min-width: 0;
}

.wpv-categories-index-hero {
	width: 100%;
	padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(2.25rem, 5vw, 3rem);
	text-align: center;
	background: linear-gradient(180deg, #eef3fb 0%, #e8eef8 48%, #f8f9fa 100%);
	border-bottom: 1px solid rgba(13, 71, 161, 0.1);
	overflow: hidden;
}

.wpv-categories-index-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.wpv-categories-index-hero .wpv-tag {
	margin: 0 0 0.85rem;
	background: rgba(26, 115, 232, 0.1);
	color: var(--wpv-primary-dark, #0d47a1);
	border-color: rgba(26, 115, 232, 0.2);
}

.wpv-categories-index-hero h1 {
	margin: 0 auto 1rem;
	font-size: clamp(1.85rem, 4.5vw, 2.65rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.035em;
	color: var(--wpv-primary-dark, #0d47a1);
	max-width: min(26ch, 100%);
	text-wrap: balance;
}

.wpv-categories-index-hero__lead {
	margin: 0 auto;
	max-width: min(48ch, 100%);
	font-size: clamp(1rem, 2.2vw, 1.08rem);
	line-height: 1.6;
	color: var(--wpv-muted, #6c757d);
}

.wpv-categories-index__body {
	padding: clamp(1.75rem, 4vw, 2.5rem) 0 2.5rem;
	background: var(--wpv-bg, #f8f9fa);
}

.wpv-categories-index__section-head {
	margin-bottom: 1.15rem;
}

.wpv-categories-index__section-head h2 {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 800;
}

.wpv-categories-index__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 0.85rem;
}

.wpv-categories-index__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.45rem;
	padding: 1rem 1.05rem;
	background: #fff;
	border: 1px solid var(--wpv-border-soft, #e9ecef);
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(33, 37, 41, 0.05);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.wpv-categories-index__card:hover {
	border-color: rgba(26, 115, 232, 0.35);
	box-shadow: 0 8px 24px rgba(26, 115, 232, 0.1);
	transform: translateY(-2px);
}

.wpv-categories-index__card-icon {
	font-size: 1.65rem;
	line-height: 1;
}

.wpv-categories-index__card-label {
	font-size: 1rem;
	font-weight: 700;
	color: var(--wpv-text, #212529);
	line-height: 1.25;
}

.wpv-categories-index__card-stat {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--wpv-muted, #6c757d);
}

.wpv-category-subnav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 0.55rem;
	margin: 0 0 1.35rem;
}

.wpv-category-subnav__pill {
	display: inline-flex;
	align-items: center;
	padding: 0.38rem 0.75rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	text-decoration: none;
	color: var(--wpv-primary-dark, #0d47a1);
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid rgba(26, 115, 232, 0.18);
	transition: background 0.15s ease, border-color 0.15s ease;
}

.wpv-category-subnav__pill:hover {
	background: rgba(26, 115, 232, 0.08);
	border-color: rgba(26, 115, 232, 0.35);
}

.wpv-category-subnav__pill.is-active {
	background: var(--wpv-primary, #1a73e8);
	border-color: var(--wpv-primary, #1a73e8);
	color: #fff;
}

.wpv-category-subnav__pill--all {
	background: rgba(26, 115, 232, 0.08);
}

@media (max-width: 520px) {
	.wpv-categories-index__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
