/*
 * Supplemental CSS for QuizTarget Blog.
 *
 * theme.json covers global color/typography/spacing tokens; this file only adds what theme.json
 * has no slot for — component-level layout (header, mobile menu, post cards, CTA cards), the
 * rounded-corner/soft-shadow treatment from the main app's design system, and a few small
 * accessibility utilities (skip link, focus-visible). Every value below is taken directly from
 * DESIGN_SYSTEM.md / the main app's own Tailwind classes, not invented.
 */

/* ---------- Accessibility utilities ---------- */

.qt-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: #0f172a;
	color: #fff;
	padding: 0.75rem 1.25rem;
	border-radius: 0 0 0.75rem 0;
	font-weight: 700;
	text-decoration: none;
}
.qt-skip-link:focus {
	left: 0;
}

:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

/* ---------- Header ---------- */

.qt-header,
.qt-header *,
.qt-header *::before,
.qt-header *::after {
	box-sizing: border-box;
}
.qt-header {
	position: sticky;
	top: 0;
	z-index: 30;
	border-bottom: 1px solid #e2e8f0;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(6px);
}
.qt-header__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0.875rem 1.5rem;
	display: flex;
	align-items: center;
	gap: 1.75rem;
}
.qt-logo-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	line-height: 0;
	flex-shrink: 0;
}
.qt-header__nav-links {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	flex-grow: 1;
	justify-content: flex-end;
	margin: 0;
}
.qt-header__link,
.qt-header__nav-links a {
	font-size: 0.875rem;
	line-height: 1;
	font-weight: 700;
	color: #475569;
	text-decoration: none;
	transition: color 0.15s;
}
.qt-header__link:hover,
.qt-header__nav-links a:hover {
	color: #0f172a;
}
.qt-header__link.is-active {
	color: #2563eb;
}
.qt-header__cta {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	flex-shrink: 0;
	margin: 0;
}
.qt-login-link,
.qt-signup-link {
	display: inline-flex;
	align-items: center;
	font-size: 0.875rem;
	line-height: 1;
	text-decoration: none;
	padding: 0.625rem 1.125rem;
	border-radius: 0.75rem;
	transition: background 0.15s;
	white-space: nowrap;
}
.qt-login-link {
	font-weight: 900;
	color: #334155;
}
.qt-login-link:hover {
	background: #f8fafc;
}
.qt-signup-link {
	font-weight: 700;
	color: #fff;
	background: #2563eb;
	border-radius: 1rem;
}
.qt-signup-link:hover {
	background: #1d4ed8;
}

/* Product dropdown */
.qt-product-menu {
	position: relative;
}
.qt-product-menu__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 700;
	color: #475569;
	padding: 0;
}
.qt-product-menu__trigger:hover,
.qt-product-menu.is-open .qt-product-menu__trigger {
	color: #0f172a;
}
.qt-product-menu__trigger svg {
	transition: transform 0.15s;
}
.qt-product-menu.is-open .qt-product-menu__trigger svg {
	transform: rotate(180deg);
}
.qt-product-menu__panel {
	display: none;
	position: absolute;
	left: 0;
	top: calc(100% + 0.5rem);
	width: 14rem;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	box-shadow: 0 20px 25px -5px rgba(226, 232, 240, 0.5), 0 8px 10px -6px rgba(226, 232, 240, 0.5);
	padding: 0.5rem;
	flex-direction: column;
	gap: 0.125rem;
}
.qt-product-menu.is-open .qt-product-menu__panel {
	display: flex;
}
.qt-product-menu__panel a {
	padding: 0.625rem 0.875rem;
	border-radius: 0.75rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: #334155;
	text-decoration: none;
}
.qt-product-menu__panel a:hover {
	background: #f8fafc;
	color: #0f172a;
}

/* Mobile menu toggle + panel */
.qt-mobile-toggle__btn {
	display: none;
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 0.5rem;
	margin-left: auto;
	color: #334155;
	flex-shrink: 0;
}
.qt-mobile-menu {
	display: none;
	border-top: 1px solid #e2e8f0;
	padding: 1rem 1.5rem 1.25rem;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
}
.qt-mobile-menu[hidden] {
	display: none !important;
}
.qt-mobile-menu.is-open {
	display: flex;
}
.qt-mobile-menu a {
	padding: 0.625rem 0.875rem;
	border-radius: 0.75rem;
	font-size: 0.9375rem;
	font-weight: 700;
	color: #334155;
	text-decoration: none;
}
.qt-mobile-menu a:hover {
	background: #f8fafc;
}
.qt-mobile-menu a[aria-current="page"] {
	color: #2563eb;
	background: #eff6ff;
}
.qt-mobile-menu__eyebrow {
	font-size: 0.6875rem;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #94a3b8;
	padding: 0.375rem 0.875rem 0.125rem;
}
.qt-mobile-menu__divider {
	border: 0;
	border-top: 1px solid #f1f5f9;
	margin: 0.5rem 0;
}
.qt-mobile-menu__signup {
	margin-top: 0.25rem;
	text-align: center;
	background: #2563eb;
	color: #fff !important;
	border-radius: 1rem;
}

@media (max-width: 899px) {
	.qt-header__nav-links,
	.qt-header__cta {
		display: none;
	}
	.qt-mobile-toggle__btn {
		display: block;
	}
}
@media (min-width: 900px) {
	.qt-mobile-menu {
		display: none !important;
	}
}

/* ---------- Page shell ---------- */

.qt-main {
	padding-top: 3rem;
	padding-bottom: 5rem;
}
.qt-eyebrow {
	font-size: 0.75rem;
	font-weight: 900;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #64748b;
	margin: 0 0 0.75rem;
}
.qt-blog-hero {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 2.5rem;
}
.qt-blog-hero__intro {
	font-size: 1.125rem;
	color: #475569;
	margin-top: 0.75rem;
}
.qt-section-heading {
	margin: 3rem 0 1.5rem;
}

/* Category pill nav */
.qt-category-nav {
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 3rem;
}
.qt-category-nav .wp-block-categories,
.qt-category-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.qt-category-nav a {
	display: inline-flex;
	padding: 0.5rem 1rem;
	border-radius: 9999px;
	background: #eff6ff;
	border: 1px solid rgba(191, 219, 254, 0.8);
	color: #1d4ed8;
	font-size: 0.75rem;
	font-weight: 700;
	text-decoration: none;
}
.qt-category-nav a:hover {
	background: #dbeafe;
}

/* ---------- Featured post ---------- */

.qt-featured-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 2rem;
	overflow: hidden;
	box-shadow: 0 20px 25px -5px rgba(226, 232, 240, 0.5), 0 8px 10px -6px rgba(226, 232, 240, 0.5);
	margin-bottom: 3.5rem;
	align-items: stretch;
}
.qt-featured-card__image,
.qt-featured-card__image img {
	flex: 1 1 420px;
	min-width: 320px;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}
.qt-featured-card__body {
	flex: 1 1 360px;
	padding: 2.5rem;
}
.qt-featured-card__body h2 a {
	text-decoration: none;
	color: #0f172a;
}
.qt-featured-card__body h2 a:hover {
	color: #1d4ed8;
}

/* ---------- Post grid ---------- */

.qt-post-grid__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.qt-post-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1.5rem;
	overflow: hidden;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
	transition: transform 0.15s, box-shadow 0.15s;
}
.qt-post-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 20px 25px -5px rgba(226, 232, 240, 0.5), 0 8px 10px -6px rgba(226, 232, 240, 0.5);
}
.qt-post-card__image {
	margin: 0;
}
.qt-post-card__image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.qt-post-card h3,
.qt-post-card .wp-block-post-excerpt,
.qt-post-card .qt-post-meta,
.qt-post-card .qt-post-terms {
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}
.qt-post-card h3 {
	margin-top: 1rem;
	font-size: 1.125rem;
}
.qt-post-card h3 a {
	text-decoration: none;
	color: #0f172a;
}
.qt-post-card h3 a:hover {
	color: #1d4ed8;
}
.qt-post-card .wp-block-post-excerpt {
	color: #64748b;
	font-size: 0.875rem;
}
.qt-post-card .qt-post-meta {
	padding-bottom: 1.5rem;
	margin-top: 0.5rem;
}

.qt-post-terms {
	font-size: 0.6875rem;
	font-weight: 900;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #2563eb;
	margin-top: 1rem;
}
.qt-post-terms a {
	color: inherit;
	text-decoration: none;
}
.qt-post-meta {
	font-size: 0.8125rem;
	color: #94a3b8;
	gap: 0.75rem;
}

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

.qt-pagination {
	margin-top: 3rem;
	justify-content: center;
	gap: 0.5rem;
}
.qt-pagination a,
.qt-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border-radius: 0.75rem;
	border: 1px solid #e2e8f0;
	font-weight: 700;
	font-size: 0.875rem;
	color: #334155;
	text-decoration: none;
}
.qt-pagination a:hover {
	background: #f8fafc;
}
.qt-pagination .wp-block-query-pagination-numbers .current {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

/* ---------- Single post / article ---------- */

.qt-main--single {
	padding-top: 2.5rem;
}
.qt-single-title {
	margin-top: 0.75rem;
}
.qt-single-meta {
	gap: 1rem;
	margin: 1rem 0 2rem;
	color: #64748b;
	font-size: 0.875rem;
	font-weight: 600;
	align-items: center;
}
.qt-reading-time::before {
	content: "\2022";
	margin-right: 1rem;
	color: #cbd5e1;
}
.qt-single-featured {
	margin: 0 0 2.5rem;
	border-radius: 1.5rem;
	overflow: hidden;
}
.qt-single-featured img {
	width: 100%;
	object-fit: cover;
}

.qt-article {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: #334155;
}
.qt-article > * + * {
	margin-top: 1.5rem;
}
.qt-article h2 {
	margin-top: 2.5rem;
}
.qt-article h3 {
	margin-top: 2rem;
}
.qt-article img {
	border-radius: 1.5rem;
	height: auto;
}
.qt-article a {
	text-decoration: underline;
	text-decoration-color: #bfdbfe;
	text-underline-offset: 2px;
}
.qt-article blockquote {
	padding-left: 1.25rem;
}

/* ---------- Related posts ---------- */

.qt-related-posts {
	margin-top: 3.5rem;
}
.qt-related-posts__heading {
	font-size: 1.375rem;
	margin-bottom: 1.25rem;
}
.qt-related-posts__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.25rem;
}
.qt-related-posts__card {
	display: block;
	text-decoration: none;
	border: 1px solid #e2e8f0;
	border-radius: 1.25rem;
	overflow: hidden;
	background: #fff;
}
.qt-related-posts__thumb img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
}
.qt-related-posts__title {
	display: block;
	padding: 1rem 1.125rem;
	font-weight: 700;
	font-size: 0.9375rem;
	color: #0f172a;
}

/* ---------- Conversion CTA cards ---------- */

.qt-cta-row {
	gap: 1.25rem;
	margin: 3.5rem 0;
	align-items: stretch;
}
.qt-cta-card {
	flex: 1 1 260px;
	background: #eff6ff;
	border: 1px solid rgba(191, 219, 254, 0.8);
	border-radius: 1.5rem;
	padding: 1.75rem;
}
.qt-cta-card__title {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
}
.qt-cta-card__body {
	color: #475569;
	font-size: 0.875rem;
	margin: 0 0 1.25rem;
}

/* ---------- Footer ---------- */

.qt-footer,
.qt-footer *,
.qt-footer *::before,
.qt-footer *::after {
	box-sizing: border-box;
}
.qt-footer {
	margin-top: 4rem;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding: 4rem 1.5rem 2rem;
	border-top: 1px solid #e2e8f0;
}

/* CSS Grid, not flex-wrap: every column's title sits on the same row regardless of how many
   lines a given column's own links wrap to (the Templates column has much longer link text than
   its neighbors) — flex-wrap items don't share a row baseline like this once row-wrapped. */
.qt-footer__columns {
	display: grid;
	grid-template-columns: 1.6fr repeat(5, 1fr);
	gap: 2.5rem 2rem;
	margin-bottom: 3rem;
}
@media (max-width: 900px) {
	.qt-footer__columns {
		grid-template-columns: repeat(3, 1fr);
	}
	.qt-footer__brand {
		grid-column: 1 / -1;
	}
}
@media (max-width: 599px) {
	.qt-footer__columns {
		grid-template-columns: 1fr 1fr;
	}
}

.qt-footer__brand {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}
.qt-footer__tagline {
	max-width: 280px;
	font-size: 0.875rem;
	color: #64748b;
	margin: 0;
}
.qt-footer__social {
	display: flex;
	gap: 0.5rem;
	margin: 0;
}
.qt-footer__social-icon {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.75rem;
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #94a3b8;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: default;
}
.qt-footer__nav {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	min-width: 0;
}
.qt-footer__nav-title {
	display: block;
	font-size: 0.6875rem;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #0f172a;
	margin-bottom: 0.25rem;
}
.qt-footer__nav a {
	font-size: 0.875rem;
	color: #475569;
	text-decoration: none;
}
.qt-footer__nav a:hover {
	color: #0f172a;
}
.qt-footer__pending {
	display: block;
	font-size: 0.875rem;
	color: #94a3b8;
	cursor: default;
	user-select: none;
}
.qt-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid #f1f5f9;
	font-size: 0.8125rem;
	color: #64748b;
}
.qt-footer__copyright {
	margin: 0;
}
.qt-footer__legal {
	display: flex;
	gap: 1.25rem;
	margin: 0;
}
.qt-footer__legal .qt-footer__pending {
	font-size: 0.8125rem;
}

/* ---------- Search / 404 ---------- */

.qt-archive-header {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 3rem;
}
.qt-archive-description {
	color: #64748b;
	margin-top: 0.5rem;
}
.qt-search-form {
	max-width: 420px;
	margin: 1.5rem auto 0;
}
.qt-404 {
	text-align: center;
	padding-top: 4rem;
	padding-bottom: 6rem;
}
.qt-404 .qt-search-form {
	margin-top: 2rem;
}
.qt-404 .wp-block-buttons {
	justify-content: center;
	margin-top: 1.5rem;
}
