/* ═══════════════════════════════════════════════════════════════
   ShiftWiz Blog Styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Blog Hero ── */
.blog-hero {
  padding: 120px 32px 56px;
  text-align: center;
}
.blog-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-hero p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

/* ── Blog Grid ── */
.blog-grid-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.blog-featured:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.blog-featured-visual {
  background: linear-gradient(135deg, #2C0E82, #160C40);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  min-height: 260px;
  position: relative;
  overflow: hidden;
}
.blog-featured-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.12;
}
.blog-featured-visual .feat-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(199,125,255,0.4);
  position: relative;
  z-index: 1;
}
.blog-featured-visual .feat-icon svg {
  width: 40px;
  height: 40px;
  color: #fff;
}
.blog-featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.blog-featured-body .post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.blog-featured-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  line-height: 1.25;
  color: var(--text);
}
.blog-featured-body p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.blog-featured-body .read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  transition: gap var(--transition);
}
.blog-featured-body .read-link:hover { gap: 10px; }
.blog-featured-body .read-link svg {
  width: 16px;
  height: 16px;
}

/* ── Post cards grid ── */
.blog-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.blog-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.blog-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--text);
  flex: 1;
}
.blog-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.blog-card .read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: auto;
  transition: gap var(--transition);
}
.blog-card .read-link:hover { gap: 10px; }
.blog-card .read-link svg {
  width: 14px;
  height: 14px;
}

/* ── Category badge ── */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cat-story   { background: rgba(199,125,255,0.15); color: #C77DFF; border: 1px solid rgba(199,125,255,0.3); }
.cat-product { background: rgba(236,72,153,0.12);  color: #EC4899; border: 1px solid rgba(236,72,153,0.25); }
.cat-tips    { background: rgba(249,115,22,0.12);  color: #F97316; border: 1px solid rgba(249,115,22,0.25); }
.cat-guide   { background: rgba(6,182,212,0.12);   color: #06B6D4; border: 1px solid rgba(6,182,212,0.25); }
.cat-insights{ background: rgba(251,191,36,0.12);  color: #FBBF24; border: 1px solid rgba(251,191,36,0.25); }

/* ── Post meta ── */
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.post-date, .post-read {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.post-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ═══════════════════════════════════════
   ARTICLE / SINGLE POST
   ═══════════════════════════════════════ */
.article-hero {
  padding: 110px 32px 40px;
  max-width: 760px;
  margin: 0 auto;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-muted);
  transition: color var(--transition);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin: 20px 0 16px;
  color: var(--text);
}
.article-hero .post-meta { margin-top: 4px; }

.article-divider {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px;
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}

.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 32px 64px;
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--text-secondary);
}
.article-body p {
  margin-bottom: 20px;
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  margin: 44px 0 16px;
  line-height: 1.25;
}
.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
}
.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.article-body li {
  margin-bottom: 8px;
}
.article-body strong {
  color: var(--text);
  font-weight: 600;
}
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(199,125,255,0.4);
  transition: text-decoration-color var(--transition);
}
.article-body a:hover {
  text-decoration-color: var(--accent);
}

/* Callout / tip box */
.article-tip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 32px 0;
  font-size: 0.93rem;
}
.article-tip p { margin-bottom: 0; }

/* ── Article CTA ── */
.article-cta {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.article-cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article-cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.05;
  pointer-events: none;
}
.article-cta-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text);
  position: relative;
}
.article-cta-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  position: relative;
}
.article-cta-card .btn {
  position: relative;
}

/* ── Related posts ── */
.related-posts {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.related-posts h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.related-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), background var(--transition);
}
.related-item:hover {
  border-color: var(--accent);
  background: var(--bg-subtle);
}
.related-item .cat-badge { flex-shrink: 0; }
.related-item span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.related-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Back to top ── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--gradient);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 90;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); }
.back-to-top svg { width: 20px; height: 20px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-visual { min-height: 180px; padding: 32px; }
  .blog-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .blog-hero { padding: 100px 20px 40px; }
  .blog-grid-wrap { padding: 0 20px 60px; }
  .blog-cards { grid-template-columns: 1fr; }
  .blog-featured-body { padding: 24px; }
  .article-hero { padding: 100px 20px 32px; }
  .article-divider { padding: 0 20px; }
  .article-body { padding: 32px 20px 48px; }
  .article-cta { padding: 0 20px 60px; }
  .article-cta-card { padding: 28px 20px; }
  .related-posts { padding: 0 20px 60px; }
  .back-to-top { bottom: 20px; right: 20px; }
  .related-item { gap: 10px; padding: 14px 16px; }
}
