/* ==========================================================================
   بلاگ — homepage slider + single page
   Palette: navy #102a71 / navy-dark #001840 / gold #f5c400 / cream #fffdf0
   ========================================================================== */

.bl-section {
	position: relative;
	padding: 56px 0 64px;
	background: #fffdf0;
}
.bl-section > .bl-head,
.bl-section > .bl-slider,
.bl-section > .bl-empty {
	width: min(1360px, 96%);
	margin-inline: auto;
}

/* ---- head ---- */
.bl-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	margin-bottom: 26px;
}
.bl-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 14px;
	border-radius: 999px;
	background: rgba(16, 42, 113, .08);
	color: #102a71;
	font-size: 12px;
	font-weight: 800;
}
.bl-head__title {
	margin: 10px 0 6px;
	font-size: clamp(1.35rem, 2.2vw, 1.8rem);
	font-weight: 800;
	line-height: 1.5;
	color: #001840;
}
.bl-head__sub { margin: 0; font-size: 13.5px; color: #5c6575; line-height: 1.9; }
.bl-head__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bl-btn-all,
.bl-btn-write {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 20px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
	white-space: nowrap;
}
.bl-btn-all {
	background: #fff;
	color: #102a71;
	border: 1.5px solid rgba(16, 42, 113, .25);
}
.bl-btn-all:hover { border-color: #102a71; box-shadow: 0 8px 18px -12px rgba(16, 42, 113, .6); }
.bl-btn-write {
	background: linear-gradient(135deg, #f5c400, #ffd94d);
	color: #3b2f00;
	box-shadow: 0 10px 22px -12px rgba(245, 196, 0, .9);
}
.bl-btn-write:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(245, 196, 0, .95); }

/* ---- slider ----
 * Native scroll-snap track (same engine as the courses / announcements rows).
 * Touch dragging is the browser's own horizontal pan — which is only possible
 * because `touch-action` here is not `pan-y` (see native-carousel.css).
 */
.bl-slider { position: relative; }
.bl-track {
	display: flex;
	gap: 16px;
	direction: rtl;
	padding: 6px 2px 14px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	touch-action: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.bl-track::-webkit-scrollbar { display: none; height: 0; }
.bl-slide {
	flex: 0 0 calc((100% - 48px) / 4);
	min-width: 0;
	scroll-snap-align: start;
}

/* ---- card ---- */
.bl-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid rgba(16, 42, 113, .09);
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 10px 26px -20px rgba(0, 24, 64, .45);
	transition: transform .3s cubic-bezier(.32, .72, 0, 1), box-shadow .3s ease, border-color .3s ease;
}
.bl-card:hover {
	transform: translateY(-6px);
	border-color: rgba(245, 196, 0, .7);
	box-shadow: 0 22px 40px -22px rgba(0, 24, 64, .55);
}
.bl-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	background: linear-gradient(150deg, #102a71, #001840);
	overflow: hidden;
}
.bl-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .6s cubic-bezier(.22, .61, .36, 1);
}
.bl-card:hover .bl-card__media img { transform: scale(1.06); }
.bl-card__ph {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-size: 40px;
	opacity: .85;
}
.bl-badge {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	padding: 3px 11px;
	border-radius: 999px;
	background: #f5c400;
	color: #001840;
	font-size: 10.5px;
	font-weight: 800;
	box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .5);
}
.bl-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1 1 auto;
	padding: 13px 14px 14px;
}
.bl-card__title {
	margin: 0;
	font-size: 14.5px;
	font-weight: 800;
	line-height: 1.8;
	color: #001840;
	min-height: 52px;
}
.bl-card__title a {
	color: inherit;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bl-card__title a:hover { color: #b98f00; }
.bl-card__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	color: #889098;
	white-space: nowrap;
	overflow: hidden;
}
.bl-author { font-weight: 700; color: #5c6575; overflow: hidden; text-overflow: ellipsis; }
.bl-dot { opacity: .6; }
.bl-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid #f1f3f9;
}
/*
 * «مطالعه» روی کارت بلاگ یک دکمهٔ واقعی است، نه فقط متنِ رنگی:
 * کادر + شعاع + پدینگ تا از بقیهٔ خط پایین کارت جدا دیده شود.
 */
.bl-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 5px 15px;
	border: 1px solid rgba(16, 42, 113, .3);
	border-radius: 999px;
	background: #fff;
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1;
	color: #102a71;
	text-decoration: none;
	white-space: nowrap;
	transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.bl-cta:hover {
	background: #102a71;
	border-color: #102a71;
	color: #fff;
	box-shadow: 0 8px 18px -10px rgba(16, 42, 113, .75);
}
.bl-cta:focus-visible {
	outline: 2px solid #f5c400;
	outline-offset: 2px;
}
.bl-read { font-size: 11px; color: #9aa2b1; }

/* ---- arrows ---- */
.bl-nav {
	position: absolute;
	top: 42%;
	z-index: 4;
	width: 42px;
	height: 42px;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid rgba(16, 42, 113, .18);
	background: #fff;
	color: #102a71;
	box-shadow: 0 10px 24px -12px rgba(0, 24, 64, .45);
	cursor: pointer;
	padding: 0;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}
.bl-prev { inset-inline-end: -14px; }
.bl-next { inset-inline-start: -14px; }
.bl-nav:hover { background: #f5c400; color: #3b2f00; border-color: #f5c400; }
.bl-nav:focus-visible { outline: 2px solid #f5c400; outline-offset: 2px; }
.bl-nav:disabled { opacity: .35; cursor: default; background: #fff; color: #102a71; border-color: rgba(16, 42, 113, .18); }

/* ---- dots ---- */
.bl-dots {
	display: flex;
	justify-content: center;
	gap: 7px;
	margin-top: 6px;
}
.bl-dots .sm-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(16, 42, 113, .2);
	cursor: pointer;
	transition: width .3s cubic-bezier(.32, .72, 0, 1), background .3s ease;
}
.bl-dots .sm-dot.is-active { width: 22px; background: #f5c400; box-shadow: 0 0 8px rgba(245, 196, 0, .7); }
.bl-dots .sm-dot:focus-visible { outline: 2px solid #f5c400; outline-offset: 2px; }

.bl-empty {
	padding: 40px 20px;
	border: 1px dashed rgba(16, 42, 113, .22);
	border-radius: 18px;
	text-align: center;
	color: #5c6575;
	font-size: 14px;
	background: #fff;
}

/* ==========================================================================
   Single
   ========================================================================== */

.bl-draft-note {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 0;
	padding: 12px 20px;
	background: rgba(245, 196, 0, .16);
	border-bottom: 1px solid rgba(245, 196, 0, .45);
	color: #5a4700;
	font-size: 13px;
	font-weight: 700;
}
.bl-draft-note__ico { font-size: 15px; }
.bl-draft-note a {
	margin-inline-start: auto;
	color: #102a71;
	text-decoration: none;
	font-weight: 800;
	border-bottom: 1px dashed rgba(16, 42, 113, .4);
}

.bl-single { padding: 40px 0 70px; background: #fffdf0; }
.bl-single__inner { width: min(820px, 92%); margin-inline: auto; }
.bl-crumbs { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; color: #889098; margin-bottom: 18px; }
.bl-crumbs a { color: #102a71; text-decoration: none; font-weight: 700; }
.bl-crumbs a:hover { color: #b98f00; }
.bl-crumbs__now { color: #5c6575; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }

.bl-single__title {
	margin: 0 0 14px;
	font-size: clamp(1.6rem, 3.2vw, 2.3rem);
	font-weight: 900;
	line-height: 1.6;
	color: #001840;
}
.bl-single__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.bl-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid rgba(16, 42, 113, .12);
	font-size: 12px;
	font-weight: 700;
	color: #3c4658;
}
/*
 * کاور تک‌بلاگ هم دقیقاً ۱۶:۱۰ است — مستقل از نسبت فایل اصلی.
 * تصویر با `object-fit: cover` برش می‌خورد (بدون کشیدگی) و روی سیستم
 * باریک‌تر از ستون متن می‌شود تا صفحه سنگین نشود.
 */
.bl-single__cover {
	margin: 0 auto 26px;
	width: 100%;
	max-width: 660px;
	aspect-ratio: 16 / 10;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 18px 40px -26px rgba(0, 24, 64, .5);
	background: #eef2f8;
}
.bl-single__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.bl-blocks { display: flex; flex-direction: column; gap: 18px; }
.bl-p { font-size: 15.5px; line-height: 2.1; color: #22304a; }
.bl-p p { margin: 0 0 14px; }
.bl-p p:last-child { margin-bottom: 0; }
.bl-p a { color: #102a71; font-weight: 700; }
.bl-h {
	margin: 14px 0 2px;
	font-size: 1.35rem;
	font-weight: 900;
	line-height: 1.7;
	color: #001840;
	padding-inline-start: 12px;
	border-inline-start: 4px solid #f5c400;
}
.bl-quote {
	margin: 6px 0;
	padding: 18px 20px;
	border-radius: 16px;
	background: linear-gradient(135deg, rgba(245, 196, 0, .14), rgba(16, 42, 113, .06));
	border-inline-start: 4px solid #f5c400;
}
.bl-quote p { margin: 0; font-size: 15.5px; line-height: 2; color: #22304a; font-weight: 600; }
.bl-quote cite { display: block; margin-top: 8px; font-size: 12.5px; color: #5c6575; font-style: normal; }
.bl-fig { margin: 6px 0; }
.bl-fig img { width: 100%; height: auto; border-radius: 16px; display: block; }
.bl-fig figcaption { margin-top: 8px; font-size: 12px; color: #889098; text-align: center; }
.bl-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.bl-list li {
	position: relative;
	padding-inline-start: 26px;
	font-size: 15px;
	line-height: 2;
	color: #22304a;
}
.bl-list li::before {
	content: "";
	position: absolute;
	inset-inline-start: 4px;
	top: 14px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #f5c400;
	box-shadow: 0 0 0 3px rgba(245, 196, 0, .2);
}
.bl-video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 16px; overflow: hidden; background: #001840; }
.bl-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bl-video-link a { color: #102a71; font-weight: 700; }
.bl-hr { border: 0; border-top: 1px dashed rgba(16, 42, 113, .2); margin: 8px 0; }
.bl-cta-wrap { margin: 4px 0; }
.bl-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 11px 22px;
	border-radius: 999px;
	background: #102a71;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
	transition: background .2s ease, transform .2s ease;
}
.bl-btn:hover { background: #001840; color: #fff; transform: translateY(-1px); }
.bl-btn--ghost { background: #fff; color: #102a71; border: 1.5px solid rgba(16, 42, 113, .22); }

.bl-single__foot {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 34px;
	padding-top: 22px;
	border-top: 1px solid rgba(16, 42, 113, .1);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
	.bl-slide { flex-basis: calc((100% - 32px) / 3); }
}
@media (max-width: 860px) {
	.bl-slide { flex-basis: calc((100% - 16px) / 2); }
	.bl-prev { inset-inline-end: -8px; }
	.bl-next { inset-inline-start: -8px; }
}
@media (max-width: 640px) {
	.bl-section { padding: 40px 0 48px; }
	.bl-slide { flex-basis: calc((100% - 16px) / 2.15); }
	.bl-head { align-items: flex-start; }
	.bl-head__actions { width: 100%; }
	.bl-btn-all, .bl-btn-write { flex: 1 1 auto; justify-content: center; }
	/* arrows stay usable on a phone, just smaller and pulled inside the row */
	.bl-nav { width: 34px; height: 34px; top: 38%; }
	.bl-prev { inset-inline-end: 2px; }
	.bl-next { inset-inline-start: 2px; }
	.bl-card__title { font-size: 13px; min-height: 46px; }
	/* کارت روی موبایل باریک‌تر است؛ دکمهٔ «مطالعه» جمع‌تر می‌شود تا جا شود. */
	.bl-card__foot { gap: 6px; }
	.bl-cta { min-height: 26px; padding: 4px 10px; font-size: 11.5px; }
	.bl-single__inner { width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
	.bl-track { scroll-behavior: auto; }
	.bl-card, .bl-card__media img, .bl-btn { transition: none !important; }
}
