.container {
  display: grid;
  grid-template-columns: 2.5fr 7.5fr;
  gap: 40px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Left Content ===== */
.left-content {
  position: sticky;
  top: 100px;
  align-self: start;
}

.toc {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.toc h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #111827;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 8px;
}

.toc a {
  text-decoration: none;
  color: #333;
  font-size: 12px;
  transition: color 0.2s;
}

.toc a:hover {
  color: black;
}

/* ===== Right Content ===== */
.right-content {
  padding-top: 100px;
}

.article-tag {
  display: inline-block;
  background-color: rgba(68, 157, 240, 0.1);
  color: #449df0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(68, 157, 240, 0.2);
}

.article-tag:hover {
  background-color: oklch(68% 0.15 250 / 0.2);
}

.article-title {
  font-size: 28px;
  font-weight: 600;
  color: #111827;
  margin: 10px 0 20px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 20px;
}

.meta i {
  margin-right: 5px;
  color: #9ca3af;
}

/* Share buttons */
.share-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.share-buttons button {
  background: #e5e7eb;
  border: none;
  border-radius: 6px;
  height: 30px;
  cursor: pointer;
  transition: background 0.3s ease;
  padding: 0 10px;
}

.share-buttons button:hover {
  background-color: #449df0;
  color: white;
  transition: all 0.5s ease;
}

/* Image */

figure.wp-block-image.size-large {
  display: flex;
  align-items: center;
}

.article-image img {
  width: 100%;
  height: auto;
  margin-bottom: 30px;
}

.article-body p {
  font-size: 15px;
  color: #374151;
  margin: 18px 0;
  line-height: 25px;
}

.article-body h3 {
  font-size: 18px;
  color: #111827;
}

.article-body ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.article-body li {
  margin-bottom: 6px;
  color: #4b5563;
}

.back-btn {
  margin-top: 40px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  background-color: #fff;
  color: #000;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid #e2e5e880;
  box-shadow: 0 1px 2px #e2e5e880;
}

.btn-back i {
  margin-right: 6px;
}

.btn-back:hover {
  background-color: #68b5f5;
  border: 1px solid #449df0;
}

.btn-back:hover i {
  transform: translateX(-7px); /* icon dịch sang trái khi hover */
  transition: all 0.3s ease;
}

/*=================== related section =======================*/

.related-articles {
  text-align: center;
  padding: 60px 20px;
  max-width: 1400px;
  width: 100%;
  margin: auto;
}

.related-articles h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #111827;
}

.related-articles .section-desc {
  color: #6b7280;
  font-size: 15px;
  margin-bottom: 40px;
}

/* Grid layout */
.articles-grid {
  display: grid;
  gap: 50px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 auto;
}

/* Article Card */
.article-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.5s ease;
}

.article-card:hover {
  transform: translateY(-10px);
}

.article-card .article-image {
  overflow: hidden;
}

.article-card .article-image img {
  width: 100%;
  transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
  transform: scale(1.2);
}
/* Image + Tag */
.article-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.article-image .tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: #fafcff;
  color: #000;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 5px;
}

/* Content */
.article-content {
  padding: 20px;
  text-align: left;
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.article-card:hover h3 {
  color: #449df0;
}

.article-content p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
  line-height: 1.5;
  -webkit-line-clamp: 3;
}

/* Meta info */
.meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  color: #6b7280;
}

.meta i {
  margin-right: 5px;
  color: #9ca3af;
}

.menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
}

/* =================== Responsive =================== */

/* Tablet */
@media (max-width: 992px) {
  .container {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    padding: 0 20px;
  }

  .right-content {
    width: 100%;
    padding-top: 80px;
  }

  .header-row {
    justify-content: space-between;
    position: relative;
  }

  /* Ẩn menu và 2 nút Sign In / Trial */
  .header-center,
  .header-right .btn {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #111;
    cursor: pointer;
  }

  .header-center.active {
    display: block;
    position: absolute;
    top: 70px;
    right: 0;
    width: 200px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 999;
  }

  .header-center .menu {
    flex-direction: column;
    padding: 15px;
    gap: 12px;
    text-align: right;
  }

  .header-center .menu li a {
    display: block;
    padding: 8px 0;
  }

  /* ===== Table of Contents ===== */
  /* Ẩn left-content (TOC bên trái PC) */
  .left-content {
    display: none;
  }

  /* TOC di động */
  .toc-mobile {
    display: block;
    margin: 20px 0;
  }
  /* 
  .toc-toggle {
    background:white;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
  } */

  .toc-toggle {
    background: white;
    color: black;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    text-align: center;
    font-size: 1rem;
  }

  .toc-toggle:hover {
    background-color: #449df0;
    color: white;
    transition: all 0.5s ease;
  }

  .toc-content {
    display: none;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
  }

  .toc-content.show {
    display: block;
  }

  .toc-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .toc-content ul li {
    margin: 8px 0;
  }

  .toc-content ul li a {
    color: #333;
    text-decoration: none;
    font-size: 12px;
  }

  .toc-content ul li a:hover {
    color: black;
  }

  /* ===== Related Articles ===== */
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
    justify-items: start;
  }
}

/* Mobile */
@media (max-width: 600px) {
  /* ===== Header ===== */
  .site-title {
    font-size: 1.2rem;
  }

  .header-center.active {
    width: 100%;
    right: 0;
  }

  /* ===== TOC ===== */
  .toc-toggle {
    width: 100%;
  }

  /* ===== Related Articles: 1 box mỗi hàng ===== */
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .articles-grid .article-card:last-child {
    width: 100%;
  }
}

@media (min-width: 992px) {
  /* TOC di động ẩn trên PC */
  .toc-mobile {
    display: none;
  }

  /* TOC bên trái chỉ hiển thị ở PC */
  .left-content {
    display: block;
  }
}

h2 .wp-block-heading {
  padding-bottom: 10px;
}

ul.wp-block-list {
  margin-left: 40px;
}

.wp-block-image :where(figcaption) {
  margin-bottom: 1em;
  margin-top: 0.5em;
  text-align: center;
  font-size: 13px;
  color: #6b6b6b;
  font-style: italic;
}
