/* KTC232: synchronize mobile footer layout across all site pages with the homepage mobile footer */
@media (max-width: 767px) {
  body .ktc-site-footer,
  body .ktc-site-footer.ktc-snap-section,
  body.ktc-homepage-body.ktc-snap-enabled .ktc-site-footer.ktc-snap-section {
    min-height: 100dvh !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  body .ktc-site-footer .ktc-site-footer__slogan {
    top: 20px !important;
    bottom: auto !important;
    left: 50% !important;
    width: calc(100% - 30px) !important;
    transform: translateX(-50%) !important;
    text-align: center !important;
    z-index: 3 !important;
  }

  body .ktc-site-footer .ktc-site-footer__slogan span {
    font-size: clamp(17px, 4.65vw, 21px) !important;
    line-height: 1.22 !important;
    letter-spacing: .022em !important;
  }

  body .ktc-site-footer .ktc-site-footer__slogan::after {
    width: min(100%, 360px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  body .ktc-site-footer .ktc-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  body .ktc-site-footer__inner,
  body .ktc-shared-footer--normal .ktc-site-footer__inner,
  body .ktc-shared-footer--snap .ktc-site-footer__inner,
  body.ktc-homepage-body.ktc-snap-enabled .ktc-site-footer.ktc-snap-section .ktc-site-footer__inner {
    min-height: 100dvh !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 76px 14px 82px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  body .ktc-site-footer__empty {
    display: none !important;
  }

  body .ktc-site-footer__content {
    justify-self: auto !important;
    align-self: center !important;
    width: min(100%, 342px) !important;
    max-width: 342px !important;
    padding: 14px 14px 13px !important;
    border-radius: 15px !important;
    box-sizing: border-box !important;
    box-shadow: 0 14px 34px rgba(4, 12, 28, .22) !important;
    overflow: visible !important;
  }

  body .ktc-site-footer__content h2 {
    color: #fff !important;
    -webkit-text-stroke: 0 !important;
    paint-order: normal !important;
    font-size: clamp(18px, 5.05vw, 21px) !important;
    line-height: 1.03 !important;
    letter-spacing: 0 !important;
  }

  body .ktc-site-footer__contact {
    margin-top: 10px !important;
    gap: 7px !important;
  }

  body .ktc-site-footer__contact p {
    font-size: clamp(12.2px, 3.25vw, 13.2px) !important;
    line-height: 1.32 !important;
  }

  body .ktc-site-footer__social {
    gap: 8px !important;
    margin-top: 0 !important;
  }

  body .ktc-site-footer__social-link {
    width: 30px !important;
    height: 30px !important;
  }

  body .ktc-site-footer__social-link svg {
    width: 15px !important;
    height: 15px !important;
  }
}

@media (max-width: 374px) {
  body .ktc-site-footer__inner,
  body .ktc-shared-footer--normal .ktc-site-footer__inner,
  body .ktc-shared-footer--snap .ktc-site-footer__inner,
  body.ktc-homepage-body.ktc-snap-enabled .ktc-site-footer.ktc-snap-section .ktc-site-footer__inner {
    padding: 70px 12px 72px !important;
  }

  body .ktc-site-footer__content {
    width: min(100%, 326px) !important;
    max-width: 326px !important;
    padding: 12px 12px 11px !important;
  }

  body .ktc-site-footer__content h2 {
    font-size: 17px !important;
  }

  body .ktc-site-footer__contact p {
    font-size: 11.8px !important;
    line-height: 1.28 !important;
  }
}

/* KTC235: force natural scrolling on mobile/tablet across all KTC pages */
@media (max-width: 1199px), (pointer: coarse) {
  html.ktc-snap-enabled,
  body.ktc-snap-enabled,
  body.ktc-homepage-body.ktc-snap-enabled,
  body.ktc-about-page-body.ktc-snap-enabled,
  body.ktc-fields-body.ktc-snap-enabled,
  body.ktc-construction-body.ktc-snap-enabled,
  body.ktc-contact-body.ktc-snap-enabled,
  body.ktc-sustainability-body.ktc-snap-enabled,
  body.ktc-project-page-body.ktc-snap-enabled {
    scroll-snap-type: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body [data-ktc-snap-root],
  body .ktc-homepage-main,
  body .ktc-about-main,
  body .ktc-project-main,
  body .ktc-dynamic-project-main {
    scroll-snap-type: none !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
  }

  body [data-ktc-snap-section],
  body .ktc-snap-section {
    scroll-snap-align: none !important;
    scroll-snap-stop: normal !important;
    scroll-margin-top: 0 !important;
  }

  body .ktc-section-index,
  body .ktc-section-index--about,
  body .ktc-section-index--project,
  body .ktc-contact-section-index,
  body .ktc-fields-side-nav,
  body .ktc-sustainability-side-nav {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.ktc-fields-body .ktc-fields-section,
  body.ktc-contact-body .ktc-contact-hero.ktc-snap-section,
  body.ktc-contact-body .ktc-contact-page-section.ktc-snap-section,
  body.ktc-sustainability-body .ktc-sustain-section,
  body.ktc-project-page-body .ktc-project-section,
  body.ktc-project-page-body .ktc-dynamic-project-section {
    height: auto !important;
    min-height: auto !important;
  }

  body.ktc-fields-body .ktc-fields-section {
    overflow: hidden !important;
  }
}

/* KTC293: cân lại cỡ tiêu đề section toàn site, giữ tối thiểu 30px - tối đa 60px.
   Không đụng tiêu đề trang/hero. Dùng 1 bộ CSS duy nhất để tránh nhảy/giật khi load. */
:root {
  --ktc-section-title-responsive: clamp(30px, 2.85vw, 60px);
}

@media (min-width: 1024px) and (max-width: 1599px) {
  :root {
    --ktc-section-title-responsive: clamp(30px, 3.15vw, 50px);
  }
}

@media (max-width: 767px) {
  :root {
    --ktc-section-title-responsive: clamp(30px, 7.4vw, 38px);
  }
}

body .section-heading h2,
body .ktc-about__text h2,
body .ktc-message__content h2,
body.ktc-homepage-body .ktc-about-home__eyebrow,
body.ktc-homepage-body .ktc-fields-home__heading h2,
body.ktc-homepage-body .ktc-stats-home__title-fixed,
body.ktc-homepage-body .ktc-news-home__heading h2,
body.ktc-homepage-body .ktc-projects-home__header h2,
body.ktc-member-page-body .ktc-member-tree__intro h2,
body.ktc-about-page-body .ktc-about-chairman__title,
body.ktc-about-page-body .ktc-about-executives__title,
body.ktc-about-page-body .ktc-about-vision-card__title,
body.ktc-about-page-body .ktc-about-values__title,
body.ktc-about-page-body .ktc-about-history__title,
body.ktc-about-page-body .ktc-about-business-plan .ktc-about-history__title,
body.ktc-construction-body .ktc-fields-design__copy h2,
body.ktc-construction-body .ktc-fields-construction__copy h2,
body.ktc-construction-body .ktc-fields-equipment__copy h2,
body.ktc-construction-body .ktc-fields-system__copy h2,
body.ktc-construction-body .ktc-fields-safety__copy h2,
body.ktc-construction-body .ktc-fields-people__copy h2,
body.ktc-construction-body .ktc-fields-mep__copy h2,
body.ktc-construction-body .ktc-fields-cta__inner h2,
body.ktc-contact-body .ktc-contact-section-heading h2,
body.ktc-contact-body .ktc-contact-section-title h2,
body.ktc-contact-body .ktc-contact-form-panel .ktc-contact-section-heading h2,
body.ktc-sustainability-body .ktc-sustain-commit__title,
body.ktc-sustainability-body .ktc-newsclone__heading h2,
body.ktc-sustainability-body .ktc-sustain-goals__title h2,
body.ktc-fields-body .ktc-fields-overview-card__content h2,
body.ktc-real-estate-body .ktc-real-section-heading h2,
body.ktc-real-estate-body .ktc-real-value__copy h2,
body.ktc-real-estate-body .ktc-real-standard__copy h2,
body.ktc-real-estate-body .ktc-real-cta__inner h2,
body.ktc-real-estate-body .ktc-real-projects__head h2,
body.ktc-project-page-body .ktc-project-scale__panel h2,
body.ktc-project-page-body .ktc-project-location h2,
body.ktc-project-page-body .ktc-project-location__copy h2,
body.ktc-project-page-body .ktc-dynamic-project-scale__panel h2,
body.ktc-project-page-body .ktc-dynamic-project-location__copy h2,
body.ktc-project-page-body .ktc-dynamic-project-gallery__head h2,
body.ktc-single-post-body .ktc-single-related__header h2,
body.ktc-single-post-body .ktc-single-comments-card h2 {
  font-size: var(--ktc-section-title-responsive) !important;
}

body.ktc-homepage-body .ktc-stats-home__title-fixed > span,
body.ktc-member-page-body .ktc-member-tree__intro h2 > span,
body.ktc-sustainability-body .ktc-sustain-commit__title > span,
body.ktc-sustainability-body .ktc-sustain-commit__title .ktc-letter-line,
body.ktc-sustainability-body .ktc-sustain-commit__title .ktc-word,
body.ktc-sustainability-body .ktc-sustain-commit__title .ktc-char,
body.ktc-project-page-body .ktc-project-scale__panel h2 span,
body.ktc-project-page-body .ktc-project-scale__panel h2 strong,
body.ktc-project-page-body .ktc-dynamic-project-scale__panel h2 span,
body.ktc-project-page-body .ktc-dynamic-project-scale__panel h2 strong,
body.ktc-construction-body .ktc-fields-equipment__copy h2 strong,
body.ktc-construction-body .ktc-fields-system__copy h2 strong,
body.ktc-construction-body .ktc-fields-safety__copy h2 strong {
  font-size: inherit !important;
}

/* KTC295: đồng bộ kích thước tiêu đề trang/hero theo chuẩn tiêu đề trang Giới thiệu */
:root {
  --ktc-page-hero-title-size: clamp(2.85rem, 5.4vw, 4.85rem);
  --ktc-page-hero-title-line: .94;
  --ktc-page-hero-title-spacing: -0.02em;
}

@media (max-width: 1200px) {
  :root {
    --ktc-page-hero-title-size: clamp(2.7rem, 6vw, 4.35rem);
  }
}

@media (max-width: 767px) {
  :root {
    --ktc-page-hero-title-size: clamp(2.2rem, 11vw, 3.35rem);
  }
}

body.ktc-about-page-body .ktc-about-hero__title,
body.ktc-fields-overview-body .ktc-fields-overview-heading h1,
body.ktc-contact-body .ktc-contact-hero h1,
body.ktc-news-list-body .ktc-news-list-hero h1,
body.ktc-member-page-body .ktc-member-hero__inner h1,
body.ktc-profile-body .ktc-profile-heading h1,
body.ktc-construction-body .ktc-fields-hero__title h1,
body.ktc-real-estate-body .ktc-real-hero__content h1,
body.ktc-project-page-body .ktc-project-overview h1,
body.ktc-project-page-body .ktc-dynamic-project-hero__copy h1,
body.ktc-project-page-body .ktc-project-archive-hero h1 {
  font-size: var(--ktc-page-hero-title-size) !important;
  line-height: var(--ktc-page-hero-title-line) !important;
  letter-spacing: var(--ktc-page-hero-title-spacing) !important;
  font-weight: 400 !important;
}

body.ktc-fields-overview-body .ktc-fields-overview-heading h1,
body.ktc-contact-body .ktc-contact-hero h1,
body.ktc-news-list-body .ktc-news-list-hero h1,
body.ktc-member-page-body .ktc-member-hero__inner h1,
body.ktc-profile-body .ktc-profile-heading h1,
body.ktc-construction-body .ktc-fields-hero__title h1,
body.ktc-real-estate-body .ktc-real-hero__content h1,
body.ktc-project-page-body .ktc-project-overview h1,
body.ktc-project-page-body .ktc-dynamic-project-hero__copy h1,
body.ktc-project-page-body .ktc-project-archive-hero h1 {
  text-transform: uppercase !important;
}

/* KTC301: reduce mobile page/hero titles so long titles like "Lĩnh vực hoạt động" stay on one line */
@media (max-width: 767px) {
  :root {
    --ktc-page-hero-title-size: clamp(24px, 6.4vw, 28px);
    --ktc-page-hero-title-line: 1;
    --ktc-page-hero-title-spacing: -0.035em;
  }

  body.ktc-about-page-body .ktc-about-hero__title,
  body.ktc-fields-overview-body .ktc-fields-overview-heading h1,
  body.ktc-contact-body .ktc-contact-hero h1,
  body.ktc-news-list-body .ktc-news-list-hero h1,
  body.ktc-recruitment-list-body .ktc-news-list-hero h1,
  body.ktc-member-page-body .ktc-member-hero__inner h1,
  body.ktc-profile-body .ktc-profile-heading h1,
  body.ktc-construction-body .ktc-fields-hero__title h1,
  body.ktc-real-estate-body .ktc-real-hero__content h1,
  body.ktc-project-page-body .ktc-project-overview h1,
  body.ktc-project-page-body .ktc-dynamic-project-hero__copy h1,
  body.ktc-project-page-body .ktc-project-archive-hero h1 {
    font-size: var(--ktc-page-hero-title-size) !important;
    line-height: var(--ktc-page-hero-title-line) !important;
    letter-spacing: var(--ktc-page-hero-title-spacing) !important;
  }

  body.ktc-fields-overview-body .ktc-fields-overview-heading h1 {
    font-size: clamp(22px, 5.8vw, 25px) !important;
    white-space: nowrap !important;
    max-width: calc(100vw - 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    letter-spacing: -0.04em !important;
  }
}

/* KTC302: cân lại tiêu đề trang/hero trên mobile - lớn hơn KTC301 nhưng vẫn giữ Lĩnh vực hoạt động 1 hàng */
@media (max-width: 767px) {
  :root {
    --ktc-page-hero-title-size: clamp(30px, 8.05vw, 34px);
    --ktc-page-hero-title-line: 1.02;
    --ktc-page-hero-title-spacing: -0.028em;
  }

  body.ktc-about-page-body .ktc-about-hero__title,
  body.ktc-fields-overview-body .ktc-fields-overview-heading h1,
  body.ktc-contact-body .ktc-contact-hero h1,
  body.ktc-news-list-body .ktc-news-list-hero h1,
  body.ktc-recruitment-list-body .ktc-news-list-hero h1,
  body.ktc-member-page-body .ktc-member-hero__inner h1,
  body.ktc-profile-body .ktc-profile-heading h1,
  body.ktc-construction-body .ktc-fields-hero__title h1,
  body.ktc-real-estate-body .ktc-real-hero__content h1,
  body.ktc-project-page-body .ktc-project-overview h1,
  body.ktc-project-page-body .ktc-dynamic-project-hero__copy h1,
  body.ktc-project-page-body .ktc-project-archive-hero h1 {
    font-size: var(--ktc-page-hero-title-size) !important;
    line-height: var(--ktc-page-hero-title-line) !important;
    letter-spacing: var(--ktc-page-hero-title-spacing) !important;
  }

  body.ktc-fields-overview-body .ktc-fields-overview-heading h1 {
    font-size: clamp(30px, 8vw, 33px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.032em !important;
    white-space: nowrap !important;
    max-width: calc(100vw - 20px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* KTC341: tablet footer contact card sits near the bottom like mobile */
@media (min-width: 768px) and (max-width: 1024px) {
  body .ktc-site-footer,
  body .ktc-site-footer.ktc-snap-section,
  body.ktc-homepage-body.ktc-snap-enabled .ktc-site-footer.ktc-snap-section {
    min-height: 100dvh !important;
    height: auto !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  body .ktc-site-footer .ktc-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  body .ktc-site-footer__inner,
  body .ktc-shared-footer--normal .ktc-site-footer__inner,
  body .ktc-shared-footer--snap .ktc-site-footer__inner,
  body.ktc-homepage-body.ktc-snap-enabled .ktc-site-footer.ktc-snap-section .ktc-site-footer__inner {
    min-height: 100dvh !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 140px 28px 50px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  body .ktc-site-footer__empty {
    display: none !important;
  }

  body .ktc-site-footer__content {
    justify-self: auto !important;
    align-self: center !important;
    width: min(100%, 680px) !important;
    max-width: 680px !important;
    padding: 32px 36px !important;
    border-radius: 22px !important;
    box-sizing: border-box !important;
  }

  body .ktc-site-footer__content h2 {
    font-size: clamp(28px, 4.1vw, 34px) !important;
    line-height: 1.05 !important;
  }

  body .ktc-site-footer__contact {
    margin-top: 24px !important;
    gap: 16px !important;
  }

  body .ktc-site-footer__contact p {
    font-size: clamp(18px, 2.7vw, 22px) !important;
    line-height: 1.5 !important;
  }
}

/* KTC350: align tablet footer slogan position with mobile */
@media (min-width: 768px) and (max-width: 1024px) {
  body .ktc-site-footer .ktc-site-footer__slogan {
    top: 20px !important;
    bottom: auto !important;
    left: 50% !important;
    width: calc(100% - 40px) !important;
    transform: translateX(-50%) !important;
    text-align: center !important;
    z-index: 3 !important;
  }

  body .ktc-site-footer .ktc-site-footer__slogan span {
    font-size: clamp(22px, 3.4vw, 30px) !important;
    line-height: 1.22 !important;
    letter-spacing: .025em !important;
  }

  body .ktc-site-footer .ktc-site-footer__slogan::after {
    width: min(100%, 520px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}
