/*
Theme Name: Theme NhaNong
Theme URI: https://nhanonghoc.com/
Author: NhaNong Team
Author URI: https://nhanonghoc.com/
Description: WordPress theme chuyển đổi từ giao diện tĩnh NhaNongHoc, tối ưu cho WordPress 6.x.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: theme-nhanong
*/

:root {
  --container-max: 80rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

img {
  display: block;
  height: auto;
  max-width: 100%;
}

a {
  text-decoration: none;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #eee;
  clip: auto !important;
  clip-path: none;
  color: #444;
  display: block;
  font-size: 1em;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Single post reading experience */
.nhh-single-page {
  background: #eef8fc;
  color: #061f2b;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nhh-single-container {
  margin: 0 auto;
  max-width: 1180px;
  padding-left: 24px;
  padding-right: 24px;
}

.nhh-single-hero {
  background:
    radial-gradient(circle at 85% 0%, rgba(178, 242, 171, 0.28), transparent 34%),
    linear-gradient(180deg, #eef8fc 0%, #e5f5fb 100%);
  padding: 36px 0 56px;
}

.nhh-single-kicker {
  align-items: center;
  color: #5b6a62;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
  gap: 10px;
  margin-top: 30px;
}

.nhh-single-kicker span,
.nhh-single-category {
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(7, 30, 39, 0.06);
  color: #5b6a62;
  padding: 9px 14px;
}

.nhh-single-category {
  background: #0d631b;
  color: #ffffff;
  text-transform: uppercase;
}

.nhh-single-title {
  color: #061f2b;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: clamp(2rem, 3.35vw, 3.25rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.12;
  margin: 22px 0 0;
  max-width: 100%;
}

.nhh-single-excerpt {
  color: #405149;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.7;
  margin: 22px 0 0;
  max-width: 780px;
}

.nhh-single-author {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-top: 30px;
}

.nhh-single-author-avatar {
  align-items: center;
  background: #d8f7df;
  border: 4px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(7, 30, 39, 0.12);
  color: #0d631b;
  display: flex;
  flex: 0 0 58px;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 800;
  height: 58px;
  justify-content: center;
  overflow: hidden;
  width: 58px;
}

.nhh-single-author-avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.nhh-single-author strong,
.nhh-single-author span {
  display: block;
}

.nhh-single-author strong {
  color: #061f2b;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 17px;
}

.nhh-single-author span {
  color: #657169;
  font-size: 13px;
  margin-top: 3px;
}

.nhh-single-featured-wrap {
  margin-top: -54px;
}

.nhh-single-featured {
  background: #ffffff;
  border: 1px solid rgba(6, 31, 43, 0.08);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(7, 30, 39, 0.11);
  margin: 0;
  overflow: hidden;
}

.nhh-single-featured img {
  height: auto;
  object-fit: contain;
  width: 100%;
}

.nhh-single-caption {
  color: #66746d;
  font-size: 14px;
  font-style: italic;
  margin-top: 14px;
  text-align: center;
}

.nhh-single-body-wrap {
  padding: 42px 0 70px;
}

.nhh-single-layout {
  align-items: start;
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.nhh-single-article {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 18px 54px rgba(7, 30, 39, 0.07);
  padding: clamp(24px, 4vw, 46px);
}

.nhh-single-content {
  color: #233026;
  font-size: 18px;
  line-height: 1.88;
}

.nhh-single-content > *:first-child {
  margin-top: 0;
}

.nhh-single-content > *:last-child {
  margin-bottom: 0;
}

.nhh-single-content p,
.nhh-single-content ul,
.nhh-single-content ol,
.nhh-single-content blockquote,
.nhh-single-content table,
.nhh-single-content figure {
  margin-bottom: 1.45em;
}

.nhh-single-content h2,
.nhh-single-content h3,
.nhh-single-content h4 {
  color: #061f2b;
  font-family: "Work Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 2em 0 0.75em;
}

.nhh-single-content h2 {
  color: #0d631b;
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.nhh-single-content h3 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.nhh-single-content h4 {
  font-size: 1.2rem;
}

.nhh-single-content a {
  color: #0d631b;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.nhh-single-content ul,
.nhh-single-content ol {
  padding-left: 1.45rem;
}

.nhh-single-content li {
  padding-left: 0.25rem;
}

.nhh-single-content li + li {
  margin-top: 0.45rem;
}

.nhh-single-content blockquote {
  background: #e6f6ff;
  border-left: 6px solid #0d631b;
  border-radius: 1.25rem;
  color: #061f2b;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 1.08em;
  font-weight: 700;
  line-height: 1.65;
  padding: 1.35rem 1.6rem;
}

.nhh-single-content blockquote p:last-child {
  margin-bottom: 0;
}

.nhh-single-content img {
  border-radius: 1.4rem;
  box-shadow: 0 20px 60px rgba(7, 30, 39, 0.12);
  height: auto;
  margin: 2rem auto;
  max-width: 100%;
  width: auto;
}

.nhh-single-content img.size-full,
.nhh-single-content .wp-block-image img {
  width: auto;
}

.nhh-single-content figure {
  margin-left: 0;
  margin-right: 0;
}

.nhh-single-content figcaption {
  color: #63706a;
  font-size: 0.9rem;
  margin-top: 0.8rem;
  text-align: center;
}

.nhh-single-content table {
  border-collapse: collapse;
  border-radius: 1rem;
  box-shadow: 0 0 0 1px rgba(6, 31, 43, 0.08);
  display: block;
  overflow-x: auto;
  width: 100%;
}

.nhh-single-content th,
.nhh-single-content td {
  border: 1px solid rgba(6, 31, 43, 0.08);
  padding: 0.85rem 1rem;
  text-align: left;
}

.nhh-single-content th {
  background: #dff2fb;
  color: #061f2b;
  font-weight: 800;
}

.nhh-single-content .wp-caption {
  max-width: 100%;
}

.nhh-single .page-links {
  border-top: 1px solid rgba(6, 31, 43, 0.08);
  font-weight: 700;
  margin-top: 2rem;
  padding-top: 1rem;
}

.nhh-single-tags {
  border-top: 1px solid rgba(6, 31, 43, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
  padding-top: 24px;
}

.nhh-single-tags span,
.nhh-single-tags a {
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 14px;
}

.nhh-single-tags span {
  color: #657169;
  text-transform: uppercase;
}

.nhh-single-tags a {
  background: #e6f6ff;
  color: #0d631b;
}

.nhh-single-sidebar {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 96px;
}

.nhh-single-box,
.nhh-single-cta {
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(7, 30, 39, 0.08);
  padding: 24px;
}

.nhh-single-box {
  background: #ffffff;
}

.nhh-single-box h2,
.nhh-single-cta h2 {
  color: #061f2b;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 18px;
}

.nhh-single-meta-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.nhh-single-meta-list div {
  border-bottom: 1px solid rgba(6, 31, 43, 0.08);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 13px 0;
}

.nhh-single-meta-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.nhh-single-meta-list dt,
.nhh-single-meta-list dd {
  margin: 0;
}

.nhh-single-meta-list dt {
  color: #66746d;
}

.nhh-single-meta-list dd {
  color: #061f2b;
  font-weight: 800;
  text-align: right;
}

.nhh-single-cta {
  background: #0d631b;
  color: #ffffff;
}

.nhh-single-cta span {
  color: #b2f2ab;
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.nhh-single-cta h2 {
  color: #ffffff;
}

.nhh-single-cta p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  margin: 0;
}

.nhh-single-cta a {
  background: #ffffff;
  border-radius: 12px;
  color: #0d631b;
  display: inline-flex;
  font-weight: 800;
  margin-top: 20px;
  padding: 12px 18px;
}

.nhh-single-recent-list {
  display: grid;
  gap: 18px;
}

.nhh-single-recent {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 78px minmax(0, 1fr);
}

.nhh-single-recent-thumb {
  background: #dff2fb;
  border-radius: 14px;
  height: 78px;
  overflow: hidden;
}

.nhh-single-recent-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.nhh-single-recent strong {
  color: #061f2b;
  display: block;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

.nhh-single-recent span {
  color: #718078;
  display: block;
  font-size: 12px;
  margin-top: 6px;
}

.nhh-single-related-section {
  background: #e5f5fb;
  padding: 70px 0;
}

.nhh-single-section-label {
  color: #0d631b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.nhh-single-section-title {
  color: #061f2b;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 30px;
}

.nhh-single-related-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nhh-single-related-card {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 18px 60px rgba(7, 30, 39, 0.08);
  color: inherit;
  overflow: hidden;
}

.nhh-single-related-thumb {
  background: #dff2fb;
  height: 210px;
  overflow: hidden;
}

.nhh-single-related-thumb img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  width: 100%;
}

.nhh-single-related-card:hover .nhh-single-related-thumb img {
  transform: scale(1.05);
}

.nhh-single-related-content {
  padding: 22px;
}

.nhh-single-related-content h3 {
  color: #061f2b;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 21px;
  line-height: 1.22;
  margin: 0;
}

.nhh-single-related-content p {
  color: #5d6b64;
  font-size: 14px;
  line-height: 1.65;
  margin: 12px 0 0;
}

.nhh-single-comments {
  background: #eef8fc;
  padding: 60px 0;
}

@media (max-width: 767px) {
  .nhh-single-container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nhh-single-hero {
    padding: 30px 0 58px;
  }

  .nhh-single-kicker {
    margin-top: 22px;
  }

  .nhh-single-featured {
    border-radius: 18px;
  }

  .nhh-single-featured img {
    max-height: none;
  }

  .nhh-single-body-wrap {
    padding: 42px 0 54px;
  }

  .nhh-single-layout,
  .nhh-single-related-grid {
    grid-template-columns: 1fr;
  }

  .nhh-single-sidebar {
    position: static;
  }

  .nhh-single-article {
    border-radius: 22px;
  }

  .nhh-single-content {
    font-size: 16px;
    line-height: 1.78;
  }

  .nhh-single-content blockquote {
    padding: 1.15rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .nhh-single-layout,
  .nhh-single-related-grid {
    grid-template-columns: 1fr;
  }

  .nhh-single-sidebar {
    position: static;
  }
}

/* Shared category archive design */
.nhh-category-page {
  background: #eef8fc;
  color: #061f2b;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.nhh-category-container {
  margin: 0 auto;
  max-width: 1180px;
  padding-left: 24px;
  padding-right: 24px;
}

.nhh-category-hero {
  background:
    radial-gradient(circle at 88% 15%, rgba(179, 242, 171, 0.34), transparent 34%),
    linear-gradient(180deg, #eef8fc 0%, #e3f4fb 100%);
  padding: 54px 0 46px;
}

.nhh-category-hero-grid {
  align-items: end;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1fr) 280px;
  margin-top: 26px;
}

.nhh-category-eyebrow {
  color: #0d631b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.nhh-category-hero h1 {
  color: #061f2b;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: clamp(2.6rem, 6vw, 5.25rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
  max-width: 840px;
}

.nhh-category-description {
  color: #405149;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.75;
  margin-top: 22px;
  max-width: 720px;
}

.nhh-category-description p {
  margin: 0;
}

.nhh-category-stat {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(7, 30, 39, 0.08);
  padding: 28px;
}

.nhh-category-stat span {
  color: #0d631b;
  display: block;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
}

.nhh-category-stat p {
  color: #66746d;
  font-weight: 600;
  line-height: 1.45;
  margin: 10px 0 0;
}

.nhh-category-filter-wrap {
  background: #e3f4fb;
  padding: 0 0 30px;
}

.nhh-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nhh-category-filter a {
  background: #d8effa;
  border-radius: 999px;
  color: #0d631b;
  font-size: 14px;
  font-weight: 800;
  padding: 12px 20px;
}

.nhh-category-filter a.is-active,
.nhh-category-filter a:hover {
  background: #0d631b;
  color: #ffffff;
}

.nhh-category-content {
  padding: 50px 0 76px;
}

.nhh-category-layout {
  align-items: start;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.nhh-category-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nhh-category-card {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 18px 54px rgba(7, 30, 39, 0.07);
  overflow: hidden;
}

.nhh-category-card-featured {
  grid-column: 1 / -1;
}

.nhh-category-card-link {
  color: inherit;
  display: grid;
  height: 100%;
}

.nhh-category-card-featured .nhh-category-card-link {
  grid-template-columns: 1.08fr 0.92fr;
}

.nhh-category-card-media {
  background: #dff2fb;
  min-height: 230px;
  overflow: hidden;
}

.nhh-category-card-featured .nhh-category-card-media {
  min-height: 380px;
}

.nhh-category-card-media img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
  width: 100%;
}

.nhh-category-card:hover .nhh-category-card-media img {
  transform: scale(1.045);
}

.nhh-category-card-body {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.nhh-category-card-featured .nhh-category-card-body {
  justify-content: center;
  padding: 34px;
}

.nhh-category-card-meta {
  align-items: center;
  color: #6b5a52;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.nhh-category-card-meta span {
  color: #0d631b;
}

.nhh-category-card h2 {
  color: #061f2b;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.16;
  margin: 0;
}

.nhh-category-card-featured h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.nhh-category-card p {
  color: #5e6b64;
  font-size: 15px;
  line-height: 1.7;
  margin: 16px 0 0;
}

.nhh-category-readmore {
  color: #0d631b;
  font-weight: 800;
  margin-top: 22px;
}

.nhh-category-readmore::after {
  content: " ->";
}

.nhh-category-pagination {
  margin-top: 38px;
}

.nhh-category-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.nhh-category-pagination .page-numbers {
  align-items: center;
  background: #d8effa;
  border-radius: 12px;
  color: #0d631b;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  min-width: 42px;
  padding: 0 14px;
}

.nhh-category-pagination .page-numbers.current {
  background: #0d631b;
  color: #ffffff;
}

.nhh-category-empty,
.nhh-category-sidebox {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 18px 54px rgba(7, 30, 39, 0.07);
  padding: 26px;
}

.nhh-category-empty h2,
.nhh-category-sidebox h2 {
  color: #061f2b;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 18px;
}

.nhh-category-empty p {
  color: #5e6b64;
  margin: 0;
}

.nhh-category-sidebar {
  display: grid;
  gap: 22px;
  position: sticky;
  top: 94px;
}

.nhh-category-sidebox input {
  background: #d8effa;
  border: 0;
  border-radius: 14px;
  color: #061f2b;
  font: inherit;
  outline: none;
  padding: 15px 16px;
  width: 100%;
}

.nhh-category-sidebox input:focus {
  box-shadow: 0 0 0 3px rgba(13, 99, 27, 0.18);
}

.nhh-category-latest {
  display: grid;
  gap: 16px;
}

.nhh-category-latest a {
  align-items: center;
  color: inherit;
  display: grid;
  gap: 13px;
  grid-template-columns: 72px minmax(0, 1fr);
}

.nhh-category-latest div {
  background: #dff2fb;
  border-radius: 14px;
  height: 72px;
  overflow: hidden;
}

.nhh-category-latest img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.nhh-category-latest span {
  color: #061f2b;
  font-family: "Work Sans", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.nhh-category-list {
  display: grid;
  gap: 10px;
}

.nhh-category-list a {
  align-items: center;
  background: #eef8fc;
  border-radius: 14px;
  color: #061f2b;
  display: flex;
  font-weight: 700;
  justify-content: space-between;
  padding: 13px 14px;
}

.nhh-category-list a:hover {
  background: #0d631b;
  color: #ffffff;
}

.nhh-category-list strong {
  color: inherit;
}

@media (max-width: 1023px) {
  .nhh-category-hero-grid,
  .nhh-category-layout,
  .nhh-category-card-featured .nhh-category-card-link {
    grid-template-columns: 1fr;
  }

  .nhh-category-sidebar {
    position: static;
  }
}

@media (max-width: 767px) {
  .nhh-category-container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nhh-category-hero {
    padding: 36px 0 28px;
  }

  .nhh-category-filter-wrap {
    padding-bottom: 22px;
  }

  .nhh-category-content {
    padding: 34px 0 52px;
  }

  .nhh-category-grid {
    grid-template-columns: 1fr;
  }

  .nhh-category-card-featured .nhh-category-card-media,
  .nhh-category-card-media {
    min-height: 230px;
  }

  .nhh-category-card-featured .nhh-category-card-body,
  .nhh-category-card-body {
    padding: 22px;
  }
}
