/* ==========================================================================
   Smart Gadgets Reviews – category archive (category.php)
   --------------------------------------------------------------------------
   Loaded on category pages only (inc/category-archive.php). Article cards
   and the 3/2/1-column grid reuse .sgr-card / .sgr-posts from
   css/content.css, so homepage and archive cards always match.
   Colour variables (--sgr-c-*) are defined in css/content.css.

     1. Page frame (width aligned with header/footer)
     2. Header band: breadcrumbs, H1, description
     3. Section titles and buttons
     4. Featured article
     5. Pagination
     6. Empty state
     7. Responsive
   ========================================================================== */

/* 1. Page frame ----------------------------------------------------------- */
body .site-main.sgr-archive {
	max-width: none;
	padding-inline: 0;
}
.sgr-archive__container {
	box-sizing: border-box;
	width: 100%;
	max-width: 1240px; /* 1200px content + 2 × 20px side margins, like the header */
	margin-inline: auto;
	padding-inline: 20px;
}
.sgr-archive__body {
	padding-block: 56px 88px;
}

/* 2. Header band ---------------------------------------------------------- */
.sgr-archive__header {
	background: var(--sgr-c-light);
	border-block-end: 1px solid var(--sgr-c-border);
	padding-block: 32px 56px;
}

.sgr-breadcrumbs {
	margin: 0 0 28px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--sgr-c-muted);
}
.sgr-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sgr-breadcrumbs li + li::before {
	content: "\203A"; /* › */
	margin-inline: 8px;
	color: #98A2B3;
}
.sgr-breadcrumbs a {
	color: var(--sgr-c-primary);
	font-weight: 600;
	text-decoration: none;
}
.sgr-breadcrumbs a:hover,
.sgr-breadcrumbs a:focus-visible {
	color: var(--sgr-c-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.sgr-breadcrumbs [aria-current] {
	color: var(--sgr-c-text);
}
.sgr-breadcrumbs--rank-math p {
	margin: 0;
}

.sgr-archive__title {
	margin: 0;
	max-width: 22ch;
	color: var(--sgr-c-navy);
	font-size: 48px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
}
.sgr-archive__description {
	max-width: 680px;
	margin-top: 16px;
	color: var(--sgr-c-text);
	font-size: 18px;
	line-height: 1.6;
}
.sgr-archive__description p {
	margin: 0 0 0.75em;
}
.sgr-archive__description p:last-child {
	margin-bottom: 0;
}

/* 3. Section titles and buttons ------------------------------------------- */
.sgr-archive__section-title {
	margin: 0 0 24px;
	color: var(--sgr-c-navy);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.25;
}

/* ".sgr-archive" prefix: beats the Elementor kit link colour (.elementor-kit-N a). */
.sgr-archive .sgr-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 24px;
	border: 1px solid var(--sgr-c-primary);
	border-radius: 6px;
	background: var(--sgr-c-primary);
	color: #FFFFFF;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.sgr-archive .sgr-button:hover,
.sgr-archive .sgr-button:focus-visible {
	background: var(--sgr-c-navy);
	border-color: var(--sgr-c-navy);
	color: #FFFFFF;
}
.sgr-archive .sgr-button--outline {
	background: #FFFFFF;
	border-color: #D0D5DD;
	color: var(--sgr-c-navy);
}
.sgr-archive a:focus-visible {
	outline: 2px solid var(--sgr-c-primary);
	outline-offset: 2px;
}

/* 4. Featured article ----------------------------------------------------- */
.sgr-featured {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	margin-bottom: 64px;
	background: #FFFFFF;
	border: 1px solid var(--sgr-c-border);
	border-radius: var(--sgr-radius);
	box-shadow: var(--sgr-shadow);
	overflow: hidden;
}
.sgr-featured--no-image {
	grid-template-columns: minmax(0, 1fr);
}
.sgr-featured__media {
	display: block;
	min-height: 100%;
	aspect-ratio: 16 / 10;
	background: var(--sgr-c-light);
	overflow: hidden;
}
.sgr-featured__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.sgr-featured__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 12px;
	padding: 40px;
}
.sgr-featured__eyebrow {
	margin: 0;
	color: var(--sgr-c-primary);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.sgr-featured__title {
	margin: 0;
	color: var(--sgr-c-navy);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.25;
}
.sgr-featured__title a {
	color: inherit;
	text-decoration: none;
}
.sgr-featured__title a:hover,
.sgr-featured__title a:focus-visible {
	color: var(--sgr-c-primary);
}
.sgr-featured__meta {
	margin: 0;
	color: var(--sgr-c-muted);
	font-size: 14px;
}
.sgr-featured__excerpt {
	margin: 0 0 8px;
	color: var(--sgr-c-text);
	font-size: 16px;
	line-height: 1.65;
}

/* 5. Pagination (core paginate_links list) -------------------------------- */
.sgr-pagination {
	margin-top: 48px;
}
.sgr-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sgr-pagination .page-numbers li {
	margin: 0;
}
.sgr-pagination a.page-numbers,
.sgr-pagination span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--sgr-c-border);
	border-radius: 6px;
	background: #FFFFFF;
	color: var(--sgr-c-navy);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.sgr-pagination a.page-numbers:hover,
.sgr-pagination a.page-numbers:focus-visible {
	border-color: var(--sgr-c-primary);
	color: var(--sgr-c-primary);
}
.sgr-pagination span.page-numbers.current {
	background: var(--sgr-c-primary);
	border-color: var(--sgr-c-primary);
	color: #FFFFFF;
}
.sgr-pagination span.page-numbers.dots {
	border-color: transparent;
	background: transparent;
	min-width: 24px;
	padding: 0;
}

/* 6. Empty state ---------------------------------------------------------- */
.sgr-archive-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	padding: 56px 24px;
	border: 1px dashed #D0D5DD;
	border-radius: var(--sgr-radius);
	background: var(--sgr-c-light);
	text-align: center;
}
.sgr-archive-empty__text {
	max-width: 520px;
	margin: 0;
	color: var(--sgr-c-text);
	font-size: 17px;
	line-height: 1.6;
}

/* 7. Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
	.sgr-archive__title { font-size: 40px; }
	.sgr-featured__body { padding: 32px; }
	.sgr-featured__title { font-size: 26px; }
}
@media (max-width: 900px) {
	.sgr-featured {
		grid-template-columns: minmax(0, 1fr);
	}
	.sgr-featured__media {
		min-height: 0;
	}
}
@media (max-width: 767px) {
	.sgr-archive__header { padding-block: 24px 40px; }
	.sgr-breadcrumbs { margin-bottom: 20px; }
	.sgr-archive__title { font-size: 32px; }
	.sgr-archive__description { font-size: 16px; }
	.sgr-archive__body { padding-block: 40px 64px; }
	.sgr-archive__section-title { font-size: 24px; }
	.sgr-featured { margin-bottom: 48px; }
	.sgr-featured__body { padding: 24px; }
	.sgr-featured__title { font-size: 22px; }
	.sgr-pagination { margin-top: 36px; }
	.sgr-pagination ul.page-numbers { gap: 6px; }
	.sgr-pagination a.page-numbers,
	.sgr-pagination span.page-numbers { min-width: 40px; height: 40px; padding: 0 10px; font-size: 14px; }
	.sgr-archive-empty { padding: 40px 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.sgr-button { transition: none; }
}
