/* =============================================
   BLOG / MARKET UPDATES — SHARED STYLES
   ============================================= */

/* Hub hero */
.blog-hero { padding: 140px 0 4rem; background: radial-gradient(ellipse 90% 65% at 65% 25%,rgba(37,99,235,.16) 0%,transparent 58%),radial-gradient(ellipse 55% 50% at 10% 80%,rgba(16,185,129,.11) 0%,transparent 55%),linear-gradient(180deg,#040C1A 0%,#07122A 100%); border-bottom: 1px solid rgba(255,255,255,.07); }
.blog-hero-inner { text-align: center; }
.blog-hero h1 { font-family: var(--head); font-size: clamp(2.25rem,5vw,3.5rem); font-weight: 900; color: #fff; line-height: 1.12; margin: 1rem 0 1.25rem; }
.blog-hero p { font-size: 1.0625rem; color: rgba(255,255,255,.65); max-width: 560px; margin: 0 auto; line-height: 1.75; }

/* Category filter */
.blog-filter-strip { background: var(--white); border-bottom: 1px solid var(--bdrlt); position: sticky; top: 60px; z-index: 90; }
.blog-filters { display: flex; align-items: center; gap: .5rem; padding: .875rem 0; flex-wrap: wrap; }
.bff-label { font-size: .78rem; font-weight: 600; color: var(--tx3); margin-right: .5rem; }
.bff-btn { padding: .4rem .9rem; border-radius: 20px; border: 1.5px solid var(--bdrlt); background: transparent; color: var(--tx2); font-size: .8rem; font-weight: 600; cursor: pointer; transition: all var(--t); white-space: nowrap; }
.bff-btn:hover { border-color: var(--blue); color: var(--blue); background: rgba(37,99,235,.05); }
.bff-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Featured post */
.blog-featured-section { padding: 4rem 0 2rem; background: var(--bg); }
.blog-featured-label { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: 1.25rem; }
.blog-featured-card { background: var(--white); border: 1.5px solid var(--bdrlt); border-radius: var(--r4); overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; transition: transform 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out; }
.blog-featured-card:hover { transform: translateY(-4px); box-shadow: var(--sh2); border-color: rgba(37,99,235,.2); }
.bfc-visual { background: linear-gradient(135deg, #040C1A 0%, #0f2451 50%, #1e3a8a 100%); min-height: 280px; display: flex; align-items: center; justify-content: center; padding: 3rem; position: relative; overflow: hidden; }
.bfc-visual::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(37,99,235,.3), transparent 65%); }
.bfc-stat-block { position: relative; text-align: center; }
.bfc-stat-block .big-num { font-family: var(--head); font-size: 5rem; font-weight: 900; color: #fff; line-height: 1; }
.bfc-stat-block .big-label { font-size: .9rem; color: rgba(255,255,255,.6); margin-top: .5rem; }
.bfc-content { padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; }
.bfc-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.post-cat-tag { font-size: .7rem; font-weight: 700; padding: .25rem .65rem; border-radius: 20px; }
.post-cat-tag.capacity { background: rgba(234,88,12,.1); color: #c2410c; }
.post-cat-tag.procurement { background: rgba(37,99,235,.1); color: #1d4ed8; }
.post-cat-tag.demand-response { background: rgba(16,185,129,.1); color: #065f46; }
.post-cat-tag.market-update { background: rgba(139,92,246,.1); color: #6d28d9; }
.post-read-time { font-size: .75rem; color: var(--tx3); font-weight: 500; }
.post-date { font-size: .75rem; color: var(--tx3); }
.bfc-content h2 { font-family: var(--head); font-size: clamp(1.35rem,2.5vw,1.75rem); font-weight: 800; color: var(--tx); line-height: 1.3; margin-bottom: .875rem; }
.bfc-content p { font-size: .9375rem; color: var(--tx2); line-height: 1.75; margin-bottom: 1.5rem; flex: 1; }
@media (max-width: 760px) { .blog-featured-card { grid-template-columns: 1fr; } .bfc-visual { min-height: 200px; } }

/* Posts grid */
.blog-posts-section { padding: 2rem 0 5rem; background: var(--bg); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .blog-grid { grid-template-columns: 1fr; } }

.post-card { background: var(--white); border: 1.5px solid var(--bdrlt); border-radius: var(--r4); overflow: hidden; display: flex; flex-direction: column; transition: transform 160ms ease-out, box-shadow 160ms ease-out, border-color 160ms ease-out; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--sh2); border-color: rgba(37,99,235,.2); }
.post-card-visual { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 3rem; position: relative; overflow: hidden; }
.post-card-visual.cap { background: linear-gradient(135deg, #431407, #92400e); }
.post-card-visual.proc { background: linear-gradient(135deg, #1e1b4b, #1e3a8a); }
.post-card-visual.dr { background: linear-gradient(135deg, #022c22, #065f46); }
.post-card-visual.mu { background: linear-gradient(135deg, #2e1065, #4c1d95); }
.post-card-body { padding: 1.375rem 1.375rem 1rem; flex: 1; display: flex; flex-direction: column; }
.post-card-meta { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; margin-bottom: .875rem; }
.post-card-body h3 { font-family: var(--head); font-size: 1rem; font-weight: 800; color: var(--tx); line-height: 1.35; margin-bottom: .625rem; flex: 1; }
.post-card-body p { font-size: .84rem; color: var(--tx2); line-height: 1.7; margin: 0; }
.post-card-footer { padding: 1rem 1.375rem; border-top: 1px solid var(--bdrlt); }
.post-card-footer a { font-size: .82rem; font-weight: 700; color: var(--blue); text-decoration: none; }
.post-card-footer a:hover { text-decoration: underline; }

/* post hidden state */
.post-card.blog-hidden, .blog-featured-card.blog-hidden { display: none; }

/* =============================================
   ARTICLE PAGE STYLES
   ============================================= */

.article-hero { padding: 140px 0 3rem; background: radial-gradient(ellipse 90% 65% at 65% 25%,rgba(37,99,235,.16) 0%,transparent 58%),radial-gradient(ellipse 55% 50% at 10% 80%,rgba(16,185,129,.11) 0%,transparent 55%),linear-gradient(180deg,#040C1A 0%,#07122A 100%); border-bottom: 1px solid rgba(255,255,255,.07); }
.article-hero-inner { max-width: 780px; }
.article-hero-meta { display: flex; align-items: center; gap: .875rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.article-hero h1 { font-family: var(--head); font-size: clamp(1.75rem,4vw,2.75rem); font-weight: 900; color: #fff; line-height: 1.18; margin-bottom: 1.25rem; }
.article-hero-summary { font-size: 1.0625rem; color: rgba(255,255,255,.7); line-height: 1.75; max-width: 680px; }

/* Article layout */
.article-layout { padding: 4rem 0 5rem; background: var(--bg); }
.article-grid { display: grid; grid-template-columns: 1fr 300px; gap: 4rem; align-items: start; }
@media (max-width: 960px) { .article-grid { grid-template-columns: 1fr; } .article-sidebar { order: -1; } }

/* Article body */
.article-body { background: var(--white); border: 1.5px solid var(--bdrlt); border-radius: var(--r4); padding: 2.75rem; }
.article-body h2 { font-family: var(--head); font-size: 1.4rem; font-weight: 800; color: var(--tx); margin: 2.25rem 0 .875rem; line-height: 1.3; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-family: var(--head); font-size: 1.1rem; font-weight: 700; color: var(--tx); margin: 1.75rem 0 .625rem; }
.article-body p { font-size: .9375rem; color: var(--tx2); line-height: 1.8; margin-bottom: 1.125rem; }
.article-body ul, .article-body ol { margin: 0 0 1.125rem 1.375rem; }
.article-body li { font-size: .9375rem; color: var(--tx2); line-height: 1.75; margin-bottom: .4rem; }
.article-body strong { color: var(--tx); font-weight: 700; }
.article-body a { color: var(--blue); text-decoration: underline; }

.article-callout { background: rgba(37,99,235,.06); border-left: 4px solid var(--blue); border-radius: 0 var(--r2) var(--r2) 0; padding: 1.25rem 1.375rem; margin: 1.75rem 0; }
.article-callout p { margin: 0; color: var(--tx); font-weight: 500; }
.article-callout p:not(:last-child) { margin-bottom: .5rem; }

.article-warning { background: rgba(234,88,12,.06); border-left: 4px solid #ea580c; border-radius: 0 var(--r2) var(--r2) 0; padding: 1.25rem 1.375rem; margin: 1.75rem 0; }
.article-warning p { margin: 0; color: var(--tx); }

.article-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .875rem; }
.article-table th { background: var(--bg); color: var(--tx); font-weight: 700; padding: .75rem 1rem; text-align: left; border: 1px solid var(--bdrlt); }
.article-table td { padding: .75rem 1rem; border: 1px solid var(--bdrlt); color: var(--tx2); vertical-align: top; }
.article-table tr:nth-child(even) td { background: var(--bg); }
.td-green { color: #059669; font-weight: 700; }
.td-red { color: #dc2626; font-weight: 700; }

.article-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin: 1.75rem 0; }
@media (max-width: 600px) { .article-stat-row { grid-template-columns: repeat(2,1fr); } }
.asr-item { background: var(--bg); border: 1.5px solid var(--bdrlt); border-radius: var(--r3); padding: 1.125rem; text-align: center; }
.asr-value { font-family: var(--head); font-size: 1.6rem; font-weight: 900; color: var(--blue); line-height: 1; }
.asr-label { font-size: .75rem; color: var(--tx3); margin-top: .35rem; line-height: 1.4; }

/* Sidebar */
.article-sidebar { display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 80px; }
.sidebar-card { background: var(--white); border: 1.5px solid var(--bdrlt); border-radius: var(--r4); padding: 1.5rem; }
.sidebar-card h4 { font-family: var(--head); font-size: .9rem; font-weight: 800; color: var(--tx); margin: 0 0 1rem; }
.sidebar-toc { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.sidebar-toc a { font-size: .82rem; color: var(--tx2); text-decoration: none; padding: .35rem .5rem; border-radius: var(--r1); display: block; transition: background var(--t), color var(--t); }
.sidebar-toc a:hover { background: rgba(37,99,235,.07); color: var(--blue); }
.sidebar-toc a.active { color: var(--blue); font-weight: 600; }
.sidebar-cta { background: linear-gradient(135deg, #040C1A, #0f2451); border: 1.5px solid rgba(37,99,235,.3); }
.sidebar-cta h4 { color: #fff; }
.sidebar-cta p { font-size: .84rem; color: rgba(255,255,255,.65); line-height: 1.65; margin-bottom: 1.25rem; }
.sidebar-author { display: flex; align-items: center; gap: .875rem; }
.sa-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg,var(--blue),var(--green)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sa-avatar svg { color: #fff; }
.sa-info strong { display: block; font-size: .875rem; font-weight: 700; color: var(--tx); }
.sa-info span { font-size: .78rem; color: var(--tx3); }

/* Article footer */
.article-footer-nav { padding: 3rem 0; background: var(--white); border-top: 1px solid var(--bdrlt); }
.afn-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.afn-back { font-size: .875rem; color: var(--blue); text-decoration: none; font-weight: 600; }
.afn-back:hover { text-decoration: underline; }
.afn-related h4 { font-size: .78rem; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.afn-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.afn-links a { font-size: .875rem; color: var(--blue); text-decoration: none; font-weight: 600; }
.afn-links a:hover { text-decoration: underline; }
