/* ==========================================================================
   NOITHATKAYA - SINGLE POST DETAIL (BÀI VIẾT CHI TIẾT)
   Layout rộng rãi (Spacious Container 1280px) & Sidebar Chuyên Nghiệp
   ========================================================================== */

/* 1. CONTAINER CHÍNH CỦA TRANG BÀI VIẾT CHI TIẾT */
body.single-post .site-content {
  background-color: #f7f9fa;
  padding-top: 24px;
  padding-bottom: 50px;
}

body.single-post .site-content > .ast-container {
  max-width: 1280px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  box-sizing: border-box;
}

/* 2. FLEX LAYOUT: PHẦN NỘI DUNG (PRIMARY) & SIDEBAR (SECONDARY) */
@media (min-width: 922px) {
  body.single-post.ast-right-sidebar .site-content > .ast-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 36px !important;
    align-items: flex-start !important;
  }

  body.single-post.ast-right-sidebar #primary {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: calc(100% - 356px) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  body.single-post.ast-right-sidebar #secondary {
    width: 320px !important;
    min-width: 320px !important;
    flex: 0 0 320px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    position: sticky !important;
    top: 90px !important;
    align-self: flex-start !important;
  }
}

@media (max-width: 921px) {
  body.single-post .site-content > .ast-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  body.single-post #primary {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.single-post #secondary {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
  }
}

/* 3. THẺ BÀI VIẾT CHI TIẾT (ARTICLE CARD) */
body.single-post .ast-article-single {
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1px solid #eef1f5 !important;
  box-shadow: 0 6px 24px rgba(17, 24, 39, 0.04) !important;
  padding: 42px 48px !important;
  margin-bottom: 24px !important;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  body.single-post .ast-article-single {
    padding: 24px 18px !important;
    border-radius: 12px !important;
  }
}

/* ==========================================================================
   BREADCRUMB TRONG BÀI VIẾT CHI TIẾT (GIỐNG PRODUCT CATEGORY & CANH GIỮA)
   ========================================================================== */
body.single-post .ast-breadcrumbs-wrapper,
body.single-post .breadcrumb-trail.breadcrumbs,
body.single-post .ast-breadcrumbs {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
}

body.single-post .ast-breadcrumbs .trail-items {
  display: inline-flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px 4px !important;
  margin: 0 0 14px 0 !important;
  padding: 0 !important;
  color: #666055 !important;
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  font-family: inherit !important;
  list-style: none !important;
}

body.single-post .ast-breadcrumbs .trail-items li {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

body.single-post .ast-breadcrumbs .trail-items li::marker {
  display: none !important;
  content: "" !important;
}

/* Biểu tượng Nhà (Home SVG) cho Trang chủ giống Product Category */
body.single-post .ast-breadcrumbs .trail-items li.trail-begin > a::before {
  content: "" !important;
  display: inline-block !important;
  width: 14px !important;
  height: 14px !important;
  margin-right: 5px !important;
  background-color: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9.5L12 3l9 6.5V20a1 1 0 0 1-1 1h-5v-6h-6v6H4a1 1 0 0 1-1-1V9.5z'/%3E%3C/svg%3E") no-repeat center !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9.5L12 3l9 6.5V20a1 1 0 0 1-1 1h-5v-6h-6v6H4a1 1 0 0 1-1-1V9.5z'/%3E%3C/svg%3E") no-repeat center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  vertical-align: -1px !important;
}

/* Link đường dẫn */
body.single-post .ast-breadcrumbs .trail-items li a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  color: #666055 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: color 0.2s ease !important;
  font-size: 13.5px !important;
}

body.single-post .ast-breadcrumbs .trail-items li a:hover {
  color: #ff9e22 !important;
}

/* Dấu phân cách » màu cam chuẩn KAYA giống Product Category */
body.single-post .ast-breadcrumbs .trail-items li::after {
  content: "»" !important;
  color: #ff9e22 !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  margin: 0 6px !important;
  display: inline-block !important;
  border: none !important;
  transform: none !important;
  width: auto !important;
  height: auto !important;
  user-select: none !important;
}

body.single-post .ast-breadcrumbs .trail-items li:last-child::after,
body.single-post .ast-breadcrumbs .trail-items li.trail-end::after {
  display: none !important;
}

/* Mục hiện tại (Active / Current Page) giống Product Category */
body.single-post .ast-breadcrumbs .trail-items li.trail-end,
body.single-post .ast-breadcrumbs .trail-items li.trail-end span {
  font-weight: 700 !important;
  color: #171714 !important;
}

/* ==========================================================================
   TIÊU ĐỀ BÀI VIẾT (CANH GIỮA & MÀU SẮC CHUẨN)
   ========================================================================== */
body.single-post .entry-header {
  margin-bottom: 28px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

body.single-post .entry-title {
  font-size: clamp(24px, 3.2vw, 34px) !important;
  font-weight: 700 !important;
  color: #ff9801 !important;
  line-height: 1.35 !important;
  margin: 0 0 16px 0 !important;
  letter-spacing: -0.01em !important;
  text-align: center !important;
}

/* ==========================================================================
   METADATA BÀI VIẾT: TÁC GIẢ & NGÀY ĐĂNG (ICON CAM, CANH GIỮA, KHÔNG CATEGORY/COMMENT)
   ========================================================================== */
body.single-post .entry-meta {
  font-size: 0 !important; /* Ẩn triệt để chữ "Bởi" hoặc dấu gạch thừa */
  color: #555555 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 24px !important;
  padding-bottom: 14px !important;
  margin-bottom: 28px !important;
  border-bottom: 1px solid #ebebeb !important;
  width: 100% !important;
}

/* Tác giả & Ngày đăng */
body.single-post .entry-meta .posted-by,
body.single-post .entry-meta .posted-on {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 13.5px !important;
  color: #555555 !important;
  line-height: 1 !important;
  background: transparent !important;
  border: none !important;
}

/* Link tác giả */
body.single-post .entry-meta .posted-by a {
  color: #555555 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  transition: color 0.2s ease !important;
}

body.single-post .entry-meta .posted-by a:hover {
  color: #ff9801 !important;
}

/* ICON NGƯỜI (FontAwesome User - Màu cam) */
body.single-post .entry-meta .posted-by::before {
  content: "" !important;
  display: inline-block !important;
  width: 14px !important;
  height: 14px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23ff9801' d='M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  flex-shrink: 0 !important;
}

/* ICON ĐỒNG HỒ (FontAwesome Clock-o - Màu cam) */
body.single-post .entry-meta .posted-on::before {
  content: "" !important;
  display: inline-block !important;
  width: 14px !important;
  height: 14px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23ff9801' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm12-320h-24c-6.6 0-12 5.4-12 12v140c0 6.6 5.4 12 12 12h104c6.6 0 12-5.4 12-12v-24c0-6.6-5.4-12-12-12h-80V148c0-6.6-5.4-12-12-12z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  flex-shrink: 0 !important;
}

/* Text ngày đăng */
body.single-post .entry-meta .posted-on .published {
  font-size: 13.5px !important;
  color: #555555 !important;
}

/* Tuyệt đối ẩn Category và Comment trong Single Post theo yêu cầu */
body.single-post .entry-meta .cat-links,
body.single-post .entry-meta .ast-taxonomy-container,
body.single-post .entry-meta .comments-link {
  display: none !important;
}


/* NỘI DUNG BÀI VIẾT CHI TIẾT (ENTRY CONTENT) */
body.single-post .entry-content {
  font-size: 16.5px !important;
  line-height: 1.85 !important;
  color: #374151 !important;
  font-weight: 400 !important;
  word-wrap: break-word !important;
}

body.single-post .entry-content p {
  margin-bottom: 1.4em !important;
}

body.single-post .entry-content h2 {
  font-size: 1.55rem !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin: 1.8em 0 0.8em 0 !important;
  padding-left: 14px !important;
  border-left: 4px solid #ff6600 !important;
  line-height: 1.4 !important;
}

body.single-post .entry-content h3 {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  margin: 1.5em 0 0.6em 0 !important;
  line-height: 1.4 !important;
}

body.single-post .entry-content h4 {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #374151 !important;
  margin: 1.3em 0 0.5em 0 !important;
  line-height: 1.4 !important;
}

body.single-post .entry-content a {
  color: #ff6600 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: color 0.2s ease !important;
}

body.single-post .entry-content a:hover {
  color: #d95300 !important;
  text-decoration: underline !important;
}

body.single-post .entry-content strong,
body.single-post .entry-content b {
  color: #111827 !important;
  font-weight: 600 !important;
}

body.single-post .entry-content ul,
body.single-post .entry-content ol {
  padding-left: 24px !important;
  margin-bottom: 1.4em !important;
}

body.single-post .entry-content li {
  margin-bottom: 8px !important;
  line-height: 1.75 !important;
}

body.single-post .entry-content blockquote {
  background: #fff8f2 !important;
  border-left: 4px solid #ff6600 !important;
  padding: 18px 24px !important;
  border-radius: 0 10px 10px 0 !important;
  margin: 24px 0 !important;
  font-style: italic !important;
  color: #4b5563 !important;
}

/* HÌNH ẢNH TRONG BÀI VIẾT */
body.single-post .entry-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 10px !important;
  display: block !important;
  margin: 20px auto !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

body.single-post .entry-content figure {
  margin: 24px auto !important;
}

body.single-post .entry-content figcaption {
  text-align: center !important;
  font-size: 0.88rem !important;
  color: #6b7280 !important;
  margin-top: 8px !important;
  font-style: italic !important;
}

body.single-post .entry-content iframe {
  max-width: 100% !important;
  border-radius: 12px !important;
  display: block !important;
  margin: 20px auto !important;
}

/* ==========================================================================
   4. SIDEBAR CHUYÊN NGHIỆP (#SECONDARY)
   ========================================================================== */

/* Card Hotline & Báo Giá Nhanh Kaya trong Sidebar */
.kaya-sidebar-cta {
  background: linear-gradient(145deg, #1f2229 0%, #111317 100%) !important;
  border: 1px solid rgba(255, 102, 0, 0.35) !important;
  border-radius: 14px !important;
  padding: 24px 20px !important;
  margin-bottom: 24px !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
  text-align: center;
}

.kaya-sidebar-cta-badge {
  display: inline-block;
  background: rgba(255, 102, 0, 0.2);
  color: #ff6600;
  border: 1px solid rgba(255, 102, 0, 0.4);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.kaya-sidebar-cta-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.kaya-sidebar-cta-desc {
  font-size: 13px;
  color: #9ca3af;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.kaya-sidebar-cta-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ff6600;
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(255, 102, 0, 0.35);
}

.kaya-sidebar-cta-phone:hover {
  background: #e65c00;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 102, 0, 0.45);
}

.kaya-sidebar-cta-phone svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.kaya-sidebar-cta-zalo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb !important;
  text-decoration: none !important;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.kaya-sidebar-cta-zalo:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff !important;
}

.kaya-sidebar-cta-zalo img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Các Widget tiêu chuẩn của WordPress trong Sidebar */
body.single-post #secondary .widget,
body.single-post #secondary .widget_block {
  background: #ffffff !important;
  border: 1px solid #eef1f5 !important;
  border-radius: 14px !important;
  padding: 22px 20px !important;
  margin-bottom: 24px !important;
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.03) !important;
  box-sizing: border-box;
}

/* Tiêu đề Widget */
body.single-post #secondary .widget-title,
body.single-post #secondary .wp-block-heading {
  font-size: 15.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: #111827 !important;
  margin: 0 0 16px 0 !important;
  padding-bottom: 10px !important;
  border-bottom: 2px solid #f3f4f6 !important;
  position: relative !important;
}

body.single-post #secondary .widget-title::after,
body.single-post #secondary .wp-block-heading::after {
  content: '' !important;
  position: absolute !important;
  bottom: -2px !important;
  left: 0 !important;
  width: 36px !important;
  height: 2px !important;
  background: #ff6600 !important;
  border-radius: 2px !important;
}

/* Widget Search (Tìm kiếm) */
body.single-post #secondary .wp-block-search {
  margin-bottom: 0 !important;
}

body.single-post #secondary .wp-block-search__label {
  display: none !important;
}

body.single-post #secondary .wp-block-search__inside-wrapper {
  display: flex !important;
  gap: 8px !important;
  border: none !important;
  padding: 0 !important;
}

body.single-post #secondary .wp-block-search__input {
  flex: 1 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  background: #ffffff !important;
  color: #111827 !important;
  transition: all 0.2s ease !important;
  height: 42px !important;
}

body.single-post #secondary .wp-block-search__input:focus {
  border-color: #ff6600 !important;
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15) !important;
  outline: none !important;
}

body.single-post #secondary .wp-block-search__button {
  background: #ff6600 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 0 16px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  height: 42px !important;
  transition: background 0.2s ease !important;
}

body.single-post #secondary .wp-block-search__button:hover {
  background: #e65c00 !important;
}

/* Widget Bài viết mới nhất (Recent Posts) */
body.single-post #secondary .wp-block-latest-posts {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.single-post #secondary .wp-block-latest-posts li {
  padding: 10px 0 !important;
  border-bottom: 1px dashed #e5e7eb !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  line-height: 1.45 !important;
}

body.single-post #secondary .wp-block-latest-posts li:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

body.single-post #secondary .wp-block-latest-posts li:first-child {
  padding-top: 0 !important;
}

body.single-post #secondary .wp-block-latest-posts li::before {
  content: '▸' !important;
  color: #ff6600 !important;
  font-size: 13px !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}

body.single-post #secondary .wp-block-latest-posts__post-title {
  color: #374151 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

body.single-post #secondary .wp-block-latest-posts__post-title:hover {
  color: #ff6600 !important;
}

/* Widget Chuyên mục (Categories) */
body.single-post #secondary .wp-block-categories {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

body.single-post #secondary .wp-block-categories li {
  padding: 8px 0 !important;
  border-bottom: 1px solid #f3f4f6 !important;
}

body.single-post #secondary .wp-block-categories li:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

body.single-post #secondary .wp-block-categories a {
  color: #4b5563 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  transition: all 0.2s ease !important;
}

body.single-post #secondary .wp-block-categories a:hover {
  color: #ff6600 !important;
  padding-left: 4px !important;
}

/* Widget Lưu trữ (Archives) - Thanh cuộn gọn gàng */
body.single-post #secondary .wp-block-archives {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  padding-right: 6px !important;
}

body.single-post #secondary .wp-block-archives::-webkit-scrollbar {
  width: 4px;
}

body.single-post #secondary .wp-block-archives::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

body.single-post #secondary .wp-block-archives li {
  padding: 6px 0 !important;
  border-bottom: 1px solid #f3f4f6 !important;
}

body.single-post #secondary .wp-block-archives a {
  color: #4b5563 !important;
  font-size: 13.5px !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}

body.single-post #secondary .wp-block-archives a:hover {
  color: #ff6600 !important;
}

/* Ẩn widget bình luận rỗng */
body.single-post #secondary .widget:has(.no-comments) {
  display: none !important;
}
