/*
Theme Name: HelloDigi Modern
Theme URI: https://hellodigi.ir/
Author: HelloDigi
Author URI: https://hellodigi.ir/
Description: قالب اختصاصی، سریع و راست‌چین هلو دیجی برای انتشار محتوای شبکه، امنیت و فناوری.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.4
Text Domain: hellodigi-modern
*/

@font-face {
	font-family: "Shabnam";
	src: url("assets/fonts/Shabnam-Light-FD.woff") format("woff");
	font-style: normal;
	font-weight: 300;
	font-display: swap;
}

@font-face {
	font-family: "Shabnam";
	src: url("assets/fonts/Shabnam-FD.woff") format("woff");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: "Shabnam";
	src: url("assets/fonts/Shabnam-Bold-FD.woff") format("woff");
	font-style: normal;
	font-weight: 700;
	font-display: swap;
}

:root {
	--color-canvas: #f3f7f8;
	--color-surface: #ffffff;
	--color-surface-soft: #eaf3f4;
	--color-ink: #102532;
	--color-muted: #617581;
	--color-border: #dce7e9;
	--color-navy: #061d2b;
	--color-navy-soft: #0d3445;
	--color-brand: #008f95;
	--color-brand-strong: #006f75;
	--color-brand-light: #60e2db;
	--color-accent: #f6b73c;
	--color-danger: #bc3c4b;
	--shadow-sm: 0 8px 25px rgb(7 35 49 / 8%);
	--shadow-md: 0 18px 50px rgb(7 35 49 / 13%);
	--radius-sm: 10px;
	--radius-md: 18px;
	--radius-lg: 26px;
	--container: 1180px;
	--font-body: "Shabnam", Tahoma, Arial, sans-serif;
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--color-canvas);
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.9;
	direction: rtl;
	text-rendering: optimizeLegibility;
}

body.nav-open {
	overflow: hidden;
}

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

figure {
	margin: 0;
}

a {
	color: var(--color-brand-strong);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--color-brand);
}

button,
input,
textarea,
select {
	font: inherit;
}

button,
input[type="submit"] {
	cursor: pointer;
}

:focus-visible {
	outline: 3px solid var(--color-accent);
	outline-offset: 3px;
}

::selection {
	background: var(--color-brand-light);
	color: var(--color-navy);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-block: 0 0.6em;
	color: var(--color-navy);
	font-weight: 700;
	line-height: 1.5;
}

p {
	margin-block: 0 1.2em;
}

.container {
	width: min(calc(100% - 36px), var(--container));
	margin-inline: auto;
}

.site-main {
	min-height: 55vh;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	top: 10px;
	right: 10px;
	z-index: 100000;
	display: block;
	width: auto;
	height: auto;
	padding: 12px 18px;
	clip: auto;
	background: var(--color-surface);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-md);
	color: var(--color-navy);
	font-weight: 700;
}

.skip-link {
	direction: rtl;
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--color-surface);
	box-shadow: 0 1px 0 var(--color-border);
}

.admin-bar .site-header {
	top: 32px;
}

.top-strip {
	background: var(--color-navy);
	color: #c8d9de;
	font-size: 0.78rem;
}

.top-strip__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 34px;
	gap: 16px;
}

.top-strip p {
	margin: 0;
}

.top-strip__signal {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.top-strip__signal::before {
	width: 7px;
	height: 7px;
	background: var(--color-brand-light);
	border-radius: 50%;
	box-shadow: 0 0 0 4px rgb(96 226 219 / 14%);
	content: "";
}

.top-strip a {
	color: #e9f7f6;
	text-decoration: none;
}

.top-strip a:hover {
	color: var(--color-brand-light);
}

.brand-row {
	display: grid;
	grid-template-columns: minmax(190px, auto) 1fr;
	align-items: center;
	gap: 28px;
	padding-block: 18px;
}

.site-branding {
	display: flex;
	align-items: center;
	min-width: 0;
}

.custom-logo-link {
	display: inline-flex;
	align-items: center;
}

.custom-logo {
	width: auto;
	max-width: 245px;
	max-height: 58px;
}

.brand-mark {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--color-navy);
	text-decoration: none;
}

.brand-mark:hover {
	color: var(--color-navy);
}

.brand-mark__icon {
	display: grid;
	width: 50px;
	height: 50px;
	place-items: center;
	background: linear-gradient(145deg, var(--color-brand-light), var(--color-brand));
	border-radius: 15px 5px 15px 15px;
	box-shadow: 0 8px 20px rgb(0 143 149 / 24%);
	color: var(--color-navy);
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1;
}

.brand-mark__text {
	display: grid;
	gap: 1px;
}

.brand-mark__name {
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.5;
}

.brand-mark__tagline {
	color: var(--color-muted);
	font-size: 0.74rem;
	font-weight: 400;
}

.header-search {
	justify-self: end;
	width: min(100%, 430px);
}

.search-form {
	display: flex;
	align-items: stretch;
	width: 100%;
	min-height: 48px;
	padding: 4px;
	background: var(--color-canvas);
	border: 1px solid var(--color-border);
	border-radius: 14px;
}

.search-field {
	min-width: 0;
	flex: 1;
	padding: 8px 14px;
	background: transparent;
	border: 0;
	color: var(--color-ink);
	outline: 0;
}

.search-field::placeholder {
	color: #84959d;
}

.search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 78px;
	padding: 8px 16px;
	background: var(--color-brand-strong);
	border: 0;
	border-radius: 10px;
	color: #fff;
	font-weight: 700;
	transition: background-color 160ms ease, transform 160ms ease;
}

.search-submit:hover {
	background: var(--color-navy-soft);
	transform: translateY(-1px);
}

.nav-shell {
	background: var(--color-navy);
}

.nav-shell__inner {
	display: flex;
	align-items: center;
	min-height: 52px;
}

.primary-nav {
	width: 100%;
}

.site-menu {
	display: flex;
	align-items: stretch;
	gap: 2px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.site-menu .menu-item {
	position: relative;
	margin: 0;
}

.site-menu a {
	display: flex;
	align-items: center;
	min-height: 52px;
	padding-inline: 15px;
	border-radius: 8px;
	color: #e4eff2;
	font-size: 0.92rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 150ms ease, color 150ms ease;
}

.site-menu a:hover,
.site-menu .current-menu-item > a,
.site-menu .current-menu-ancestor > a {
	background: rgb(96 226 219 / 12%);
	color: var(--color-brand-light);
}

.site-menu .sub-menu {
	position: absolute;
	top: calc(100% - 3px);
	right: 0;
	z-index: 20;
	visibility: hidden;
	min-width: 220px;
	padding: 8px;
	margin: 0;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 0 0 14px 14px;
	box-shadow: var(--shadow-md);
	list-style: none;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}

.site-menu .sub-menu a {
	min-height: 42px;
	color: var(--color-ink);
	font-size: 0.86rem;
}

.site-menu .menu-item:hover > .sub-menu,
.site-menu .menu-item:focus-within > .sub-menu {
	visibility: visible;
	opacity: 1;
	transform: translateY(0);
}

.menu-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 9px 0;
	background: transparent;
	border: 0;
	color: #fff;
	font-weight: 700;
}

.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	border-radius: 4px;
	content: "";
	transition: transform 180ms ease;
}

.menu-toggle__bars {
	position: relative;
}

.menu-toggle__bars::before {
	position: absolute;
	top: -7px;
}

.menu-toggle__bars::after {
	position: absolute;
	top: 7px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars {
	background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before {
	top: 0;
	transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after {
	top: 0;
	transform: rotate(-45deg);
}

/* Common page building blocks */
.page-section {
	padding-block: 52px;
}

.page-section--tight {
	padding-block: 32px;
}

.page-section--surface {
	background: var(--color-surface);
}

.section-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 20px;
	margin-block-end: 24px;
}

.section-heading__title {
	position: relative;
	padding-inline-start: 16px;
	margin: 0;
	font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.section-heading__title::before {
	position: absolute;
	top: 0.2em;
	right: 0;
	width: 5px;
	height: 1.25em;
	background: linear-gradient(var(--color-brand-light), var(--color-brand));
	border-radius: 5px;
	content: "";
}

.section-heading__link {
	white-space: nowrap;
	font-size: 0.86rem;
	font-weight: 700;
	text-decoration: none;
}

.section-heading__link::after {
	margin-inline-start: 6px;
	content: "←";
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-block-end: 8px;
	color: var(--color-brand-strong);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.eyebrow::before {
	width: 18px;
	height: 2px;
	background: currentColor;
	content: "";
}

.topic-cloud {
	display: flex;
	align-items: center;
	gap: 10px;
	overflow-x: auto;
	padding-block: 15px;
	scrollbar-width: thin;
}

.topic-cloud__label {
	flex: none;
	color: var(--color-navy);
	font-size: 0.83rem;
	font-weight: 700;
}

.topic-chip {
	flex: none;
	padding: 7px 13px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 999px;
	color: var(--color-muted);
	font-size: 0.78rem;
	text-decoration: none;
	transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.topic-chip:hover {
	background: var(--color-surface-soft);
	border-color: #b8d7d9;
	color: var(--color-brand-strong);
}

.breadcrumbs {
	display: flex;
	align-items: center;
	gap: 8px;
	overflow: hidden;
	margin-block: 28px 18px;
	color: var(--color-muted);
	font-size: 0.78rem;
	white-space: nowrap;
}

.breadcrumbs a {
	color: var(--color-muted);
	text-decoration: none;
}

.breadcrumbs span[aria-current="page"] {
	overflow: hidden;
	color: var(--color-ink);
	text-overflow: ellipsis;
}

/* Post cards */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
}

.post-card {
	position: relative;
	display: flex;
	min-width: 0;
	height: 100%;
	flex-direction: column;
	overflow: hidden;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-card:hover {
	border-color: #c6dcdf;
	box-shadow: var(--shadow-md);
	transform: translateY(-4px);
}

.post-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: linear-gradient(145deg, var(--color-navy-soft), var(--color-brand-strong));
}

.post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 450ms ease;
}

.post-card__media > a:first-child {
	display: block;
	width: 100%;
	height: 100%;
}

.post-card:hover .post-card__media img {
	transform: scale(1.035);
}

.media-placeholder {
	display: grid;
	width: 100%;
	height: 100%;
	place-items: center;
	background:
		radial-gradient(circle at 18% 22%, rgb(96 226 219 / 22%), transparent 30%),
		linear-gradient(145deg, var(--color-navy-soft), var(--color-navy));
	color: rgb(255 255 255 / 58%);
	font-size: 0.82rem;
	font-weight: 700;
}

.post-card__category {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 2;
	padding: 5px 10px;
	background: rgb(6 29 43 / 88%);
	border: 1px solid rgb(255 255 255 / 14%);
	border-radius: 999px;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.6;
	text-decoration: none;
	backdrop-filter: blur(8px);
}

.post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px;
}

.post-card__title {
	margin: 0 0 10px;
	font-size: 1rem;
	line-height: 1.75;
}

.post-card__title a {
	color: var(--color-navy);
	text-decoration: none;
}

.post-card__title a:hover {
	color: var(--color-brand-strong);
}

.post-card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin: 0 0 14px;
	color: var(--color-muted);
	font-size: 0.84rem;
	line-height: 1.85;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.post-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-block-start: auto;
	color: var(--color-muted);
	font-size: 0.72rem;
}

.post-meta a {
	color: inherit;
	text-decoration: none;
}

/* Homepage */
.home-intro {
	padding-block: 38px 8px;
}

.home-intro__copy {
	max-width: 780px;
}

.home-intro h1 {
	margin: 0 0 8px;
	font-size: clamp(1.7rem, 3.2vw, 2.75rem);
}

.home-intro p {
	max-width: 670px;
	margin: 0;
	color: var(--color-muted);
	font-size: clamp(0.9rem, 1.3vw, 1.05rem);
}

.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.92fr);
	gap: 22px;
}

.hero-grid__side {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.post-card--lead .post-card__media {
	aspect-ratio: 16 / 9;
}

.post-card--lead .post-card__body {
	padding: 24px;
}

.post-card--lead .post-card__title {
	font-size: clamp(1.35rem, 2.4vw, 2rem);
	line-height: 1.65;
}

.post-card--lead .post-card__excerpt {
	font-size: 0.94rem;
	-webkit-line-clamp: 3;
}

.post-card--compact {
	border-radius: 15px;
}

.post-card--compact .post-card__media {
	aspect-ratio: 16 / 9;
}

.post-card--compact .post-card__body {
	padding: 13px;
}

.post-card--compact .post-card__category {
	right: 8px;
	bottom: 8px;
	padding: 3px 8px;
	font-size: 0.62rem;
}

.post-card--compact .post-card__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 0 0 8px;
	font-size: 0.84rem;
	line-height: 1.7;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.post-card--compact .post-meta {
	font-size: 0.64rem;
}

.category-band {
	padding-block: 52px;
	border-top: 1px solid var(--color-border);
}

.category-band:first-child {
	border-top: 0;
}

.category-band__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.discovery-box {
	position: relative;
	overflow: hidden;
	padding: clamp(26px, 5vw, 54px);
	background:
		radial-gradient(circle at 14% 20%, rgb(96 226 219 / 18%), transparent 28%),
		linear-gradient(125deg, var(--color-navy), var(--color-navy-soft));
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	color: #d9e8eb;
}

.discovery-box::after {
	position: absolute;
	bottom: -90px;
	left: -70px;
	width: 230px;
	height: 230px;
	border: 36px solid rgb(96 226 219 / 8%);
	border-radius: 50%;
	content: "";
}

.discovery-box__content {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
	align-items: center;
	gap: 42px;
}

.discovery-box h2 {
	margin: 0 0 8px;
	color: #fff;
	font-size: clamp(1.45rem, 2.6vw, 2.15rem);
}

.discovery-box p {
	margin: 0;
	color: #bed2d7;
}

.discovery-box .search-form {
	background: #fff;
	border-color: transparent;
}

/* Archive, search and index */
.page-hero {
	padding-block: 44px 36px;
	background:
		radial-gradient(circle at 18% 0, rgb(96 226 219 / 15%), transparent 26%),
		linear-gradient(135deg, var(--color-navy), var(--color-navy-soft));
	color: #cce0e4;
}

.page-hero .breadcrumbs {
	margin-block: 0 18px;
	color: #adc5ca;
}

.page-hero .breadcrumbs a,
.page-hero .breadcrumbs span[aria-current="page"] {
	color: inherit;
}

.page-hero h1 {
	max-width: 880px;
	margin: 0 0 8px;
	color: #fff;
	font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.page-hero p,
.archive-description {
	max-width: 760px;
	margin: 0;
	color: #bed2d7;
}

.archive-description p:last-child {
	margin-bottom: 0;
}

.pagination {
	margin-block-start: 38px;
}

.nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

.page-numbers {
	display: grid;
	min-width: 42px;
	min-height: 42px;
	padding: 7px 12px;
	place-items: center;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 10px;
	color: var(--color-ink);
	font-size: 0.82rem;
	text-decoration: none;
}

.page-numbers.current,
.page-numbers:hover {
	background: var(--color-brand-strong);
	border-color: var(--color-brand-strong);
	color: #fff;
}

.page-numbers.dots {
	background: transparent;
	border-color: transparent;
}

.page-numbers.prev,
.page-numbers.next {
	width: auto;
}

.nothing-found {
	max-width: 720px;
	padding: clamp(28px, 6vw, 58px);
	margin-inline: auto;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	text-align: center;
}

.nothing-found__code {
	display: block;
	margin-block-end: 8px;
	color: var(--color-brand);
	font-size: clamp(3.5rem, 11vw, 7rem);
	font-weight: 700;
	line-height: 1;
}

.nothing-found .search-form {
	max-width: 520px;
	margin: 24px auto 0;
}

/* Single posts and pages */
.single-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	align-items: start;
	gap: 30px;
	padding-block-end: 58px;
}

.article-shell {
	min-width: 0;
	overflow: hidden;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

.article-header {
	padding: clamp(24px, 5vw, 48px);
	padding-block-end: 28px;
}

.article-header h1 {
	margin: 0 0 18px;
	font-size: clamp(1.7rem, 3.5vw, 2.8rem);
	line-height: 1.55;
}

.article-kicker {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-block-end: 15px;
}

.article-kicker a {
	padding: 5px 10px;
	background: var(--color-surface-soft);
	border-radius: 999px;
	color: var(--color-brand-strong);
	font-size: 0.72rem;
	font-weight: 700;
	text-decoration: none;
}

.article-featured {
	margin-inline: clamp(16px, 3vw, 28px);
	overflow: hidden;
	border-radius: var(--radius-md);
}

.article-featured img {
	width: 100%;
	max-height: 600px;
	object-fit: cover;
}

.article-featured figcaption {
	padding: 9px 12px;
	background: var(--color-canvas);
	color: var(--color-muted);
	font-size: 0.74rem;
	text-align: center;
}

.entry-content {
	padding: clamp(28px, 5vw, 52px);
	color: #233b48;
	font-size: 1.03rem;
	line-height: 2.08;
}

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

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

.entry-content h2 {
	margin-block: 1.8em 0.65em;
	font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.entry-content h3 {
	margin-block: 1.6em 0.6em;
	font-size: clamp(1.15rem, 2vw, 1.45rem);
}

.entry-content h4 {
	margin-block: 1.4em 0.5em;
}

.entry-content a {
	font-weight: 700;
}

.entry-content ul,
.entry-content ol {
	padding-inline-start: 1.4em;
}

.entry-content li + li {
	margin-block-start: 0.4em;
}

.entry-content blockquote {
	padding: 18px 22px;
	margin: 28px 0;
	background: var(--color-surface-soft);
	border-right: 5px solid var(--color-brand);
	border-radius: var(--radius-sm);
	color: #31505d;
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content pre,
	.entry-content code,
	.entry-content kbd {
	direction: ltr;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	text-align: left;
}

.entry-content pre {
	overflow-x: auto;
	padding: 20px;
	background: var(--color-navy);
	border-radius: var(--radius-sm);
	color: #dcecef;
	font-size: 0.85rem;
	line-height: 1.75;
	-webkit-overflow-scrolling: touch;
}

.entry-content :not(pre) > code {
	padding: 0.12em 0.36em;
	background: #e5eff0;
	border-radius: 5px;
	color: #8d2b45;
	font-size: 0.9em;
}

.entry-content table {
	width: 100%;
	margin-block: 26px;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
	padding: 11px 13px;
	border: 1px solid var(--color-border);
	text-align: right;
}

.entry-content th {
	background: var(--color-surface-soft);
	color: var(--color-navy);
}

.entry-content iframe {
	max-width: 100%;
}

.entry-content .alignwide {
	width: min(1060px, calc(100vw - 44px));
	max-width: none;
	margin-inline: 50%;
	transform: translateX(50%);
}

.entry-content .alignfull {
	width: 100vw;
	max-width: none;
	margin-inline: 50%;
	transform: translateX(50%);
}

.entry-content .wp-caption-text,
.entry-content figcaption {
	margin-block-start: 8px;
	color: var(--color-muted);
	font-size: 0.76rem;
	text-align: center;
}

.article-footer {
	padding: 0 clamp(28px, 5vw, 52px) clamp(28px, 5vw, 48px);
}

.tag-list {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	padding-block-start: 24px;
	border-top: 1px solid var(--color-border);
}

.tag-list a {
	padding: 6px 10px;
	background: var(--color-canvas);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	color: var(--color-muted);
	font-size: 0.72rem;
	text-decoration: none;
}

.tag-list a::before {
	content: "#";
}

.post-navigation {
	padding: 26px clamp(28px, 5vw, 52px);
	border-top: 1px solid var(--color-border);
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
	gap: 18px;
}

.post-navigation a {
	display: flex;
	height: 100%;
	flex-direction: column;
	padding: 15px;
	background: var(--color-canvas);
	border-radius: var(--radius-sm);
	color: var(--color-navy);
	font-size: 0.86rem;
	font-weight: 700;
	text-decoration: none;
}

.post-navigation .nav-subtitle {
	color: var(--color-muted);
	font-size: 0.68rem;
	font-weight: 400;
}

.article-sidebar {
	position: sticky;
	top: 150px;
	display: grid;
	gap: 18px;
}

.sidebar-card {
	padding: 20px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-sm);
}

.sidebar-title,
.widget-title {
	position: relative;
	padding-inline-start: 12px;
	margin: 0 0 15px;
	font-size: 1rem;
}

.sidebar-title::before,
.widget-title::before {
	position: absolute;
	top: 0.25em;
	right: 0;
	width: 4px;
	height: 1.15em;
	background: var(--color-brand);
	border-radius: 3px;
	content: "";
}

.sidebar-list,
.widget ul {
	padding: 0;
	margin: 0;
	list-style: none;
}

.sidebar-list li,
.widget li {
	padding-block: 9px;
	border-bottom: 1px solid var(--color-border);
	font-size: 0.82rem;
	line-height: 1.75;
}

.sidebar-list li:last-child,
.widget li:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.sidebar-list a,
.widget li a {
	color: var(--color-ink);
	text-decoration: none;
}

.sidebar-list a:hover,
.widget li a:hover {
	color: var(--color-brand-strong);
}

.sidebar-categories a {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}

.sidebar-categories .count {
	color: var(--color-muted);
	font-size: 0.7rem;
}

.author-box {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 18px;
	padding: 24px;
	margin-block-start: 24px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}

.author-box__avatar {
	display: grid;
	width: 72px;
	height: 72px;
	place-items: center;
	background: linear-gradient(145deg, var(--color-brand-light), var(--color-brand));
	border-radius: 50%;
	color: var(--color-navy);
	font-size: 1.5rem;
	font-weight: 700;
}

.author-box h2 {
	margin: 0 0 4px;
	font-size: 1rem;
}

.author-box p {
	margin: 0;
	color: var(--color-muted);
	font-size: 0.82rem;
}

.related-posts {
	padding-block: 44px 58px;
}

.page-shell {
	max-width: 900px;
	padding-block-end: 58px;
	margin-inline: auto;
}

.page-shell .article-shell {
	padding-block-start: 1px;
}

.page-links {
	clear: both;
	margin-block-start: 26px;
	font-weight: 700;
}

/* Comments and forms */
.comments-area {
	padding: clamp(24px, 5vw, 44px);
	margin-block-start: 24px;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

.comments-title,
.comment-reply-title {
	font-size: 1.3rem;
}

.comment-list {
	padding: 0;
	margin: 0;
	list-style: none;
}

.comment-list .children {
	padding-inline-start: 26px;
	list-style: none;
}

.comment-body {
	padding-block: 22px;
	border-bottom: 1px solid var(--color-border);
}

.comment-meta {
	margin-block-end: 12px;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
}

.comment-author img {
	border-radius: 50%;
}

.comment-metadata {
	margin-inline-start: 48px;
	font-size: 0.7rem;
}

.comment-metadata a {
	color: var(--color-muted);
	text-decoration: none;
}

.comment-content {
	font-size: 0.9rem;
}

.reply a {
	font-size: 0.74rem;
	font-weight: 700;
}

.comment-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.comment-form-comment,
.comment-form-cookies-consent,
.form-submit,
.logged-in-as,
.comment-notes {
	grid-column: 1 / -1;
}

.comment-form p {
	margin: 0;
}

.comment-form label {
	display: block;
	margin-block-end: 5px;
	font-size: 0.78rem;
	font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
	width: 100%;
	padding: 11px 13px;
	background: var(--color-surface);
	border: 1px solid #cbdadd;
	border-radius: 10px;
	color: var(--color-ink);
}

textarea {
	min-height: 150px;
	resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--color-brand);
	box-shadow: 0 0 0 3px rgb(0 143 149 / 12%);
	outline: 0;
}

input[type="submit"],
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 20px;
	background: var(--color-brand-strong);
	border: 0;
	border-radius: 10px;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

input[type="submit"]:hover,
.button:hover {
	background: var(--color-navy-soft);
	color: #fff;
}

/* Footer */
.site-footer {
	background: var(--color-navy);
	color: #b9ccd1;
}

.footer-main {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr 0.8fr;
	gap: 50px;
	padding-block: 54px 44px;
}

.footer-brand .brand-mark {
	color: #fff;
}

.footer-brand .brand-mark:hover {
	color: #fff;
}

.footer-brand .brand-mark__tagline {
	color: #9eb7bd;
}

.footer-about {
	max-width: 460px;
	margin-block: 18px 0;
	font-size: 0.85rem;
}

.footer-title {
	margin: 0 0 16px;
	color: #fff;
	font-size: 1rem;
}

.footer-menu,
.footer-categories {
	display: grid;
	gap: 8px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.footer-menu a,
.footer-categories a {
	color: #b9ccd1;
	font-size: 0.82rem;
	text-decoration: none;
}

.footer-menu a:hover,
.footer-categories a:hover {
	color: var(--color-brand-light);
}

.footer-bottom {
	border-top: 1px solid rgb(255 255 255 / 9%);
}

.footer-bottom__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 64px;
	font-size: 0.74rem;
}

.footer-bottom p {
	margin: 0;
}

.back-to-top {
	color: #dcebed;
	font-weight: 700;
	text-decoration: none;
}

/* WordPress compatibility */
.sticky {
	border-color: #9ccfd1;
}

.bypostauthor {
	outline: 0;
}

.gallery-caption,
.wp-caption-text {
	color: var(--color-muted);
}

.wp-block-image img,
.wp-block-cover,
.wp-block-gallery {
	border-radius: var(--radius-sm);
}

.wp-block-button__link {
	background: var(--color-brand-strong);
	border-radius: 10px;
	font-family: inherit;
}

.wp-block-separator {
	border-color: var(--color-border);
}

/* Responsive */
@media (max-width: 1080px) {
	.posts-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.hero-grid {
		grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
	}

	.single-layout {
		grid-template-columns: minmax(0, 1fr) 270px;
	}
}

@media (max-width: 900px) {
	.admin-bar .site-header {
		top: 46px;
	}

	.brand-row {
		grid-template-columns: 1fr;
		gap: 14px;
		padding-block: 14px;
	}

	.header-search {
		justify-self: stretch;
		width: 100%;
	}

	.hero-grid {
		grid-template-columns: 1fr;
	}

	.hero-grid__side {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.post-card--compact .post-card__body {
		padding: 11px;
	}

	.post-card--compact .post-meta span:nth-last-child(-n + 2) {
		display: none;
	}

	.single-layout {
		grid-template-columns: 1fr;
	}

	.article-sidebar {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.footer-main {
		grid-template-columns: 1fr 1fr;
	}

	.footer-brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 760px) {
	.site-header,
	.admin-bar .site-header {
		position: relative;
		top: auto;
	}

	.container {
		width: min(calc(100% - 28px), var(--container));
	}

	.top-strip__inner {
		justify-content: center;
	}

	.top-strip__secondary {
		display: none;
	}

	.nav-shell__inner {
		display: block;
	}

	.has-js .menu-toggle {
		display: flex;
	}

	.site-menu {
		flex-direction: column;
		align-items: stretch;
		padding-block: 8px 14px;
	}

	.has-js .primary-nav {
		display: none;
	}

	.has-js .primary-nav.is-open {
		display: block;
		max-height: calc(100vh - 190px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.site-menu a {
		min-height: 44px;
		padding-inline: 12px;
	}

	.site-menu .sub-menu {
		position: static;
		visibility: visible;
		display: block;
		padding: 0 18px 4px 0;
		background: transparent;
		border: 0;
		box-shadow: none;
		opacity: 1;
		transform: none;
	}

	.site-menu .sub-menu a {
		min-height: 38px;
		color: #c7d9dd;
	}

	.home-intro {
		padding-block-start: 28px;
	}

	.page-section {
		padding-block: 38px;
	}

	.posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.hero-grid__side {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	.category-band__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.category-band__grid .post-card:last-child {
		display: none;
	}

	.discovery-box__content {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.footer-main {
		gap: 32px;
	}
}

@media (max-width: 520px) {
	body {
		font-size: 15px;
	}

	.brand-mark__icon {
		width: 44px;
		height: 44px;
	}

	.brand-mark__tagline {
		display: none;
	}

	.custom-logo {
		max-height: 48px;
	}

	.search-form {
		min-height: 44px;
	}

	.search-submit {
		min-width: 67px;
		padding-inline: 12px;
	}

	.posts-grid,
	.category-band__grid,
	.article-sidebar,
	.footer-main {
		grid-template-columns: 1fr;
	}

	.category-band__grid .post-card:last-child {
		display: flex;
	}

	.hero-grid__side {
		grid-template-columns: 1fr;
	}

	.post-card--compact {
		display: grid;
		grid-template-columns: 120px minmax(0, 1fr);
	}

	.post-card--compact .post-card__media {
		height: 100%;
		aspect-ratio: auto;
	}

	.post-card--compact .post-card__category {
		display: none;
	}

	.article-shell {
		border-radius: var(--radius-md);
	}

	.article-header,
	.entry-content,
	.article-footer {
		padding-inline: 20px;
	}

	.article-featured {
		margin-inline: 12px;
	}

	.entry-content {
		font-size: 0.98rem;
	}

	.post-navigation .nav-links,
	.comment-form {
		grid-template-columns: 1fr;
	}

	.comment-form > * {
		grid-column: 1;
	}

	.author-box {
		grid-template-columns: 52px 1fr;
		padding: 18px;
	}

	.author-box__avatar {
		width: 52px;
		height: 52px;
		font-size: 1.15rem;
	}

	.footer-brand {
		grid-column: auto;
	}

	.footer-bottom__inner {
		align-items: flex-start;
		flex-direction: column;
		justify-content: center;
		padding-block: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media print {
	.site-header,
	.site-footer,
	.article-sidebar,
	.related-posts,
	.comments-area,
	.breadcrumbs {
		display: none !important;
	}

	body,
	.article-shell {
		background: #fff;
		box-shadow: none;
	}

	.single-layout {
		display: block;
	}

	a {
		color: inherit;
	}
}
