/*
 * blog.css — JewelryWelderPro blog system
 * Shared styles for blog list (blog.html) + article pages (blog/*.html).
 * Reuses the site brand tokens (gold #B48D3C / burgundy-dark bands / Montserrat+Roboto).
 * Self-contained: pairs with Bootstrap 5.3.2 + bootstrap-icons CDN (same as landing pages).
 */
:root {
  --primary-gold: #B48D3C;
  --dark-gold: #836A35;
  --deep-navy: #24181B;   /* recolored dark band (burgundy-black) */
  --charcoal: #362026;    /* dark burgundy */
  --light-bg: #F6F4F1;
  --surface: #FFFFFF;
  --text-dark: #1A1A1A;
  --text-muted: #5A5A5A;
  --border: #E7DDD5;
}

body { font-family: 'Roboto', sans-serif; color: var(--text-dark); background: var(--light-bg); }
.brand-font, h1, h2, h3, h4, h5 { font-family: 'Montserrat', sans-serif; }

/* ---- navbar (self-contained, matches landing style) ---- */
.navbar { background: var(--deep-navy); padding: .75rem 0; }
.navbar .navbar-brand { font-family: 'Montserrat', sans-serif; font-weight: 800; color: #fff; font-size: 1.4rem; }
.navbar .navbar-brand span { color: var(--primary-gold); }
.navbar .nav-link { color: rgba(255,255,255,.85); font-weight: 500; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--primary-gold); }
.btn-gold { background: linear-gradient(135deg, var(--primary-gold), var(--dark-gold)); color: #fff; border: none; font-weight: 600; }
.btn-gold:hover { filter: brightness(1.07); color: #fff; }
.navbar-toggler { border-color: rgba(255,255,255,.3); }
.navbar-toggler-icon { filter: invert(1); }

/* ---- breadcrumb ---- */
.blog-breadcrumb { font-size: .85rem; }
.blog-breadcrumb a { color: rgba(255,255,255,.8); text-decoration: none; }
.blog-breadcrumb a:hover { color: var(--primary-gold); }
.blog-breadcrumb .sep { opacity: .5; margin: 0 .4rem; }

/* ======================= BLOG LIST (blog.html) ======================= */
.blog-list-hero {
  background: linear-gradient(135deg, var(--charcoal), var(--deep-navy));
  color: #fff; padding: 7rem 0 3rem; text-align: center;
}
.blog-list-hero h1 { font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); }
.blog-list-hero p { color: rgba(255,255,255,.8); max-width: 640px; margin: .75rem auto 0; }

.category-chips { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 2rem 0; }
.category-chip {
  border: 1px solid var(--border); background: #fff; color: var(--text-muted);
  border-radius: 999px; padding: .4rem 1.1rem; font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: all .15s ease;
}
.category-chip:hover { border-color: var(--primary-gold); color: var(--primary-gold); }
.category-chip.active { background: var(--primary-gold); border-color: var(--primary-gold); color: #fff; }

.post-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  height: 100%; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(36,24,27,.12); }
.post-card .thumb { aspect-ratio: 16/9; width: 100%; object-fit: cover; background: var(--charcoal); }
.post-card .card-body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.post-badge {
  align-self: flex-start; background: rgba(180,141,60,.12); color: var(--dark-gold);
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px; padding: .3rem .75rem; margin-bottom: .75rem;
}
.post-card h2 { font-size: 1.2rem; font-weight: 700; line-height: 1.35; margin-bottom: .5rem; }
.post-card h2 a { color: var(--text-dark); text-decoration: none; }
.post-card h2 a:hover { color: var(--primary-gold); }
.post-card .excerpt { color: var(--text-muted); font-size: .93rem; flex: 1; }
.post-card .meta { color: var(--text-muted); font-size: .8rem; margin-top: 1rem; display: flex; gap: 1rem; }
.post-card .read-more { color: var(--dark-gold); font-weight: 600; text-decoration: none; margin-top: 1rem; }
.post-card .read-more:hover { color: var(--primary-gold); }

/* ======================= ARTICLE (blog/*.html) ======================= */
.article-hero { position: relative; color: #fff; padding: 7rem 0 3rem; overflow: hidden; }
.article-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--charcoal), var(--deep-navy));
  z-index: 0;
}
.article-hero > .container { position: relative; z-index: 1; }
.article-hero .post-badge { background: rgba(255,255,255,.14); color: var(--primary-gold); }
.article-hero h1 { font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.2; max-width: 900px; }
.article-meta { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.article-meta .pill {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px; padding: .35rem .9rem; font-size: .82rem; color: rgba(255,255,255,.92);
}

.article-wrap { padding: 3rem 0 4rem; }
.article-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 2.25rem;
}
.article-content { font-size: 1.05rem; line-height: 1.8; color: #2a2226; }
.article-content h2 {
  font-size: 1.5rem; font-weight: 700; margin: 2.2rem 0 .9rem; padding-left: .85rem;
  border-left: 4px solid var(--primary-gold); scroll-margin-top: 90px;
}
.article-content h3 { font-size: 1.2rem; font-weight: 700; margin: 1.6rem 0 .6rem; }
.article-content p { margin-bottom: 1.1rem; }
.article-content ul, .article-content ol { margin-bottom: 1.1rem; padding-left: 1.3rem; }
.article-content li { margin-bottom: .5rem; }
.article-content .lead { font-size: 1.18rem; color: var(--text-muted); }
.callout {
  background: var(--light-bg); border: 1px solid var(--border); border-left: 4px solid var(--primary-gold);
  border-radius: 10px; padding: 1.1rem 1.3rem; margin: 1.5rem 0;
}
.callout strong { color: var(--dark-gold); }

/* TOC */
.toc-box {
  background: var(--light-bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.35rem; margin-bottom: 1.75rem;
}
.toc-box h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: .6rem; }
.toc-box ol { margin: 0; padding-left: 1.15rem; }
.toc-box li { margin-bottom: .35rem; }
.toc-box a { color: var(--dark-gold); text-decoration: none; font-size: .95rem; }
.toc-box a:hover { color: var(--primary-gold); text-decoration: underline; }

/* Sticky sidebar */
.sidebar-column { position: relative; }
.sidebar-placeholder { display: none; }
.sidebar-placeholder.active { display: block; }
.blog-sidebar.is-fixed { position: fixed; top: 100px; }
.blog-sidebar.is-bottom { position: absolute; bottom: 0; }
.sidebar-widget, .cta-widget { border-radius: 14px; padding: 1.5rem; margin-bottom: 1.5rem; }
.sidebar-widget { background: var(--surface); border: 1px solid var(--border); }
.sidebar-widget h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .35rem; }
.sidebar-widget p.hint { color: var(--text-muted); font-size: .88rem; margin-bottom: 1rem; }
.sidebar-widget label { font-size: .82rem; font-weight: 600; color: var(--text-dark); margin-bottom: .25rem; }
.sidebar-widget .form-control { border-radius: 8px; border: 1px solid var(--border); font-size: .92rem; }
.sidebar-widget .form-control:focus { border-color: var(--primary-gold); box-shadow: 0 0 0 .2rem rgba(180,141,60,.15); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.erp-form-status { display: none; font-size: .88rem; margin-top: .75rem; }
.cta-widget { background: linear-gradient(135deg, var(--charcoal), var(--deep-navy)); color: #fff; }
.cta-widget h3 { color: #fff; font-size: 1.15rem; font-weight: 700; }
.cta-widget p { color: rgba(255,255,255,.82); font-size: .9rem; }

/* Author + related */
.author-card {
  display: flex; gap: 1rem; align-items: center; margin-top: 2.25rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.author-card .avatar {
  width: 54px; height: 54px; border-radius: 50%; background: var(--primary-gold); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; flex: 0 0 auto;
}
.author-card .name { font-weight: 700; }
.author-card .role { color: var(--text-muted); font-size: .88rem; }

.related-section { margin-top: 3rem; }
.related-section h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.25rem; }
.related-card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.1rem 1.25rem; height: 100%; text-decoration: none; color: var(--text-dark); transition: all .2s ease;
}
.related-card:hover { border-color: var(--primary-gold); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(36,24,27,.1); }
.related-card .rc-badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--dark-gold); }
.related-card h3 { font-size: 1.02rem; font-weight: 700; margin: .4rem 0 0; line-height: 1.35; }

/* footer (matches landing footer) */
footer { background: var(--deep-navy); color: rgba(255,255,255,.75); padding: 3rem 0 1.5rem; }
footer h5 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
footer a { color: rgba(255,255,255,.75); text-decoration: none; display: block; margin-bottom: .4rem; font-size: .92rem; }
footer a:hover { color: var(--primary-gold); }
footer .text-gold { color: var(--primary-gold); }
footer .social-icon { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; margin-right: .4rem; }
footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.25rem; }
footer .footer-bottom a { display: inline; }

@media (max-width: 991px) {
  .blog-sidebar.is-fixed, .blog-sidebar.is-bottom { position: static; width: auto !important; }
  .sidebar-column { margin-top: 2rem; }
}
