/**
 * New Bloggers Theme — main stylesheet.
 *
 * Original CSS written for this theme. Magazine/blog layout inspired by
 * common news site patterns (dark header, card grid, accent links).
 *
 * @package New_Bloggers_Theme
 * @license GPL-2.0-or-later
 */

/* -------------------------------------------------------------------------
   Design tokens
   ------------------------------------------------------------------------- */
:root {
	--cst-color-bg: #f5f5f5;
	--cst-color-surface: #ffffff;
	--cst-color-text: #222222;
	--cst-color-muted: #666666;
	--cst-color-header: #1a1a1a;
	--cst-color-header-text: #f0f0f0;
	--cst-color-accent: #c0392b;
	--cst-color-accent-hover: #962d22;
	--cst-color-border: #e6e6e6;
	--cst-font-body: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	--cst-font-heading: Georgia, "Times New Roman", serif;
	--cst-container: 1170px;
	--cst-sidebar: 320px;
	--cst-gap: 1.5rem;
	--cst-radius: 4px;
	--cst-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--cst-font-body);
	font-size: 16px;
	line-height: 1.65;
	color: var(--cst-color-text);
	background: var(--cst-color-bg);
}

a {
	color: var(--cst-color-accent);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover,
a:focus {
	color: var(--cst-color-accent-hover);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: #fff;
	clip: auto;
	clip-path: none;
	color: #000;
	display: block;
	font-size: 1rem;
	height: auto;
	left: 8px;
	line-height: normal;
	padding: 12px 16px;
	top: 8px;
	width: auto;
	z-index: 100000;
}

/* -------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------- */
.cst-container {
	width: min(100% - 2rem, var(--cst-container));
	margin-inline: auto;
}

.cst-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--cst-sidebar);
	gap: var(--cst-gap);
	padding-block: 2rem;
}

.cst-layout--page {
	grid-template-columns: minmax(0, 1fr);
}

.cst-main__content {
	min-width: 0;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.cst-header {
	background: var(--cst-color-header);
	color: var(--cst-color-header-text);
	border-bottom: 3px solid var(--cst-color-accent);
}

.cst-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: 1rem;
}

.cst-site-title {
	margin: 0;
	font-family: var(--cst-font-heading);
	font-size: 1.75rem;
	font-weight: 700;
}

.cst-site-title a {
	color: inherit;
}

.cst-site-title a:hover {
	color: #fff;
}

.cst-site-description {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	opacity: 0.75;
}

.cst-logo img {
	max-height: 60px;
	width: auto;
}

.cst-nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: inherit;
	padding: 0.5rem 0.75rem;
	border-radius: var(--cst-radius);
	cursor: pointer;
}

.cst-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
}

.cst-menu a {
	color: var(--cst-color-header-text);
	font-size: 0.9375rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.cst-menu a:hover,
.cst-menu .current-menu-item > a {
	color: #fff;
}

/* -------------------------------------------------------------------------
   Cards / post grid
   ------------------------------------------------------------------------- */
.cst-page-header {
	margin-bottom: 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 2px solid var(--cst-color-accent);
}

.cst-page-title,
.cst-entry-title {
	font-family: var(--cst-font-heading);
	line-height: 1.25;
	margin: 0 0 0.5rem;
}

.cst-post-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--cst-gap);
}

.cst-card {
	background: var(--cst-color-surface);
	border: 1px solid var(--cst-color-border);
	border-radius: var(--cst-radius);
	overflow: hidden;
	box-shadow: var(--cst-shadow);
	display: flex;
	flex-direction: column;
}

.cst-card__media {
	display: block;
	overflow: hidden;
}

.cst-card__image {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.cst-card:hover .cst-card__image {
	transform: scale(1.03);
}

.cst-card__body {
	padding: 1rem 1.25rem 1.25rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.cst-card__category {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.cst-card__title {
	margin: 0 0 0.5rem;
	font-family: var(--cst-font-heading);
	font-size: 1.25rem;
	line-height: 1.35;
}

.cst-card__title a {
	color: var(--cst-color-text);
}

.cst-card__title a:hover {
	color: var(--cst-color-accent);
}

.cst-card__meta {
	font-size: 0.8125rem;
	color: var(--cst-color-muted);
	margin-bottom: 0.75rem;
}

.cst-card__excerpt {
	color: var(--cst-color-muted);
	font-size: 0.9375rem;
	margin-bottom: 1rem;
	flex: 1;
}

.cst-card__link {
	font-weight: 700;
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* -------------------------------------------------------------------------
   Single / page article
   ------------------------------------------------------------------------- */
.cst-article {
	background: var(--cst-color-surface);
	border: 1px solid var(--cst-color-border);
	border-radius: var(--cst-radius);
	padding: 1.5rem 2rem 2rem;
	box-shadow: var(--cst-shadow);
}

.cst-entry-header {
	margin-bottom: 1rem;
}

.cst-entry-title {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
}

.cst-entry-meta {
	color: var(--cst-color-muted);
	font-size: 0.875rem;
}

.cst-entry-media {
	margin: 0 0 1.5rem;
	border-radius: var(--cst-radius);
	overflow: hidden;
}

.cst-entry-content > *:first-child {
	margin-top: 0;
}

.cst-entry-content > *:last-child {
	margin-bottom: 0;
}

.cst-entry-footer {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--cst-color-border);
	font-size: 0.875rem;
}

/* -------------------------------------------------------------------------
   Sidebar & footer
   ------------------------------------------------------------------------- */
.cst-sidebar .widget {
	background: var(--cst-color-surface);
	border: 1px solid var(--cst-color-border);
	border-radius: var(--cst-radius);
	padding: 1rem 1.25rem;
	margin-bottom: var(--cst-gap);
}

.cst-sidebar .widget-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-bottom: 2px solid var(--cst-color-accent);
	padding-bottom: 0.5rem;
}

.cst-footer {
	background: var(--cst-color-header);
	color: var(--cst-color-header-text);
	margin-top: 2rem;
}

.cst-footer__widgets {
	padding: 2rem 0 1rem;
}

.cst-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding: 1.25rem 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-size: 0.875rem;
}

.cst-menu--footer a {
	color: rgba(255, 255, 255, 0.85);
}

.cst-copyright a {
	color: #fff;
}

/* -------------------------------------------------------------------------
   Forms, buttons, pagination
   ------------------------------------------------------------------------- */
.cst-button,
.cst-search-form__submit {
	display: inline-block;
	background: var(--cst-color-accent);
	color: #fff !important;
	border: 0;
	border-radius: var(--cst-radius);
	padding: 0.625rem 1.25rem;
	font-weight: 700;
	font-size: 0.875rem;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.cst-button:hover,
.cst-search-form__submit:hover {
	background: var(--cst-color-accent-hover);
	color: #fff !important;
}

.cst-search-form {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
}

.cst-search-form__field {
	flex: 1;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--cst-color-border);
	border-radius: var(--cst-radius);
	font: inherit;
}

.cst-pagination {
	margin-top: 2rem;
}

.cst-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.cst-pagination a,
.cst-pagination span {
	display: inline-block;
	padding: 0.5rem 0.875rem;
	border: 1px solid var(--cst-color-border);
	border-radius: var(--cst-radius);
	background: var(--cst-color-surface);
}

.cst-pagination .current {
	background: var(--cst-color-accent);
	border-color: var(--cst-color-accent);
	color: #fff;
}

.cst-404 {
	text-align: center;
	padding: 2rem 0;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 960px) {
	.cst-layout {
		grid-template-columns: 1fr;
	}

	.cst-post-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.cst-nav-toggle {
		display: inline-block;
	}

	.cst-nav {
		width: 100%;
		display: none;
	}

	.cst-nav.is-open {
		display: block;
	}

	.cst-menu--primary {
		flex-direction: column;
		padding-top: 0.5rem;
	}
}
