/* =========================
   PROJECT CONTENT – BASE
   ========================= */

.project-content {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1f2937;
}
/* ===== GUIDE CONTENT SPACING ===== */

.project-content--guide {
  padding-left: 10px;
  padding-right: 10px;
}

/* =========================
   LIST WRAPPER
   ========================= */

.guide-list-view {
  display: flex;
  flex-direction: column;
}

/* =========================
   EACH ROW
   ========================= */


.guide-row {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 10px;
}

.guide-row-actions {
  display: flex;
  gap: 0px;
  align-self: start;
  margin-top: calc(1.2em + 25px);
}

.guide-row:last-child {
  border-bottom: none;
}

/* =========================
   CLICKABLE CONTENT (LEFT)
   ========================= */

.guide-row-content {
  flex: 1;
  min-width: 0;
  display: block;
  padding: 14px 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.guide-row-content:hover {
  background: #f9fafb;
}

/* =========================
   TITLE
   ========================= */

.guide-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: #111827;
}

/* =========================
   EXCERPT
   ========================= */

.guide-excerpt {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
  margin-bottom: 12px;
}

/* =========================
   META ROW (KEY FIX)
   ========================= */

.guide-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #9ca3af;

  margin-bottom: 8px;
}

/* ====LIST VIEW – META 2 ROWS ======= */
.meta-top {
  flex-wrap: nowrap;      /* luôn 1 dòng */
}

.meta-bottom {
  flex-wrap: wrap;        /* cho phép xuống dòng */
  row-gap: 4px;
}


/*=========================================*/


.guide-meta-info .function {
  color: #2563eb;
  font-weight: 500;
}

/* =========================
   META ACTIONS (RIGHT)
   ========================= */

.guide-meta-actions {
  display: inline-flex;
  align-items: center;
  margin-right: 0px;
  margin-left: 5px;
  flex-shrink: 0;
}

/* =========================
   ACTION BUTTON (FINAL)
   ========================= */

.guide-action-btn {
  height: 20px;
  min-width: 20px;
  padding: 0 10px;
  border-radius: 6px;
  border: none;
  background: #f3f4f6;
  color: #9ca3af;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

@media (min-width: 768px) {
  .guide-action-btn.like {
    margin-right: 5px !important;
}
}


/* LIKE */
.guide-action-btn.like::before {
  content: "\f487"; /* dashicons-heart */
  font-family: dashicons;
  font-size: 18px;
}

/* SHARE */
.guide-action-btn.share::before {
  content: "\f103"; /* dashicons-share */
  font-family: dashicons;
  font-size: 18px;
}

.guide-action-btn:hover {
  background: #e5e7eb;
  color: #005891;
}


.guide-action-btn.share.is-active {
  border-color: #D5EBD6;
  background: #C8E3F7;
  color: #005891;
}

.guide-action-btn.like.is-active {
  background: #C8E3F7;
  color: #ef4444;
}

@media (max-width: 768px) {
  .guide-row-actions {
    flex-direction: column;
    gap: 0px;
    align-items: flex-end;
  }

  .guide-action-btn.like {
      margin-bottom: 5px !important;

  }
  .guide-action-btn {
    width: 36px;
    height: 36px;
    margin-right: 3px;
  }
}


/* =========================
   GUIDE META (READ · VIEW · LIKE)
   ========================= */

.guide-meta {
  display: flex;
  gap: 3px;
  align-items: flex-start;
}

.guide-list-view .guide-meta {
  flex-direction: column;
}

.guide-meta .meta-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 3px;
  font-size: 12px;
  color: #6b7280;
}

.guide-meta .meta-view::before {
  content: "👁";
  font-size: 13px;
  line-height: 1;
}

.guide-meta .meta-like::before {
  content: "❤";
  font-size: 13px;
  line-height: 1;
  color: #ef4444;
}

.meta-created::before {
  content: "📆";
  margin-right: 4px;
}

.meta-updated::before {
  content: "📝";
  margin-right: 4px;
}


@media (max-width: 768px) {
.guide-excerpt {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.5;
  color: #6b7280;
  margin-bottom: 12px;
}

.guide-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.5;
  color: #111827;
}

}


@media (max-width: 768px) {

/* List view */
.guide-list-view .guide-row {
  border-bottom: 1px solid #e5e7eb;
}

/* Grid view (sau này) */
.guide-grid-view .guide-row {
  border-bottom: none;
}
}


/* FUNCTION META */
.meta-function {
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  padding: 2px 6px;
  border-radius: 6px;
}



/* ==============================
   SINGLE GUIDE – COMMENT SEPARATION
============================== */

/* Nếu muốn cao cấp hơn (UX rõ ràng hơn)
Dùng background khác:*/

.single-guide .comments-area {
  margin-top: 50px;
  padding: 20px 20px;
  background: #fafafa;
  border-radius: 8px;
}

/* title comment */
.single-guide .comments-area .comments-title {
  margin-bottom: 28px;
  font-size: 18px;
  font-weight: 600;
}

/* form spacing */
.single-guide .comment-respond {
  margin-top: 20px;
}

/* ==============================
   SINGLE GUIDE – SIMPLE DIVIDER
============================== */

.single-guide .guide-end-divider {
  margin: 20px 0 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}



/* ==============================
   GUIDE RAIL – COMMENT CTA
============================== */

.project-meta-rail--guide .guide-rail-comment {
  margin-top: 24px;
  text-align: center;
}

.project-meta-rail--guide .guide-rail-divider {
  border: none;
  border-top: 1px solid #999896;
  margin: 20px 0;
}

.project-meta-rail--guide .guide-rail-comment-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 6px;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #374151;
  transition: all .2s ease;
}

.project-meta-rail--guide .guide-rail-comment-btn:hover {
  background: #8BDCAA;
  color: #273955;
}

html {
  scroll-behavior: smooth;
}


/* ==============================
   RELATED GUIDES
============================== */

/* Title */
.single-guide .guide-related-title {
  display: block;
  margin-bottom: 6px;
}

/* Meta 1 hàng */
.single-guide .guide-related-meta {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 14px;
  margin-bottom: 17px;
}

/* Meta item phải là inline-flex */
.single-guide .guide-related-meta .meta-item {
  display: inline-flex !important;
  align-items: center;
}

.single-guide .guide-related-title {
  display: block;
  margin-bottom: 6px;
  border-left: 3px solid #e5e7eb;
  padding-left: 12px;
  transition: border-color .2s ease;
}

.single-guide .guide-related-item:hover .guide-related-title {
  border-color: #0087C8;
}

.single-guide .guide-related-meta .meta-item {
  gap: 2px;
}


/* ==============================
   MOBILE – RELATED GUIDES SCALE UP
============================== */

@media (max-width: 768px) {

  /* "Các bài liên quan" */
  .single-guide .guide-related-heading {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 24px;
  }

  /* Title từng guide */
  .single-guide .guide-related-title {
    font-size: 19px;
    line-height: 1.4;
  }

  .single-guide .guide-related-meta {
    gap: 6px;
  }

  .single-guide .guide-related-meta .meta-item {
    font-size: 12px;
  }

}


/* ==============================
   GUIDE HEADER META – PRO STYLE
============================== */

.guide-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 14px;
  color: #6b7280;
}

/* Dấu chấm phân cách tự động */
.guide-header-meta .meta-item:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: #cbd5e1;
}

/* Function badge */
.guide-header-meta .meta-function {
  font-weight: 600;
  color: #374151;
}

/* Version */
.guide-header-meta .meta-version {
  color: #334155;
}

/* Author */
.guide-header-meta .meta-author {
  font-weight: 500;
}

/* Mobile tối ưu */
@media (max-width: 768px) {
  .guide-header-meta {
    font-size: 13px;
    gap: 4px;
  }
}

/* CSS đọc bài guide */
.voice-highlight {
  background: #fff59d;
}


/* ===== FIX BULLET TRONG GUIDE CONTENT ===== */

.guide-content ul,
.guide-content ol {
  margin: 1em 0;
  padding-left: 30px;   /* 🔥 khôi phục độ thụt vào */
}

.guide-content li {
  margin-bottom: 6px;
}

.guide-content table {
  margin: 1em 0;
  margin-left: 15px;
  border-collapse: collapse;
}

.guide-content th,
.guide-content td {
  padding: 8px 10px;
}


