/* Final responsive layer for NESPAK static pages. Loaded after page CSS. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg,
iframe,
embed,
object {
  max-width: 100%;
}

img,
video {
  height: auto;
}

iframe,
embed,
object {
  border: 0;
}

p,
li,
a,
span,
td,
th,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: anywhere;
}

.container,
.container-fluid {
  max-width: 100%;
}

.row {
  min-width: 0;
}

.row > [class*="col-"] {
  min-width: 0;
}

.c-layout-page,
.c-content-box,
.c-content-box .container,
.c-content-box .container-fluid,
.c-layout-breadcrumbs-1,
.panel,
.panel-body,
.tab-content {
  max-width: 100%;
}

table {
  max-width: 100%;
}

.table-responsive,
.panel-body,
.c-content-box {
  -webkit-overflow-scrolling: touch;
}

.panel-body table,
.c-content-box table,
.tab-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  white-space: normal;
}

.panel-body table img,
.c-content-box table img {
  max-width: min(100%, 920px);
}

.c-content-title-1 h1,
.c-content-title-1 h2,
.c-content-title-1 h3,
.nespak-section-heading__title,
.portfolio-projects__header h2,
.ap-division-title,
.ap-division-services__title {
  text-wrap: balance;
}

.c-content-product-2,
.c-content-product-3,
.portfolio-project-card,
.nespak-project-category,
.overseas-market-card,
.nespak-office-card,
.ap-division-service,
.nespak-contact-card,
.nespak-contact-mini-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.c-content-product-2 .c-label,
.c-content-product-3 .c-label,
.portfolio-project-card__title,
.nespak-project-category__label,
.overseas-market-card__title,
.nespak-office-card h3,
.ap-division-service h3 {
  white-space: normal !important;
}

.c-bg-img-top-center,
.c-bg-img-center,
.c-bg-img-bottom-center,
[style*="background-image"] {
  background-size: cover;
}

.c-layout-go2top {
  right: clamp(14px, 2vw, 28px) !important;
  bottom: clamp(14px, 2vw, 28px) !important;
}

@media (min-width: 1400px) {
  .container {
    width: min(1320px, calc(100vw - 80px));
  }
}

@media (min-width: 1600px) {
  .container {
    width: min(1480px, calc(100vw - 112px));
  }

  .c-content-box {
    padding-top: clamp(58px, 4vw, 92px);
    padding-bottom: clamp(58px, 4vw, 92px);
  }

  .portfolio-projects__grid,
  .portfolio-modern-page .portfolio-projects__grid,
  .nespak-project-stats,
  .portfolio-projects__header,
  .nespak-project-explore__title {
    max-width: 1480px;
  }
}

@media (min-width: 1920px) {
  .container {
    width: min(1640px, calc(100vw - 160px));
  }

  .nespak-footer__main,
  .nespak-footer__bottom {
    padding-right: clamp(100px, 8vw, 180px);
    padding-left: clamp(100px, 8vw, 180px);
  }
}

@media (min-width: 992px) and (max-width: 1399px) {
  .container {
    width: min(1140px, calc(100vw - 48px));
  }

  .c-content-box {
    padding-top: clamp(42px, 4vw, 70px);
    padding-bottom: clamp(42px, 4vw, 70px);
  }

  .portfolio-modern-page .portfolio-projects__grid,
  .portfolio-projects__grid,
  .overseas-detail .overseas-market-grid {
    gap: 22px;
  }
}

@media (max-width: 1199px) {
  .portfolio-modern-page .portfolio-projects__grid,
  .portfolio-projects__grid,
  .overseas-detail .overseas-market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .nespak-project-stats__grid,
  .nespak-contact-routing,
  .nespak-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .container {
    width: min(100%, calc(100vw - 36px));
  }

  .c-content-box {
    padding-top: 46px !important;
    padding-bottom: 52px !important;
  }

  .c-content-title-1 {
    margin-bottom: 24px;
  }

  .c-content-title-1 h1,
  .c-content-title-1 h2,
  .c-content-title-1 h3,
  .nespak-section-heading__title {
    font-size: clamp(27px, 5vw, 38px) !important;
    line-height: 1.16 !important;
  }

  .portfolio-projects__header,
  .nespak-project-explore__header,
  .funding-showcase__header,
  .nespak-contact-more__inner {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .portfolio-modern-page .portfolio-projects,
  .portfolio-projects {
    padding: 52px 18px 64px !important;
  }

  .ap-division-hero {
    margin-top: 0 !important;
  }

  .ap-division-lead {
    text-align: left !important;
  }

  .nespak-modern-header .nespak-search-menu,
  .nespak-modern-header .nespak-language-menu {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

@media (max-width: 767px) {
  .container {
    width: min(100%, calc(100vw - 28px));
  }

  .row {
    margin-right: -10px;
    margin-left: -10px;
  }

  .row > [class*="col-"] {
    padding-right: 10px;
    padding-left: 10px;
  }

  .portfolio-modern-page .portfolio-projects__grid,
  .portfolio-projects__grid,
  .overseas-detail .overseas-market-grid,
  .ap-division-service-grid,
  .nespak-offices-grid,
  .nespak-contact-routing,
  .nespak-contact-grid,
  .nespak-project-stats__grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .nespak-project-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    overflow: visible;
  }

  .nespak-project-categories > li {
    flex: none !important;
    width: 100% !important;
  }

  .portfolio-project-card__media,
  .portfolio-project-card__media img,
  .nespak-project-category__media {
    min-height: 220px !important;
  }

  .nespak-contact-map,
  .nespak-contact-map iframe {
    min-height: 320px !important;
  }

  .c-layout-breadcrumbs-1 {
    padding-top: 40px !important;
    padding-bottom: 34px !important;
  }
}

@media (max-width: 575px) {
  .container {
    width: min(100%, calc(100vw - 24px));
  }

  .c-content-box {
    padding-top: 38px !important;
    padding-bottom: 44px !important;
  }

  .c-content-title-1 h1,
  .c-content-title-1 h2,
  .c-content-title-1 h3,
  .nespak-section-heading__title {
    font-size: clamp(24px, 8vw, 32px) !important;
  }

  .nespak-project-categories {
    grid-template-columns: minmax(0, 1fr);
  }

  .portfolio-project-card,
  .nespak-project-category,
  .overseas-market-card,
  .ap-division-service,
  .nespak-contact-card,
  .nespak-contact-mini-card,
  .nespak-office-card__body {
    padding: 20px !important;
  }

  .portfolio-project-card__media,
  .portfolio-project-card__media img,
  .nespak-project-category__media {
    min-height: 190px !important;
  }

  .ap-division-hero__panel {
    width: calc(100% - 20px) !important;
    padding-right: 28px !important;
    padding-left: 28px !important;
  }

  .ap-division-hero__title {
    letter-spacing: 0 !important;
  }

  .nespak-footer__main,
  .nespak-footer__bottom {
    padding-right: 18px !important;
    padding-left: 18px !important;
  }
}

@media (max-width: 380px) {
  .container {
    width: min(100%, calc(100vw - 20px));
  }

  .c-content-title-1 h1,
  .c-content-title-1 h2,
  .c-content-title-1 h3,
  .nespak-section-heading__title {
    font-size: 23px !important;
  }

  .nespak-modern-header .c-logo::after {
    font-size: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Shared mobile safeguards for legacy pages and the injected global header. */
@media (max-width: 991px) {
  .c-layout-header,
  .c-layout-header .c-navbar,
  .c-layout-header .container-fluid,
  .c-layout-header .c-brand,
  .c-layout-header .c-mega-menu {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }

  .c-layout-header .c-logo,
  .c-layout-header .c-logo img {
    max-width: calc(100vw - 82px) !important;
  }

  .c-layout-page,
  .c-layout-page > *,
  .c-content-box,
  .c-content-box > .container,
  .c-content-box > .container-fluid {
    max-width: 100% !important;
  }

  .ap-hero__panel,
  .ap-division-hero__panel {
    min-width: 0 !important;
    max-width: calc(100vw - 20px) !important;
  }
}

@media (max-width: 767px) {
  .c-layout-page .row {
    max-width: 100%;
  }

  .c-layout-page img,
  .c-layout-page video,
  .c-layout-page iframe {
    max-width: 100% !important;
  }

  .c-layout-page .gallery-items {
    float: none !important;
    width: 100% !important;
    height: auto !important;
  }

  .c-layout-page table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
  }

  [id^="jssor_"] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 1080 / 480;
  }

  [id^="jssor_"] [data-u="slides"] {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
  }
}

@media (max-width: 575px) {
  .ap-hero__panel,
  .ap-division-hero__panel {
    width: calc(100% - 20px) !important;
    padding-right: 28px !important;
    padding-left: 28px !important;
  }

  .c-content-box,
  .c-layout-page .container,
  .c-layout-page .container-fluid {
    overflow-x: clip;
  }
}
