:root {
  --blue: #0d4c8b;
  --deep-blue: #06284f;
  --red: #b80d2c;
  --dark-red: #85091d;
  --gold: #d9a53a;
  --ink: #222;
  --muted: #697386;
  --line: #e3e7ee;
  --soft: #f5f7fa;
  --white: #fff;
  --shadow: 0 12px 28px rgba(5, 26, 52, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: #fff;
}

body {
  margin: 0;
  min-width: 320px;
}

html:not([data-lang="en"]) .lang-en,
html[data-lang="en"] .lang-vi {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(5, 26, 52, 0.08);
  position: relative;
  z-index: 20;
}

.header-main {
  width: min(1160px, calc(100% - 32px));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
  flex: 1 1 auto;
}

.brand-logo {
  width: 170px;
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-text {
  display: block;
  min-width: 0;
  transform: translateY(3px);
}

.brand-text strong {
  display: block;
  color: var(--deep-blue);
  font-size: 22px;
  line-height: 1.24;
  font-weight: 700;
}

.brand-text small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #4d5a6b;
  font-size: 14px;
}

.language {
  display: inline-flex;
  border: 1px solid var(--line);
}

.language-option {
  min-width: 38px;
  padding: 7px 9px;
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  text-align: center;
  font-size: 13px;
  color: var(--deep-blue);
  cursor: pointer;
}

.language-option:last-child {
  border-right: 0;
}

.language-option:hover:not(.is-active) {
  background: #f4f6f9;
}

.language-option.is-active {
  background: var(--red);
  color: var(--white);
  cursor: default;
}

.language-option:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 38px;
  flex: 0 0 42px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--deep-blue);
  font-size: 22px;
  cursor: pointer;
}

.main-nav {
  background: var(--deep-blue);
  display: flex;
  justify-content: center;
  min-height: 48px;
}

.main-nav a {
  color: var(--white);
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  font-size: 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  transition: background-color 0.2s ease;
}

.main-nav a:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--red);
}

html[data-lang="en"] .main-nav a {
  padding-right: 20px;
  padding-left: 20px;
  font-size: 14px;
}

.main-nav a.is-pending {
  cursor: default;
}

.inner-hero {
  position: relative;
  height: 190px;
  overflow: hidden;
  background-color: var(--deep-blue);
  background-image: url("../images/vietnam/hcmc-landmark.jpg");
  background-position: center 42%;
  background-size: cover;
}

.inner-hero.hero-news {
  background-image: url("../images/vietnam/hcmc-landmark.jpg");
  background-position: center 44%;
}

.inner-hero.hero-cooperation {
  background-image: url("../images/vietnam/cooperation-vietnam-office.jpg");
  background-position: center 60%;
}

.inner-hero.hero-exam {
  background-image: url("../images/vietnam/exam-center-hanoi.jpg");
  background-position: center 52%;
}

.inner-hero.hero-service {
  background-image: url("../images/vietnam/association-services-hanoi.jpg");
  background-position: center 75%;
}

.inner-hero.hero-contact {
  background-image: url("../images/vietnam/hanoi-lake.jpg");
  background-position: center 48%;
}

.inner-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 38, 76, 0.78);
}

.inner-hero .container {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
}

.inner-hero h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
}

.inner-hero p {
  max-width: 680px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.6;
}

.breadcrumb-bar {
  min-height: 44px;
  display: flex;
  align-items: center;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb-bar .container {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.breadcrumb-bar a:hover {
  color: var(--red);
}

.inner-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 34px;
  padding-top: 38px;
  padding-bottom: 54px;
}

.section-sidebar {
  align-self: start;
  border: 1px solid var(--line);
  background: var(--white);
}

.section-sidebar h2 {
  min-height: 58px;
  margin: 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  border-left: 5px solid var(--gold);
  background: var(--deep-blue);
  color: var(--white);
  font-size: 19px;
  line-height: 1.25;
}

.section-sidebar nav {
  display: block;
}

.section-sidebar nav a {
  min-height: 50px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: #26384d;
  font-size: 15px;
  line-height: 1.35;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.section-sidebar nav a:last-child {
  border-bottom: 0;
}

.section-sidebar nav a::after {
  content: "›";
  color: #8a96a6;
  font-size: 19px;
}

.section-sidebar nav a:hover,
.section-sidebar nav a.active {
  background: var(--red);
  color: var(--white);
}

.section-sidebar nav a:hover::after,
.section-sidebar nav a.active::after {
  color: var(--white);
}

.inner-content {
  min-width: 0;
}

.inner-content-heading {
  min-height: 52px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 2px solid var(--red);
}

.inner-content-heading h2 {
  margin: 0;
  color: var(--deep-blue);
  font-size: 24px;
  line-height: 1.25;
}

.inner-content-heading span {
  color: var(--muted);
  font-size: 13px;
}

.news-archive-list {
  display: grid;
  gap: 0;
}

.news-archive-list.text-only-archive .archive-item {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.news-archive-list.text-only-archive .archive-thumb {
  display: none;
}

.news-archive-list.text-only-archive .archive-copy p {
  max-width: 760px;
}

.archive-item {
  min-height: 160px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px dashed #d5dce6;
}

.archive-thumb {
  position: relative;
  width: 210px;
  height: 132px;
  overflow: hidden;
  background: var(--soft);
}

.archive-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.archive-thumb:hover img {
  transform: scale(1.035);
}

.archive-date {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 58px;
  min-height: 48px;
  padding: 4px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  line-height: 1.1;
}

.archive-date strong {
  font-size: 22px;
  line-height: 1;
}

.archive-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.archive-copy h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.42;
  font-weight: 700;
}

.archive-copy h2 a {
  color: var(--deep-blue);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.archive-copy h2 a:hover {
  color: var(--red);
}

.archive-copy p {
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.archive-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #8792a3;
  font-size: 12px;
}

.archive-meta a {
  color: var(--red);
  font-weight: 700;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}

.pagination a,
.pagination span {
  width: 36px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--white);
  color: #415066;
  font-size: 13px;
}

.pagination a:hover,
.pagination .active {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.article-detail-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.article-detail-header h1 {
  max-width: 800px;
  margin: 0 auto;
  color: var(--deep-blue);
  font-size: 28px;
  line-height: 1.42;
}

.article-detail-meta {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: #8691a1;
  font-size: 13px;
}

.article-body {
  color: #344358;
  font-size: 16px;
  line-height: 1.9;
}

.article-body .article-lead {
  margin: 24px 0;
  padding: 15px 18px;
  border-left: 4px solid var(--red);
  background: var(--soft);
  color: #30445e;
  font-weight: 700;
}

.article-body img {
  width: 100%;
  height: 360px;
  margin: 24px 0;
  object-fit: cover;
}

.article-body h2 {
  margin: 30px 0 10px;
  color: var(--deep-blue);
  font-size: 21px;
  line-height: 1.4;
}

.article-body p {
  margin: 12px 0;
}

.article-body ul {
  margin: 12px 0;
  padding-left: 22px;
}

.article-body li {
  margin: 7px 0;
}

.article-navigation {
  margin-top: 34px;
  padding-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  border-top: 1px solid var(--line);
}

.article-navigation a {
  min-width: 0;
  color: #425268;
  font-size: 14px;
  line-height: 1.55;
}

.article-navigation a:last-child {
  text-align: right;
}

.article-navigation a:hover {
  color: var(--red);
}

.content-list {
  border-top: 1px solid var(--line);
}

.content-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px dashed #d5dce6;
}

.content-list h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
}

.content-list h3 a {
  color: var(--deep-blue);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.content-list h3 a:hover {
  color: var(--red);
}

.content-list p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.content-list time {
  align-self: start;
  padding-top: 3px;
  color: #8792a3;
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.partner-directory-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.partner-directory-card {
  min-width: 0;
  height: 138px;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--deep-blue);
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.partner-directory-card:hover {
  border-color: var(--red);
  transform: translateY(-2px);
}

.partner-directory-card img {
  width: 100%;
  height: 72px;
  object-fit: contain;
}

.partner-directory-card.partner-dark img {
  padding: 8px;
  background: var(--deep-blue);
}

.service-intro {
  margin: 0 0 24px;
  color: #40516a;
  font-size: 15px;
  line-height: 1.8;
}

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

.service-card {
  min-height: 168px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  background: var(--white);
}

.service-card h3 {
  margin: 0 0 10px;
  color: var(--deep-blue);
  font-size: 18px;
  line-height: 1.4;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.download-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.download-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px dashed #d5dce6;
}

.file-type {
  width: 52px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--deep-blue);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
}

.download-copy {
  min-width: 0;
}

.download-copy h3 {
  margin: 0;
  color: var(--deep-blue);
  font-size: 17px;
  line-height: 1.45;
}

.download-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.download-action {
  min-width: 96px;
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.download-action:hover {
  background: var(--red);
  color: var(--white);
}

.download-action.is-disabled,
.download-action.is-disabled:hover {
  border-color: #cfd6df;
  background: #f7f8fa;
  color: #8792a3;
  cursor: default;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.contact-block {
  padding-top: 18px;
  border-top: 3px solid var(--red);
}

.contact-block h3 {
  margin: 0 0 16px;
  color: var(--deep-blue);
  font-size: 19px;
}

.contact-list {
  margin: 0;
  display: grid;
  gap: 14px;
}

.contact-list div {
  padding-bottom: 13px;
  border-bottom: 1px dashed #d5dce6;
}

.contact-list dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.contact-list dd {
  margin: 0;
  color: #344358;
  font-size: 15px;
  line-height: 1.6;
}

.contact-note {
  margin: 0;
  padding: 18px;
  background: var(--soft);
  color: #45566e;
  font-size: 14px;
  line-height: 1.75;
}

.hero {
  position: relative;
  height: 440px;
  overflow: hidden;
  background: var(--deep-blue);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 0.5s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-inner {
  width: min(1160px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
  padding-right: 32%;
}

.eyebrow {
  margin: 0 0 18px;
  color: #e9c46a;
  font-size: 15px;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: 42px;
  line-height: 1.22;
  font-weight: 700;
}

.hero p {
  max-width: 660px;
  margin: 18px 0 0;
  font-size: 22px;
  line-height: 1.48;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 32px;
  height: 4px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--gold);
}

.notice-strip {
  background: #f1f3f7;
  border-bottom: 1px solid var(--line);
}

.notice-inner {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.notice-inner strong {
  flex: 0 0 auto;
  padding: 8px 16px;
  background: var(--red);
  color: var(--white);
  font-size: 15px;
}

.notice-track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 26px;
  overflow: hidden;
}

.notice-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  color: var(--deep-blue);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.28s ease;
}

.notice-item.is-active {
  opacity: 1;
}

.notice-more {
  color: var(--red);
  flex: 0 0 auto;
  font-size: 14px;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr) minmax(
      240px,
      0.65fr
    );
  gap: 24px;
  align-items: stretch;
  padding: 36px 0 26px;
}

.news-panel,
.cooperation-panel,
.exam-panel,
.category-box {
  min-width: 0;
  background: var(--white);
}

.news-panel,
.cooperation-panel,
.exam-panel {
  display: flex;
  flex-direction: column;
}

.section-title {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--red);
  gap: 16px;
}

.section-title h2,
.category-title h2 {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.category-title a {
  margin-left: auto;
  flex: 0 0 auto;
}

.category-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  border-left: 5px solid var(--red);
  padding-left: 12px;
}

.section-title h2 span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.section-title a,
.category-title a {
  color: var(--muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

.section-title a:hover,
.category-title a:hover {
  color: var(--red);
}

.section-title.compact {
  background: var(--dark-red);
  border-bottom: 0;
  padding: 0 14px;
}

.section-title.compact h2 {
  color: var(--white);
  border-left-color: var(--gold);
  font-size: 18px;
}

.section-title.compact h2 span,
.section-title.compact a {
  color: rgba(255, 255, 255, 0.78);
}

.lead-news a {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.lead-news img {
  width: 180px;
  height: 128px;
  object-fit: cover;
}

.lead-date {
  position: absolute;
  left: 0;
  bottom: 14px;
  width: 58px;
  padding: 7px 0;
  text-align: center;
  color: var(--white);
  background: rgba(184, 13, 44, 0.94);
  font-size: 12px;
}

.lead-date b {
  display: block;
  font-size: 23px;
  line-height: 1;
}

.lead-news h3 {
  margin: 0 0 10px;
  color: var(--deep-blue);
  font-size: 18px;
  line-height: 1.42;
  max-height: calc(18px * 1.42 * 2);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lead-news p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-height: calc(14px * 1.7 * 3);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.article-list,
.exam-list,
.category-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.article-list li {
  flex: 1 1 0;
}

.article-list li,
.exam-list li,
.category-box li {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px dashed #d7dce5;
}

.article-list a,
.exam-list a,
.category-box a {
  flex: 1 1 auto;
  min-width: 0;
  color: #28384c;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.article-list a:hover,
.exam-list a:hover,
.category-box a:hover {
  color: var(--red);
}

.article-list time,
.exam-list time,
.category-box time {
  flex: 0 0 86px;
  color: #8a94a3;
  font-size: 13px;
  text-align: right;
}

.cooperation-card {
  min-height: 150px;
  flex: 1 1 0;
  margin-top: 18px;
  display: flex;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cooperation-card.small {
  min-height: 150px;
  margin-top: 16px;
}

.cooperation-card span {
  width: 100%;
  color: var(--white);
  background: rgba(6, 28, 58, 0.72);
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.45;
}

.exam-panel {
  background: #f7f8fb;
  border: 1px solid var(--line);
}

.exam-list {
  flex: 1 1 auto;
  padding: 10px 14px 12px;
}

.exam-list li {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  padding: 11px 0;
}

.exam-list a {
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.45;
}

.exam-list time {
  flex-basis: auto;
  text-align: left;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 36px;
  align-items: stretch;
  padding: 16px 0 42px;
}

.category-box {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.category-title {
  height: 52px;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 2px solid var(--red);
  gap: 16px;
}

.category-title a {
  justify-self: end;
}

.category-box li {
  flex: 1 1 0;
  padding: 0 4px;
}

.category-box ul {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.category-box li::before,
.article-list li::before {
  content: "";
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  background: var(--red);
}

.friend-links {
  border-top: 1px solid var(--line);
  background: var(--white);
  padding: 22px 0 20px;
  text-align: center;
  overflow: hidden;
}

.friend-links h2 {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 20px;
}

.partner-marquee {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  overflow: hidden;
  border: 0;
  background: transparent;
}

.partner-track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  animation: partner-scroll 32s linear infinite;
}

.partner-marquee:hover .partner-track {
  animation-play-state: paused;
}

.partner-track a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 138px;
  height: 68px;
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid #e4e8ef;
  box-shadow: 0 4px 12px rgba(5, 26, 52, 0.05);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.partner-track a:hover {
  transform: translateY(-2px);
  border-color: var(--red);
}

.partner-track a.partner-card-dark {
  background: var(--deep-blue);
  border-color: #123b64;
}

.partner-track img {
  display: block;
  width: 100%;
  height: 50px;
  object-fit: contain;
  filter: saturate(0.95);
}

@keyframes partner-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.footer-bottom {
  background: #313233;
  color: #d5d9de;
  text-align: center;
  padding: 14px 16px;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 1060px) {
  .header-tools {
    display: flex;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .header-tools > span {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    justify-content: flex-start;
    border-right: 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  .feature-row {
    grid-template-columns: 1fr 1fr;
  }

  .exam-panel {
    grid-column: 1 / -1;
  }

  .inner-layout {
    grid-template-columns: 1fr;
  }

  .section-sidebar nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .section-sidebar nav a {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .section-sidebar nav a:last-child {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .header-main {
    min-height: 76px;
  }

  .brand-logo {
    width: 124px;
  }

  .brand-text strong {
    font-size: 15px;
    line-height: 1.18;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: 360px;
  }

  .hero-inner {
    padding-right: 0;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero p {
    font-size: 17px;
  }

  .notice-inner {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }

  .notice-inner strong {
    width: fit-content;
  }

  .notice-more {
    width: fit-content;
  }

  .feature-row,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .lead-news a {
    grid-template-columns: 1fr;
  }

  .lead-news img {
    width: 100%;
    height: 188px;
  }

  .lead-date {
    bottom: auto;
    top: 18px;
  }

  .article-list li,
  .category-box li {
    gap: 10px;
    padding: 11px 0;
  }

  .article-list li::before,
  .category-box li::before {
    display: none;
  }

  .article-list a,
  .category-box a {
    width: auto;
    white-space: nowrap;
  }

  .inner-hero {
    height: 160px;
  }

  .inner-hero h1 {
    font-size: 27px;
  }

  .inner-hero p {
    font-size: 14px;
  }

  .inner-layout {
    padding-top: 24px;
    padding-bottom: 38px;
  }

  .section-sidebar nav {
    grid-template-columns: 1fr;
  }

  .section-sidebar nav a {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .archive-item {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
  }

  .archive-thumb {
    width: 150px;
    height: 110px;
  }

  .archive-copy h2 {
    font-size: 16px;
  }

  .archive-copy p {
    display: none;
  }

  .archive-meta a {
    display: none;
  }

  .article-detail-header h1 {
    font-size: 24px;
  }

  .article-body img {
    height: 260px;
  }

  .article-navigation {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .article-navigation a:last-child {
    text-align: left;
  }

  .partner-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .header-main {
    gap: 12px;
  }

  .brand {
    gap: 9px;
  }

  .brand-logo {
    width: 108px;
  }

  .brand-text {
    display: none;
  }

  .language-option {
    min-width: 32px;
    padding: 6px;
  }

  .archive-item {
    min-height: 0;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 13px;
    padding-bottom: 18px;
    margin-bottom: 18px;
  }

  .archive-thumb {
    width: 112px;
    height: 92px;
  }

  .archive-date {
    width: 48px;
    min-height: 41px;
  }

  .archive-date strong {
    font-size: 18px;
  }

  .archive-copy h2 {
    font-size: 15px;
    line-height: 1.4;
  }

  .archive-meta {
    margin-top: 8px;
  }

  .inner-content-heading {
    align-items: flex-end;
  }

  .inner-content-heading h2 {
    font-size: 21px;
  }

  .article-body {
    font-size: 15px;
  }

  .article-body img {
    height: 210px;
  }

  .content-list article {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 17px 0;
  }

  .content-list time {
    padding-top: 0;
    text-align: left;
  }

  .service-grid,
  .partner-directory-grid {
    grid-template-columns: 1fr;
  }

  .partner-directory-card {
    height: 128px;
  }

  .download-item {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 13px;
  }

  .file-type {
    width: 48px;
    height: 52px;
  }

  .download-action {
    grid-column: 2;
    width: fit-content;
  }
}
