/* =============================================
   P SQUARED SYSTEMS — Blog Stylesheet
   Supplements main styles.css
   ============================================= */

/* ── 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:0; }

/* ── Blog Hero ──────────────────────────────── */
.blog-hero {
  background: var(--navy);
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(167,200,239,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167,200,239,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero h1 { color: var(--white); margin-bottom: 14px; }
.blog-hero p  { color: rgba(255,255,255,0.7); font-size: 1.05rem; max-width: 600px; }

/* ── Blog Layout (2-col: posts + sidebar) ────── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 64px 0 96px;
  align-items: start;
}
@media (max-width: 900px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { order: -1; }
}

/* ── Posts Grid ─────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* ── Post Card ──────────────────────────────── */
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.post-card-img { position: relative; }
.post-card-img img { width: 100%; height: 200px; object-fit: cover; display: block; }
.post-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--navy); color: var(--blue-accent);
  font-family: var(--font-head); font-size: 0.68rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px;
}
/* Inline post-tag (not absolute) */
.post-header .post-tag {
  position: static; display: inline-block; margin-bottom: 12px;
}

.post-card-body { padding: 22px; }
.post-meta { font-size: 0.75rem; color: var(--gray); margin-bottom: 8px; }
.post-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.post-card h3 a { color: var(--navy); transition: color var(--ease); }
.post-card h3 a:hover { color: var(--navy-light); }
.post-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.post-read-more {
  font-family: var(--font-head); font-size: 0.82rem; font-weight: 700;
  color: var(--navy-light); letter-spacing: 0.04em;
  transition: color var(--ease);
}
.post-read-more:hover { color: var(--navy); }

/* ── Pagination ─────────────────────────────── */
.blog-pagination { text-align: center; padding-top: 16px; }
.page-info { font-size: 0.82rem; color: var(--gray); }

/* ── Sidebar ────────────────────────────────── */
.blog-sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 22px; }

.sidebar-widget {
  background: var(--gray-light); border-radius: var(--radius);
  padding: 22px; border: 1px solid var(--border);
}
.sidebar-title {
  font-family: var(--font-head); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.sidebar-list { list-style: none; }
.sidebar-list li { margin-bottom: 8px; }
.sidebar-list a { font-size: 0.85rem; color: var(--text-muted); transition: color var(--ease); }
.sidebar-list a:hover { color: var(--navy); }
.sidebar-list span { font-size: 0.75rem; color: var(--gray); }

.sidebar-cta {
  background: var(--navy); border-radius: var(--radius);
  padding: 22px; text-align: center;
}
.sidebar-cta p { color: rgba(255,255,255,0.8); font-size: 0.88rem; margin-bottom: 14px; }
.sidebar-cta .btn { width: 100%; justify-content: center; }

.sidebar-social {
  display: flex; justify-content: center; gap: 12px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ── Social Icon Links ──────────────────────── */
.social-icon-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(167,200,239,0.12);
  color: var(--blue-accent);
  transition: background var(--ease), color var(--ease), transform var(--ease);
}
.social-icon-link:hover {
  background: var(--blue-accent); color: var(--navy);
  transform: translateY(-2px);
}
/* Footer social bar uses slightly larger version */
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social .social-icon-link { background: rgba(167,200,239,0.1); }

/* ── Full Post Layout ───────────────────────── */
.post-full { min-width: 0; }

/* Breadcrumb */
.breadcrumb { margin-bottom: 20px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb li { font-size: 0.78rem; color: var(--gray); }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; }
.breadcrumb a { color: var(--navy-light); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--gray); }

/* Post Header */
.post-header { margin-bottom: 32px; }
.post-header h1 { color: var(--navy); margin-bottom: 14px; }
.post-meta-bar {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 0.78rem; color: var(--gray);
  margin-bottom: 24px; padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.post-featured-img {
  width: 100%; height: 380px; object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

/* Post Body */
.post-body { max-width: 72ch; }
.post-intro { font-size: 1.05rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 28px; font-weight: 500; }
.post-body h2 { color: var(--navy); margin: 36px 0 14px; font-size: 1.4rem; }
.post-body p  { color: var(--text-muted); line-height: 1.8; margin-bottom: 16px; }
.post-body ul { color: var(--text-muted); line-height: 1.8; margin: 0 0 16px 20px; }
.post-body li { margin-bottom: 6px; }
.post-body strong { color: var(--navy); }

/* Post CTA Box */
.post-cta-box {
  background: linear-gradient(140deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg); padding: 32px 36px; margin: 40px 0;
  max-width: 100%;
}
.post-cta-box h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 10px; }
.post-cta-box p  { color: rgba(255,255,255,0.72); font-size: 0.92rem; margin-bottom: 20px; }

/* Post Tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 32px 0 20px; }
.post-tags span { font-size: 0.75rem; font-weight: 700; color: var(--gray); }
.post-tags a {
  font-size: 0.72rem; padding: 4px 12px;
  background: rgba(5,29,64,0.06); color: var(--navy);
  border-radius: 100px; transition: background var(--ease), color var(--ease);
  font-family: var(--font-head); font-weight: 700; letter-spacing: 0.07em;
}
.post-tags a:hover { background: var(--navy); color: var(--white); }

/* Post Share */
.post-share {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.post-share span { font-size: 0.78rem; font-weight: 700; color: var(--navy); font-family: var(--font-head); letter-spacing: 0.1em; text-transform: uppercase; }
.post-share .social-icon-link { background: rgba(5,29,64,0.06); color: var(--navy); }
.post-share .social-icon-link:hover { background: var(--navy); color: var(--white); }

/* Related Posts */
.related-posts { margin-top: 40px; }
.related-posts h2 { color: var(--navy); font-size: 1.3rem; margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.related-card {
  display: block; padding: 18px 20px;
  background: var(--gray-light); border: 1px solid var(--border); border-radius: var(--radius);
  transition: all var(--ease);
}
.related-card:hover { border-color: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.related-card strong { display: block; font-family: var(--font-head); font-size: 0.92rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; line-height: 1.3; }
.related-card span  { font-size: 0.75rem; color: var(--gray); }
@media (max-width: 580px) { .related-grid { grid-template-columns: 1fr; } }

/* ── Blog Preview Section (homepage) ─────────── */
.blog-preview { padding: 96px 0; background: var(--white); }
.blog-preview .section-header h2 { color: var(--navy); }
.blog-preview-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 22px; margin-bottom: 40px;
}
.blog-preview .view-all {
  display: flex; justify-content: center;
}
@media (max-width: 768px) { .blog-preview-grid { grid-template-columns: 1fr; } }

/* ── Main site social icons in footer ────────── */
.footer-social-bar { display: flex; gap: 10px; margin-top: 14px; }
