/* DEBMEDIA ERP — Blog styles */

/* ---------- Cover gradients ---------- */
.cv-1 { background: linear-gradient(135deg, #0057b8, #00b4d8); }
.cv-2 { background: linear-gradient(135deg, #1e2640, #0057b8); }
.cv-3 { background: linear-gradient(135deg, #16a34a, #06d6a0); }
.cv-4 { background: linear-gradient(135deg, #7c3aed, #db2777); }
.cv-5 { background: linear-gradient(135deg, #ca8a04, #ea580c); }
.cv-6 { background: linear-gradient(135deg, #0f172a, #374151); }

/* ---------- Blog hero ---------- */
.blog-hero {
  background: var(--dark);
  padding: calc(var(--nav-h) + 64px) 0 56px;
  position: relative;
  overflow: hidden;
}
.blog-hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 30% 60%, rgba(0,87,184,.3), transparent 60%),
              radial-gradient(ellipse 50% 50% at 80% 30%, rgba(0,180,216,.15), transparent 60%);
}
.blog-hero-inner { position: relative; z-index: 2; }
.blog-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: #fff; letter-spacing: -.03em; margin: 14px 0 12px; }
.blog-hero p { color: rgba(255,255,255,.6); font-size: 1.05rem; margin-bottom: 28px; max-width: 560px; }
.blog-hero-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-cat-pill {
  padding: 7px 16px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.75); font-size: 13px; font-weight: 600;
  transition: background .2s, color .2s;
  display: inline-flex; align-items: center; gap: 6px;
}
.blog-cat-pill span { background: rgba(255,255,255,.2); border-radius: 999px; padding: 1px 7px; font-size: 11px; }
.blog-cat-pill:hover, .blog-cat-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Featured ---------- */
.blog-featured-label {
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: var(--gray);
  display: flex; align-items: center; gap: 7px; margin-bottom: 20px;
}
.blog-featured-label i { color: #f59e0b; }
.blog-featured {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md);
}
.blog-featured-cover {
  height: 360px; display: flex; align-items: center; justify-content: center;
  font-size: 72px; color: rgba(255,255,255,.8);
}
.blog-featured-body { padding: 40px 40px 40px 0; }
.blog-cat-tag {
  display: inline-flex; align-items: center;
  background: rgba(0,87,184,.1); color: var(--primary);
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.blog-featured-body h2 { font-size: 1.7rem; font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.blog-featured-body p { font-size: 15px; color: var(--gray); line-height: 1.7; margin-bottom: 20px; }
.blog-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--gray); margin-bottom: 24px; }
.blog-meta i { margin-right: 5px; color: var(--primary); }

/* ---------- Filter label ---------- */
.blog-filter-label {
  font-size: 15px; color: var(--mid); margin-bottom: 24px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
}

/* ---------- Grid ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: var(--radius-md); overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column; color: var(--dark);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-card-cover {
  height: 160px; display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: rgba(255,255,255,.8);
}
.blog-card-body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.blog-card-body h3 { font-size: 1rem; font-weight: 800; line-height: 1.35; }
.blog-card-body p { font-size: 13.5px; color: var(--gray); line-height: 1.6; flex: 1; }

/* ---------- Article shell ---------- */
.article-shell {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  max-width: 1140px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
}
.article-main { min-width: 0; }
.article-header { margin-bottom: 36px; }
.article-cover {
  height: 240px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; color: rgba(255,255,255,.85);
  margin-bottom: 28px;
}
.article-meta-top {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  font-size: 13px; color: var(--gray); margin-bottom: 16px;
}
.article-meta-top i { margin-right: 5px; color: var(--primary); }
.article-header h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; line-height: 1.2; margin-bottom: 14px; letter-spacing: -.02em; }
.article-excerpt { font-size: 1.05rem; color: var(--gray); line-height: 1.7; }

/* Article TOC (mobile) */
.article-toc-mobile {
  margin-bottom: 28px;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.article-toc-mobile details summary {
  padding: 14px 18px; font-size: 14px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  list-style: none; background: var(--gray-lighter);
}
.article-toc-mobile details summary::-webkit-details-marker { display: none; }
.article-toc-mobile ul { padding: 12px 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.article-toc-mobile ul a { font-size: 14px; color: var(--primary); }

/* Body */
.article-body { font-size: 15.5px; line-height: 1.85; color: var(--mid); margin-bottom: 40px; }
.article-body h2 { font-size: 1.35rem; font-weight: 800; color: var(--dark); margin: 36px 0 14px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.article-body h3 { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin: 24px 0 10px; }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { padding-left: 22px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.article-body li { line-height: 1.7; }
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.article-body table thead { background: var(--gray-lighter); }
.article-body table th { padding: 10px 14px; text-align: left; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--mid); }
.article-body table td { padding: 10px 14px; border-bottom: 1px solid #e5e7eb; }
.article-body blockquote { border-left: 4px solid var(--primary); background: #f0f7ff; padding: 14px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 24px 0; font-style: italic; }

/* Article CTA box */
.article-cta-box {
  background: linear-gradient(135deg, #f0f7ff, #e0f2fe);
  border: 1px solid #bfdbfe; border-radius: var(--radius-lg);
  padding: 28px; margin: 36px 0;
}
.article-cta-inner { display: flex; gap: 18px; align-items: flex-start; }
.article-cta-icon {
  width: 48px; height: 48px; background: var(--primary);
  border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; color: #fff; flex: none;
}
.article-cta-inner strong { font-size: 16px; font-weight: 800; display: block; margin-bottom: 6px; color: var(--dark); }
.article-cta-inner p { font-size: 14px; color: var(--mid); margin-bottom: 14px; line-height: 1.6; }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* Article FAQ */
.article-faq { margin: 40px 0; }
.article-faq h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 16px; }
.article-faq .faq-item details { background: #fff; }

/* Article footer */
.article-footer-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-top: 40px;
  padding-top: 28px; border-top: 1px solid #e5e7eb;
}
.article-share { display: flex; align-items: center; gap: 10px; }
.article-share span { font-size: 13px; color: var(--gray); }
.article-share a {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--gray-lighter); color: var(--mid);
  display: grid; place-items: center; transition: background .2s, color .2s; font-size: 14px;
}
.article-share a:hover { background: var(--primary); color: #fff; }

/* ---------- Sidebar ---------- */
.article-sidebar { padding-top: 0; }
.article-toc-sticky {
  position: sticky; top: calc(var(--nav-h) + 24px);
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: var(--radius-md); padding: 20px;
  margin-bottom: 24px;
}
.article-toc-sticky ul { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.article-toc-sticky .docs-toc-link { font-size: 13.5px; }
.sidebar-cta {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius-md); padding: 28px 22px;
  text-align: center; margin-bottom: 24px; color: #fff;
}
.sidebar-cta-icon { font-size: 28px; margin-bottom: 12px; }
.sidebar-cta h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.sidebar-cta p { font-size: 13px; color: rgba(255,255,255,.75); margin-bottom: 18px; line-height: 1.6; }
.sidebar-related h4 { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); margin-bottom: 14px; }
.related-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; border: 1px solid #e5e7eb; border-radius: var(--radius-md);
  margin-bottom: 10px; transition: border-color .2s, box-shadow .2s; color: var(--dark);
}
.related-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.related-cover {
  width: 48px; height: 48px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: rgba(255,255,255,.85); flex: none;
}
.related-card strong { font-size: 13px; font-weight: 700; line-height: 1.4; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-cover { height: 200px; }
  .blog-featured-body { padding: 28px; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .article-shell { grid-template-columns: 1fr; max-width: 720px; }
  .article-sidebar { display: none; }
  .article-toc-mobile { display: block; }
}
@media (max-width: 768px) {
  .blog-hero { padding: calc(var(--nav-h) + 48px) 0 44px; }
  .blog-hero h1 { font-size: 1.9rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-featured { border-radius: var(--radius-md); }
  .blog-featured-body { padding: 22px; }
  .article-shell { padding: calc(var(--nav-h) + 24px) 16px 60px; }
  .article-cover { height: 180px; font-size: 60px; }
  .article-header h1 { font-size: 1.5rem; }
  .article-body { font-size: 15px; }
  .article-body table { display: block; overflow-x: auto; }
  .article-cta-inner { flex-direction: column; }
  .blog-hero-cats { gap: 6px; }
}
@media (max-width: 480px) {
  .blog-hero h1 { font-size: 1.6rem; }
  .article-footer-row { flex-direction: column; align-items: flex-start; }
  .blog-cat-pill span { display: none; }
}
