/* ============================================================
   SekaiDC — Article (Single Post) Styles
   Giao diện trực quan, hiện đại cho bài viết
   ============================================================ */

:root {
  --sk-primary: #2b9d63;
  --sk-primary-dark: #156d3a;
  --sk-accent: #c62828;
  --sk-blue: #0b72d9;
  --sk-text: #2c3e50;
  --sk-muted: #6b7280;
  --sk-bg-soft: #f7faf8;
  --sk-border: #e6ecea;
  --sk-radius: 12px;
  --sk-shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --sk-shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
  --sk-shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* ===== Single Post Hero ===== */
.single-hero {
  position: relative;
  background: linear-gradient(135deg, #0d3823 0%, #2b9d63 100%);
  color: #fff;
  padding: 60px 0 80px;
  overflow: hidden;
}
.single-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0, transparent 40%),
                    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.06) 0, transparent 40%);
  pointer-events: none;
}
.single-hero .container {
  position: relative;
  z-index: 2;
}
.single-hero .breadcrumb {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  margin-bottom: 18px;
}
.single-hero .breadcrumb a {
  color: #ffeb3b;
  text-decoration: none;
}
.single-hero .breadcrumb a:hover { text-decoration: underline; }

.single-hero .cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  backdrop-filter: blur(6px);
  margin-bottom: 16px;
}
.single-hero .cat-badge i { font-size: 12px; }

.single-hero .single-title {
  color: #fff;
  font-size: 40px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 20px;
  max-width: 880px;
}
.single-hero .post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}
.single-hero .post-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.single-hero .post-meta i {
  color: #ffeb3b;
}

/* ===== Featured Image (overlap) ===== */
.featured-image-wrap {
  margin-top: -50px;
  margin-bottom: 32px;
  position: relative;
  z-index: 3;
}
.featured-image-wrap img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--sk-radius);
  box-shadow: var(--sk-shadow-lg);
}

/* ===== Article Layout ===== */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  padding: 0 0 60px;
}
.article-main { min-width: 0; }

.article-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--sk-text);
}
.article-content > p:first-of-type::first-letter {
  float: left;
  font-size: 56px;
  line-height: 1;
  padding: 4px 12px 0 0;
  color: var(--sk-primary);
  font-weight: 700;
}

.article-content p { margin: 0 0 1.2em; }

.article-content h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--sk-primary-dark);
  margin: 2em 0 0.6em;
  padding-left: 16px;
  border-left: 5px solid var(--sk-primary);
  scroll-margin-top: 80px;
}
.article-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--sk-text);
  margin: 1.6em 0 0.5em;
  scroll-margin-top: 80px;
}
.article-content h3::before {
  content: "▸";
  color: var(--sk-primary);
  margin-right: 8px;
}
.article-content h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--sk-text);
  margin: 1.4em 0 0.4em;
}

.article-content a {
  color: var(--sk-blue);
  text-decoration: none;
  border-bottom: 1px dashed var(--sk-blue);
  transition: all 0.2s;
}
.article-content a:hover {
  color: var(--sk-primary);
  border-bottom-style: solid;
}

.article-content ul, .article-content ol {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}
.article-content ul li,
.article-content ol li {
  margin-bottom: 0.5em;
}
.article-content ul.checklist {
  list-style: none;
  padding-left: 0;
}
.article-content ul.checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 0.8em;
}
.article-content ul.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  background: var(--sk-primary);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.article-content blockquote {
  margin: 1.8em 0;
  padding: 20px 28px;
  background: var(--sk-bg-soft);
  border-left: 4px solid var(--sk-primary);
  border-radius: 0 var(--sk-radius) var(--sk-radius) 0;
  font-style: italic;
  color: #2c3e50;
  font-size: 18px;
  position: relative;
}
.article-content blockquote::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-size: 64px;
  color: var(--sk-primary);
  opacity: 0.3;
  position: absolute;
  top: -8px;
  left: 12px;
  line-height: 1;
}
.article-content blockquote p:last-child { margin-bottom: 0; }

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--sk-radius);
  box-shadow: var(--sk-shadow-md);
  margin: 1.4em 0;
}
.article-content figure {
  margin: 1.6em 0;
}
.article-content figcaption {
  text-align: center;
  font-size: 14px;
  color: var(--sk-muted);
  margin-top: 8px;
  font-style: italic;
}

.article-content code {
  background: #1e1e2e;
  color: #a6e3a1;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: "Fira Code", Consolas, monospace;
  font-size: 0.92em;
}
.article-content pre {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 18px 22px;
  border-radius: var(--sk-radius);
  overflow-x: auto;
  margin: 1.6em 0;
  box-shadow: var(--sk-shadow-md);
  font-size: 14px;
  line-height: 1.6;
}
.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  background: #fff;
  border-radius: var(--sk-radius);
  overflow: hidden;
  box-shadow: var(--sk-shadow-sm);
}
.article-content th {
  background: var(--sk-primary);
  color: #fff;
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
}
.article-content td {
  padding: 12px 16px;
  border-top: 1px solid var(--sk-border);
}
.article-content tr:nth-child(even) td { background: var(--sk-bg-soft); }

.article-content hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sk-border), transparent);
  margin: 2.4em 0;
}

/* ===== Callout Boxes ===== */
.callout {
  display: flex;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--sk-radius);
  margin: 1.8em 0;
  border-left: 5px solid;
  background: var(--sk-bg-soft);
}
.callout .callout-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
}
.callout .callout-body { flex: 1; }
.callout .callout-title {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.callout p:last-child { margin-bottom: 0; }

.callout.callout-info {
  background: #e7f3ff;
  border-color: #0b72d9;
}
.callout.callout-info .callout-icon { background: #0b72d9; }
.callout.callout-info .callout-title { color: #0b72d9; }

.callout.callout-tip {
  background: #e9f9ef;
  border-color: #2b9d63;
}
.callout.callout-tip .callout-icon { background: #2b9d63; }
.callout.callout-tip .callout-title { color: #1e824c; }

.callout.callout-warning {
  background: #fff7e6;
  border-color: #f59e0b;
}
.callout.callout-warning .callout-icon { background: #f59e0b; }
.callout.callout-warning .callout-title { color: #b45309; }

.callout.callout-danger {
  background: #fdecec;
  border-color: #c62828;
}
.callout.callout-danger .callout-icon { background: #c62828; }
.callout.callout-danger .callout-title { color: #991b1b; }

/* ===== Stat Cards (inline highlight numbers) ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 1.8em 0;
}
.stat-card {
  background: linear-gradient(135deg, #2b9d63 0%, #1e824c 100%);
  color: #fff;
  padding: 22px;
  border-radius: var(--sk-radius);
  text-align: center;
  box-shadow: var(--sk-shadow-md);
}
.stat-card .stat-number {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .stat-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  opacity: 0.9;
}

/* ===== Step Cards ===== */
.step-list {
  list-style: none;
  padding: 0;
  margin: 1.8em 0;
  counter-reset: step-counter;
}
.step-list li {
  counter-increment: step-counter;
  background: #fff;
  border: 1px solid var(--sk-border);
  border-radius: var(--sk-radius);
  padding: 20px 24px 20px 76px;
  margin-bottom: 14px;
  position: relative;
  box-shadow: var(--sk-shadow-sm);
  transition: all 0.2s;
}
.step-list li:hover {
  transform: translateY(-2px);
  box-shadow: var(--sk-shadow-md);
}
.step-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--sk-primary);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.step-list li strong { color: var(--sk-primary-dark); }

/* ===== Pros / Cons ===== */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 1.8em 0;
}
.pros-cons .pc-box {
  padding: 20px;
  border-radius: var(--sk-radius);
  border: 1px solid var(--sk-border);
}
.pros-cons .pc-box h4 {
  margin: 0 0 12px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pros-cons .pc-box ul {
  margin: 0;
  padding-left: 20px;
}
.pros-cons .pc-pros { background: #e9f9ef; border-color: #b6e8c9; }
.pros-cons .pc-pros h4 { color: #1e824c; }
.pros-cons .pc-cons { background: #fdecec; border-color: #f5c2c2; }
.pros-cons .pc-cons h4 { color: #991b1b; }

/* ===== TOC (Table of Contents) ===== */
.toc-box {
  background: #fff;
  border: 1px solid var(--sk-border);
  border-radius: var(--sk-radius);
  padding: 20px 22px;
  margin: 0 0 28px;
  box-shadow: var(--sk-shadow-sm);
}
.toc-box .toc-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--sk-primary-dark);
  font-weight: 700;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-box ol {
  margin: 0;
  padding-left: 22px;
  font-size: 15px;
}
.toc-box ol li { margin-bottom: 6px; }
.toc-box ol li a {
  color: var(--sk-text);
  text-decoration: none;
  transition: color 0.2s;
}
.toc-box ol li a:hover { color: var(--sk-primary); }

/* ===== Sidebar ===== */
.article-sidebar { min-width: 0; }
.sidebar-widget {
  background: #fff;
  border: 1px solid var(--sk-border);
  border-radius: var(--sk-radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--sk-shadow-sm);
}
.sidebar-widget .widget-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--sk-primary-dark);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--sk-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-share {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.sidebar-share a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s;
  font-size: 16px;
}
.sidebar-share a:hover { transform: translateY(-3px); }
.sidebar-share .sh-fb { background: #1877f2; }
.sidebar-share .sh-tw { background: #1da1f2; }
.sidebar-share .sh-li { background: #0a66c2; }
.sidebar-share .sh-zl { background: #0068ff; }
.sidebar-share .sh-co { background: #6b7280; }

.sidebar-cta {
  background: linear-gradient(135deg, #c62828 0%, #8b1a1a 100%);
  color: #fff;
  text-align: center;
  border: none;
}
.sidebar-cta .widget-title {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.3);
  justify-content: center;
}
.sidebar-cta p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 14px;
}
.sidebar-cta .cta-btn {
  display: inline-block;
  background: #ffeb3b;
  color: #2c3e50;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s;
}
.sidebar-cta .cta-btn:hover { transform: scale(1.05); }

.sidebar-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-related-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--sk-border);
}
.sidebar-related-list li:last-child { border-bottom: none; }
.sidebar-related-list li img {
  width: 70px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.sidebar-related-list li .rel-text {
  font-size: 14px;
  line-height: 1.4;
}
.sidebar-related-list li a {
  color: var(--sk-text);
  text-decoration: none;
  font-weight: 600;
}
.sidebar-related-list li a:hover { color: var(--sk-primary); }
.sidebar-related-list li .rel-date {
  display: block;
  font-size: 12px;
  color: var(--sk-muted);
  margin-top: 4px;
}

/* ===== Bottom share bar ===== */
.article-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0;
  padding: 18px 22px;
  background: var(--sk-bg-soft);
  border-radius: var(--sk-radius);
  border: 1px solid var(--sk-border);
}
.article-share-bar .share-label {
  font-weight: 700;
  color: var(--sk-primary-dark);
}
.article-share-bar .share-buttons {
  display: flex;
  gap: 10px;
}

/* ===== Author / CTA after content ===== */
.article-cta {
  margin-top: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #2b9d63 0%, #156d3a 100%);
  color: #fff;
  border-radius: var(--sk-radius);
  text-align: center;
}
.article-cta h3 {
  color: #fff;
  font-size: 24px;
  margin: 0 0 8px;
}
.article-cta p {
  margin: 0 0 18px;
  font-size: 16px;
  opacity: 0.95;
}
.article-cta .cta-btn {
  display: inline-block;
  background: #ffeb3b;
  color: #2c3e50;
  padding: 12px 32px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.article-cta .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* ===== Related Posts (bottom) ===== */
.related-posts-section {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--sk-border);
}
.related-posts-section h3 {
  font-size: 22px;
  color: var(--sk-primary-dark);
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.related-card {
  background: #fff;
  border: 1px solid var(--sk-border);
  border-radius: var(--sk-radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sk-shadow-md);
}
.related-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.related-card .rc-body { padding: 14px 16px 18px; }
.related-card .rc-cat {
  font-size: 11px;
  color: var(--sk-primary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.related-card .rc-title {
  font-size: 16px;
  margin: 6px 0 0;
  line-height: 1.4;
}
.related-card .rc-title a {
  color: var(--sk-text);
  text-decoration: none;
}
.related-card .rc-title a:hover { color: var(--sk-primary); }

/* ============================================================
   Category / Archive Page
   ============================================================ */
.archive-hero {
  background: linear-gradient(135deg, #0d3823 0%, #2b9d63 100%);
  color: #fff;
  padding: 50px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.archive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08) 0, transparent 40%),
                    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.06) 0, transparent 40%);
}
.archive-hero .container { position: relative; z-index: 2; }
.archive-hero h1 {
  font-size: 38px;
  margin: 0 0 12px;
  color: #fff;
}
.archive-hero .archive-desc {
  font-size: 17px;
  max-width: 720px;
  margin: 0 auto;
  opacity: 0.95;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}
.post-card {
  background: #fff;
  border-radius: var(--sk-radius);
  overflow: hidden;
  box-shadow: var(--sk-shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--sk-border);
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sk-shadow-lg);
}
.post-card .pc-thumb {
  position: relative;
  display: block;
  overflow: hidden;
}
.post-card .pc-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s;
}
.post-card:hover .pc-thumb img { transform: scale(1.06); }
.post-card .pc-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--sk-primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
}
.post-card .pc-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card .pc-meta {
  font-size: 13px;
  color: var(--sk-muted);
  margin-bottom: 8px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.post-card .pc-meta i { color: var(--sk-primary); margin-right: 4px; }
.post-card .pc-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 10px;
}
.post-card .pc-title a {
  color: var(--sk-text);
  text-decoration: none;
}
.post-card .pc-title a:hover { color: var(--sk-primary); }
.post-card .pc-excerpt {
  font-size: 14px;
  color: var(--sk-muted);
  line-height: 1.6;
  margin: 0 0 14px;
  flex: 1;
}
.post-card .pc-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sk-primary);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  margin-top: auto;
}
.post-card .pc-readmore:hover { gap: 10px; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 30px 0 60px;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--sk-border);
  color: var(--sk-text);
  text-decoration: none;
  transition: all 0.2s;
  font-weight: 600;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--sk-primary);
  color: #fff;
  border-color: var(--sk-primary);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    order: 2;
  }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .single-hero { padding: 40px 0 60px; }
  .single-hero .single-title { font-size: 28px; }
  .featured-image-wrap { margin-top: -36px; }
  .featured-image-wrap img { max-height: 280px; }
  .article-content { font-size: 16px; }
  .article-content h2 { font-size: 22px; }
  .article-content h3 { font-size: 19px; }
  .post-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .pros-cons { grid-template-columns: 1fr; }
  .archive-hero h1 { font-size: 28px; }
  .article-content > p:first-of-type::first-letter {
    font-size: 44px;
  }
  /* Let wide tables scroll horizontally instead of breaking layout */
  .article-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .article-content figure { margin: 1.4em 0; }
  .article-content img { height: auto; }
}
