@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Merriweather:wght@300;400;700;900&family=Roboto:wght@300;500&display=swap');

:root {
  --red: #bb332b;
  --red-dark: #96231e;
  --navy: #182940;
  --blue: #1e427c;
  --gold: #d7a532;
  --ink: #1d2b3d;
  --muted: #5d6877;
  --line: #d9e0e8;
  --soft: #f4f7fa;
  --white: #ffffff;
  --shadow: 0 18px 40px rgba(24, 41, 64, 0.12);
  --max-width: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Be Vietnam Pro", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, input { font: inherit; }

svg { display: block; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--navy);
  border-radius: 4px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.error-wrap,
.help-wrap {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.site-header {
  background: url("assets/page-left-bg.png") left top no-repeat, url("assets/page-right-bg.png") right top no-repeat;
  font-family: Merriweather, Georgia, serif;
}

.portal-header {
  width: min(100%, 1200px);
  margin-inline: auto;
  background: var(--white);
}

.portal-banner {
  min-height: 181px;
  position: relative;
  background: var(--white) url("assets/header1.png") top right / 555px auto no-repeat;
  border-bottom: 4px double #c3d0e0;
}

.portal-brand {
  position: absolute;
  top: 38px;
  left: 50px;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.portal-brand > img {
  width: 110px;
  height: 110px;
  object-fit: contain;
}

.portal-brand-copy {
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  color: #2a2a2a;
  line-height: 1.15;
  text-transform: uppercase;
  text-shadow: 2px 0 #fff, -2px 0 #fff, 0 2px #fff, 0 -2px #fff, 1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
}

.portal-brand-copy > span { font-size: 25px; font-weight: 500; }
.portal-brand-copy > strong { margin-top: 7px; color: #e81d02; font-size: 34px; font-weight: 700; }
.portal-brand-copy small { margin: 11px 0 0 5px; color: #182940; font-family: Roboto, Arial, sans-serif; font-size: 13px; font-weight: 500; line-height: 12px; text-shadow: none; text-transform: none; }

.nav-shell {
  min-height: 48px;
  position: relative;
  border-top: 1px solid #f2f2f2;
  border-bottom: 1px solid #c3d0e0;
  background: var(--white);
}

.main-nav {
  width: 100%;
  min-height: 48px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
}

.main-nav a {
  height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #182940;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 400;
  line-height: 45px;
  transition: color .2s ease;
}

.main-nav a::after { content: ""; position: absolute; bottom: 0; left: 20px; right: 20px; height: 3px; border-radius: 6px; background: transparent; }
.main-nav a { position: relative; }
.main-nav a:hover::after,
.main-nav a:focus-visible::after { background: #bb332b; }
.main-nav a:focus-visible { outline: none; color: #bb332b; }
.main-nav .home-link { width: 60px; padding: 0 20px; }
.main-nav .home-link::after { display: none; }
.main-nav .home-link img { width: 20px; height: 16px; object-fit: contain; }

.header-search {
  position: absolute;
  top: 12px;
  right: 18px;
  width: 26px;
  height: 26px;
  padding: 3px;
  border: 0;
  color: #7388a4;
  background: transparent;
  cursor: pointer;
}

.header-search svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.menu-toggle, .mobile-nav { display: none; }

.error-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(224, 230, 237, .48) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 230, 237, .48) 1px, transparent 1px),
    linear-gradient(100deg, #f5f8fb 0%, #ffffff 68%);
  background-size: 42px 42px, 42px 42px, auto;
}

.error-wrap {
  position: relative;
  z-index: 1;
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  align-items: center;
  padding-block: 64px 72px;
}

.error-content { width: 100%; max-width: 760px; margin-inline: auto; text-align: center; }

.error-code {
  margin: 0 0 4px;
  color: var(--red);
  font-family: Merriweather, Georgia, serif;
  font-size: clamp(104px, 11vw, 154px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: .86;
  text-shadow: 5px 5px 0 rgba(187, 51, 43, .08);
}

.error-content h1 {
  margin: 28px 0 20px;
  color: var(--navy);
  font-family: Merriweather, Georgia, serif;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.28;
  letter-spacing: -0.035em;
}

.error-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
}

.primary-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.button {
  min-height: 52px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid transparent;
  border-radius: 5px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .035em;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.button svg { width: 18px; height: 18px; }
.button-primary { color: var(--white); background: var(--red); box-shadow: 0 10px 24px rgba(187, 51, 43, .2); }
.button-primary svg { fill: currentColor; }
.button-secondary { color: var(--navy); background: var(--white); border-color: var(--navy); }
.button-secondary svg { fill: none; stroke: currentColor; stroke-width: 2; }
.button:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.button:focus-visible { outline: 3px solid rgba(215, 165, 50, .55); outline-offset: 3px; }

.search-form { max-width: 620px; margin: 32px auto 0; text-align: left; }
.search-form label { display: block; margin-bottom: 9px; color: var(--navy); font-size: 13px; font-weight: 700; }
.search-control { display: grid; grid-template-columns: 1fr 58px; padding: 7px; background: var(--white); border: 1px solid #cbd5df; border-radius: 8px; box-shadow: 0 12px 28px rgba(24, 41, 64, .08); }
.search-control:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 66, 124, .13); }
.search-control input { width: 100%; min-width: 0; height: 44px; padding: 0 14px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.search-control input::placeholder { color: #8993a0; }
.search-control button { display: grid; place-items: center; border: 0; border-radius: 5px; color: var(--white); background: var(--navy); cursor: pointer; transition: background-color .2s ease; }
.search-control button:hover { background: var(--red); }
.search-control button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search-message { min-height: 24px; margin: 8px 0 0; color: var(--red-dark); font-size: 13px; }

.help-links { background: var(--white); }
.help-wrap { padding-block: 56px 66px; }
.help-wrap h2 { margin: 0 0 26px; color: var(--navy); font-family: Merriweather, Georgia, serif; font-size: 24px; }
.link-list { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, 1fr); }
.link-list a { min-height: 76px; padding: 0 18px 0 0; display: grid; grid-template-columns: 52px 1fr 24px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; font-weight: 600; transition: color .2s ease, padding-left .2s ease; }
.link-list a:nth-child(odd) { margin-right: 32px; }
.link-list a:hover { padding-left: 8px; color: var(--red); }
.link-list span { color: var(--red); font-family: Merriweather, Georgia, serif; font-size: 13px; }
.link-list svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.site-footer {
  color: var(--white);
  background: #041b47;
  font-family: Merriweather, Georgia, serif;
}

.footer-top {
  min-height: 337px;
  background: #1e427c url("assets/footer-bg.png") repeat;
}

.footer-wrap {
  width: min(calc(100% - 48px), 1200px);
  margin-inline: auto;
  padding: 35px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .86fr);
  gap: 90px;
}

.footer-wrap h2 {
  margin: 0 0 20px;
  color: var(--white);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

.footer-wrap p {
  margin: 0 0 16px;
  color: #b5dcfb;
  font-size: 13px;
  line-height: 1.5;
}

.footer-wrap a { color: #b5dcfb; text-decoration: none; }
.footer-wrap a:hover { color: var(--white); text-decoration: underline; font-weight: 600; }
.trust-badge { width: 220px; margin-top: 14px; display: block; }
.trust-badge img { width: 220px; height: 100px; display: block; border-radius: 2px; }
.footer-contact { margin: 0; font-style: normal; }
.footer-contact p { display: flex; align-items: flex-start; gap: 7px; }
.footer-contact p svg { width: 16px; height: 16px; margin-top: 1px; flex: 0 0 auto; fill: none; stroke: #b5dcfb; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer-contact .zalo { padding-left: 7px; }
.footer-contact p .printer { margin-top: 0; }
.footer-bottom { background: #041b47; }
.copyright { width: min(calc(100% - 48px), 1200px); margin-inline: auto; padding: 15px 0; color: #bfbfbf; text-align: left; font-family: Roboto, Arial, sans-serif; font-size: 12px; font-weight: 300; line-height: 1.5; }
.copyright a { color: #bfbfbf; text-decoration: none; }
.copyright a:hover { color: #d12303; text-decoration: underline; }

.emc-status {
  position: fixed;
  z-index: 60;
  left: 0;
  bottom: 0;
  min-height: 31px;
  padding: 4px 10px 4px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 0 10px 0 0;
  color: var(--white);
  background: #ff4055;
  font-family: Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
}

.emc-status span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--white); }
.emc-status svg { width: 18px; fill: none; stroke: #e82b3f; stroke-width: 1.8; }
.emc-status circle { fill: #1e64b5; stroke: none; }

.back-to-top {
  position: fixed;
  z-index: 60;
  right: 45px;
  bottom: 11px;
  width: 39px;
  height: 39px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #d8d8d8;
  border-radius: 50%;
  color: var(--white);
  background: #ff0000;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  cursor: pointer;
}

.back-to-top svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: square; stroke-linejoin: miter; }

@media (min-width: 1200px) {
  .footer-wrap { padding-inline: 12px; grid-template-columns: 600px 1fr; gap: 88px; }
  .footer-bottom { min-height: 78px; }
  .copyright { padding-inline: 12px; }
}

@media (max-width: 1080px) {
  .error-wrap { grid-template-columns: minmax(0, 760px); }
}

@media (max-width: 820px) {
  .site-header { background: var(--white); }
  .portal-header { position: relative; }
  .portal-banner { min-height: 120px; background-size: 100% auto; border-bottom: 0; }
  .portal-brand { top: 10px; left: 0; align-items: flex-start; }
  .portal-brand > img { width: 65px; height: 65px; padding: 10px 0 0 10px; }
  .portal-brand-copy { margin: 14px 0 0 10px; white-space: nowrap; }
  .portal-brand-copy > span { font-size: 15px; line-height: 18px; }
  .portal-brand-copy > strong { margin-top: 5px; font-size: 22px; line-height: 1.2; }
  .portal-brand-copy small { margin: 8px 0 0 5px; font-size: 13px; line-height: 15.6px; }
  .main-nav { display: none; }
  .nav-shell { min-height: 30px; position: absolute; top: 88px; right: 0; width: 100%; border: 0; background: transparent; }
  .header-search { top: -1px; right: 35px; width: 25px; height: 25px; color: #8493a5; }
  .menu-toggle { position: absolute; top: 2px; right: 0; width: 46px; height: 25px; padding: 0; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
  .menu-icon { width: 35px; display: grid; gap: 2px; }
  .menu-icon i { width: 100%; height: 5px; display: block; background: #ff0000; transition: transform .2s ease, opacity .2s ease; }
  .menu-toggle[aria-expanded="true"] .menu-icon i:first-child { transform: translateY(7px) rotate(45deg); height: 2px; }
  .menu-toggle[aria-expanded="true"] .menu-icon i:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] .menu-icon i:last-child { transform: translateY(-7px) rotate(-45deg); height: 2px; }
  .mobile-nav { position: absolute; z-index: 20; top: 120px; left: 0; width: 100%; max-height: 500px; overflow-y: auto; padding: 20px; border-top: 1px solid #b70a0a; background: var(--white); box-shadow: -1px 3px 3px rgba(0,0,0,.3); }
  .mobile-nav.is-open { display: grid; }
  .mobile-nav a { padding: 10px 0; border-bottom: 1px dotted #ccc; color: #4d4d4d; text-decoration: none; font-size: 13px; font-weight: 500; }
  .error-wrap { min-height: auto; grid-template-columns: 1fr; padding-block: 58px 52px; }
  .error-content { max-width: none; }
  .link-list { grid-template-columns: 1fr; }
  .link-list a:nth-child(odd) { margin-right: 0; }
  .footer-top { min-height: 753.578125px; margin-inline: 5px; }
  .footer-wrap { width: 100%; padding: 45px 15px 59px; grid-template-columns: 1fr; gap: 64px; }
  .footer-wrap h2 { font-size: 22px; line-height: 1.5; }
  .trust-badge { width: min(100%, 350px); }
  .trust-badge img { width: 100%; height: auto; }
  .footer-bottom { min-height: 160px; }
  .copyright { width: calc(100% - 10px); padding: 15px 0; text-align: justify; }
  .back-to-top { right: 66px; bottom: 8px; }
}

@media (max-width: 560px) {
  .error-wrap, .help-wrap { width: min(calc(100% - 32px), var(--max-width)); }
  .error-section { background-size: 34px 34px, 34px 34px, auto; }
  .error-wrap { padding-top: 46px; }
  .error-content h1 { margin-top: 22px; font-size: 31px; }
  .error-description { font-size: 14px; }
  .primary-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .search-form { margin-top: 26px; }
  .help-wrap { padding-block: 42px 48px; }
  .help-wrap h2 { font-size: 21px; }
  .link-list a { grid-template-columns: 40px 1fr 20px; font-size: 13px; }
}

@media (prefers-reduced-motion: no-preference) {
  .error-code, .error-content h1, .error-description, .primary-actions, .search-form { animation: rise .55s both; }
  .error-content h1 { animation-delay: .07s; }
  .error-description { animation-delay: .13s; }
  .primary-actions { animation-delay: .19s; }
  .search-form { animation-delay: .25s; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
}
