.resources-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 34px;
}

.resources-hero::before {
  content: "บทความ";
  position: absolute;
  right: -3vw;
  top: 8px;
  color: rgba(180, 71, 31, 0.06);
  font-family: "Noto Serif Thai", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(5rem, 12vw, 12rem);
  line-height: 0.9;
  pointer-events: none;
}

.resources-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.46fr);
  gap: 42px;
  align-items: start;
}

.resources-hero h1,
.resources-toolbar h2,
.resources-article-hero h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.06;
}

.resources-hero h1 {
  max-width: 780px;
  font-size: clamp(3.5rem, 6vw, 6.4rem);
}

.resource-hero-topics {
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid rgba(33, 31, 27, 0.12);
  background: rgba(255, 250, 242, 0.72);
  box-shadow: 0 18px 48px rgba(33, 31, 27, 0.06);
}

.resource-hero-topics > span {
  color: var(--lacquer);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.resource-topic-grid,
.resource-hero-topics .resource-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 10px;
}

.resource-hero-topics a,
.resource-topic-list a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 780;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.resource-hero-topics a {
  padding: 0 12px 0 14px;
}

.resource-hero-topics a span,
.resource-topic-list a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-hero-topics a:hover,
.resource-hero-topics a.is-active,
.resource-topic-list a:hover,
.resource-topic-list a.is-active {
  border-color: rgba(180, 71, 31, 0.42);
  background: rgba(180, 71, 31, 0.07);
  color: var(--lacquer);
}

.resource-hero-topics a:hover {
  transform: translateY(-1px);
}

.resource-hero-topics .resource-topic-all,
.resource-topic-list .resource-topic-all {
  display: inline-flex;
  border: 1px solid rgba(180, 71, 31, 0.34);
  background: rgba(180, 71, 31, 0.08);
  color: var(--lacquer);
  text-transform: uppercase;
}

.resource-hero-topics em,
.resource-topic-list em {
  display: inline-grid;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  place-items: center;
  border: 1px solid rgba(180, 71, 31, 0.18);
  background: rgba(180, 71, 31, 0.08);
  color: var(--lacquer);
  font-size: 0.78rem;
  font-weight: 900;
  font-style: normal;
  line-height: 1;
}

.resources-hero-feature {
  display: grid;
  gap: 12px;
  margin-top: 34px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.resources-hero-feature img {
  width: 100%;
  aspect-ratio: 1.18;
  object-fit: cover;
  background: var(--porcelain);
}

.resources-hero-feature span,
.resource-meta a,
.resource-meta span,
.resource-meta time {
  color: var(--lacquer);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.resources-hero-feature strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
}

.resources-shell,
.resources-article-shell {
  padding: 28px 0 88px;
}

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

.resources-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 25px 28px;
  border: 1px solid var(--line);
  background: var(--white);
}

.resources-toolbar h2 {
  font-size: clamp(2.2rem, 3.8vw, 4rem);
}

.resources-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-list {
  display: grid;
  gap: 16px;
}

.resource-card {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  border: 1px solid var(--line);
  background: var(--white);
}

.resource-card-image {
  display: block;
  width: 236px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--porcelain);
}

.resource-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
}

.resource-card-body {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 11px;
  min-height: 236px;
  padding: 22px 26px;
}

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.resource-meta a,
.resources-article-heading .kicker a {
  color: var(--lacquer);
  text-decoration: none;
}

.resource-meta a:hover,
.resources-article-heading .kicker a:hover {
  color: var(--ink);
}

.resource-meta time {
  color: rgba(33, 31, 27, 0.56);
}

.resource-card h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 2.1vw, 2.35rem);
  font-weight: 500;
  line-height: 1.02;
}

.resource-card h2 a {
  display: -webkit-box;
  overflow: hidden;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.resource-card h2 a:hover {
  color: var(--lacquer);
}

.resource-card p {
  display: -webkit-box;
  max-width: 700px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.96rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.text-link {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.text-link:hover {
  color: var(--lacquer);
}

.resources-sidebar {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 16px;
}

.resource-side-card {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--white);
}

.resource-side-card .kicker {
  margin-bottom: 14px;
}

.resource-featured-card a {
  display: grid;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.resource-featured-card img {
  width: 100%;
  aspect-ratio: 1.18;
  object-fit: cover;
  background: var(--porcelain);
}

.resource-featured-card span {
  color: var(--lacquer);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.resource-featured-card strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1;
}

.resource-side-list {
  display: grid;
  gap: 0;
}

.resource-side-list a {
  display: grid;
  gap: 4px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.resource-side-list a:first-child {
  border-top: 0;
  padding-top: 0;
}

.resource-side-list span {
  color: rgba(33, 31, 27, 0.55);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resource-side-list strong {
  font-size: 0.94rem;
  line-height: 1.35;
}

.resource-side-list a:hover strong {
  color: var(--lacquer);
}

.resource-topic-list,
.resource-course-list {
  display: grid;
  gap: 8px;
}

.resource-topic-list .resource-topic-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

.resource-topic-list a {
  padding: 0 10px 0 12px;
  min-height: 42px;
  font-size: 0.84rem;
}

.resource-course-list a {
  display: grid;
  gap: 4px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.resource-course-list a:first-child {
  border-top: 0;
  padding-top: 0;
}

.resource-course-list span {
  color: rgba(33, 31, 27, 0.55);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resource-course-list strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
}

.resource-course-list a:hover strong {
  color: var(--lacquer);
}

.resource-side-list.compact a {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.resource-side-list.compact em {
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  font-style: normal;
  line-height: 1;
}

.resources-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--white);
}

.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
}

.resources-pagination a,
.resources-pagination span {
  display: inline-grid;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.resources-pagination a:hover,
.resources-pagination .page-current {
  border-color: var(--lacquer);
  background: var(--lacquer);
  color: var(--paper);
}

.resources-pagination .page-gap,
.resources-pagination .disabled {
  color: rgba(33, 31, 27, 0.42);
}

.resources-pagination .page-step {
  min-width: 104px;
  padding: 0 14px;
}

.resources-article-hero {
  padding: 48px 0 34px;
}

.resources-article-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 0.72fr);
  gap: 56px;
  align-items: start;
}

.resources-article-hero-text-only .resources-article-hero-grid {
  grid-template-columns: minmax(0, 920px);
}

.resources-article-hero-text-only .resources-article-heading {
  padding-bottom: 10px;
}

.resources-article-heading {
  min-width: 0;
}

.resources-article-hero h1 {
  max-width: 760px;
  font-size: clamp(3rem, 5.4vw, 5.8rem);
}

.resource-back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--lacquer);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.article-meta {
  margin-top: 24px;
}

.resources-article-body {
  border: 1px solid var(--line);
  background: var(--white);
}

.resources-article-visual {
  position: relative;
  justify-self: end;
  width: min(100%, 540px);
  margin-top: 86px;
}

.resources-article-visual::before {
  content: "";
  position: absolute;
  top: 22px;
  right: -18px;
  width: 86%;
  height: 88%;
  border: 1px solid rgba(33, 31, 27, 0.12);
  background: var(--porcelain);
}

.article-featured-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: clamp(340px, 32vw, 430px);
  object-fit: cover;
  object-position: center center;
  background: var(--porcelain);
  box-shadow: var(--shadow);
}

.resource-article-content {
  padding: 34px;
}

.resource-article-content > *:first-child {
  margin-top: 0;
}

.resource-article-content > *:last-child {
  margin-bottom: 0;
}

.resource-article-content p,
.resource-article-content li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.78;
}

.resource-article-content p {
  margin: 0 0 18px;
}

.resource-article-content h2,
.resource-article-content h3 {
  margin: 34px 0 14px;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.04;
}

.resource-article-content h2 {
  font-size: clamp(2rem, 3.2vw, 3.2rem);
}

.resource-article-content h3 {
  font-size: 2rem;
}

.resource-article-content ul,
.resource-article-content ol {
  margin: 0 0 22px;
  padding-left: 22px;
}

.resource-article-content :is(h2, h3) + :is(ul, ol) {
  margin-top: var(--heading-copy-gap, 18px);
}

.resource-article-content figure {
  margin: 30px 0;
}

.resource-article-content img {
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  background: var(--porcelain);
}

.resource-article-content .resource-infographic img {
  max-height: none;
  object-fit: contain;
}

.resource-article-content a {
  color: var(--lacquer);
  font-weight: 800;
}

.resource-article-content .nts-table-wrap {
  position: relative;
  margin: 32px 0;
  overflow-x: auto;
  border: 1px solid rgba(112, 28, 28, 0.16);
  background:
    linear-gradient(90deg, rgba(112, 28, 28, 0.08), rgba(112, 28, 28, 0)),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 44px rgba(33, 31, 27, 0.08);
}

.resource-article-content .nts-article-table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.resource-article-content .nts-article-table th,
.resource-article-content .nts-article-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(33, 31, 27, 0.08);
  text-align: left;
  vertical-align: top;
}

.resource-article-content .nts-article-table th {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #701c1c;
}

.resource-article-content .nts-article-table th + th,
.resource-article-content .nts-article-table td + td {
  border-left: 1px solid rgba(33, 31, 27, 0.07);
}

.resource-article-content .nts-article-table tbody tr {
  background: rgba(255, 255, 255, 0.82);
}

.resource-article-content .nts-article-table tbody tr:nth-child(even) {
  background: rgba(112, 28, 28, 0.035);
}

.resource-article-content .nts-article-table tbody tr:hover {
  background: rgba(112, 28, 28, 0.075);
}

.resource-article-content .nts-article-table td:first-child {
  width: 23%;
  color: var(--ink);
  font-weight: 800;
  border-left: 4px solid rgba(112, 28, 28, 0.56);
}

.resource-article-content .nts-article-table td:nth-child(2) {
  width: 34%;
}

.resource-article-content .nts-article-table tbody tr:last-child td {
  border-bottom: 0;
}

.resource-article-content .nts-process-diagram {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 30px;
}

.resource-article-content .nts-process-diagram span {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px solid rgba(112, 28, 28, 0.18);
  background: rgba(112, 28, 28, 0.055);
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}

.resource-article-content .nts-source-box {
  margin: 34px 0;
  padding: 24px;
  border-left: 4px solid var(--lacquer);
  background: rgba(112, 28, 28, 0.055);
}

.resource-article-content .nts-source-box h2 {
  margin-top: 0;
  font-size: clamp(1.7rem, 2.4vw, 2.4rem);
}

.resource-article-content .nts-source-box li {
  margin-bottom: 8px;
}

@media (max-width: 980px) {
  .resources-hero-grid,
  .resources-article-hero-grid,
  .resources-layout,
  .resource-card {
    grid-template-columns: 1fr;
  }

  .resources-sidebar {
    position: static;
  }

  .resources-hero-feature {
    margin-top: 0;
  }

  .resources-article-visual {
    justify-self: start;
    max-width: 620px;
    margin-top: 0;
  }

  .resource-card-image {
    width: 100%;
  }

  .resource-card-body {
    min-height: 0;
  }

  .resources-toolbar,
  .resources-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-article-content .nts-process-diagram {
    grid-template-columns: 1fr;
  }

  .resource-article-content .nts-table-wrap {
    margin-right: -6px;
    margin-left: -6px;
  }
}

@media (max-width: 640px) {
  .resources-hero {
    padding: 38px 0 24px;
  }

  .resources-hero h1,
  .resources-article-hero h1 {
    font-size: clamp(2.75rem, 14vw, 4rem);
  }

  .resources-article-hero-grid {
    gap: 24px;
  }

  .resources-article-visual::before {
    top: 14px;
    right: -10px;
  }

  .resource-card-body,
  .resource-article-content,
  .resources-toolbar,
  .resource-side-card {
    padding: 20px;
  }

  .resource-card h2 {
    font-size: clamp(1.55rem, 8vw, 2.05rem);
  }

  .resource-article-content .nts-article-table {
    min-width: 0;
    border-spacing: 0;
  }

  .resource-article-content .nts-article-table thead {
    display: none;
  }

  .resource-article-content .nts-article-table,
  .resource-article-content .nts-article-table tbody,
  .resource-article-content .nts-article-table tr,
  .resource-article-content .nts-article-table td {
    display: block;
    width: 100%;
  }

  .resource-article-content .nts-article-table tr {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(33, 31, 27, 0.1);
  }

  .resource-article-content .nts-article-table td {
    padding: 0;
    border: 0;
  }

  .resource-article-content .nts-article-table td + td {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(33, 31, 27, 0.07);
  }

  .resource-article-content .nts-article-table td:first-child {
    width: 100%;
    padding-left: 12px;
  }

  .resources-pagination .page-step {
    width: 100%;
  }
}
