/* ============================================================
   SIGNATURE HUB — Public Blog Styles
   Matches SA design system: Gold #c9a84c, Black, Off-white
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:       #c9a84c;
  --gold-light: #dfc06f;
  --ink:        #0d0d0d;
  --dark:       #141414;
  --body-bg:    #f7f7f5;
  --surface:    #f0ede6;
  --text:       #1a1a1a;
  --muted:      #777777;
  --gray-light: #b0b0b0;
  --border:     #e2e0db;
  --white:      #ffffff;
  --off-white:  #f7f7f5;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-arabic: 'Noto Naskh Arabic', serif;
  --font-sans:   'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --max-w:       1360px;
  --header-h:    72px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--ink);
  line-height: 1.85;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { font-family: var(--font-serif); }
a    { color: inherit; text-decoration: none; transition: all 0.3s var(--ease); }
img  { max-width: 100%; height: auto; display: block; }

/* ── Blog Header ────────────────────────────────────────────── */
.blog-header {
  height: var(--header-h);
  background: var(--ink);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(201,168,76,.15);
}
.blog-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.blog-header .logo img { height: 42px; }
.blog-header nav { display: flex; gap: 1.8rem; align-items: center; }
.blog-header nav a {
  font-size: 0.8rem; color: rgba(255,255,255,.7); font-weight: 500;
  letter-spacing: 0.02em;
}
.blog-header nav a:hover, .blog-header nav a.active { color: var(--gold); }
.blog-header .back-to-site {
  font-size: 0.76rem; color: rgba(255,255,255,.5); white-space: nowrap;
  border: 1px solid rgba(255,255,255,.15); padding: 0.4rem 1rem; border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.blog-header .back-to-site:hover { color: var(--gold); border-color: var(--gold); }

/* ── Container ──────────────────────────────────────────────── */
.blog-container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

/* ── Hero ────────────────────────────────────────────────────── */
.blog-hero {
  background: var(--ink);
  color: var(--white);
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.blog-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 1.2rem;
  position: relative;
}
.blog-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.15;
  position: relative;
}
.blog-hero p {
  font-size: 1.05rem; color: rgba(255,255,255,.6); max-width: 560px;
  margin: 0 auto 2rem; line-height: 1.7; position: relative;
}
.blog-search {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.blog-search input {
  flex: 1;
  padding: 0.8rem 1.2rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-right: none;
  border-radius: 2px 0 0 2px;
  color: #fff;
  font-size: 0.9rem;
  font-family: var(--font-sans);
}
.blog-search input::placeholder { color: rgba(255,255,255,.35); }
.blog-search input:focus { outline: none; border-color: var(--gold); }
.blog-search button {
  padding: 0.8rem 1.5rem;
  background: var(--gold);
  border: none;
  border-radius: 0 2px 2px 0;
  color: #000;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.3s var(--ease);
}
.blog-search button:hover { background: var(--gold-light); }

/* ── Topic chips ────────────────────────────────────────────── */
.topic-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 2rem 0 1rem; }
.chip {
  padding: 0.4rem 1rem;
  border-radius: 2px;
  font-size: 0.76rem;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.chip:hover  { background: var(--ink); color: var(--gold); border-color: var(--ink); }
.chip--active { background: var(--ink); color: var(--gold); border-color: var(--ink); }

/* ── Post grid ──────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 1.5rem 0 4rem;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.4s var(--ease);
  position: relative;
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.post-card:hover {
  border-color: rgba(201,168,76,0.3);
  box-shadow: 0 12px 40px rgba(0,0,0,.06);
  transform: translateY(-4px);
}
.post-card:hover::before { opacity: 1; }
.post-card--pillar { border-color: rgba(201,168,76,0.4); }
.post-card--pillar::before { opacity: 1; }
.post-card-img { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-card-img img { transform: scale(1.05); }
.pillar-badge {
  position: absolute; top: .8rem; left: .8rem;
  background: var(--gold); color: #000; font-size: .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; padding: .25rem .7rem; border-radius: 1px;
}
.post-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: .5rem; }
.post-cat {
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  color: var(--gold); text-decoration: none;
}
.post-card h2 { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; line-height: 1.35; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--gold); }
.post-subtitle { font-size: .85rem; color: var(--muted); font-family: var(--font-serif); font-style: italic; }
.post-excerpt { font-size: .85rem; color: var(--muted); line-height: 1.65; flex: 1; }
.post-card-footer {
  font-size: .72rem; color: var(--gray-light); display: flex; gap: .4rem;
  flex-wrap: wrap; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--border);
}

/* ── Single post ────────────────────────────────────────────── */
.blog-main { min-height: 60vh; background: var(--white); }
.breadcrumb { font-size: .76rem; color: var(--muted); padding: 2rem 0 1rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold); }
.post-article { max-width: 760px; margin: 0 auto; padding: 1rem 0 4rem; }
.post-header { margin-bottom: 2.5rem; }
.post-category {
  display: inline-block; font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; color: var(--gold); text-decoration: none; margin-bottom: 1rem;
}
.post-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: .8rem;
}
.post-subtitle { font-size: 1.1rem; color: var(--muted); font-family: var(--font-serif); font-style: italic; line-height: 1.5; margin-bottom: 1.2rem; }
.post-meta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; padding: 1.2rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.author-name { font-size: .85rem; font-weight: 700; color: var(--ink); }
.author-role { font-size: .76rem; color: var(--muted); margin-left: .4rem; }
.post-stats { display: flex; gap: .5rem; font-size: .76rem; color: var(--muted); flex-wrap: wrap; align-items: center; }
.expert-badge { background: rgba(201,168,76,.12); color: var(--gold); font-size: .65rem; font-weight: 700; padding: .15rem .6rem; border-radius: 1px; text-transform: uppercase; letter-spacing: .08em; }
.post-featured-img { margin: 2rem 0; overflow: hidden; }
.post-featured-img img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.post-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: #222;
}
.post-content h2 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 .8rem; color: var(--ink); }
.post-content h3 { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; margin: 2rem 0 .6rem; }
.post-content h4 { font-size: 1rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.post-content p  { margin-bottom: 1.3rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.post-content li { margin-bottom: .4rem; }
.post-content blockquote {
  border-left: 3px solid var(--gold); padding: 1rem 1.5rem;
  margin: 2rem 0; background: var(--off-white); 
  font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; color: #444;
}
.post-content a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.post-content img { margin: 2rem 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: .9rem; }
.post-content th, .post-content td { padding: .7rem .9rem; border: 1px solid var(--border); text-align: left; }
.post-content th { background: var(--off-white); font-weight: 700; }
.post-content code { background: var(--off-white); padding: .15rem .4rem; font-size: .86em; }
.post-content pre  { background: var(--ink); color: #e8e8e8; padding: 1.2rem; overflow-x: auto; margin: 2rem 0; font-size: .86rem; }
.post-content pre code { background: none; padding: 0; color: inherit; }

/* ── FAQs ────────────────────────────────────────────────────── */
.post-faqs { margin: 3rem auto; padding: 2.5rem; background: var(--off-white); border: 1px solid var(--border); max-width: 760px; }
.post-faqs h2 { font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: 1.5rem; }
.faq-block { border-bottom: 1px solid var(--border); padding: 1.2rem 0; }
.faq-block:last-child { border-bottom: none; }
.faq-block h3 { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: .5rem; font-family: var(--font-sans); }
.faq-block div { font-size: .9rem; color: var(--muted); line-height: 1.7; }

/* ── Tags ────────────────────────────────────────────────────── */
.post-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem auto; max-width: 760px; }
.tag-link { background: transparent; border: 1px solid var(--border); padding: .3rem .8rem; font-size: .72rem; color: var(--muted); text-decoration: none; transition: all 0.3s var(--ease); }
.tag-link:hover { border-color: var(--gold); color: var(--gold); }

/* ── Author bio ──────────────────────────────────────────────── */
.author-bio-box {
  background: var(--off-white); border: 1px solid var(--border);
  padding: 2rem; margin: 3rem auto; max-width: 760px;
  display: flex; gap: 1.5rem; align-items: flex-start;
}
.author-bio-text strong { font-size: 1rem; font-weight: 700; color: var(--ink); }
.author-bio-text span   { font-size: .8rem; color: var(--muted); margin-left: .5rem; }
.author-bio-text p      { font-size: .88rem; color: var(--muted); margin-top: .5rem; line-height: 1.7; }
.author-bio-text a      { font-size: .8rem; font-weight: 700; color: var(--gold); }

/* ── Related posts ───────────────────────────────────────────── */
.related-posts { padding: 4rem 0; border-top: 1px solid var(--border); }
.related-posts h2 { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 2rem; text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.related-card { background: var(--white); border: 1px solid var(--border); overflow: hidden; text-decoration: none; color: var(--ink); transition: all 0.4s var(--ease); }
.related-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.06); transform: translateY(-3px); }
.related-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.related-body { padding: 1.2rem; }
.related-body h3 { font-family: var(--font-serif); font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.related-body p  { font-size: .82rem; color: var(--muted); line-height: 1.6; }
.related-body span { font-size: .72rem; color: var(--gray-light); display: block; margin-top: .5rem; }

/* ── Blog footer ─────────────────────────────────────────────── */
.blog-footer { background: var(--ink); color: rgba(255,255,255,.5); padding: 3rem 0; margin-top: 4rem; text-align: center; font-size: .8rem; }
.blog-footer a { color: rgba(255,255,255,.7); transition: color 0.3s var(--ease); }
.blog-footer a:hover { color: var(--gold); }
.blog-footer .footer-links { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.blog-footer .footer-links a { font-size: .78rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; gap: .4rem; justify-content: center; padding: 1rem 0 3rem; }
.page-link { padding: .5rem 1rem; background: var(--white); border: 1px solid var(--border); color: var(--muted); font-size: .82rem; text-decoration: none; transition: all 0.3s var(--ease); }
.page-link:hover { border-color: var(--gold); color: var(--gold); }
.page-link.active { background: var(--ink); border-color: var(--ink); color: var(--gold); font-weight: 700; }

/* ── Author page ─────────────────────────────────────────────── */
.author-hero { background: var(--ink); color: var(--white); padding: 4rem 0; position: relative; overflow: hidden; }
.author-hero::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.author-hero h1 { font-family: var(--font-serif); font-size: clamp(1.6rem, 3.5vw, 2.2rem); position: relative; }
.author-hero .role { color: var(--gold); font-size: .75rem; text-transform: uppercase; letter-spacing: .16em; margin-bottom: .8rem; position: relative; }
.author-hero p { color: rgba(255,255,255,.6); max-width: 560px; margin-top: .8rem; position: relative; line-height: 1.7; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .post-article { padding: 1rem 0 2rem; }
  .blog-hero { padding: 3rem 0 2.5rem; }
  .blog-header .inner { padding: 0 1rem; }
  .blog-container { padding: 0 1rem; }
  .author-bio-box { flex-direction: column; gap: 1rem; }
  .blog-header nav { display: none; }
}
@media (max-width: 480px) {
  .blog-header .back-to-site { display: none; }
  .blog-search { flex-direction: column; gap: .5rem; }
  .blog-search input { border-right: 1px solid rgba(255,255,255,.12); border-radius: 2px; }
  .blog-search button { border-radius: 2px; width: 100%; }
}
