/* ════════════════════════════════════════════════════
   blog.css  –  Shared styles for Blog static pages
   Covers: homepage, category page, article page
   ════════════════════════════════════════════════════ */

/* ── Base ── */


/* ════════════════════════════════════════════════════
   BLOG HERO  (homepage)
   ════════════════════════════════════════════════════ */
.blog-hero {
    background: linear-gradient(135deg, #013cc7 0%, #0a3977 50%, #2157d6 100%);
    padding: 72px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.1) 0%, transparent 70%);
}
.blog-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(99,102,241,.12);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 18px;
}
.blog-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
}
.blog-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #a5b4fc, #6ee7b7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.blog-hero-sub {
  font-size: 14px;
  color: #94a3b8;
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* ── Search bar ── */
.blog-search-wrap {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}
.blog-search-wrap input {
  width: 100%;
  padding: 14px 52px 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  font-size: 14px;
  color: #fff;
  outline: none;
  box-sizing: border-box;
  transition: border-color .2s, background .2s;
}
.blog-search-wrap input::placeholder { color: #64748b; }
.blog-search-wrap input:focus {
  border-color: rgba(99,102,241,.5);
  background: rgba(255,255,255,.1);
}
.blog-search-icon {
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
}

/* ════════════════════════════════════════════════════
   LAYOUT GRID
   ════════════════════════════════════════════════════ */
.blog-layout {
  max-width: 1160px;
  margin: 56px auto 80px;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ════════════════════════════════════════════════════
   FEATURED CARD
   ════════════════════════════════════════════════════ */
.blog-featured { margin-bottom: 40px; }
.blog-featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(2,6,23,.08);
  box-shadow: 0 8px 32px rgba(0,0,0,.07);
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
}
.blog-featured-card:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,.11);
  transform: translateY(-3px);
  color: inherit;
}
.blog-featured-img {
  position: relative;
  background: linear-gradient(135deg, #1e3a5f, #312e81);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.blog-featured-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-featured-img-placeholder { font-size: 72px; opacity: .3; }
.blog-feat-badge {
  position: absolute;
  top: 16px; left: 16px;
  background: #6366f1;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: .04em;
}
.blog-featured-body {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.blog-featured-body h2 { margin: 0; font-size: 20px; font-weight: 900; color: #0f172a; line-height: 1.4; }
.blog-featured-body p  { margin: 0; font-size: 13.5px; color: #475569; line-height: 1.7; }

/* ── Post meta ── */
.blog-post-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.blog-post-cat  { font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px; border: 1px solid; }
.cat-digital { color: #6366f1; border-color: #c7d2fe; background: #eef2ff; }
.cat-product  { color: #0284c7; border-color: #bae6fd; background: #f0f9ff; }
.cat-news     { color: #16a34a; border-color: #bbf7d0; background: #f0fdf4; }
.cat-guide    { color: #f59e0b; border-color: #fde68a; background: #fefce8; }
.cat-case     { color: #ec4899; border-color: #fbcfe8; background: #fdf4ff; }
.blog-post-date { font-size: 12px; color: #94a3b8; font-weight: 600; }
.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #6366f1;
  text-decoration: none;
}
.blog-read-more:hover { text-decoration: underline; }

/* ── Section label ── */
.blog-section-label {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-section-label::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

/* ════════════════════════════════════════════════════
   POST GRID CARDS
   ════════════════════════════════════════════════════ */
.blog-post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.blog-post-card {
  background: #fff;
  border: 1px solid rgba(2,6,23,.08);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.blog-post-card:hover {
  box-shadow: 0 10px 32px rgba(0,0,0,.09);
  transform: translateY(-3px);
  color: inherit;
}
.blog-post-thumb {
  height: 160px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f, #312e81);
}
.blog-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-post-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.blog-post-body h3 { margin: 0; font-size: 14px; font-weight: 800; color: #0f172a; line-height: 1.45; }
.blog-post-body p  { margin: 0; font-size: 12.5px; color: #64748b; line-height: 1.6; }
.blog-post-footer  { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.blog-read-time    { font-size: 11.5px; color: #94a3b8; font-weight: 600; }

/* ════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════ */
.blog-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 84px; }
.blog-widget {
  background: #fff;
  border: 1px solid rgba(2,6,23,.08);
  border-radius: 16px;
  padding: 22px 20px;
}
.blog-widget-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
/* Categories */
.blog-cat-list { display: flex; flex-direction: column; gap: 8px; }
.blog-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
  color: #0f172a;
}
.blog-cat-item:hover { background: #f1f5f9; color: #0f172a; }
.blog-cat-item span:first-child { font-size: 13px; font-weight: 600; }
.blog-cat-item span:last-child  { color: #94a3b8; font-size: 13px; }
/* Popular */
.blog-popular-list { display: flex; flex-direction: column; gap: 14px; }
.blog-popular-item { display: flex; gap: 12px; align-items: flex-start; }
.blog-popular-num  { font-size: 20px; font-weight: 900; color: #e2e8f0; line-height: 1; flex-shrink: 0; width: 28px; }
.blog-popular-item h4 { margin: 0 0 3px; font-size: 12.5px; font-weight: 700; color: #0f172a; line-height: 1.4; }
.blog-popular-item span { font-size: 11.5px; color: #94a3b8; }
/* Newsletter */
.blog-newsletter-inner {
  background: linear-gradient(135deg, #1e3a5f, #312e81);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.blog-newsletter-inner p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.55;
}
.blog-newsletter-inner input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  font-size: 13px;
  color: #fff;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 10px;
}
.blog-newsletter-inner input::placeholder { color: #64748b; }
.blog-newsletter-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: #6366f1;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.blog-newsletter-btn:hover { background: #4f46e5; }

/* ════════════════════════════════════════════════════
   CATEGORY PAGE HERO
   ════════════════════════════════════════════════════ */
.cat-hero {
    background: linear-gradient(135deg, #013cc7 0%, #0a3977 50%, #2157d6 100%);
    padding: 64px 0 52px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cat-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.1) 0%, transparent 70%);
}
.cat-hero .inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 32px;
  position: relative;
  z-index: 1;
}
.cat-hero-bc { font-size: 12px; margin-bottom: 14px; color: rgba(255,255,255,.5); }
.cat-hero-bc a { color: rgba(255,255,255,.6); text-decoration: none; }
.cat-hero-bc a:hover { color: #fff; }
.cat-hero-bc span { margin: 0 8px; }
.cat-hero h1 { color: #fff; font-weight: 900; font-size: clamp(26px,4vw,38px); margin: 0 0 10px; }
.cat-hero-desc { color: rgba(255,255,255,.7); font-size: 14px; max-width: 480px; margin: 0 auto 16px; line-height: 1.7; }
.cat-hero-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.3);
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 999px;
}
.empty-box { text-align: center; padding: 90px 0; color: #94a3b8; }
.empty-box i { font-size: 48px; margin-bottom: 16px; display: block; }
.empty-box h4 { color: #64748b; font-size: 16px; margin-bottom: 14px; }

/* ════════════════════════════════════════════════════
   ARTICLE PAGE
   ════════════════════════════════════════════════════ */
#rdprog {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #a5b4fc);
  z-index: 9999;
  width: 0;
  transition: width .1s;
}
.art-hero {
  background: linear-gradient(135deg, #013cc7 0%, #0a3977 50%, #2157d6 100%);
  padding: 64px 0 52px;
  position: relative;
  overflow: hidden;
}
.art-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.1) 0%, transparent 70%);
}
.art-hero .inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 32px;
  position: relative;
  z-index: 1;
}
.art-hero-bc { font-size: 12px; margin-bottom: 14px; color: rgba(255,255,255,.5); }
.art-hero-bc a { color: rgba(255,255,255,.6); text-decoration: none; }
.art-hero-bc a:hover { color: #fff; }
.art-hero-bc span { margin: 0 8px; }
.art-hero-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99,102,241,.2);
  border: 1px solid rgba(99,102,241,.35);
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  text-decoration: none;
}
.art-hero h1 { color: #fff; font-weight: 900; font-size: clamp(22px,3.5vw,34px); margin: 0 0 16px; line-height: 1.3; }
.art-hero-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: rgba(255,255,255,.6);
  font-size: 12px;
  font-weight: 600;
}
.art-body-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 32px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
.art-panel {
  background: #fff;
  border: 1px solid rgba(2,6,23,.08);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
  padding: 36px;
  margin-bottom: 24px;
}
/* Thumbnail shown inside art-panel, above article content */
.art-thumb {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  margin-bottom: 28px;
  box-shadow: 0 6px 28px rgba(0,0,0,.1);
}
.art-lead {
  border-left: 3px solid #6366f1;
  background: #eef2ff;
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #334155;
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.75;
}
/* Article content typography */
.art-content { font-size: 15.5px; line-height: 1.9; color: #1e293b; }
.art-content h2 { font-size: 20px; font-weight: 800; color: #0f172a; margin: 2.2rem 0 .9rem; padding-bottom: 8px; border-bottom: 2px solid #e2e8f0; }
.art-content h3 { font-size: 17px; font-weight: 700; color: #0f172a; margin: 1.8rem 0 .7rem; }
.art-content h4 { font-size: 15px; font-weight: 700; color: #1e3a5f; margin: 1.5rem 0 .5rem; }
.art-content p  { margin-bottom: 1.3rem; }
.art-content img { max-width: 100%; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.1); display: block; margin: 1rem auto; }
.art-content a  { color: #6366f1; text-underline-offset: 3px; }
.art-content a:hover { color: #4f46e5; }
.art-content blockquote {
  border-left: 3px solid #6366f1;
  padding: 12px 18px;
  background: #eef2ff;
  margin: 1.75rem 0;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #475569;
}
.art-content ul,
.art-content ol { padding-left: 22px; margin-bottom: 1.25rem; }
.art-content li { margin-bottom: 5px; }
.art-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 14px; border-radius: 10px; overflow: hidden; }
.art-content table th { background: #1e3a5f; color: #fff; padding: 10px 15px; text-align: left; font-weight: 700; }
.art-content table td { padding: 9px 15px; border-bottom: 1px solid #e2e8f0; }
.art-content table tr:nth-child(even) td { background: #f8fafc; }
.art-content pre { background: #0f172a; color: #e2e8f0; padding: 18px; border-radius: 12px; overflow-x: auto; font-size: 13px; line-height: 1.65; margin-bottom: 1.5rem; }
/* Section label (gallery / docs) */
.sec-label {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-label::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }
/* Image gallery */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: 10px; }
.img-th {
  cursor: pointer;
  border-radius: 10px;
  height: 130px;
  object-fit: cover;
  width: 100%;
  display: block;
  transition: transform .2s, box-shadow .2s;
}
.img-th:hover { transform: scale(1.04); box-shadow: 0 8px 28px rgba(0,0,0,.18); }
/* Document links */
.doc-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 9px;
  text-decoration: none;
  color: inherit;
  background: #f8fafc;
  transition: border-color .2s, background .2s, transform .15s;
}
.doc-link:hover { border-color: #6366f1; background: #eef2ff; transform: translateX(3px); color: inherit; }
.doc-ic { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 18px; }
.ic-pdf   { background: #fef2f2; color: #dc2626; }
.ic-word  { background: #eff6ff; color: #2563eb; }
.ic-excel { background: #f0fdf4; color: #16a34a; }
.ic-other { background: #eef2ff; color: #6366f1; }
/* Lightbox */
.lb-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lb-modal.open { display: flex; }
.lb-modal img  { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.lb-close { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 32px; cursor: pointer; line-height: 1; }
.lb-cap   { color: rgba(255,255,255,.65); font-size: 13px; margin-top: 12px; }

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .blog-layout          { grid-template-columns: 1fr; }
  .blog-sidebar         { position: static; }
  .blog-featured-card   { grid-template-columns: 1fr; }
  .blog-featured-img    { min-height: 200px; }
  .art-body-wrap        { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .blog-post-grid { grid-template-columns: 1fr; }
}
