/* ==========================================================================
   Blog: listing, featured card, post cards, single article
   ========================================================================== */

/* Listing ------------------------------------------------------------------ */
.jdc-blog-list { padding-bottom: var(--jdc-section-y); }
.jdc-blog-grid { margin-top: 16px; }
.jdc-blog-empty { padding: 40px 0; font-size: 18px; color: var(--jdc-muted); }

.jdc-post-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	font-size: 13px; color: var(--jdc-muted);
}

/* Featured (latest) */
.jdc-post-feature {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
	background: var(--jdc-white);
	border-radius: var(--jdc-r-panel);
	overflow: hidden;
	color: var(--jdc-ink);
	box-shadow: var(--jdc-shadow-float);
	transition: transform .35s var(--jdc-ease);
}
.jdc-post-feature:hover { transform: translateY(-4px); color: var(--jdc-ink); }
.jdc-post-feature__media {
	position: relative; display: block; min-height: 340px;
	background: var(--jdc-sand) center / cover no-repeat;
}
.jdc-post-feature__flag {
	position: absolute; top: 20px; left: 20px;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 14px; border-radius: var(--jdc-r-pill);
	background: var(--jdc-crimson); color: var(--jdc-white);
	font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}
.jdc-post-feature__flag .jdc-icon { width: 16px; height: 16px; }
.jdc-post-feature__body { display: flex; flex-direction: column; gap: 18px; padding: clamp(32px, 4vw, 56px); }
.jdc-post-feature__body .jdc-post-meta { font-size: 14px; }
.jdc-post-feature__body .jdc-chip { padding: 6px 12px; font-size: 14px; }
.jdc-post-feature__body .jdc-chip .jdc-icon { width: 18px; height: 18px; }
.jdc-post-feature__title {
	font-family: var(--jdc-font-heading);
	font-size: clamp(32px, 3.4vw, 50px); font-weight: 500; line-height: 1.06; letter-spacing: -.015em;
	text-wrap: balance;
}
.jdc-post-feature__excerpt { font-size: 18px; line-height: 1.7; color: var(--jdc-text); }
.jdc-post-feature__cta { margin-top: auto; align-self: flex-start; }

/* Grid card */
.jdc-post-card {
	display: flex; flex-direction: column;
	background: var(--jdc-white); border-radius: var(--jdc-r-card-lg); overflow: hidden;
	color: var(--jdc-ink); box-shadow: var(--jdc-shadow-rest);
	transition: transform .3s var(--jdc-ease), box-shadow .3s;
}
.jdc-post-card:hover { transform: translateY(-4px); box-shadow: var(--jdc-shadow-raised); color: var(--jdc-ink); }
.jdc-post-card__media { display: block; aspect-ratio: 16 / 10; background: var(--jdc-sand) center / cover no-repeat; }
.jdc-post-card__body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 24px 26px 26px; }
.jdc-post-card__title {
	font-family: var(--jdc-font-heading);
	font-size: clamp(23px, 1.9vw, 27px); font-weight: 500; line-height: 1.15; text-wrap: pretty;
}
.jdc-post-card__excerpt { font-size: 15px; line-height: 1.6; color: var(--jdc-text); }
.jdc-post-card .jdc-textlink { margin-top: auto; align-self: flex-start; padding-top: 6px; padding-bottom: 3px; font-size: 14px; }
.jdc-post-card--compact .jdc-post-card__body { padding: 22px 24px 24px; gap: 12px; }
.jdc-post-card--compact .jdc-post-card__title { font-size: 24px; }

.jdc-post-card[hidden], .jdc-post-feature[hidden] { display: none; }

/* Pagination */
.jdc-pagination { margin-top: 40px; }
.jdc-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.jdc-pagination .page-numbers {
	min-width: 46px; height: 46px; padding: 0 16px; border-radius: var(--jdc-r-pill);
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--jdc-rule); background: var(--jdc-white); color: var(--jdc-ink);
}
.jdc-pagination .page-numbers.current { background: var(--jdc-ink); border-color: var(--jdc-ink); color: var(--jdc-marble); }

/* Single article ----------------------------------------------------------- */
.jdc-article__header {
	max-width: calc(1100px);
	margin: 0 auto;
	padding: clamp(36px, 5vw, 72px) var(--jdc-gutter) 0;
}
.jdc-article__meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin-top: 32px; font-size: 14px; color: var(--jdc-muted);
}
.jdc-article__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.jdc-article__meta .jdc-icon { width: 17px; height: 17px; }
.jdc-chip--topic { padding: 7px 14px; font-size: 14px; font-weight: 500; }
.jdc-chip--topic .jdc-icon { width: 18px; height: 18px; }
.jdc-chip--emergencies { background: var(--jdc-crimson-tint); color: var(--jdc-crimson); }
a.jdc-chip:hover { filter: brightness(.97); }
.jdc-article__title {
	margin-top: 22px;
	font-size: clamp(40px, 5.4vw, 76px); line-height: 1.02; letter-spacing: -.025em;
	text-wrap: balance;
}
.jdc-article__subtitle {
	margin-top: 22px; max-width: 36em;
	font-family: var(--jdc-font-heading);
	font-size: clamp(21px, 1.9vw, 26px); line-height: 1.5; font-style: italic; color: var(--jdc-text);
}
.jdc-article__byline {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
	margin-top: 32px; padding: 18px 0;
	border-top: 1px solid var(--jdc-rule); border-bottom: 1px solid var(--jdc-rule);
}
.jdc-article__author { display: flex; align-items: center; gap: 14px; }
.jdc-avatar { display: block; width: 52px; height: 52px; border-radius: 50%; background: var(--jdc-sand) center / cover no-repeat; flex: none; }
.jdc-article__author-name { display: block; font-size: 15px; font-weight: 500; }
.jdc-article__author-role { display: block; font-size: 13px; color: var(--jdc-muted); }

.jdc-share { display: flex; align-items: center; gap: 8px; flex: none; }
.jdc-share__label { margin-right: 4px; font-size: 13px; color: var(--jdc-muted); }
.jdc-share__copy, .jdc-share__icon {
	height: 44px; border: 1px solid var(--jdc-rule-strong); background: var(--jdc-white); color: var(--jdc-ink);
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border-radius: var(--jdc-r-pill); font-size: 14px; white-space: nowrap;
}
.jdc-share__copy { padding: 0 16px; }
.jdc-share__icon { width: 44px; }
.jdc-share__copy:hover, .jdc-share__icon:hover { border-color: var(--jdc-ink); color: var(--jdc-ink); }
.jdc-share .jdc-icon { width: 18px; height: 18px; }
.jdc-share__copy .is-done, .jdc-share__copy.is-done .is-idle { display: none; }
.jdc-share__copy.is-done .is-done { display: block; }

.jdc-article__image {
	max-width: var(--jdc-container);
	margin: 0 auto;
	padding: clamp(28px, 4vw, 48px) var(--jdc-gutter) 0;
}
.jdc-article__image img {
	width: 100%; aspect-ratio: 16 / 8; min-height: 260px; object-fit: cover;
	border-radius: var(--jdc-r-panel); background: var(--jdc-sand);
}

.jdc-article__layout {
	display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start;
	max-width: calc(var(--jdc-content) + 2 * var(--jdc-gutter));
	margin: 0 auto;
	padding: clamp(48px, 6vw, 88px) var(--jdc-gutter);
}
.jdc-article__layout:not(.has-toc) { max-width: calc(720px + 2 * var(--jdc-gutter)); }
@media (min-width: 1000px) { .jdc-article__layout.has-toc { grid-template-columns: 240px minmax(0, 1fr); } }
.jdc-article__body { max-width: 720px; }
.jdc-article__body > p:first-child { font-size: 24px; line-height: 1.6; color: var(--jdc-ink); text-wrap: pretty; }

/* Table of contents */
.jdc-toc { position: sticky; top: calc(var(--jdc-header-h) + 24px); display: none; gap: 16px; }
@media (min-width: 1000px) { .jdc-toc { display: grid; } }
.jdc-toc__label { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--jdc-gold-text); }
.jdc-toc__nav { display: grid; border-left: 1px solid var(--jdc-rule); font-size: 15px; }
.jdc-toc__nav a {
	margin-left: -1px; padding: 9px 0 9px 16px;
	border-left: 2px solid transparent; color: var(--jdc-muted); line-height: 1.35;
}
.jdc-toc__nav a:hover { color: var(--jdc-ink); }
.jdc-toc__nav a.is-active { border-left-color: var(--jdc-crimson); color: var(--jdc-ink); font-weight: 500; }
.jdc-toc__call {
	margin-top: 12px; display: flex; align-items: center; gap: 12px;
	padding: 16px; border-radius: 18px; background: var(--jdc-ink); color: var(--jdc-marble);
	font-size: 13px; line-height: 1.4;
}
.jdc-toc__call strong { display: block; margin-top: 2px; font-size: 17px; font-weight: 500; }
.jdc-toc__call:hover { background: var(--jdc-crimson); color: var(--jdc-white); }
.jdc-toc__call .jdc-badge .jdc-icon { width: 22px; height: 22px; }

/* Author card */
.jdc-author-card-wrap { padding-bottom: clamp(72px, 9vw, 120px); }
.jdc-author-card {
	display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center;
	padding: clamp(28px, 4vw, 48px); border-radius: var(--jdc-r-panel);
	background: var(--jdc-ink); color: var(--jdc-dark-heading);
}
@media (min-width: 820px) { .jdc-author-card { grid-template-columns: 120px minmax(0, 1fr) auto; } }
.jdc-author-card__photo {
	display: block; width: 120px; height: 120px; border-radius: 50%;
	border: 3px solid var(--jdc-gold); background: #3A352F center / cover no-repeat;
}
.jdc-author-card__name { margin-top: 10px; font-family: var(--jdc-font-heading); font-size: clamp(26px, 2.4vw, 34px); font-weight: 500; line-height: 1.15; color: var(--jdc-white); }
.jdc-author-card p { margin-top: 10px; max-width: 40em; font-size: 16px; line-height: 1.65; color: var(--jdc-dark-text); }
.jdc-author-card .jdc-btn { justify-self: start; }

.jdc-related { padding-block: clamp(56px, 7vw, 96px); }
