/* Focused public Blog styling for the YekjaKar /news routes. */
:root {
	--yek-news-green: #117554;
	--yek-news-green-soft: #edf7f2;
	--yek-news-blue: #4379f2;
	--yek-news-text: #1f2d3d;
	--yek-news-muted: #667085;
	--yek-news-border: #e4e7ec;
	--yek-news-surface: #fff;
}

.blog-list-content {
	max-width: 1180px;
	margin: 0 auto 4rem;
	padding-inline: 1.25rem;
}

body:has(.blog-list-content) .hero {
	max-width: 1180px;
	width: 100%;
	margin: 1.5rem auto 1rem;
	padding: clamp(1.25rem, 3vw, 2.25rem);
	border: 1px solid #d7e9e0;
	border-radius: 20px;
	background: var(--yek-news-green-soft);
}

body:has(.blog-list-content) .row.py-8 {
	display: block;
	max-width: 1180px;
	margin: 0 auto;
	padding-block: 1.5rem .75rem;
}

body:has(.blog-list-content) .row.py-8 > .col-md-8 {
	width: 100%;
	max-width: 100%;
	flex: 0 0 100%;
}

body:has(.blog-list-content) .hero-content {
	max-width: 720px;
	margin-block: 0;
}

body:has(.blog-list-content) .hero h1 {
	margin-bottom: .75rem;
	color: var(--yek-news-text);
	font-size: clamp(1.8rem, 4vw, 2.7rem);
	font-weight: 750;
	line-height: 1.4;
}

body:has(.blog-list-content) .hero p {
	margin-bottom: 0;
	color: var(--yek-news-muted);
	font-size: 1rem;
	line-height: 1.9;
}

body:has(.blog-list-content) .custom-select {
	min-height: 44px;
	border: 1px solid var(--yek-news-border);
	border-radius: 10px;
	background-color: var(--yek-news-surface);
	color: var(--yek-news-text);
}

.blog-list-content > [data-doctype="Blog Post"] {
	width: 100%;
}

.blog-list-content > [data-doctype="Blog Post"] > .text-muted {
	display: grid;
	min-height: 180px !important;
	place-items: center;
	margin: 0 auto;
	padding: 2rem;
	border: 1px dashed var(--yek-news-border);
	border-radius: 14px;
	background: var(--yek-news-surface);
	color: var(--yek-news-muted) !important;
	text-align: center;
}

.blog-list.result {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 380px));
	justify-content: center;
	gap: 1.25rem;
	margin: 0;
}

.blog-list.result > .blog-card {
	width: auto;
	max-width: none;
	flex: initial;
	padding: 0;
}

.blog-list .card {
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--yek-news-border);
	border-radius: 16px;
	background: var(--yek-news-surface);
	box-shadow: 0 3px 12px rgb(31 45 61 / 5%);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.blog-list .card:hover,
.blog-list .card:focus-within {
	transform: translateY(-3px);
	border-color: #b9d9cc;
	box-shadow: 0 10px 24px rgb(31 45 61 / 9%);
}

.blog-list .card-img-top {
	height: 190px;
	overflow: hidden;
	background: var(--yek-news-green-soft);
}

.blog-list .card-img-top img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .25s ease;
}

.blog-list .card:hover .card-img-top img {
	transform: scale(1.025);
}

.blog-list .default-cover {
	display: grid;
	width: 100%;
	height: 100%;
	place-items: center;
	padding: 1.5rem;
	background: linear-gradient(135deg, #edf7f2 0%, #eff4ff 100%);
	color: var(--yek-news-green);
	font-size: 1.05rem;
	font-weight: 700;
	text-align: center;
}

.blog-card:has(.default-cover) .card-img-top {
	height: 120px;
}

.blog-card .card-img-top .default-cover {
	background: var(--yek-news-green-soft) !important;
	color: var(--yek-news-green) !important;
}

.blog-card .card-img-top .default-cover span {
	visibility: hidden;
}

.blog-list .card-body {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1.25rem;
	padding: 1.25rem;
}

.blog-list .card-body .text-muted.small {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	color: var(--yek-news-muted) !important;
	font-size: .78rem;
	letter-spacing: 0;
}

.blog-list .card-body .text-body {
	border-radius: 999px;
	background: var(--yek-news-green-soft);
	color: var(--yek-news-green) !important;
	padding: .25rem .6rem;
}

.blog-list .card-body h5 {
	margin-block: .65rem .5rem;
	color: var(--yek-news-text) !important;
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1.65;
}

.blog-list .post-description {
	display: -webkit-box;
	margin-bottom: 0;
	overflow: hidden;
	color: var(--yek-news-muted) !important;
	font-size: .92rem;
	line-height: 1.85;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.blog-list .blog-card-footer {
	margin-top: auto;
	padding-top: .9rem;
	border-top: 1px solid var(--yek-news-border);
	color: var(--yek-news-muted);
	font-size: .8rem;
}

.blog-list .blog-card-footer a {
	color: var(--yek-news-blue);
	text-decoration: none;
}

.blog-list-content .btn-more {
	display: block;
	min-width: 9rem;
	margin: 2rem auto 0;
	border: 1px solid var(--yek-news-border);
	border-radius: 10px;
	background: var(--yek-news-surface);
	color: var(--yek-news-green);
	font-weight: 650;
}

.blog-container {
	max-width: 850px;
	margin: 2rem auto 4rem;
	padding: clamp(1.25rem, 4vw, 3rem);
	border: 1px solid var(--yek-news-border);
	border-radius: 18px;
	background: var(--yek-news-surface);
	box-shadow: 0 5px 24px rgb(31 45 61 / 5%);
}

.blog-container .blog-header {
	max-width: 720px;
	margin-inline: auto;
}

.blog-container .blog-content .blog-header {
	margin-top: 0;
	margin-bottom: 2rem;
}

.blog-container .blog-header > div:first-child {
	margin-bottom: 1rem;
	font-size: .85rem;
}

.blog-container .blog-header a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	margin-inline-end: .4rem;
	padding: .25rem .65rem;
	border: 1px solid #d7e9e0;
	border-radius: 999px;
	background: var(--yek-news-green-soft);
	color: var(--yek-news-blue);
	text-decoration: none;
}

.blog-container .blog-header a:hover {
	border-color: #a8d1be;
	color: var(--yek-news-green);
}

.blog-container .blog-title {
	margin: 0 0 1rem;
	color: var(--yek-news-text);
	font-size: clamp(1.75rem, 4vw, 2.6rem);
	font-weight: 750;
	line-height: 1.45;
}

.blog-container .blog-intro {
	margin-bottom: 1rem;
	color: var(--yek-news-muted);
	font-size: 1.05rem;
	line-height: 1.9;
}

.blog-container .blog-header .text-muted {
	color: var(--yek-news-muted) !important;
	font-size: .85rem;
}

.blog-container .from-markdown {
	max-width: 720px;
	margin: 2rem auto;
	color: var(--yek-news-text);
	font-size: 1rem;
	line-height: 2;
	overflow-wrap: anywhere;
}

.blog-container .from-markdown h2,
.blog-container .from-markdown h3,
.blog-container .from-markdown h4 {
	margin: 2rem 0 .8rem;
	color: var(--yek-news-text);
	font-weight: 700;
	line-height: 1.55;
}

.blog-container .from-markdown p,
.blog-container .from-markdown ul,
.blog-container .from-markdown ol {
	margin-bottom: 1.1rem;
}

.blog-container .from-markdown li + li {
	margin-top: .35rem;
}

.blog-container .from-markdown blockquote {
	margin: 1.5rem 0;
	padding: .8rem 1rem;
	border-inline-start: 3px solid var(--yek-news-green);
	border-radius: 8px;
	background: var(--yek-news-green-soft);
	color: var(--yek-news-muted);
}

.blog-container .from-markdown table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
}

.blog-container .from-markdown th,
.blog-container .from-markdown td {
	padding: .65rem .8rem;
	border: 1px solid var(--yek-news-border);
}

.blog-container .from-markdown th {
	background: var(--yek-news-green-soft);
	font-weight: 700;
}

.blog-container .blog-feedback button,
.blog-container .blog-comments button,
.blog-container .blog-comments input,
.blog-container .blog-comments textarea {
	border-radius: 9px;
}

.blog-container a:focus-visible,
.blog-list a:focus-visible,
.blog-list-content button:focus-visible,
.blog-list-content select:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--yek-news-blue) 45%, transparent);
	outline-offset: 3px;
}

.blog-container .from-markdown a {
	color: var(--yek-news-blue);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.blog-container .from-markdown img {
	max-width: 100%;
	height: auto;
	border: 1px solid var(--yek-news-border);
	border-radius: 12px;
}

.blog-container .blog-footer {
	max-width: 720px;
	margin: 2rem auto 0;
	padding-top: 1rem;
	border-top: 1px solid var(--yek-news-border);
	color: var(--yek-news-muted);
	font-size: .85rem;
}

/* Article reading rhythm and its compact return/category trail. */
.blog-container .blog-content {
	max-width: 760px;
	margin-inline: auto;
}

.news-article-cover {
	max-width: 760px;
	margin: 0 auto 1.75rem;
	overflow: hidden;
	border: 1px solid var(--yek-news-border);
	border-radius: 14px;
	background: var(--yek-news-green-soft);
}

.news-article-cover img {
	display: block;
	width: 100%;
	max-height: 420px;
	object-fit: cover;
}

.news-article-cover-fallback {
	display: grid;
	min-height: 220px;
	place-items: center;
	background: linear-gradient(135deg, #edf7f2 0%, #eff4ff 100%);
}

.news-article-cover-fallback img {
	width: auto;
	max-width: min(64%, 260px);
	max-height: 220px;
	object-fit: contain;
}

.blog-container .blog-header > div:first-child {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .45rem;
}

.blog-container .blog-header > div:first-child > span {
	color: #98a2b3 !important;
}

.blog-container .blog-header .text-muted time,
.blog-container .blog-footer time {
	font-variant-numeric: tabular-nums;
}

.blog-container > hr {
	max-width: 720px;
	margin: 1.75rem auto !important;
	border-color: var(--yek-news-border);
	opacity: 1;
}

.blog-container .from-markdown > :first-child {
	margin-top: 0;
}

.blog-container .from-markdown > :last-child {
	margin-bottom: 0;
}

.blog-container .from-markdown pre {
	max-width: 100%;
	padding: 1rem;
	overflow-x: auto;
	border: 1px solid var(--yek-news-border);
	border-radius: 10px;
	background: #f8fafc;
}

.blog-container .from-markdown code {
	font-size: .92em;
}

html[data-theme="dark"],
body[data-theme="dark"] {
	--yek-news-text: #e6edf3;
	--yek-news-muted: #a6b0bd;
	--yek-news-border: #344054;
	--yek-news-surface: #1d2939;
	--yek-news-green-soft: #183b30;
}

html[data-theme="dark"] .blog-list .card,
body[data-theme="dark"] .blog-list .card,
html[data-theme="dark"] .blog-container,
body[data-theme="dark"] .blog-container {
	background: var(--yek-news-surface);
	color: var(--yek-news-text);
}

html[data-theme="dark"] .blog-container .from-markdown pre,
body[data-theme="dark"] .blog-container .from-markdown pre {
	background: #101828;
}

.blog-container > .section[data-section-template="Section With Small CTA"] .section-small-cta {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem;
	padding: clamp(1rem, 2.5vw, 1.5rem);
	border: 1px solid #d7e9e0;
	border-radius: 14px;
	background: var(--yek-news-green-soft);
	text-align: start;
}

.blog-container > .section[data-section-template="Section With Small CTA"] .section-title {
	margin: 0 0 .4rem;
	color: var(--yek-news-text);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.5;
}

.blog-container > .section[data-section-template="Section With Small CTA"] .subtitle {
	margin: 0;
	color: var(--yek-news-muted);
	font-size: .95rem;
	line-height: 1.75;
}

.blog-container > .section[data-section-template="Section With Small CTA"] .action a {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	padding: .65rem 1rem;
	border: 1px solid var(--yek-news-green);
	border-radius: 9px;
	background: var(--yek-news-green);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.blog-container > .section[data-section-template="Section With Small CTA"] .action a:hover,
.blog-container > .section[data-section-template="Section With Small CTA"] .action a:focus-visible {
	background: #0b6548;
	color: #fff;
}

.blog-container > .section[data-section-template="Section With Small CTA"] .action svg {
	display: none;
}

html[dir="rtl"] .blog-container,
html[dir="rtl"] .blog-list {
	direction: rtl;
}

@media (max-width: 767.98px) {
	body:has(.blog-list-content) .hero {
		margin: 1rem auto .75rem;
		padding: 1.35rem;
		border-radius: 15px;
	}

	.blog-list-content {
		margin-bottom: 2.5rem;
		padding-inline: 1rem;
	}

	.blog-list.result {
		grid-template-columns: minmax(0, 380px);
		gap: .9rem;
		justify-content: center;
	}

	.blog-list .card-img-top {
		height: 175px;
	}

	.blog-list .card-body {
		padding: 1rem;
	}

	.blog-container {
		margin: 1rem .75rem 2.5rem;
		padding: 1.15rem;
		border-radius: 14px;
	}

	.blog-container .blog-header > div:first-child a {
		min-height: 36px;
	}

	.blog-container > .section[data-section-template="Section With Small CTA"] .section-small-cta {
		grid-template-columns: minmax(0, 1fr);
		gap: .8rem;
		text-align: start;
	}

	.blog-container > .section[data-section-template="Section With Small CTA"] .action a {
		width: 100%;
	}

	.blog-container .from-markdown {
		margin-block: 1.5rem;
		font-size: .98rem;
	}
}

@media (min-width: 768px) and (max-width: 1023.98px) {
	.blog-list.result {
		grid-template-columns: repeat(2, minmax(0, 380px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.blog-list .card,
	.blog-list .card-img-top img {
		transition: none;
	}
	.blog-list .card:hover,
	.blog-list .card:focus-within,
	.blog-list .card:hover .card-img-top img {
		transform: none;
	}
}

/* Compact news index: categories first, then posts. */
body:has(.blog-list-content) .row.py-8 {
	display: none !important;
}

.blog-list-content {
	margin-top: 1.5rem;
}

.yek-news-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
	padding-bottom: .75rem;
	border-bottom: 1px solid var(--yek-news-border);
}

.yek-news-tabs {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: .4rem;
	overflow-x: auto;
	scrollbar-width: thin;
}

.yek-news-tab {
	display: inline-flex;
	min-height: 40px;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	padding: .45rem .85rem;
	border: 1px solid transparent;
	border-radius: 999px;
	color: var(--yek-news-muted);
	font-size: .9rem;
	font-weight: 600;
	text-decoration: none !important;
	transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.yek-news-tab:hover {
	border-color: var(--yek-news-border);
	background: var(--yek-news-surface);
	color: var(--yek-news-green);
}

.yek-news-tab.is-active {
	border-color: #cce4d8;
	background: var(--yek-news-green-soft);
	color: var(--yek-news-green);
}

.yek-news-view-switch {
	display: inline-flex;
	flex: 0 0 auto;
	gap: .2rem;
	padding: .2rem;
	border: 1px solid var(--yek-news-border);
	border-radius: 10px;
	background: var(--yek-news-surface);
}

.yek-news-view-button {
	display: inline-grid;
	width: 36px;
	height: 36px;
	place-items: center;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--yek-news-muted);
	cursor: pointer;
}

.yek-news-view-button svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.yek-news-view-button.is-active {
	background: var(--yek-news-green-soft);
	color: var(--yek-news-green);
}

.yek-news-view-button:focus-visible,
.yek-news-tab:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--yek-news-blue) 45%, transparent);
	outline-offset: 2px;
}

.blog-list .card-img-top .default-cover {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .8rem;
	padding: 1rem;
	background:
		radial-gradient(circle at 78% 25%, rgb(67 121 242 / 10%), transparent 35%),
		linear-gradient(135deg, #edf7f2, #f7f9fc);
	color: var(--yek-news-green);
}

.blog-list .default-cover .yek-news-cover-fallback-image {
	width: clamp(88px, 30%, 132px);
	height: 100%;
	max-height: 150px;
	flex: 0 0 auto;
	object-fit: contain;
	object-position: center bottom;
}

.blog-list .default-cover svg {
	width: 38px;
	height: 38px;
	flex: 0 0 auto;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.5;
}

.blog-card:has(.default-cover) .card-img-top {
	height: 160px;
}

.blog-card .card-img-top .default-cover span {
	display: -webkit-box;
	visibility: visible;
	max-width: 62%;
	overflow: hidden;
	color: var(--yek-news-text) !important;
	font-size: .9rem;
	font-weight: 650;
	line-height: 1.6;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.blog-list.result.is-list-view {
	display: flex;
	flex-direction: column;
	gap: .8rem;
}

.blog-list.result.is-list-view > .blog-card {
	width: 100%;
}

.blog-list.is-list-view .card {
	display: grid;
	grid-template-columns: 180px minmax(0, 1fr);
	min-height: 150px;
}

.blog-list.is-list-view .card-img-top,
.blog-list.is-list-view .blog-card:has(.default-cover) .card-img-top {
	height: 100%;
	min-height: 150px;
}

.blog-list.is-list-view .card-body {
	min-width: 0;
}

.blog-list.is-list-view .card-body > div:first-child {
	min-width: 0;
}

.blog-list.is-list-view .card-body h5,
.blog-list.is-list-view .post-description {
	max-width: 760px;
}

.blog-list.is-list-view .blog-card-footer {
	display: flex;
	align-items: center;
	gap: .7rem;
}

@media (max-width: 767.98px) {
	.blog-list-content {
		margin-top: .75rem;
	}

	.yek-news-toolbar {
		align-items: flex-start;
		gap: .5rem;
	}

	.yek-news-tabs {
		flex: 1 1 auto;
		padding-bottom: .25rem;
	}

	.yek-news-tab {
		min-height: 38px;
		padding-inline: .7rem;
		font-size: .84rem;
	}

	.blog-list.is-list-view .card {
		grid-template-columns: 96px minmax(0, 1fr);
		min-height: 118px;
	}

	.blog-list.is-list-view .card-img-top,
	.blog-list.is-list-view .blog-card:has(.default-cover) .card-img-top {
		min-height: 118px;
	}

	.blog-list.is-list-view .card-body {
		gap: .55rem;
		padding: .8rem;
	}

	.blog-list.is-list-view .card-body h5 {
		margin-block: .35rem;
		font-size: .95rem;
	}

	.blog-list.is-list-view .post-description {
		font-size: .82rem;
		-webkit-line-clamp: 2;
	}

	.blog-list.is-list-view .blog-card-footer {
		padding-top: .5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.yek-news-tab {
		transition: none;
	}
}
