/*
Theme Name: RoleStack Blogs
Theme URI: https://rolestack.ai
Description: RoleStack blog theme matching the rolestack.ai marketing site design
Version: 2.0
Author: RoleStack
Author URI: https://rolestack.ai
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rolestack-blogs
Domain Path: /languages
*/

/* ──────────────────────────────────────────────────────────────────
   Brand tokens — mirrored from rolestack.ai seo-page.css so the blog
   is visually identical to the other public pages.
   ────────────────────────────────────────────────────────────────── */
:root {
  --blue: #266df0;
  --blue-strong: #1b54c4;
  --navy: #151433;
  --body: #3f4255;
  --muted: #5b6680;
  --faint: #8793ab;
  --border: #e3e8f1;
  --border-soft: #eef1f6;
  --surface: #f6f8fc;
  --surface-2: #eef3fb;
  --purple-lt: #f1edff;
  --green: #16a34a;
  --radius: 16px;
  --wrap: 1140px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--navy);
  background: #fff;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; transition: color .18s ease; }

img { max-width: 100%; height: auto; display: block; }

/* ── Layout wraps ── */
.seo-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.seo-wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 22px; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all .18s ease;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-strong); transform: translateY(-1px); color: #fff; }
.btn--ghost { background: #fff; border-color: var(--border); color: var(--navy); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--surface-2); transform: translateY(-1px); }

/* ── Navbar (matches seo-nav on rolestack.ai) ── */
.seo-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 32px;
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.seo-nav__logo { display: flex; align-items: center; gap: 9px; }
.seo-nav__logo img.icon { height: 28px; width: auto; }
.seo-nav__logo img.word { height: 20px; width: auto; }
.seo-nav__links { display: flex; align-items: center; gap: 28px; }
.seo-nav__links a { font-size: 14.5px; font-weight: 500; color: var(--muted); }
.seo-nav__links a:hover { color: var(--blue); }
.seo-nav__cta { display: flex; align-items: center; gap: 10px; }
.seo-nav__cta .btn { padding: 9px 16px; font-size: 14px; }

/* WP admin bar pushes the sticky nav down when logged in */
body.admin-bar .seo-nav { top: 32px; }
@media (max-width: 782px) { body.admin-bar .seo-nav { top: 46px; } }

/* ── Blog listing hero ── */
.seo-hero {
  text-align: center; padding: 72px 0 52px;
  background: linear-gradient(180deg, var(--surface), #fff);
}
.seo-hero__eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue); margin: 0 0 16px;
}
.seo-hero__title {
  font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -.02em;
  line-height: 1.1; margin: 0 auto; max-width: 22ch; color: var(--navy);
}
.seo-hero__sub {
  font-size: clamp(16px, 1.6vw, 19px); color: var(--muted);
  max-width: 60ch; margin: 18px auto 0; line-height: 1.6;
}

/* ── Blog grid ── */
.blog-section { padding: 56px 0 72px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.blog-card:hover {
  box-shadow: 0 14px 36px rgba(21, 20, 51, .08);
  transform: translateY(-3px);
}
.blog-card-image { width: 100%; height: 200px; overflow: hidden; background: var(--surface-2); }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }
.blog-card-image--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--surface-2), var(--purple-lt));
}
.blog-card-image--placeholder img { width: 48px; height: 48px; object-fit: contain; opacity: .85; }
.blog-card-content { padding: 24px 24px 20px; flex: 1; display: flex; flex-direction: column; }
.blog-card-category {
  display: inline-block; width: fit-content;
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 10px;
}
.blog-card h3, .blog-card h2 {
  font-size: 19px; font-weight: 700; color: var(--navy);
  line-height: 1.3; margin: 0 0 10px;
}
.blog-card h3 a:hover, .blog-card h2 a:hover { color: var(--blue); }
.blog-card-excerpt { font-size: 14.5px; color: var(--muted); line-height: 1.65; flex: 1; margin: 0 0 16px; }
.blog-card-meta {
  display: flex; align-items: center; gap: 8px;
  padding-top: 14px; border-top: 1px solid var(--border-soft);
  font-size: 13px; color: var(--faint);
}
.blog-card-meta .dot { color: var(--border); }
.blog-card-more {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--blue);
}
.blog-card-more:hover { color: var(--blue-strong); }

/* ── Pagination ── */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 8px 0 0; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--navy);
  transition: all .18s ease;
}
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.pagination .current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── Single post ── */
.post-hero {
  text-align: center; padding: 64px 0 40px;
  background: linear-gradient(180deg, var(--surface), #fff);
}
.post-hero__category {
  display: inline-block;
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 14px;
}
.post-hero__category:hover { color: var(--blue-strong); }
.post-hero__title {
  font-size: clamp(30px, 4.4vw, 44px); font-weight: 800; letter-spacing: -.02em;
  line-height: 1.15; color: var(--navy); max-width: 24ch; margin: 0 auto;
}
.post-meta {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-top: 20px;
  font-size: 14px; color: var(--faint);
}
.post-meta a { color: var(--muted); font-weight: 500; }
.post-meta a:hover { color: var(--blue); }
.post-meta .dot { color: var(--border); }

.post-featured {
  max-width: 900px; margin: 36px auto 0; padding: 0 24px;
}
.post-featured img {
  width: 100%; border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(21, 20, 51, .10);
}

/* ── Post content (prose) ── */
.post-content {
  max-width: 720px; margin: 48px auto 0; padding: 0 24px;
  font-size: 17px; color: var(--body); line-height: 1.75;
}
.post-content > * + * { margin-top: 1.4em; }
.post-content h2 {
  font-size: 28px; font-weight: 750; letter-spacing: -.018em;
  color: var(--navy); line-height: 1.25; margin-top: 2em;
}
.post-content h3 {
  font-size: 22px; font-weight: 700; color: var(--navy);
  line-height: 1.3; margin-top: 1.7em;
}
.post-content h4 { font-size: 18px; font-weight: 700; color: var(--navy); margin-top: 1.5em; }
.post-content a {
  color: var(--blue); font-weight: 500;
  text-decoration: underline; text-underline-offset: 2px;
}
.post-content a:hover { color: var(--blue-strong); }
.post-content strong { color: var(--navy); font-weight: 650; }
.post-content ul, .post-content ol { padding-left: 26px; }
.post-content li { margin-bottom: .6em; }
.post-content li::marker { color: var(--blue); }
.post-content blockquote {
  border-left: 3px solid var(--blue);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  color: var(--muted); font-size: 16.5px;
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content img { border-radius: 12px; box-shadow: 0 10px 30px rgba(21, 20, 51, .08); }
.post-content code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: .88em; background: var(--surface-2);
  padding: .18em .45em; border-radius: 6px; color: var(--blue-strong);
}
.post-content pre {
  background: var(--navy); color: #e6e8f2;
  padding: 20px 24px; border-radius: 12px;
  overflow-x: auto; font-size: 14px; line-height: 1.6;
}
.post-content pre code { background: transparent; color: inherit; padding: 0; }
.post-content hr { border: none; height: 1px; background: var(--border); margin: 2.5em 0; }
.post-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.post-content th, .post-content td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.post-content th { color: var(--navy); font-weight: 650; }

/* WP core alignment classes */
.wp-caption { max-width: 100%; text-align: center; }
.wp-caption-text { font-size: 13.5px; color: var(--faint); margin-top: 8px; }
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { margin-left: auto; margin-right: auto; }

/* ── Post footer: tags, author, related ── */
.post-footer { max-width: 720px; margin: 56px auto 0; padding: 0 24px 8px; }

.pill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-tag {
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 999px; padding: 7px 15px;
  transition: all .18s ease;
}
.pill-tag:hover { color: var(--blue); border-color: var(--blue); }

.post-author {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 24px; margin-top: 32px;
}
.post-author__avatar img { width: 52px; height: 52px; border-radius: 50%; }
.post-author__name { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.post-author__bio { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ── Related posts ── */
.related-section { padding: 64px 0 24px; }
.related-section .section-head { text-align: center; margin-bottom: 36px; }
.related-section .eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--blue); margin: 0 0 12px;
}
.related-section .section-title {
  font-size: clamp(24px, 3vw, 32px); font-weight: 750; letter-spacing: -.018em;
  color: var(--navy); line-height: 1.2; margin: 0;
}

/* ── Prev / next ── */
.post-nav {
  max-width: 720px; margin: 40px auto 0; padding: 24px 24px 0;
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.post-nav a {
  font-size: 14px; font-weight: 600; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 48%;
}
.post-nav a:hover { color: var(--blue); }

/* ── CTA band (matches cta-band on rolestack.ai) ── */
.cta-band {
  background: linear-gradient(135deg, var(--navy), #221f4d);
  text-align: center; padding: 66px 24px; margin-top: 72px;
}
.cta-band__title {
  font-size: clamp(24px, 3vw, 33px); font-weight: 750; color: #fff;
  letter-spacing: -.015em; margin: 0 0 12px;
}
.cta-band__sub {
  font-size: 17px; color: #c3c6dd; max-width: 52ch;
  margin: 0 auto 28px; line-height: 1.6;
}

/* ── Footer (matches seo-foot on rolestack.ai) ── */
.seo-foot { background: #fff; border-top: 1px solid var(--border-soft); padding: 56px 0 28px; }
.seo-foot__main { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.seo-foot__brand-logo { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.seo-foot__brand-logo img.icon { height: 26px; width: auto; }
.seo-foot__brand-logo img.word { height: 18px; width: auto; }
.seo-foot__tag { font-size: 14px; color: var(--muted); max-width: 30ch; line-height: 1.6; }
.seo-foot__col-title {
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--navy); margin: 0 0 16px;
}
.seo-foot__col a { display: block; font-size: 14px; color: var(--muted); margin-bottom: 11px; }
.seo-foot__col a:hover { color: var(--blue); }
.seo-foot__bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border-soft);
  font-size: 13px; color: var(--faint); flex-wrap: wrap; gap: 12px;
}
.seo-foot__bottom a { color: var(--faint); }
.seo-foot__bottom a:hover { color: var(--blue); }

/* ── Empty state ── */
.blog-empty { text-align: center; padding: 64px 24px; }
.blog-empty h2 { font-size: 24px; font-weight: 750; color: var(--navy); margin-bottom: 10px; }
.blog-empty p { color: var(--muted); font-size: 16px; }

/* ── Utilities ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .seo-foot__main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .seo-nav { padding: 0 18px; }
  .seo-nav__links { display: none; }
  .seo-nav__cta .btn--ghost { display: none; }
  .seo-hero { padding: 48px 0 36px; }
  .post-hero { padding: 44px 0 32px; }
  .blog-section { padding: 40px 0 56px; }
  .blog-grid { grid-template-columns: 1fr; }
  .post-content { font-size: 16px; }
  .seo-foot__main { grid-template-columns: 1fr 1fr; gap: 24px; }
  .post-nav a { max-width: 100%; }
}
