/* Xưởng Làm Mộc: retain the existing homepage, menu and sidebar structure. */

body.home .xlm-hero .xlm-hero-content {
  padding-right: clamp(20px, 4vw, 56px);
  padding-left: clamp(20px, 4vw, 56px);
}

body.home .xlm-blog-all {
  margin-top: 34px;
  text-align: center;
}

body.home .xlm-blog-all a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 23px;
  border: 1px solid #8b5941;
  border-radius: 7px;
  color: #77452f;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

body.home .xlm-blog-all a:hover,
body.home .xlm-blog-all a:focus-visible {
  background: #7a4a34;
  color: #fff;
}

#masthead .nav > li > a:focus-visible,
#main-menu .nav-sidebar a:focus-visible {
  outline: 3px solid #b47d5b;
  outline-offset: 3px;
}

/* Keep the established sidebar on larger screens and make its widgets useful. */
body.single-post .post-sidebar #secondary .widget,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary .widget {
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid #e5ddd0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(47, 39, 27, .045);
}

body.single-post .post-sidebar #secondary #block-4,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary #block-4 {
  display: none;
}

body.single-post .post-sidebar #secondary h2,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary h2 {
  margin: 0 0 15px;
  color: #2e4739;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.4;
  text-transform: none;
}

body.single-post .post-sidebar #secondary .wp-block-search__label,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary .wp-block-search__label {
  display: block;
  margin-bottom: 12px;
  color: #2e4739;
  font-size: 18px;
  font-weight: 750;
}

body.single-post .post-sidebar #secondary .wp-block-search__inside-wrapper,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary .wp-block-search__inside-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.single-post .post-sidebar #secondary .wp-block-search__input,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary .wp-block-search__input {
  min-width: 0;
  flex: 1 1 100%;
  height: 43px;
  margin: 0;
  border: 1px solid #d8d4cb;
  border-radius: 6px;
  background: #faf9f6;
  font-size: 14px;
}

body.single-post .post-sidebar #secondary .wp-block-search__button,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary .wp-block-search__button {
  min-height: 40px;
  margin: 0;
  padding: 8px 17px;
  border-radius: 6px;
  background: #31513f;
  color: #fff;
  font-size: 13px;
  text-transform: none;
}

body.single-post .post-sidebar #secondary .wp-block-latest-posts,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary .wp-block-latest-posts {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.single-post .post-sidebar #secondary .wp-block-latest-posts li,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary .wp-block-latest-posts li {
  margin: 0;
  padding: 11px 0;
  border-top: 1px solid #eee9e0;
  font-size: 13.5px;
  line-height: 1.55;
}

body.single-post .post-sidebar #secondary .wp-block-latest-posts a,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary .wp-block-latest-posts a {
  color: #385143;
  text-decoration: none;
}

body.single-post .post-sidebar #secondary .wp-block-latest-posts a:hover,
:is(body.category-kinh-nghiem-noi-that, body.search) .post-sidebar #secondary .wp-block-latest-posts a:hover {
  color: #8c563b;
  text-decoration: underline;
}

/* The category is a reading index, not a second service landing page. */
:is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive.page-wrapper {
  padding: 42px 20px 76px;
  background: #f7f5f0;
}

:is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive .archive-page-header {
  max-width: 1200px;
  margin: 0 auto 0;
  padding: 33px 40px 22px;
  border-top: 5px solid #a87350;
  border-right: 1px solid #e7dfd3;
  border-left: 1px solid #e7dfd3;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, #f1ede5, #fbf8f3);
}

:is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive .archive-page-header > .row {
  display: block;
  max-width: none;
  margin: 0;
}

:is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive .archive-page-header .col {
  padding: 0;
  text-align: left;
}

:is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive .page-title {
  margin: 0;
  color: #293f34;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 750;
  line-height: 1.28;
  letter-spacing: -.025em;
  text-transform: none;
}

:is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive .xlm-archive-intro {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 40px 31px;
  border-right: 1px solid #e7dfd3;
  border-bottom: 1px solid #e7dfd3;
  border-left: 1px solid #e7dfd3;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(135deg, #f1ede5, #fbf8f3);
}

:is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive .xlm-archive-intro p {
  max-width: 74ch;
  margin: 0;
  color: #5a615a;
  font-size: 16px;
  line-height: 1.75;
}

:is(body.category-kinh-nghiem-noi-that, body.search).paged .blog-archive .archive-page-header {
  margin-bottom: 32px;
  padding-bottom: 33px;
  border-bottom: 1px solid #e7dfd3;
  border-radius: 16px;
}

:is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive > .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

:is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive > .row > .large-9.col,
:is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive > .row > .large-3.col {
  width: auto;
  max-width: none;
  min-width: 0;
  flex-basis: auto;
  padding: 0;
  border: 0;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list > article {
  min-width: 0;
  margin: 0;
  border: 1px solid #e7dfd3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 25px rgba(47, 39, 27, .045);
  overflow: hidden;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list > article .article-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 25px 25px 22px;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-header-text {
  padding: 0;
  text-align: left;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-category,
:is(body.category-kinh-nghiem-noi-that, body.search) #post-list footer.entry-meta,
:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-meta .byline {
  display: none;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-title {
  margin: 0;
  color: #2c4336;
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
  text-transform: none;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-title a {
  color: inherit;
  text-decoration: none;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-title a:hover {
  color: #8c563b;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-divider {
  width: 42px;
  height: 2px;
  margin: 18px 0 12px;
  background: #b7825b;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .posted-on {
  font-size: 0;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .posted-on a {
  color: #746d62;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-transform: none;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .posted-on a::before {
  content: "Ngày đăng: ";
  color: #8a5a41;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-content {
  flex: 1;
  padding-top: 18px;
  color: #515951;
  font-size: 14px;
  line-height: 1.7;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-summary {
  display: flex;
  flex-direction: column;
  height: 100%;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-summary p {
  margin: 0 0 22px;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .entry-summary > div {
  margin-top: auto;
  text-align: left;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .more-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #875137;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list .more-link:hover {
  color: #31513f;
  text-decoration: underline;
}

:is(body.category-kinh-nghiem-noi-that, body.search) #post-list > .nav-pagination {
  grid-column: 1 / -1;
  margin: 16px 0 0;
}

@media (max-width: 959px) {
  :is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive > .row {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
  }

  :is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive > .row > .post-sidebar {
    display: none;
  }
}

@media (max-width: 680px) {
  :is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive.page-wrapper {
    padding: 22px 12px 52px;
  }

  :is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive .archive-page-header {
    padding: 27px 23px 14px;
  }

  :is(body.category-kinh-nghiem-noi-that, body.search) .blog-archive .xlm-archive-intro {
    padding: 0 23px 24px;
  }

  :is(body.category-kinh-nghiem-noi-that, body.search) #post-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }

  :is(body.category-kinh-nghiem-noi-that, body.search) #post-list > article .article-inner {
    padding: 23px;
  }

  body.home .xlm-hero .xlm-wood-text {
    color: #efb48e;
  }
}

/* Search keeps the same reading layout; an empty query gets a clear next step. */
body.search .blog-archive .archive-page-header {
  margin-bottom: 32px;
  padding-bottom: 33px;
  border-bottom: 1px solid #e7dfd3;
  border-radius: 16px;
}
body.search .blog-archive .no-results {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid #e7dfd3;
  border-radius: 14px;
  background: #fff;
}
body.search .blog-archive .no-results h2 {
  color: #2c4336;
  font-size: 23px;
  text-transform: none;
}
body.search .blog-archive .no-results p {
  color: #515951;
  line-height: 1.7;
}
body.search .blog-archive .no-results .searchform { max-width: 480px; }
