/*
 * Blog: archive / category / single post.
 * Hero + framed-card ("מסגרת") reproduce the site's shared page-hero recipe
 * (About/Features/Contact) — see .claude/skills/prilinq-design-language §4b.
 * Kit values are hardcoded on purpose — the Customizer's --prilinq-accent
 * still defaults to the stale teal and must not leak in here.
 */

.prilinq-blog-main {
	--blog-primary: #47A7F2;
	--blog-heading: #1E293B;
	--blog-body: #64748B;
	--blog-band: #294483;
	--blog-bg: #294483;
	--blog-on-bg: #FFFFFF;
	--blog-surface: #FFFFFF;
	--blog-border: #E2E8F0;
	--blog-muted: #94A3B8;
	--blog-soft: #F8FAFC;
}

/* The hero absorbs the header offset (same as About) */
.prilinq-standard-page .site-content > .site-main.prilinq-blog-main:first-child {
	padding-block-start: 0;
}

/* ---------- Hero (site page-hero recipe: title col + description col) ---------- */
.blog-hero {
	background: var(--blog-bg, #294483);
	min-height: 500px;
	padding: 96px 38px 10px;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
}

.blog-hero__title-col {
	width: 60%;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.blog-hero__title {
	margin: 0;
	/* Gutter on the description-facing side (physical left in RTL) so long blog
	   titles keep a gap from the description column instead of butting against it
	   — blog titles are dynamic/long, unlike the short fixed About/Pricing titles. */
	padding-inline-end: 44px;
	font-family: var(--prilinq-font-family);
	font-size: 120px;
	font-weight: 700;
	line-height: 1em;
	letter-spacing: -2px;
	text-align: right;
	color: var(--blog-on-bg, #FFFFFF);
}

.blog-hero__desc-col {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 40px;
	max-width: 480px;
}

.blog-hero__description {
	margin: 0 0 20px;
	font-size: 21px;
	line-height: 1.7;
	text-align: right;
	color: var(--blog-on-bg, #FFFFFF);
}

.blog-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin: 0 0 20px;
	font-size: 18px;
	font-weight: 600;
	text-align: right;
	color: var(--blog-on-bg, #FFFFFF);
}

.blog-hero__meta a {
	color: var(--blog-on-bg, #FFFFFF);
	text-decoration: none;
}

.blog-hero__meta a:hover {
	text-decoration: underline;
}

.blog-hero__meta-dot {
	color: var(--blog-on-bg, #FFFFFF);
	opacity: 0.6;
}

/* ---------- Frame band + white card (full-bleed; inner content is bounded by .prilinq-container) ---------- */
.blog-frame {
    background: var(--blog-band, #294483);
    padding: 10px 38px 60px 38px;
}

.blog-frame__card {
	background: var(--blog-surface, #FFFFFF);
	border-radius: 40px;
	padding: 40px 0;
}

/* Bounds the grid/list content to Elementor's global Content Width (set inline
   per-request from the active Kit, see prilinq_blog_container_max_width()) —
   independent of the theme's own boxed/full-width Customizer toggle. */
.blog-container {
	max-width: var(--blog-container-max-width, 1140px);
	margin-inline: auto;
	padding-inline: var(--prilinq-container-padding-inline, 24px);
}

/* ---------- Category chips ---------- */
.blog-cats {
	margin-block-end: 32px;
}

.blog-cats__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.blog-cats__row--children {
	margin-block-start: 12px;
	gap: 6px 14px;
}

.blog-cats__chip {
	display: inline-flex;
	align-items: center;
	padding: 10px 18px;
	border: 1px solid var(--blog-border, #E2E8F0);
	border-radius: 10px;
	background: var(--blog-soft, #F8FAFC);
	color: var(--blog-heading, #1E293B);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.blog-cats__chip.is-active {
	background: var(--blog-primary, #47A7F2);
	border-color: var(--blog-primary, #47A7F2);
	color: #fff;
}

.blog-cats__subchip {
	display: inline-flex;
	align-items: center;
	padding: 6px 10px;
	border-radius: 8px;
	color: var(--blog-primary, #47A7F2);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.blog-cats__subchip.is-active {
	background: var(--blog-band, #294483);
	color: var(--blog-on-bg, #FFFFFF);
}

/* ---------- Posts grid ---------- */
.blog-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.blog-card {
	display: flex;
	flex-direction: column;
	background: var(--blog-surface, #FFFFFF);
	border: 1px solid var(--blog-border, #E2E8F0);
	border-radius: 10px;
	overflow: hidden;
}

.blog-card__thumb {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--blog-soft, #F8FAFC);
}

.blog-card__thumb img,
.blog-card__thumb-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.blog-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px;
}

.blog-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
}

.blog-card__cat {
	color: var(--blog-primary, #47A7F2);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.blog-card__dot {
	color: var(--blog-muted, #94A3B8);
}

.blog-card__date {
	color: var(--blog-muted, #94A3B8);
	font-size: 14px;
}

.blog-card__title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.blog-card__title a {
	color: var(--blog-heading, #1E293B);
	text-decoration: none;
}

.blog-card__excerpt {
	color: var(--blog-body, #64748B);
	font-size: 16px;
	line-height: 1.7;
}

.blog-card__excerpt p {
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Featured first card on page 1 of the blog */
.blog-grid--featured-first > .blog-card:first-child {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 1.2fr 1fr;
}

.blog-grid--featured-first > .blog-card:first-child .blog-card__thumb {
	aspect-ratio: auto;
	min-height: 300px;
	height: 100%;
}

.blog-grid--featured-first > .blog-card:first-child .blog-card__body {
	justify-content: center;
	padding: 36px;
}

.blog-grid--featured-first > .blog-card:first-child .blog-card__title {
	font-size: 30px;
}

.blog-empty {
	margin: 24px 0;
	font-size: 18px;
	line-height: 1.7;
	color: var(--blog-body, #64748B);
}

/* ---------- Pagination ---------- */
.prilinq-blog-main .pagination {
	margin-block-start: 40px;
}

.prilinq-blog-main .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.prilinq-blog-main .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 8px;
	border: 1px solid var(--blog-border, #E2E8F0);
	border-radius: 10px;
	color: var(--blog-heading, #1E293B);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
}

.prilinq-blog-main .page-numbers.current {
	background: var(--blog-primary, #47A7F2);
	border-color: var(--blog-primary, #47A7F2);
	color: #fff;
}

/* ---------- Single post ---------- */
.blog-post__thumb {
	max-width: var(--blog-container-max-width, 1140px);
	margin: 0 auto 32px;
}

.blog-post__thumb img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
}

.blog-post__content {
	max-width: var(--blog-container-max-width, 1140px);
	margin-inline: auto;
	font-size: 18px;
	line-height: 1.7;
	color: var(--blog-body, #64748B);
}

.blog-post__content h2,
.blog-post__content h3,
.blog-post__content h4 {
	color: var(--blog-heading, #1E293B);
	font-weight: 700;
	line-height: 1.25;
	margin: 1.6em 0 0.6em;
}

.blog-post__content h2 { font-size: 30px; letter-spacing: -0.5px; }
.blog-post__content h3 { font-size: 24px; }
.blog-post__content h4 { font-size: 20px; }

.blog-post__content p {
	margin: 0 0 1.2em;
}

.blog-post__content a {
	color: var(--blog-primary, #47A7F2);
}

.blog-post__content ul,
.blog-post__content ol {
	margin: 0 0 1.2em;
	padding-inline-start: 1.4em;
}

.blog-post__content li {
	margin-block-end: 0.4em;
}

.blog-post__content blockquote {
	margin: 1.4em 0;
	padding: 4px 0;
	padding-inline-start: 20px;
	border-inline-start: 3px solid var(--blog-primary, #47A7F2);
	color: var(--blog-heading, #1E293B);
	font-weight: 500;
}

.blog-post__content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
}

.blog-post__footer {
	max-width: var(--blog-container-max-width, 1140px);
	margin-inline: auto;
	margin-block-start: 48px;
	padding-block-start: 32px;
	border-block-start: 1px solid var(--blog-border, #E2E8F0);
}

.blog-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.blog-post-nav__card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px;
	border: 1px solid var(--blog-border, #E2E8F0);
	border-radius: 10px;
	text-decoration: none;
}

.blog-post-nav__card--prev {
	text-align: end;
}

.blog-post-nav__label {
	font-size: 13px;
	font-weight: 700;
	color: var(--blog-primary, #47A7F2);
}

.blog-post-nav__title {
	font-size: 17px;
	font-weight: 700;
	color: var(--blog-heading, #1E293B);
	line-height: 1.35;
}

.blog-post__back {
	margin-block-start: 28px;
	text-align: center;
}

.blog-btn {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	padding: 16px 30px;
	border-radius: 10px;
	background: var(--blog-primary, #47A7F2);
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
}

.blog-btn:hover {
	color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.blog-hero {
		flex-direction: column;
		min-height: 300px;
		padding: 100px 18px 10px;
	}

	.blog-hero__title-col,
	.blog-hero__desc-col {
		width: 100%;
	}

	.blog-hero__title {
		font-size: 50px;
		/* Columns are stacked at ≤1024px. Match the Elementor hero title's inset
		   from the screen edge: there the title sits inside a column that adds 10px
		   inline padding ON TOP of the section padding (a composite the blog's
		   title-col lacks), so add the same 10px here. */
		padding-inline: 10px;
	}

	.blog-hero__desc-col {
		padding: 10px;
		max-width: none;
	}

	.blog-hero__description {
		font-size: 19px;
	}

	.blog-frame {
		padding: 20px 28px 40px 28px;
	}

	.blog-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.blog-hero {
		padding: 100px 12px 10px;
	}

	.blog-hero__title {
		font-size: 46px;
	}

	.blog-hero__description {
		font-size: 14px;
	}

	.blog-hero__meta {
		justify-content: center;
		text-align: center;
	}

	.blog-frame {
		padding: 20px;
	}

	.blog-frame__card {
		border-radius: 20px;
		padding: 20px 0;
	}

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

	.blog-grid--featured-first > .blog-card:first-child {
		display: flex;
		flex-direction: column;
	}

	.blog-grid--featured-first > .blog-card:first-child .blog-card__thumb {
		aspect-ratio: 16 / 9;
		min-height: 0;
	}

	.blog-grid--featured-first > .blog-card:first-child .blog-card__body {
		padding: 24px 16px;
	}

	.blog-grid--featured-first > .blog-card:first-child .blog-card__title {
		font-size: 24px;
	}

	.blog-card__body {
		padding: 16px;
	}

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

	.blog-post-nav__card--prev {
		text-align: start;
	}
}
