/* Blog Gizadata - frontend-gizadata/blog */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #fafbfc;
  --color-bg-card: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-primary: #ea580c;
  --color-primary-hover: #c2410c;
  --color-primary-light: #fff7ed;
  --font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

#app-root {
  opacity: 1;
  transform: translateY(0);
}

#app-root.is-leaving {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}

#app-root.is-entering {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .3s ease, transform .3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header.header-scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-primary);
}

.logo-icon {
  font-size: 1.5rem;
}

.header-toc-toggle {
  display: none;
  margin-right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: white;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.header-toc-icon {
  position: relative;
  width: 18px;
  height: 14px;
}

.header-toc-icon::before,
.header-toc-icon::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--color-primary);
}

.header-toc-icon::before {
  top: 0;
  box-shadow: 0 6px 0 var(--color-primary);
}

.header-toc-icon::after {
  bottom: 0;
  width: 70%;
}

.header-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.header-toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

.header-toggle[aria-expanded="true"] .header-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.header-toggle[aria-expanded="true"] .header-toggle-bar:nth-child(2) {
  opacity: 0;
}

.header-toggle[aria-expanded="true"] .header-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  transition: var(--transition);
}

.header-nav-link:hover {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .header-toggle {
    display: flex;
  }

  body.has-blog-toc[data-blog-page="baiviet"] .header-toc-toggle {
    display: inline-flex;
  }

  .header-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: white;
    box-shadow: var(--shadow-lg);
    padding: 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s, opacity 0.3s, visibility 0.3s;
  }

  .header-nav.is-open {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
  }

  .header-nav-link {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }

  .header-nav-link:hover {
    background: var(--color-primary-light);
  }

  .header-nav .header-cta {
    margin-top: 8px;
    justify-content: center;
  }
}

.main {
  min-height: 50vh;
  padding-top: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.btn-cta {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-cta:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-cta-large {
  padding: 14px 32px;
  font-size: 1rem;
}

.hero {
  position: relative;
  padding: 80px 0 60px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(234, 88, 12, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  color: #92400e;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 999px;
}

.hero-title {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-text);
}

.hero-title .highlight {
  color: var(--color-primary);
}

.hero-tagline {
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: 1.0625rem;
  color: var(--color-text-muted);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 32px;
  margin-bottom: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 28px;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  transition: var(--transition);
}

.stat-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-number {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.4;
}

.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  opacity: 0.8;
}

.scroll-hint:hover {
  opacity: 1;
  color: var(--color-primary);
}

.scroll-icon {
  width: 24px;
  height: 24px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(6px)
  }
}

.section-latest {
  background: linear-gradient(180deg, var(--color-bg) 0%, rgba(250, 251, 252, 0.5) 100%);
}

.section-footer {
  text-align: center;
  margin-top: 40px;
}

.posts-grid-home {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.posts-grid-home .post-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.posts-grid-home .post-card-excerpt,
.posts-grid .post-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 40px;
}

.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.topic-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.topic-card:hover .topic-link {
  color: var(--color-primary-hover);
}

.topic-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
  background: #dbeafe;
}

.topic-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.topic-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.topic-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.why-card {
  text-align: center;
}

.why-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #fef3c7;
}

.why-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.why-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.cta-box {
  background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
  border-radius: var(--radius-xl);
  padding: 56px 40px;
  text-align: center;
  box-shadow: 0 20px 40px -10px rgba(234, 88, 12, 0.35);
}

.cta-icon {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.cta-title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.cta-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 28px;
}

.cta-box .btn-cta {
  background: white;
  color: var(--color-primary);
}

.cta-box .btn-cta:hover {
  background: var(--color-primary-light);
}

.cta-contact {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.cta-contact-label {
  display: block;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 12px;
}

.cta-contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
}

.cta-contact-link {
  font-size: 0.9375rem;
  font-weight: 600;
  color: white;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
}

.cta-contact-link:hover {
  background: rgba(255, 255, 255, 0.25);
}

.footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary);
  transition: var(--transition);
}

.footer-social-link:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

.footer-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-primary);
}

.footer-links a:hover {
  color: var(--color-primary-hover);
}

.footer-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.page-section {
  padding-top: 30px;
}

.page-header {
  margin-bottom: 40px;
}

.page-title {
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.page-desc {
  color: var(--color-text-muted);
  font-size: 1rem;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.post-card {
  padding: 0;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Bài viết khuyến mãi: border gold nhẹ khi hover */
.post-card-promotion {
  border: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.post-card-promotion:hover {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4), 0 4px 12px rgba(212, 175, 55, 0.08);
}

.post-card-link {
  display: block;
  color: inherit;
}

.post-card-link:hover {
  color: inherit;
}

.post-card-thumb {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--color-bg);
  position: relative;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 24px;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.post-card-excerpt {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.post-card-date {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Badges và expired cho bài viết khuyến mãi - luôn hiển thị, đặt ngoài link để tránh ảnh hưởng hover */
.post-card-badge {
  position: absolute;
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: 600;
  z-index: 3;
  pointer-events: none;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.post-card-badge-promotion {
  top: 12px;
  right: 12px;
  background: #22c55e;
  color: #fff;
}
.post-card-badge-expired {
  top: 12px;
  right: 12px;
  background: #dc2626;
  color: #fff;
}
.post-expired .post-card-thumb img,
.post-expired .post-card-thumb {
  filter: grayscale(100%);
  opacity: 0.75;
}
.post-expired .post-card-title,
.post-expired .post-card-excerpt {
  color: var(--color-text-muted, #6b7280);
}
.post-single-expired-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #dc2626;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
}
.post-expired .post-single-thumb img {
  filter: grayscale(100%);
  opacity: 0.75;
}

.post-promo-expired-box {
  margin: 0 0 28px;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.post-promo-expired-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.post-promo-expired-main {
  flex: 1;
}

.post-promo-expired-title {
  font-weight: 600;
  color: #9a3412;
  margin-bottom: 4px;
}

.post-promo-expired-time {
  font-size: 0.9375rem;
  color: #7c2d12;
  margin-bottom: 4px;
}

.post-promo-expired-note {
  font-size: 0.875rem;
  color: #78350f;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pagination-info {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.no-posts {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-muted);
}

.no-posts a {
  color: var(--color-primary);
}

.container-narrow {
  max-width: 720px;
}

.post-single {
  padding-top: 30px;
}

.post-single-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

/* blog-toc */

@media (min-width: 992px) {
  .blog-toc {
    border: 0 !important;
    box-shadow: none !important;
  }
  .container.post-single-layout {
    width: 90% !important;
    max-width: 1600px !important;
  }
}

body.has-blog-toc .post-single-layout {
  grid-template-columns: 260px 1fr;
}

.post-single-body {
  min-width: 0;
  max-width: 720px;
}

body:not(.has-blog-toc) .post-single-body {
  margin: 0 auto;
}

body.has-blog-toc .post-single-body {
  max-width: 100%;
}

.blog-toc-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}

.blog-toc-sidebar .blog-toc {
  max-height: calc(100vh - 88px - 48px);
}

.post-single-header {
  margin-bottom: 32px;
}

.post-category-line {
  margin-bottom: 12px;
}

.post-category {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.post-category:hover {
  color: var(--color-primary-hover);
}

.post-category-promo {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-left: 4px;
}

.post-category-promo-expired {
  color: var(--color-text-muted);
}

.post-single-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.post-meta {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

/* Thời gian chương trình khuyến mãi - xuống dòng riêng, nổi bật */
.post-promo-daterange {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(255, 193, 7, 0.06) 100%);
  border-left: 3px solid rgba(212, 175, 55, 0.6);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(212, 175, 55, 0.1);
  position: relative;
  overflow: hidden;
  
}

/* Hiệu ứng ánh sáng lướt từ trái qua phải */
.post-promo-daterange::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: translateX(-100%);
  animation: postPromoShine 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes postPromoShine {
  0% { transform: translateX(-100%); opacity: 0.6; }
  40% { transform: translateX(250%); opacity: 0.8; }
  100% { transform: translateX(250%); opacity: 0; }
}

.post-promo-daterange-icon {
  flex-shrink: 0;
  display: inline-flex;
  color: rgba(212, 175, 55, 0.9);
  animation: postPromoIconShake 2.5s ease-in-out infinite;
}

@keyframes postPromoIconShake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-4deg); }
  40% { transform: rotate(4deg); }
  60% { transform: rotate(-2deg); }
  80% { transform: rotate(2deg); }
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post-tag {
  font-size: 0.8125rem;
  padding: 4px 12px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: 999px;
  transition: var(--transition);
}

.post-tag:hover {
  background: var(--color-primary);
  color: white;
}

.post-single-thumb {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}

.post-single-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* Download box - hiển thị đầu hoặc cuối bài viết */
.post-download-box {
  margin: 28px 0;
  padding: 0;
  background: var(--color-bg-card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  position: relative;
}
.post-download-icon {
  width: 64px;
  min-width: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover, #c2410c) 100%);
  color: #fff;
  font-size: 1.5rem;
}
.post-download-inner {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  min-height: 64px;
}
.post-download-content {
  flex: 1;
  min-width: 180px;
}
.post-download-desc {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.post-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--color-primary) !important;
  color: #fff !important;
  border: none;
  border-radius: var(--radius-sm, 8px);
  font-weight: 600;
  white-space: nowrap;
  font-size: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.post-download-btn:hover {
  background: var(--color-primary-hover, #c2410c) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.35);
}
.post-download-btn i {
  font-size: 1.1em;
}
.post-download-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.post-download-count {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-download-count i {
  font-size: 0.9em;
  opacity: 0.8;
}
/* Badge an toàn */
.post-download-badge {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 0.75rem;
  color: #16a34a;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.post-download-badge i {
  font-size: 1em;
}
/* Kịch bản không có mô tả - compact, cân bằng */
.post-download-no-desc .post-download-inner {
  justify-content: center;
  padding: 20px 24px 20px 20px;
}
.post-download-no-desc .post-download-content {
  display: none;
}
.post-download-no-desc .post-download-actions {
  flex: 1;
  justify-content: center;
}
/* Responsive - mobile */
@media (max-width: 576px) {
  .post-download-box {
    flex-direction: column;
    align-items: stretch;
  }
  .post-download-icon {
    width: 100%;
    min-width: 100%;
    padding: 16px;
    font-size: 1.75rem;
  }
  .post-download-inner {
    padding: 16px 20px 20px;
    padding-top: 36px; /* chừa chỗ cho badge */
  }
  .post-download-no-desc .post-download-inner {
    padding-top: 20px;
  }
  .post-download-badge {
    top: 8px;
    right: 12px;
  }
  .post-download-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .post-download-no-desc .post-download-actions {
    align-items: center;
  }
  .post-download-btn {
    justify-content: center;
  }
}

.post-single-content {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.blog-toc {
  background: var(--color-bg-card);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-y: auto;
  /* box-shadow: var(--shadow-md); */
}

.blog-toc-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text);
}

.blog-toc-nav {
  font-size: 0.9rem;
}

.blog-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-toc-item {
  margin-bottom: 6px;
}

.blog-toc-link {
  display: block;
  padding: 6px 10px;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 6px;
  border-left: 3px solid transparent;
  transition: var(--transition);
}

.blog-toc-link:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  padding-left: 14px;
}

.blog-toc-link.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
  border-left-color: var(--color-primary);
  padding-left: 14px;
}

.blog-toc-sublist {
  list-style: none;
  padding: 0;
  margin: 4px 0 0 0;
  padding-left: 16px;
  border-left: 1px solid #e2e8f057;
}

.blog-toc-sublist .blog-toc-item {
  margin-bottom: 4px;
}

.blog-toc-sublist .blog-toc-link {
  font-size: 0.875rem;
  padding: 4px 8px;
}

.blog-toc-level-1 .blog-toc-link {
  /* font-weight: 600; */
  font-size: 12px;
}

.blog-toc::-webkit-scrollbar {
  width: 6px;
}

.blog-toc::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.blog-toc::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.blog-toc::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@media (max-width: 991px) {
  body.has-blog-toc .post-single-layout {
    grid-template-columns: 1fr;
  }

  .blog-toc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    transform: translateX(-100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 120;
  }

  body.has-blog-toc.blog-toc-open .blog-toc-sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .blog-toc-sidebar .blog-toc {
    max-height: 100vh;
    border-radius: 0;
  }

  body.has-blog-toc.blog-toc-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 110;
  }
}

.post-single-content h2 {
  font-size: 1.375rem;
  margin: 32px 0 12px;
}

.post-single-content p {
  margin-bottom: 16px;
}

.post-single-content ul,
.post-single-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.post-single-content li {
  margin-bottom: 8px;
}

.post-single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.post-single-content a {
  color: var(--color-primary);
}

.post-single-content a:hover {
  text-decoration: underline;
}

/* Code blocks - .codecopy (theme sáng) */
.post-single-content .codecopy {
  position: relative;
  background: var(--color-primary-light, #fff7ed);
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--color-primary, #ea580c);
  border-radius: var(--radius-md, 8px);
  padding: 16px 16px 16px 52px;
  margin: 20px 0;
  overflow-x: auto;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
  padding-top: 45px;
}

.post-single-content .codecopy::before {
  content: "CODE";
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-primary, #ea580c);
  background: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #fed7aa;
  letter-spacing: 0.5px;
}

.post-single-content .codecopy pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  font-family: ui-monospace, 'Courier New', Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
  color: var(--color-text, #1e293b);
}

.post-single-content .codecopy.has-lines {
  display: flex;
  padding: 0;
}

.post-single-content .codecopy.has-lines .code-lines {
  display: flex;
  flex-direction: column;
  background: rgba(0,0,0,0.04);
  border-right: 1px solid #e2e8f0;
  padding: 16px 10px;
  user-select: none;
  text-align: right;
  min-width: 44px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-muted, #64748b);
}

.post-single-content .codecopy.has-lines pre {
  flex: 1;
  padding: 16px;
}

.post-single-content .codecopy .copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--color-primary, #ea580c);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s;
  z-index: 5;
}

.post-single-content .codecopy .copy-btn:hover {
  background: var(--color-primary-hover, #c2410c);
}

.post-single-content .codecopy .copy-btn.copied {
  background: #16a34a;
}

/* Code blocks - .code-block-viewer (nền sáng dễ chịu) */
.post-single-content .code-block-viewer {
  position: relative;
  background: linear-gradient(135deg, #fefefe 0%, #f8fafc 30%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 16px 16px 52px;
  margin: 20px 0;
  overflow-x: auto;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: ui-monospace, SFMono-Regular, 'Fira Code', Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}

.post-single-content .code-block-viewer:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.post-single-content .code-block-viewer pre,
.post-single-content .code-block-viewer code {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  color: #334155;
  white-space: pre;
}

.post-single-content .code-block-viewer .line-number {
  position: absolute;
  left: 0;
  top: 16px;
  padding-right: 12px;
  width: 40px;
  text-align: right;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  user-select: none;
}

.post-single-content .code-block-viewer .code-copied {
  position: absolute;
  top: 10px;
  right: 12px;
  background: #22c55e;
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.25s ease;
}

.post-single-content .code-block-viewer .code-copied.show {
  opacity: 1;
  transform: translateY(0);
}

/* Highlight.js token colors - nền sáng, màu rõ ràng */
.post-single-content .code-block-viewer .hljs-comment,
.post-single-content .code-block-viewer .hljs-quote {
  color: #64748b;
  font-style: italic;
}

.post-single-content .code-block-viewer .hljs-keyword,
.post-single-content .code-block-viewer .hljs-selector-tag,
.post-single-content .code-block-viewer .hljs-addition {
  color: #7c3aed;
}

.post-single-content .code-block-viewer .hljs-number,
.post-single-content .code-block-viewer .hljs-string,
.post-single-content .code-block-viewer .hljs-meta .hljs-meta-string,
.post-single-content .code-block-viewer .hljs-literal {
  color: #059669;
}

.post-single-content .code-block-viewer .hljs-regexp,
.post-single-content .code-block-viewer .hljs-link {
  color: #0284c7;
}

.post-single-content .code-block-viewer .hljs-title,
.post-single-content .code-block-viewer .hljs-section,
.post-single-content .code-block-viewer .hljs-name,
.post-single-content .code-block-viewer .hljs-selector-id,
.post-single-content .code-block-viewer .hljs-selector-class {
  color: #d97706;
}

.post-single-content .code-block-viewer .hljs-attribute,
.post-single-content .code-block-viewer .hljs-variable,
.post-single-content .code-block-viewer .hljs-template-variable,
.post-single-content .code-block-viewer .hljs-class .hljs-title {
  color: #c2410c;
}

.post-single-content .code-block-viewer .hljs-symbol,
.post-single-content .code-block-viewer .hljs-bullet,
.post-single-content .code-block-viewer .hljs-subst,
.post-single-content .code-block-viewer .hljs-meta,
.post-single-content .code-block-viewer .hljs-meta .hljs-keyword {
  color: #be185d;
}

.post-single-content .code-block-viewer .hljs-built_in,
.post-single-content .code-block-viewer .hljs-deletion {
  color: #6d28d9;
}

.post-single-content .code-block-viewer .hljs-tag {
  color: #0284c7;
}

.post-single-content .code-block-viewer .hljs-tag .hljs-name {
  color: #be185d;
}

.post-single-content .code-block-viewer .hljs-tag .hljs-attr {
  color: #059669;
}

.post-single-content .code-block-viewer .hljs-doctag,
.post-single-content .code-block-viewer .hljs-strong {
  font-weight: 700;
}

.post-single-content .code-block-viewer .hljs-emphasis {
  font-style: italic;
}

/* Breadcrumb - cuối nội dung bài viết */
.post-breadcrumb {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px dashed var(--color-border, #e5e7eb);
  font-size: 0.9375rem;
}

.post-breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}

.post-breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.post-breadcrumb-link {
  color: var(--color-primary, #2563eb);
  text-decoration: none;
}

.post-breadcrumb-link:hover {
  text-decoration: underline;
}

.post-breadcrumb-sep {
  color: var(--color-text-muted, #6b7280);
  margin: 0 4px;
}

.post-breadcrumb-current {
  color: var(--color-text-muted, #6b7280);
}

.search-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 24px 0;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.search-intro {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-muted);
}

.page-404 {
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.error-404-box {
  text-align: center;
  padding: 48px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.error-404-number {
  display: block;
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.9;
}

.error-404-title {
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
}

.error-404-desc {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.error-404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary-light);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.blog-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--color-text-muted);
}

.blog-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-primary-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: blog-spin 0.8s linear infinite;
}

.blog-loading p {
  margin-top: 16px;
  font-size: 0.9375rem;
}

@keyframes blog-spin {
  to {
    transform: rotate(360deg);
  }
}


/* Table - nội dung bài viết */
.TyagGW_tableContainer {
  margin: 24px 0;
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: none;
}

.TyagGW_tableWrapper {
  display: block;
}

.TyagGW_tableWrapper table,
.post-single-body table {
  width: fit-content;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.TyagGW_tableWrapper thead,
.post-single-body table thead {
  background: linear-gradient(135deg, #fed7aa 0%, #fef3c7 100%);
}

.TyagGW_tableWrapper th,
.post-single-body table th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  color: #9a3412;
  border: none;
  white-space: nowrap;
}

.TyagGW_tableWrapper tbody tr,
.post-single-body table tbody tr {
  transition: background-color 0.2s ease;
}

.TyagGW_tableWrapper tbody tr:nth-child(odd),
.post-single-body table tbody tr:nth-child(odd) {
  background: #fff;
}

.TyagGW_tableWrapper tbody tr:nth-child(even),
.post-single-body table tbody tr:nth-child(even) {
  background: #fffbeb;
}

.TyagGW_tableWrapper tbody tr:hover,
.post-single-body table tbody tr:hover {
  background: #fff7ed !important;
}

.TyagGW_tableWrapper td,
.post-single-body table td {
  padding: 12px 18px;
  color: var(--color-text);
  border-bottom: 1px solid #fef3c7;
}

.TyagGW_tableWrapper td:first-child,
.post-single-body table td:first-child {
  font-weight: 600;
  color: var(--color-primary);
}

.TyagGW_tableWrapper tbody tr:last-child td,
.post-single-body table tbody tr:last-child td {
  border-bottom: none;
}


hr {
  border: 0.5px solid #eee;
  margin: 10px 0
}

ul,
ol {
  list-style-type: circle;
}

.post-single-content h1,
.post-single-content h2,
.post-single-content h3,
.post-single-content h4,
.post-single-content h5,
.post-single-content h6 {
  line-height: 1.3;
}
.post-single-content h2,
.post-single-content h3,
.post-single-content h4,
.post-single-content h5,
.post-single-content h6 {
  margin: 30px 0 10px 0;
}

/* ========== Liên hệ Fixed (PC: 3 nút, Mobile: icon + expand) ========== */
.blog-lienhe-fixed {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 12px;
}

/* Toggle - chỉ hiện trên mobile */
.blog-lienhe-panel {
  z-index: 1000;
}

.blog-lienhe-toggle {
  position: relative;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-lienhe-toggle:hover,
.blog-lienhe-toggle:active {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.5);
}

.blog-lienhe-toggle[aria-expanded="true"] {
  transform: rotate(-90deg);
}

/* Panel 3 nút - mobile: expand từ dưới lên */
.blog-lienhe-panel {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.92);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

body.blog-lienhe-open .blog-lienhe-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Nút liên hệ */
.blog-lienhe-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  min-width: 160px;
  background: #fff;
  border-radius: 50px;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-lienhe-btn:hover {
  transform: translateX(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-lienhe-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.blog-lienhe-btn span {
  white-space: nowrap;
}

.blog-lienhe-btn-fb:hover { color: #1877f2; }
.blog-lienhe-btn-zalo:hover { color: #0068ff; }
.blog-lienhe-btn-tg:hover { color: #0088cc; }

/* Overlay mobile */
.blog-lienhe-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

body.blog-lienhe-open .blog-lienhe-overlay {
  z-index: 998;
  opacity: 1;
  visibility: visible;
}

/* PC: ẩn toggle, hiện panel dạng cột nút tròn */
@media (min-width: 768px) {
  .blog-lienhe-fixed {
    bottom: 24px;
    right: 24px;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
  }

  .blog-lienhe-toggle {
    display: none;
  }

  .blog-lienhe-panel {
    position: static;
    margin-bottom: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    flex-direction: column;
  }

  .blog-lienhe-overlay {
    display: none !important;
  }

  .blog-lienhe-btn {
    width: 52px;
    min-width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .blog-lienhe-btn span {
    display: none;
  }

  .blog-lienhe-btn img {
    width: 26px;
    height: 26px;
  }
}


.post-single-content code {
  font-size: 14px;
  padding: 5px;
  background: #ffffcc5b;
  border-radius: 12px;
  overflow-wrap: break-word;
  white-space: normal;
}