/* Shared Nexme UI system - loaded last on every page */
:root {
  --container-width: 1280px;
  --header-height: 78px;

  --font-display: 54px;
  --font-page-title: 48px;
  --font-section-title: 30px;
  --font-subsection-title: 24px;
  --font-card-title-lg: 20px;
  --font-card-title: 18px;
  --font-body-lg: 16px;
  --font-body: 14px;
  --font-body-sm: 13px;
  --font-small: 12px;
  --font-caption: 13px;
}
 
h1, h2 {
  line-height: 1.2 !important;
}

body {
  min-width: 320px;
  font-size: var(--font-body);
  overflow-x: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  background: rgb(255 255 255 / 97%);
  border-bottom: 1px solid #e4ebf5;
  box-shadow: 0 4px 18px rgb(20 55 105 / 5%);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  min-height: var(--header-height);
  grid-template-columns: 154px minmax(0, 1fr) auto;
  gap: 24px;
}

.site-header__brand,
.site-header__brand img {
  width: 154px;
}

.site-nav__list {
  gap: 18px;
}

.site-nav__list a {
  position: relative;
  padding: 28px 0 25px;
  color: #111b3d;
  font-size: var(--font-small);
  font-weight: 600;
  white-space: nowrap;
}

.site-nav__list a.is-active,
.site-nav__list a[aria-current="page"] {
  color: #0868ed;
}

.site-nav__list a.is-active::after,
.site-nav__list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: #0868ed;
}

.site-header__actions {
  gap: 10px;
}

.site-header__actions .button {
  min-height: 40px;
  padding-inline: 17px;
  font-size: var(--font-small);
}

.site-nav__mobile-actions button {
  width: 100%;
}

.site-footer {
  padding: 44px 0 0;
  background: #fff;
  border-top: 1px solid #e4ebf5;
}

.site-footer__grid {
  grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
  gap: 38px;
}

.site-footer__brand img {
  width: 154px;
}

.site-footer__brand p {
  max-width: 290px;
  margin-top: 16px;
  color: #5d6880;
  font-size: var(--font-small);
  line-height: 1.7;
}

.site-footer__column h2 {
  margin-bottom: 16px;
  color: #0a1637;
  font-size: var(--font-body-sm);
  font-weight: 700;
}

.site-footer__column li + li {
  margin-top: 9px;
}

.site-footer__column a,
.contact-list li {
  color: #566279;
  font-size: var(--font-small);
  line-height: 1.6;
}

.site-footer__column a:hover {
  color: #0868ed;
}

.contact-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 7px;
}

.contact-list__icon {
  color: #0868ed;
  font-size: var(--font-body-sm);
  line-height: 1.45;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 8px;
  margin-top: 17px;
}

.social-links button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: #0868ed;
  border: 0;
  border-radius: 50%;
  font: 700 var(--font-small)/1 var(--font-primary);
  transition: transform 180ms ease, background-color 180ms ease;
}

.social-links button:hover {
  background: #0757cc;
  transform: translateY(-1px);
}

.site-footer__bottom {
  margin-top: 34px;
  padding: 14px 0;
  color: #7a8498;
  border-top: 1px solid #e4ebf5;
  font-size: var(--font-small);
  text-align: center;
}

/* Harmonized type scale: no viewport-based font sizes. */
.hero h1 { font-size: var(--font-display); }
.hero__lead { font-size: var(--font-section-title); }
.hero__description { font-size: var(--font-body-lg); }
.stat-item strong { font-size: var(--font-section-title); }
.section-heading h2 { font-size: var(--font-section-title); }
.social-proof .section-heading h2 { font-size: var(--font-section-title); }
.cta h2 { font-size: var(--font-section-title); }

.about-hero h1,
.projects-hero h1,
.news-hero h1,
.contact-hero h1,
.career-hero h1 {
  font-size: var(--font-page-title);
}

.about-title,
.projects-listing__toolbar h2,
.latest-news__header h2,
.specialty-news > .container > h2,
.contact-section-heading h2,
.career-section-heading h2 {
  font-size: var(--font-section-title);
}

.toast-message {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  max-width: min(360px, calc(100% - 32px));
  padding: 13px 16px;
  color: #fff;
  background: #07123a;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgb(7 18 58 / 24%);
  font-size: var(--font-body-sm);
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast-message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1199px) {
  :root {
    --header-height: 72px;
    --font-display: 50px;
    --font-page-title: 44px;
    --font-section-title: 28px;
    --font-subsection-title: 23px;
  }

  .site-header__inner {
    min-height: var(--header-height);
    grid-template-columns: auto 1fr auto;
  }

  .site-header__brand,
  .site-header__brand img {
    width: 145px;
  }

  .site-header__actions {
    display: none;
  }

  .site-nav {
    justify-self: end;
  }

  .site-nav__toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #dfe8f5;
    border-radius: 10px;
  }

  .site-nav__toggle span {
    width: 100%;
    height: 2px;
    background: #07123a;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .site-nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .site-nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav__panel {
    position: fixed;
    inset: var(--header-height) 0 auto;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 18px max(24px, calc((100% - 1120px) / 2)) 28px;
    background: #fff;
    border-top: 1px solid #e4ebf5;
    box-shadow: 0 22px 50px rgb(16 50 100 / 14%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-110%);
    transition: opacity 220ms ease, visibility 220ms ease, transform 220ms ease;
  }

  .site-nav__panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav__list {
    display: grid;
    gap: 0;
  }

  .site-nav__list a {
    display: block;
    padding: 13px 0;
    border-bottom: 1px solid #e4ebf5;
    font-size: var(--font-body);
  }

  .site-nav__list a::after { display: none; }

  .site-nav__mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
  }

  .site-footer__grid {
    grid-template-columns: 1.35fr repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  :root {
    --font-display: 42px;
    --font-page-title: 38px;
    --font-section-title: 26px;
    --font-subsection-title: 22px;
    --font-card-title-lg: 19px;
  }

  .site-header__brand,
  .site-header__brand img { width: 132px; }
  .hero__lead { font-size: var(--font-section-title); }
  .cta h2 { font-size: var(--font-section-title); }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 24px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 479px) {
  :root {
    --font-display: 36px;
    --font-page-title: 34px;
    --font-section-title: 24px;
    --font-subsection-title: 21px;
    --font-card-title: 17px;
  }

  .site-nav__mobile-actions { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__brand { grid-column: auto; }
}

/* Back-to-top dùng chung cho toàn bộ Front-end. */
.site-back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 280;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #0b63e5;
  background: #eef5ff;
  border: 1px solid #d8e6fa;
  border-radius: 10px;
  box-shadow: 0 10px 26px rgb(20 55 105 / 16%);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease,
    background-color 180ms ease, color 180ms ease;
}

.site-back-to-top:hover {
  color: #fff;
  background: #0b63e5;
}

.site-back-to-top:focus-visible {
  outline: 3px solid rgb(11 99 229 / 25%);
  outline-offset: 3px;
}

.site-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

html.is-switching-project-tab {
  scroll-behavior: auto !important;
}

@media (max-width: 767px) {
  .site-back-to-top {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-back-to-top {
    transition: none;
  }
}
