/* ===========================
   BLOG.CSS — Bright Wire Works
   Blog listing + article styles
=========================== */

/* ── BLOG HERO ─────────────────────────────── */
.blog-hero { text-align: center; padding: 90px 24px 80px; }
.blog-hero-inner { max-width: 780px; margin: 0 auto; position: relative; z-index: 1; }
.blog-hero-eyebrow {
  display: inline-block;
  background: rgba(46, 190, 239, .14);
  border: 1px solid rgba(46, 190, 239, .32);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: rgba(255,255,255,.9);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.blog-hero h1 {
  font-family: 'DM Serif Text', serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400;
  color: #fff;
  line-height: 1.18;
  margin-bottom: 16px;
}
.blog-hero h1 span { color: var(--amber); }
.blog-hero p {
  font-size: 15.5px;
  color: rgba(255,255,255,.72);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── BLOG LISTING PAGE ─────────────────────── */
.blog-listing-page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* Filter bar */
.blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 44px;
}
.blog-filter-btn {
  background: var(--light);
  border: 1.5px solid var(--border);
  color: var(--slate);
  padding: 8px 18px;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.blog-filter-btn:hover { border-color: var(--steel); color: var(--steel); }
.blog-filter-btn.active {
  background: var(--steel);
  border-color: var(--steel);
  color: #fff;
}

/* Posts grid */
.blog-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 64px;
}

/* Blog card */
.blog-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 14px rgba(15,26,38,.05);
  transition: box-shadow .3s, transform .3s, border-color .3s;
}
.blog-card:hover {
  box-shadow: 0 12px 36px rgba(46,190,239,.13);
  transform: translateY(-4px);
  border-color: #b4e8e2;
}
.blog-card--coming { opacity: .82; }
.blog-card--coming:hover { opacity: 1; }

.blog-card-img-wrap { display: block; text-decoration: none; }
.blog-card-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.blog-card-img--green  { background: linear-gradient(135deg, #0a2e2a 0%, #00897b 100%); }
.blog-card-img--blue   { background: linear-gradient(135deg, #0f1a26 0%, #1e4d80 100%); }
.blog-card-img--amber  { background: linear-gradient(135deg, #1a1200 0%, #c97d00 100%); }
.blog-card-img--ev     { background: linear-gradient(135deg, #0a1628 0%, #2e7d32 100%); }
.blog-card-img-icon { font-size: 44px; opacity: .85; }

.blog-card-body { padding: 22px 22px 18px; display: flex; flex-direction: column; flex: 1; }

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.blog-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
}
.bescom-tag { background: rgba(46,190,239,.13); color: #0077a0; border: 1px solid rgba(46,190,239,.3); }
.nc-tag { background: rgba(0,137,123,.12); color: #00574d; border: 1px solid rgba(0,137,123,.3); }
.wiring-tag { background: rgba(255,211,33,.18); color: #7a5a00; border: 1px solid rgba(255,211,33,.4); }
.blog-date { font-size: 12px; color: var(--slate); margin-left: auto; }

.blog-card-title { font-family: 'DM Serif Text', serif; font-size: 17px; font-weight: 400; color: var(--dark); line-height: 1.35; margin-bottom: 10px; }
.blog-card-title a { text-decoration: none; color: inherit; transition: color .2s; }
.blog-card-title a:hover { color: var(--steel); }

.blog-card-excerpt { font-size: 13px; color: var(--slate); line-height: 1.65; flex: 1; margin-bottom: 18px; }

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: auto;
}
.blog-card-author { display: flex; align-items: center; gap: 10px; }
.blog-author-avatar {
  width: 34px; height: 34px;
  background: var(--dark);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #4dd0c4; font-weight: 700; font-size: 14px;
  font-family: 'Poppins', sans-serif;
  flex-shrink: 0;
}
.blog-card-author strong { display: block; font-size: 13px; color: var(--dark); }
.blog-card-author span { font-size: 11px; color: var(--slate); }

.blog-read-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--steel);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, gap .2s;
}
.blog-read-more:hover { color: var(--teal-dark); }

.blog-coming-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  background: var(--light);
  border: 1px solid var(--border);
  color: var(--slate);
  padding: 4px 10px;
  border-radius: 50px;
}

/* Blog CTA strip */
.blog-cta-strip {
  background: linear-gradient(135deg, var(--dark) 0%, #0a2e2a 100%);
  border-radius: 16px;
  padding: 52px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-cta-strip::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(46,190,239,.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(46,190,239,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.blog-cta-content { position: relative; z-index: 1; }
.blog-cta-strip h2 {
  font-family: 'DM Serif Text', serif;
  font-size: 28px; font-weight: 400;
  color: #fff; margin-bottom: 10px;
}
.blog-cta-strip p { font-size: 15px; color: rgba(255,255,255,.65); margin-bottom: 28px; }
.blog-cta-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.blog-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--steel); color: #fff;
  padding: 13px 28px; border-radius: 9px;
  font-weight: 700; font-size: 14px; text-decoration: none;
  font-family: 'Poppins', sans-serif;
  transition: background .2s, transform .2s;
  box-shadow: 0 4px 16px rgba(46,190,239,.3);
}
.blog-cta-btn:hover { background: var(--teal-dark); transform: translateY(-1px); }
.blog-cta-btn--outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.28);
  box-shadow: none;
}
.blog-cta-btn--outline:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.5); }


/* ══════════════════════════════════════════
   ARTICLE / POST PAGE STYLES
══════════════════════════════════════════ */

/* Post hero */
.post-hero { text-align: left; padding: 72px 24px 60px; }
.post-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  position: relative; z-index: 1;
}

/* Breadcrumb */
.post-breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255,255,255,.55);
  margin-bottom: 20px;
  font-family: 'Poppins', sans-serif;
}
.post-breadcrumb a { color: rgba(255,255,255,.65); text-decoration: none; transition: color .2s; }
.post-breadcrumb a:hover { color: rgba(255,255,255,.95); }
.post-breadcrumb span { color: rgba(255,255,255,.35); }

.post-badge {
  display: inline-block;
  background: var(--steel);
  color: #fff;
  font-size: 11px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 4px;
  margin-bottom: 18px;
}

.post-hero h1 {
  font-family: 'DM Serif Text', serif;
  font-size: clamp(24px, 3.8vw, 40px);
  font-weight: 400;
  color: #fff;
  line-height: 1.25;
  max-width: 820px;
  margin: 0 0 16px;
}
.post-hero h1 span { color: #4dd0c4; }

.post-hero-sub { font-size: 16px; color: rgba(255,255,255,.72); max-width: 600px; line-height: 1.7; margin-bottom: 28px; }

.post-hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.post-author { display: flex; align-items: center; gap: 12px; }
.post-author-avatar {
  width: 44px; height: 44px;
  background: var(--dark);
  border: 2px solid rgba(77,208,196,.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #4dd0c4; font-weight: 700; font-size: 17px;
  flex-shrink: 0;
}
.post-author strong { display: block; font-size: 14px; color: #fff; }
.post-author span { font-size: 12px; color: rgba(255,255,255,.55); }
.post-meta-right { font-size: 13px; color: rgba(255,255,255,.50); display: flex; gap: 8px; align-items: center; }
.post-meta-dot { opacity: .4; }

/* Post layout: article + sidebar TOC */
.post-layout {
  max-width: 1140px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 52px;
  align-items: start;
}

/* TOC sidebar */
.post-toc {
  position: sticky;
  top: 90px;
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
  border-top: 3px solid var(--steel);
}
.toc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 14px;
}
.post-toc nav { display: flex; flex-direction: column; gap: 2px; }
.toc-link {
  font-size: 13px;
  color: var(--slate);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 7px;
  transition: background .18s, color .18s;
  line-height: 1.4;
}
.toc-link:hover { background: rgba(46,190,239,.10); color: var(--dark); }
.toc-link--active { background: rgba(46,190,239,.14); color: var(--steel); font-weight: 600; }

/* Article typography */
.post-article { min-width: 0; }

.post-article h2 {
  font-family: 'DM Serif Text', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--dark);
  margin: 52px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--steel);
  scroll-margin-top: 110px;
}
.post-article h2:first-child { margin-top: 0; }
.post-article h3 { font-size: 18px; color: var(--dark); margin: 30px 0 12px; scroll-margin-top: 110px; }
.post-article p { font-size: 16px; color: #334155; line-height: 1.8; margin-bottom: 18px; font-family: Georgia, serif; }
.post-article strong { color: var(--dark); }

/* Keyword strip */
.post-keyword-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 36px; }
.post-keyword-strip span {
  background: var(--light); border: 1px solid var(--border);
  font-size: 12px; font-family: 'Poppins', sans-serif;
  padding: 4px 12px; border-radius: 20px; color: var(--slate);
}

/* Checklist */
.post-checklist { list-style: none; margin: 16px 0 24px; padding: 0; }
.post-checklist li {
  padding: 10px 0 10px 36px;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: 15.5px;
  color: #334155;
  font-family: Georgia, serif;
  line-height: 1.65;
}
.post-checklist li:last-child { border-bottom: none; }
.post-checklist li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--steel); font-weight: 700; font-size: 14px;
  font-family: 'Poppins', sans-serif;
}

/* Callout */
.post-callout {
  background: var(--teal-xlight);
  border-left: 4px solid var(--steel);
  padding: 20px 24px;
  margin: 28px 0;
  border-radius: 0 8px 8px 0;
}
.post-callout strong { display: block; margin-bottom: 8px; font-size: 14.5px; color: var(--dark); font-family: 'Poppins', sans-serif; }
.post-callout p { margin: 0; font-size: 14.5px; color: var(--slate); font-family: 'Poppins', sans-serif; line-height: 1.7; }

/* Warning */
.post-warning {
  background: #fff8f0;
  border-left: 4px solid var(--crimson);
  padding: 18px 24px;
  margin: 28px 0;
  border-radius: 0 8px 8px 0;
}
.post-warning p { margin: 0; font-size: 14.5px; color: #5a3000; font-family: 'Poppins', sans-serif; line-height: 1.7; }

/* Two-column info cards */
.post-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
.post-card {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}
.post-card h4 { font-size: 14.5px; margin-bottom: 10px; color: var(--steel); font-family: 'Poppins', sans-serif; }
.post-card p { margin: 0; font-size: 13.5px; color: var(--slate); font-family: 'Poppins', sans-serif; line-height: 1.65; }

/* Steps */
.post-steps { display: flex; flex-direction: column; gap: 14px; margin: 24px 0; }
.post-step {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--light);
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.post-step-num {
  min-width: 36px; height: 36px;
  background: var(--dark);
  color: #4dd0c4;
  font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: 'Poppins', sans-serif;
  flex-shrink: 0;
}
.post-step-body strong { display: block; margin-bottom: 4px; font-size: 14.5px; color: var(--dark); font-family: 'Poppins', sans-serif; }
.post-step-body p { margin: 0; font-size: 13.5px; color: var(--slate); font-family: 'Poppins', sans-serif; line-height: 1.6; }

/* FAQ */
.post-faq { margin: 16px 0 32px; }
.post-faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.post-faq-q {
  width: 100%;
  background: var(--light);
  border: none;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  color: var(--dark);
  font-family: 'Poppins', sans-serif;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: color .18s;
}
.post-faq-q:hover { color: var(--steel); }
.post-faq-q[aria-expanded="true"] { color: var(--steel); background: var(--teal-xlight); }
.post-faq-q .faq-icon { font-size: 20px; font-weight: 300; color: #94a3b8; flex-shrink: 0; transition: transform .25s, color .18s; }
.post-faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); color: var(--steel); }
.post-faq-a { padding: 16px 20px; font-size: 14.5px; color: var(--slate); font-family: 'Poppins', sans-serif; line-height: 1.72; }
.post-faq-a[hidden] { display: none; }

/* Author card */
.post-author-card {
  display: flex; gap: 18px; align-items: center;
  padding: 24px; border: 1px solid var(--border); border-radius: 12px;
  margin: 44px 0 0;
  background: var(--light);
}
.post-author-avatar-lg {
  width: 60px; height: 60px;
  background: var(--dark); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #4dd0c4; font-size: 22px; font-weight: 700;
  font-family: 'Poppins', sans-serif; flex-shrink: 0;
}
.post-author-info strong { display: block; font-size: 15px; color: var(--dark); }
.post-author-info span { font-size: 13px; color: var(--slate); font-family: 'Poppins', sans-serif; }

/* Post CTA box */
.post-cta-box {
  background: linear-gradient(135deg, var(--dark), #0a2e2a);
  color: #fff;
  padding: 44px 36px;
  border-radius: 14px;
  text-align: center;
  margin: 28px 0;
  position: relative; overflow: hidden;
}
.post-cta-box::before {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(46,190,239,.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(46,190,239,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.post-cta-box h2 {
  color: #fff; border-bottom: none;
  font-family: 'DM Serif Text', serif;
  font-size: 26px; font-weight: 400;
  margin: 0 0 10px; padding: 0; position: relative; z-index: 1;
}
.post-cta-box p { color: rgba(255,255,255,.65); font-size: 15.5px; margin-bottom: 28px; font-family: 'Poppins', sans-serif; position: relative; z-index: 1; }
.post-cta-btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.post-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--steel); color: #fff;
  padding: 13px 28px; border-radius: 9px;
  font-weight: 700; font-size: 14.5px; text-decoration: none;
  font-family: 'Poppins', sans-serif;
  transition: background .2s, transform .2s;
  box-shadow: 0 4px 16px rgba(46,190,239,.3);
}
.post-cta-btn:hover { background: var(--teal-dark); transform: translateY(-1px); }
.post-cta-btn--outline {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.30);
  box-shadow: none;
}
.post-cta-btn--outline:hover { background: rgba(255,255,255,.10); }

/* Back link */
.post-back-link { margin-top: 36px; }
.post-back-link a { font-size: 14px; color: var(--steel); text-decoration: none; font-weight: 600; transition: color .2s; }
.post-back-link a:hover { color: var(--teal-dark); }

/* ── RESPONSIVE ────────────────────────────── */
@media (max-width: 1024px) {
  .post-layout { grid-template-columns: 1fr; gap: 0; }
  .post-toc { position: static; margin-bottom: 32px; }
  .blog-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .blog-posts-grid { grid-template-columns: 1fr; gap: 24px; }
  .post-card-grid { grid-template-columns: 1fr; }
  .blog-cta-strip { padding: 36px 22px; }
  .blog-hero { padding: 64px 20px 54px; }
  .post-hero { padding: 52px 20px 44px; }
  .post-cta-box { padding: 32px 20px; }
  .post-cta-btns { flex-direction: column; align-items: stretch; }
  .blog-cta-btns { flex-direction: column; align-items: stretch; }
  .blog-cta-btn, .post-cta-btn { text-align: center; justify-content: center; }
  .post-hero-meta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .post-author-card { flex-direction: column; text-align: center; }
  .blog-card-meta { gap: 6px; }
  .blog-card-title { font-size: 16px; }
  .blog-filter-bar { justify-content: center; margin-bottom: 32px; gap: 8px; }
  .blog-filter-btn { font-size: 12px; padding: 6px 14px; }
  .post-article h2 { font-size: 22px; margin: 40px 0 14px; }
  .post-step { flex-direction: column; gap: 12px; }
}
