/*
 * Editorial blog templates — index (dark hero + featured post + post grid)
 * and single (reading progress + article header/hero/body + author card +
 * related posts + closing CTA). Ported 1:1 from the approved mockups at
 * projects/mdplans/Blog Category.dc.html and projects/mdplans/Blog Post.dc.html.
 */

/* ── SECTION UTILITIES (shared by both templates) ── */
.sec { padding: 100px 15px; }
.sec-inner { max-width: 1600px; margin: 0 auto; }
.sec-label { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.sec-label-text { font-family: var(--wp--preset--font-family--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--wp--preset--color--grey); }
.sec-h { font-size: clamp(30px, 3.4vw, 48px); font-weight: 600; line-height: 100%; letter-spacing: -0.03em; }

.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--wp--custom--radius--button); padding: 16px 32px; font-family: var(--wp--preset--font-family--body); font-size: 18px; font-weight: 500; cursor: pointer; border: none; text-decoration: none; white-space: nowrap; transition: all 0.3s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--wp--preset--color--brand-orange); color: var(--wp--preset--color--surface); }
.btn-primary:hover { background: var(--wp--preset--color--logo-orange); }
.btn-ghost { background: rgba(244,244,243,0.1); color: var(--wp--preset--color--surface); border: 1px solid rgba(255,255,255,0.15); }
.btn-ghost:hover { background: rgba(244,244,243,0.2); }
.btn-outline { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); border: 1px solid var(--wp--preset--color--stroke); }
.btn-outline:hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--surface); border-color: var(--wp--preset--color--ink); }

/* ── BLOG HERO (index, Editorial variant) ── */
.blog-hero { background: var(--wp--preset--color--paper); position: relative; overflow: hidden; }
.hero-editorial-top { padding: clamp(140px, 20vh, 190px) 15px 0; max-width: 1600px; margin: 0 auto; }
.hero-word-1, .hero-word-2 { font-size: clamp(44px, 9vw, 140px); font-weight: 700; letter-spacing: -0.03em; line-height: 0.95; white-space: nowrap; text-wrap: pretty; }
.hero-word-1 { color: var(--wp--preset--color--ink); margin-top: 8px; }
.hero-word-2 { color: rgba(5,5,5,0.18); margin-bottom: 36px; }
.hero-editorial-card { background: var(--wp--preset--color--ink); border-radius: var(--wp--custom--radius--card-large) var(--wp--custom--radius--card-large) 0 0; padding: 64px 60px 80px; }
.hero-editorial-inner { max-width: 1600px; margin: 0 auto; }
.ed-desc { font-size: 18px; font-weight: 500; line-height: 140%; color: rgba(255,255,255,0.55); max-width: 480px; margin: 0 0 28px; }
.ed-filters { justify-content: flex-start; }

/* ── CATEGORY FILTER (dynamic wp:categories, styled as pills) ── */
.cat-filter-row { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; margin: 44px 0 0; padding: 0; }
.cat-filter-row li { margin: 0; }
.cat-filter-row a { font-family: var(--wp--preset--font-family--body); font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.75); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--wp--custom--radius--button); padding: 10px 18px; cursor: pointer; transition: all 0.25s, transform 0.25s; white-space: nowrap; text-decoration: none; display: inline-block; }
.cat-filter-row a:hover { border-color: rgba(217,119,87,0.6); color: var(--wp--preset--color--surface); transform: translateY(-2px); }
.cat-filter-row li.active a,
.cat-filter-row a.active { background: var(--wp--preset--color--brand-orange); color: var(--wp--preset--color--surface); border-color: var(--wp--preset--color--brand-orange); }

/* ── FEATURED POST (index) ── */
.featured-post { display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; background: var(--wp--preset--color--surface); border-radius: var(--wp--custom--radius--card-large); overflow: hidden; }
.featured-post .featured-img-wrap { position: relative; aspect-ratio: 4/3; margin: 0; }
.featured-post .featured-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.post-cat-tag { font-family: var(--wp--preset--font-family--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; display: block; }
.featured-title { font-size: clamp(26px, 2.6vw, 38px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: var(--wp--preset--color--ink); }
.featured-title a { color: inherit; text-decoration: none; }
.featured-title a:hover { color: var(--wp--preset--color--brand-orange); }
.featured-excerpt { font-size: 17px; font-weight: 400; color: var(--wp--preset--color--grey); line-height: 162%; margin-top: 16px; }
.post-meta-row { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.post-avatar { width: 36px; height: 36px; border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--paper); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--wp--preset--color--grey); font-family: var(--wp--preset--font-family--mono); flex-shrink: 0; }
.post-meta-text { display: flex; flex-direction: column; gap: 2px; }
.post-meta-name { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--ink); }
.post-meta-sub { font-family: var(--wp--preset--font-family--mono); font-size: 11px; color: var(--wp--preset--color--grey); text-transform: uppercase; letter-spacing: 0.05em; display: flex; gap: 6px; }

/* ── POST GRID (index post grid + single related posts) ── */
.post-grid.wp-block-post-template { list-style: none; margin: 24px 0 0; padding: 0; gap: 24px; }
.post-grid.wp-block-post-template > li { margin: 0; }
.post-card { background: var(--wp--preset--color--surface); border-radius: var(--wp--custom--radius--card); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform 0.4s cubic-bezier(.22,1,.36,1), box-shadow 0.4s ease; height: 100%; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(5,5,5,0.08); }
.post-card-img { position: relative; aspect-ratio: 4/3; margin: 0; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card-title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; color: var(--wp--preset--color--ink); margin-top: 2px; }
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-title a:hover { color: var(--wp--preset--color--brand-orange); }
.post-card-excerpt { font-size: 15px; font-weight: 400; color: var(--wp--preset--color--grey); line-height: 155%; margin-top: 10px; flex: 1; }
.post-card-meta { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(0,0,0,0.07); }
.post-card-meta > * { font-family: var(--wp--preset--font-family--mono); font-size: 11px; font-weight: 500; color: var(--wp--preset--color--grey); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── NEWSLETTER CTA (index) ── */
.news-card { background: var(--wp--preset--color--ink); border-radius: var(--wp--custom--radius--card-large); padding: 64px 48px; text-align: center; }
.news-eyebrow { font-family: var(--wp--preset--font-family--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.55); margin-bottom: 20px; }
.news-heading { font-size: clamp(28px, 3.5vw, 46px); letter-spacing: -0.03em; margin: 0 auto 16px; line-height: 108%; }
.news-sub { font-size: 17px; font-weight: 400; color: rgba(255,255,255,0.7); max-width: 440px; margin: 0 auto 32px; line-height: 156%; }
.news-form { display: flex; gap: 10px; justify-content: center; max-width: 440px; margin: 0 auto; }
.news-input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); border-radius: var(--wp--custom--radius--button); padding: 14px 18px; color: var(--wp--preset--color--surface); font-family: var(--wp--preset--font-family--body); font-size: 15px; }
.news-input::placeholder { color: rgba(255,255,255,0.4); }
.news-submit { padding: 14px 26px; font-size: 15px; }

/* ── READING PROGRESS (single) ── */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--wp--preset--color--brand-orange); z-index: 101; width: 0%; transition: width 0.1s linear; }

/* ── ARTICLE HEADER (single) ── */
.article-header { background: var(--wp--preset--color--ink); padding: clamp(140px, 20vh, 180px) 15px 60px; }
.article-header-inner { max-width: 820px; margin: 0 auto; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--wp--preset--font-family--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.5); text-decoration: none; margin-bottom: 28px; transition: color 0.2s; }
.back-link:hover { color: var(--wp--preset--color--brand-orange); }
.article-header .post-cat-tag { color: var(--wp--preset--color--brand-orange); margin-bottom: 18px; }
.article-title.wp-block-post-title { font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; line-height: 104%; letter-spacing: -0.038em; color: var(--wp--preset--color--surface); text-wrap: pretty; margin: 0; }
.article-dek { font-size: 19px; font-weight: 400; line-height: 158%; color: rgba(255,255,255,0.72); max-width: 640px; margin-top: 22px; margin-left: 0 !important; margin-right: 0 !important; }
.article-meta-row { display: flex; align-items: flex-start; gap: 14px; margin-top: 36px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,0.1); }
.article-header .post-avatar { width: 40px; height: 40px; background: rgba(255,255,255,0.08); color: var(--wp--preset--color--surface); }
.article-meta-text { display: flex; flex-direction: column; gap: 2px; }
.article-meta-name { font-size: 14px; font-weight: 600; color: var(--wp--preset--color--surface); }
.article-meta-sub { font-family: var(--wp--preset--font-family--mono); font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.05em; gap: 6px; }

/* ── ARTICLE HERO IMAGE (single) ── */
.article-hero-img-wrap { max-width: 1100px; margin: -40px auto 0; padding: 0 15px; position: relative; z-index: 1; }
.article-hero-img.wp-block-post-featured-image { aspect-ratio: 16/9; border-radius: var(--wp--custom--radius--card-large); overflow: hidden; margin: 0; }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── ARTICLE BODY (single) ── */
.article-body-wrap { max-width: 720px; margin: 0 auto; padding: 72px 20px 40px; }
.article-body-wrap > .wp-block-post-content > *:first-child { font-size: 22px; font-weight: 500; color: #1a1917; line-height: 158%; }
.article-body-wrap .wp-block-post-content h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -0.02em; color: var(--wp--preset--color--ink); margin-top: 52px; line-height: 1.15; }
.article-body-wrap .wp-block-post-content p { font-size: 18px; font-weight: 400; color: var(--wp--preset--color--grey); line-height: 178%; margin-top: 22px; }
.article-body-wrap .wp-block-post-content ul,
.article-body-wrap .wp-block-post-content ol { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; padding-left: 0; list-style: none; }
.article-body-wrap .wp-block-post-content li { display: flex; gap: 14px; align-items: flex-start; font-size: 18px; color: var(--wp--preset--color--grey); line-height: 160%; }
.article-body-wrap .wp-block-post-content li::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--wp--preset--color--brand-orange); margin-top: 9px; flex-shrink: 0; }
.article-body-wrap .wp-block-post-content figure.wp-block-image { margin: 48px 0; }
.article-body-wrap .wp-block-post-content figure.wp-block-image img { border-radius: var(--wp--custom--radius--card); overflow: hidden; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-body-wrap .wp-block-post-content figure.wp-block-image figcaption { font-family: var(--wp--preset--font-family--mono); font-size: 12px; color: var(--wp--preset--color--grey); text-align: center; margin-top: 12px; }

/* ── ARTICLE PULL QUOTE (single) ── */
.article-body-wrap .wp-block-quote.is-style-pull-quote { background: var(--wp--preset--color--ink); border: none; border-radius: var(--wp--custom--radius--card); padding: 44px; margin: 48px 0; }
.article-body-wrap .wp-block-quote.is-style-pull-quote::before { content: "\201C"; font-family: var(--wp--preset--font-family--display); font-size: 56px; font-weight: 700; color: var(--wp--preset--color--brand-orange); line-height: 0.6; display: block; margin-bottom: 12px; }
.article-body-wrap .wp-block-quote.is-style-pull-quote p { font-family: var(--wp--preset--font-family--display); font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; font-style: italic; color: var(--wp--preset--color--surface); line-height: 140%; letter-spacing: -0.3px; margin: 0; }
.article-body-wrap .wp-block-quote.is-style-pull-quote cite { font-family: var(--wp--preset--font-family--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.5); margin-top: 20px; font-style: normal; }

/* ── SHARE ROW (single) ── */
.share-row { margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(0,0,0,0.09); }
.share-label { font-family: var(--wp--preset--font-family--mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--wp--preset--color--grey); margin: 0; }
.share-icons { display: flex; gap: 14px; }
.share-icon { width: 38px; height: 38px; border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--stroke); display: flex; align-items: center; justify-content: center; color: var(--wp--preset--color--grey); transition: all 0.25s; text-decoration: none; }
.share-icon:hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--surface); border-color: var(--wp--preset--color--ink); }
.share-icon svg { width: 16px; height: 16px; fill: currentColor; }

/* ── AUTHOR CARD (single) ── */
.author-card { max-width: 720px; margin: 56px auto 0; padding: 0 20px; }
.author-card-inner { background: var(--wp--preset--color--surface); border-radius: var(--wp--custom--radius--card); padding: 32px; gap: 22px; }
.author-avatar-lg { width: 64px; height: 64px; border-radius: var(--wp--custom--radius--pill); background: var(--wp--preset--color--paper); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: var(--wp--preset--color--grey); font-family: var(--wp--preset--font-family--mono); flex-shrink: 0; }
.author-name { font-size: 16px; font-weight: 700; color: var(--wp--preset--color--ink); }
.author-role { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.author-bio { font-size: 15px; color: var(--wp--preset--color--grey); line-height: 155%; margin-top: 8px; }

/* ── CTA CARD (single, closing) ── */
.cta-card { background: var(--wp--preset--color--ink); border-radius: var(--wp--custom--radius--card-large); padding: 80px 48px; text-align: center; }
.cta-eyebrow { font-family: var(--wp--preset--font-family--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.55); margin-bottom: 20px; }
.cta-heading { font-size: clamp(26px, 3.6vw, 48px); line-height: 108%; letter-spacing: -0.03em; max-width: 640px; margin: 0 auto 20px; text-wrap: pretty; }
.cta-sub { font-size: 18px; font-weight: 400; color: rgba(255,255,255,0.72); max-width: 460px; margin: 0 auto 36px; line-height: 156%; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
	.featured-post { grid-template-columns: 1fr; }
	.post-grid.wp-block-post-template { grid-template-columns: 1fr 1fr !important; }
	.news-card, .cta-card { padding: 48px 28px; }
	.hero-editorial-card { padding: 48px 28px; }
}
@media (max-width: 600px) {
	.post-grid.wp-block-post-template { grid-template-columns: 1fr !important; }
	.news-form { flex-direction: column; }
	.featured-body { padding: 28px; }
	.cat-filter-row { gap: 8px; }
	.cat-filter-row a { padding: 9px 14px; font-size: 13px; }
	.article-body-wrap > .wp-block-post-content > *:first-child { font-size: 19px; }
	.article-body-wrap .wp-block-post-content p,
	.article-body-wrap .wp-block-post-content li { font-size: 16.5px; }
	.article-body-wrap .wp-block-quote.is-style-pull-quote { padding: 28px; }
	.author-card-inner { flex-direction: column; text-align: center; }
	.share-row .wp-block-group { flex-direction: column; gap: 16px; align-items: flex-start; }
}
