@font-face {
  font-family: "Muangthaicap Modern";
  src:
    url("/assets/fonts/MuangthaicapModern-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Muangthaicap Modern Medium";
  src: url("/assets/fonts/MuangthaicapModern-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Muangthaicap Text";
  src: url("/assets/fonts/MuangthaicapText-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Muangthaicap Text Medium";
  src: url("/assets/fonts/MuangthaicapText-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --color-primary: #0098dc;
  --color-primary-hover: #0284be;
  --color-accent: #feef3d;
  --color-white: #ffffff;
  --color-focus: #163f73;
  --container-width: 1140px;
  --container-gutter: 24px;
  --utility-height: 39px;
  --primary-nav-height: 80px;

  --mega-menu-width: 650px;
  --mega-menu-duration: 750ms;
  --mega-menu-bottom-space: 15px;
  --primary-nav-hover-duration: 260ms;
  --font-brand: "Muangthaicap Modern", "Tahoma", sans-serif;
  --font-text: "Muangthaicap Text", "Tahoma", sans-serif;
  --font-text-medium: "Muangthaicap Text Medium", "Muangthaicap Text", "Tahoma", sans-serif;
  --font-brand-medium: "Muangthaicap Modern Medium", "Muangthaicap Modern", "Tahoma", sans-serif;
  --z-header: 1000;
  --z-floating-contact: 900;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: #1b1b1b;
  background: var(--color-white);
  font-family: var(--font-brand);
  font-weight: 400;
  line-height: 1.4;
}

img,
video {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--container-width)
  );
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  padding: 10px 14px;
  color: var(--color-white);
  background: var(--color-focus);
  border-radius: 4px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Utility navigation ----------------------------------------------------- */

.utility-bar {
  position: relative;
  z-index: calc(var(--z-header) + 1);
  height: var(--utility-height);
  color: var(--color-primary);
  background: var(--color-accent);
}

.utility-bar__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 24px;
}

.utility-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(17px, 1.35vw, 26px);
  white-space: nowrap;
  font-size: 12.3px;
  font-weight: 300;
}

.utility-nav a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.language-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.language-switcher__item {
  display: inline-flex;
  min-width: 38px;
  height: 21px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  color: var(--color-primary);
  background: var(--color-accent);
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  font-size: 12.5px;
  line-height: 1;
}

.language-switcher__item.is-active {
  color: var(--color-white);
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* Primary navigation ----------------------------------------------------- */

.primary-bar {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--primary-nav-height);
  color: var(--color-white);
  background: var(--color-primary);
  box-shadow: 0 5px 12px rgb(0 63 92 / 20%);
}

/* ลิงก์จากเมนู "แจ้งทุจริตและภัยดิจิทัล"
   เลื่อนส่วนแบบฟอร์มให้เริ่มใต้แถบเมนูสีน้ำเงินพอดี */
.page-contact #contact-form-section {
  scroll-margin-top: var(--primary-nav-height);
}

.primary-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  width: 281px;
}

.brand img {
  display: block;
  width: 80%;
  height: auto;
}

.primary-nav {
  display: flex;
  width: min(55vw, 770px);
  align-items: center;
  justify-content: space-between;
  gap: clamp(22px, 2vw, 44px);
  margin-left: auto;
  font-size: 16.5px;
  white-space: nowrap;
}

.primary-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 12px 0 9px;
}

/*
 * Wrapper จะไม่สร้างกล่องเพิ่มใน Mobile
 * ทำให้ Primary Navigation เดิมยังจัดเรียงเหมือนเดิม
 */
.primary-nav__item {
  display: contents;
}

/*
 * Mega Menu ใช้เฉพาะหน้าจอ Desktop
 * Desktop จะเปลี่ยน display ใน Media Query ด้านล่าง
 */
.mega-menu {
  display: none;
}

/* Layout ภายในหน้าต่าง ----------------------------------------------- */

.mega-menu__grid {
  display: grid;
  width: 100%;

  /*
   * ให้ Grid คำนวณความสูงจาก Content
   * ที่สูงที่สุดภายในหน้าต่างแต่ละเมนู
   */
  align-items: stretch;
}

/*
 * หน้าต่างสินเชื่อแบ่งเท่ากันทั้งสาม Column
 */
.mega-menu__grid--three {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
}

/*
 * หน้าต่างบริการอื่นๆ และคำนวณค่างวด
 * Column รูปมีความกว้าง 1/3 เท่ากับหน้าต่างสินเชื่อ
 */
.mega-menu__grid--two {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 2fr);
}

.mega-menu__cell {
  position: relative;
  min-width: 0;

  /*
   * บน 15px / ซ้าย-ขวา 15px / ล่างตามค่า x
   */
  padding:
    15px
    15px
    var(--mega-menu-bottom-space);
}

/*
 * ยกเลิก Border ที่ลากเต็มความสูงของ Cell
 */
.mega-menu__cell + .mega-menu__cell {
  border-left: 0;
}

/*
 * สร้างเส้นแบ่งที่เว้นระยะจากด้านบนและด้านล่าง
 * ให้เหมือนภาพต้นฉบับ
 */
.mega-menu__cell + .mega-menu__cell::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 0;
  width: 1px;
  background-color: #f2f2f2;
  content: "";
  pointer-events: none;
}

/* รูปภาพ */

.mega-menu__media img {
  display: block;
  width: 100%;

  /*
   * จุดสำคัญที่สุด:
   * บังคับไม่ให้ height="400" จาก HTML ดันรูปให้สูง 400px
   */
  height: auto;

  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

/* หัวข้อมีหลักประกัน/ไม่มีหลักประกัน -------------------------------- */

.mega-menu__heading {
  margin: 0 0 4px;
  color: #404040;
  cursor: default;
  font-family: var(--font-brand-medium);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

/* เมนูย่อย ------------------------------------------------------------ */

.mega-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mega-menu__link {
  display: block;
  color: #7f7f7f;
  cursor: pointer;
  font-family: var(--font-brand);
  font-size: 11.9px;

  font-weight: 400;

  /*
   * คงความสูงของแต่ละบรรทัดไว้
   * เพื่อให้ลดเฉพาะขนาดข้อความ
   * โดยระยะห่างแนวตั้งของเมนูยังเหมือนเดิม
   */
  line-height: 26px;

  white-space: nowrap;
}

/*
 * ไม่เปลี่ยนสี ไม่เลื่อนตำแหน่ง และไม่มี Animation
 * เมื่อ Hover เมนูย่อย
 */
.mega-menu__link:hover,
.mega-menu__link:focus-visible {
  color: #7f7f7f;
}

/*
 * Desktop:
 * ให้พื้นที่ของแต่ละเมนูคำนวณตามความยาวข้อความจริง
 * ไม่บังคับแบ่ง Navigation เป็น 5 ช่องกว้างเท่ากัน
 */
.primary-nav {
  position: relative;
  align-self: stretch;
  flex: 0 0 auto;
  width: auto;
  gap: 0;
}

.primary-nav__item,
.primary-nav > .primary-nav__link {
  flex: 0 0 auto;
  min-width: 0;
}

.primary-nav__item {
  display: flex;
  height: 100%;
  align-items: stretch;
}

.primary-nav__link {
  display: inline-flex;
  width: auto;
  height: 100%;
  align-items: center;
  justify-content: center;

  /*
   * พื้นที่คลิกซ้าย–ขวาของแต่ละเมนู
   * ขนาดจะอยู่ใกล้ต้นฉบับ และยืดหยุ่นตามความกว้างหน้าจอ
   */
  padding: 0 clamp(22px, 1.55vw, 30px);

  transition:
    background-color var(--primary-nav-hover-duration) ease;
}

/*
 * เปลี่ยนแถบเมนูด้านบนเป็นสีน้ำเงินเข้ม
 * เมื่อ Hover เมนู หรือใช้คีย์บอร์ด Focus อยู่ที่เมนูนั้น
 */
.primary-nav__link:hover,
.primary-nav__link:focus-visible,
.primary-nav__item:hover > .primary-nav__link,
.primary-nav__item:focus-within > .primary-nav__link {
  background-color: var(--color-primary-hover);
}

/*
 * กล่อง Mega menu:
 * วางชิดใต้แถบสีน้ำเงิน
 * และยึดขอบซ้ายของ Navigation ซึ่งตรงกับขอบซ้ายปุ่ม "สินเชื่อ"
 */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1;
  display: block;
  visibility: hidden;

  width: min(
    var(--mega-menu-width),
    calc(100vw - (var(--container-gutter) * 2))
  );

  color: #7f7f7f;
  white-space: normal;
  opacity: 0;
  pointer-events: none;

  transition:
    opacity var(--mega-menu-duration) ease,
    visibility 0s linear var(--mega-menu-duration);

  will-change: opacity;
}

.mega-menu__panel {
  overflow: hidden;
  background-color: #ffffff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 14px 32px rgb(0 0 0 / 18%);

  transform: translateY(16px);

  transition:
    transform var(--mega-menu-duration) ease;

  will-change: transform;
}

.primary-nav__item:hover > .mega-menu,
.primary-nav__item:focus-within > .mega-menu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

.primary-nav__item:hover > .mega-menu .mega-menu__panel,
.primary-nav__item:focus-within > .mega-menu .mega-menu__panel {
  transform: translateY(0);
}

.dropdown-icon {
  display: block;
  flex: 0 0 auto;
  width: 21px;
  height: 18px;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.primary-bar__mobile-actions,
.mobile-branch-locator {
  display: none;
}

.mobile-branch-locator {
  width: 34px;
  height: 30px;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  background: transparent;
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 6px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.mobile-branch-locator svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.mobile-branch-locator:hover,
.mobile-branch-locator:focus-visible {
  color: var(--color-white);
  background-color: rgb(255 255 255 / 10%);
  border-color: var(--color-white);
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero video ------------------------------------------------------------- */

.hero {
  width: 100%;
  overflow: hidden;
  background: #ffffff;
}

.hero__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ffffff;
}

.hero__video,
.hero__poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* ซ่อนวิดีโอไว้ก่อน เพื่อให้ช่วงแรกเห็นเฉพาะพื้นที่สีขาว */
.hero__video {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  object-fit: contain;
  object-position: center;
}

/* Poster อยู่เหนือวิดีโอ และเริ่มต้นด้วย opacity 0 */
.hero__poster {
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 350ms ease;
  object-fit: cover;
  object-position: center;
}

/* เริ่ม Fade in Poster หลังจาก JavaScript รอครบ 0.5 วินาที */
.hero.is-poster-visible .hero__poster {
  opacity: 1;
}

/*
 * เมื่อวิดีโอพร้อม:
 * - แสดงวิดีโอไว้ด้านหลังทันที
 * - Fade out Poster เป็นเวลา 0.35 วินาที
 */
.hero.is-video-visible .hero__video {
  opacity: 1;
}

.hero.is-video-visible .hero__poster {
  opacity: 0;
}

/* Home banner carousel --------------------------------------------------- */

.banner-carousel {
  width: 100%;
  overflow: hidden;
  background: #ffffff;
}

.banner-carousel__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #ffffff;

  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.banner-carousel__viewport.is-dragging {
  cursor: grabbing;
}

.banner-carousel__track {
  --banner-index: 0;
  --banner-duration: 650ms;

  display: flex;
  width: 100%;
  align-items: flex-start;
  transform: translate3d(
    calc(
      (var(--banner-index) * -100%)
      + var(--banner-drag-x, 0px)
    ),
    0,
    0
  );
  will-change: transform;
}

.banner-carousel__track.is-animating {
  transition:
    transform var(--banner-duration)
    cubic-bezier(0.45, 0, 0.2, 1);
}

.banner-carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.banner-carousel__link {
  display: block;
  width: 100%;
  cursor: inherit;
  -webkit-user-drag: none;
}

.banner-carousel__image {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 768px) {
  .banner-carousel__slide {
    aspect-ratio: 12 / 13;
    overflow: hidden;
  }

  .banner-carousel__link {
    height: 100%;
  }

  .banner-carousel__image {
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
}

.banner-carousel__link:focus-visible {
  outline-offset: -5px;
}

.banner-carousel__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 0.78vw, 15px);
  padding:
    clamp(24px, 2.4vw, 46px)
    16px;
  background: #ffffff;
}

.banner-carousel__dot {
  display: block;
  flex: 0 0 auto;
  width: clamp(9px, 0.79vw, 15px);
  height: clamp(9px, 0.79vw, 15px);
  margin: 0;
  padding: 0;
  background: #0098dc;
  border: 0;
  border-radius: 50%;
  cursor: pointer;

  /*
   * ใช้ Transition เฉพาะการเปลี่ยนสี
   * ไม่มีการขยายหรือหดวงกลม
   */
  transition:
    background-color 250ms ease;
}

/*
 * วงกลม Active เปลี่ยนเป็นสีเหลืองทันที
 * ไม่รอ Fade 0.75 วินาที
 */
.banner-carousel__dot.is-active {
  background: #fff03d;
  transition-duration: 0ms;
}

/*
 * Hover เฉพาะวงกลมที่ไม่ได้ Active
 * ค่อย ๆ Fade จากฟ้าไปเหลืองภายใน 0.75 วินาที
 *
 * จำกัดไว้เฉพาะอุปกรณ์ที่มีเมาส์จริง
 * เพื่อป้องกัน Hover ค้างบนหน้าจอสัมผัส
 */
@media (hover: hover) and (pointer: fine) {
  .banner-carousel__dot:not(.is-active):hover {
    background: #fff03d;
  }
}

.banner-carousel__dot:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.banner-carousel__dot:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* Customer stories ------------------------------------------------------- */

.customer-stories {
  --stories-primary: #0098dc;
  --stories-primary-hover: #0070c0;
  --stories-background: #f6f6f6;
  --stories-line: #dedede;
  --stories-yellow: #fff03d;
  --stories-content-width: 1100px;
  --stories-card-gap: 20px;

  position: relative;
  isolation: isolate;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: var(--stories-background);
}

.customer-stories__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.customer-stories__background img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.customer-stories__container {
  position: relative;
  z-index: 1;
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--stories-content-width)
  );
  height: auto;
  margin-inline: auto;
}

.customer-stories__content {
  display: flex;
  height: auto;
  flex-direction: column;
  padding-top: clamp(52px, 7.8svh, 58px);
  padding-bottom: 28px;
}

/* หัวข้อ เส้น และปุ่มอยากบอกเล่า */

.customer-stories__heading {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 22px;
}

.customer-stories__heading h2 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--stories-primary);
  font-family: var(--font-brand);
  font-size: clamp(36px, 2.35vw, 45px);
  font-weight: 400;
  line-height: 1;
}

.customer-stories__heading-line {
  position: relative;
  display: block;
  min-width: 40px;
  height: 1px;
  flex: 1 1 auto;
  background: var(--stories-line);
  transform: translateY(6px);
}

.customer-stories__heading-line::before,
.customer-stories__heading-line::after {
  position: absolute;
  top: 50%;
  width: 5.6px;
  height: 5.6px;
  content: "";
  background: var(--stories-line);
  border-radius: 50%;
  transform: translateY(-50%);
}

.customer-stories__heading-line::before {
  left: 0;
}

.customer-stories__heading-line::after {
  right: 0;
}

.customer-stories__feedback-button {
  display: inline-flex;
  min-width: 148px;
  height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-inline: 16px;
  color: #ffffff;
  background: var(--stories-primary);
  border-radius: 5px;
  font-family: var(--font-brand);
  font-size: 14.4px;
  line-height: 1;
  transform: translateY(6px);
  transition: background-color 250ms ease;
}

.customer-stories__feedback-button img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.customer-stories__feedback-button:hover,
.customer-stories__feedback-button:focus-visible {
  background: var(--stories-primary-hover);
}

/* กล่องคะแนนรวมและ Carousel */

.customer-stories__carousel {
  position: relative;
  flex: 0 0 auto;
  margin-top: clamp(54px, 8.3svh, 62px);
}

.customer-stories__grid {
  display: grid;
  height: clamp(360px, 48svh, 420px);
  grid-template-columns:
    minmax(0, calc((100% - (var(--stories-card-gap) * 2)) / 3))
    minmax(0, 1fr);
  gap: var(--stories-card-gap);
}

.review-summary,
.customer-review-card {
  overflow: hidden;
  border-radius: 12px;
}

.review-summary {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 48px 25px 38px;
  color: #ffffff;
  background: var(--stories-primary);
}

.review-summary__score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  transform: translateX(-12px);
}

.review-summary__score > strong {
  flex: 0 0 auto;
  font-family: var(--font-brand-medium);
  font-size: clamp(72.5px, 5.81vw, 108px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -4px;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.review-summary__description {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(5px);
}

.review-summary__grade {
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
}

.review-summary__maximum {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}

.review-summary__total {
  margin-top: 7px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.review-summary__distribution {
  display: grid;
  gap: 9px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.review-summary__distribution li {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.review-summary__stars {
  display: block;
  width: 100%;
  height: 18px;
  background: linear-gradient(
    to right,
    #ffffff 0%,
    #ffffff var(--stars-fill),
    #76d5f5 var(--stars-fill),
    #76d5f5 100%
  );
  -webkit-mask-image: url("https://muangthaicap.com/mtc-public/assets/images/icons/star-rounded.svg");
  mask-image: url("https://muangthaicap.com/mtc-public/assets/images/icons/star-rounded.svg");
  -webkit-mask-position: left center;
  mask-position: left center;
  -webkit-mask-repeat: space no-repeat;
  mask-repeat: space no-repeat;
  -webkit-mask-size: 17.4% 100%;
  mask-size: 17.4% 100%;
}

.review-summary progress {
  width: 100%;
  height: 10.5px;
  overflow: hidden;
  appearance: none;
  background: rgb(255 255 255 / 42%);
  border: 0;
  border-radius: 999px;
}

.review-summary progress::-webkit-progress-bar {
  background: rgb(255 255 255 / 42%);
  border-radius: 999px;
}

.review-summary progress::-webkit-progress-value {
  background: #ffffff;
  border-radius: 999px;
}

.review-summary progress::-moz-progress-bar {
  background: #ffffff;
  border-radius: 999px;
}

/* ส่วนรีวิวที่เลื่อน */

.customer-reviews__viewport {
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-text);
}

.customer-reviews__track {
  --stories-index: 0;
  --stories-duration: 600ms;

  display: flex;
  width: 100%;
  height: 100%;
  transform: translate3d(
    calc(var(--stories-index) * -100%),
    0,
    0
  );
  will-change: transform;
}

.customer-reviews__track.is-animating {
  transition:
    transform var(--stories-duration)
    cubic-bezier(0.45, 0, 0.2, 1);
}

.customer-reviews__page {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--stories-card-gap);
}

.customer-review-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  padding: 20px;
  color: #858585;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.customer-review-card__title {
  margin: 0;
  color: var(--stories-primary);
  font-size: 15px;
  font-weight: 500;
}

.customer-review-card__message {
  margin: 14px 0 0;
  color: var(--stories-primary);
  font-size: 14px;
}

.customer-review-card__categories {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 12px;
  margin-top: auto;
  overflow: hidden;
  flex-wrap: nowrap;
}

.customer-review-card__category {
  display: block;
  flex: 0 0 auto;
  padding: 9px 20px;
  color: var(--stories-primary);
  background: #e2f7ff;
  border-radius: 999px;
  font-size: 12.6px;
  line-height: 1;
  white-space: nowrap;
}

.customer-review-card__profile {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.customer-review-card__avatar {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.customer-review-card__identity {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.customer-review-card__identity strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-review-card__stars {
  color: var(--stories-yellow);
  font-size: 19px;
  letter-spacing: 1px;
  line-height: 1;
}

.customer-review-card__profile time {
  align-self: end;
  color: #b8b8b8;
  font-size: 10.5px;
  white-space: nowrap;
}

.customer-review-card__reply {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid #dedede;
  font-size: 14.3px;
}

.customer-review-card__reply strong {
  font-size: 13.8px;
  font-weight: 500;
}

.customer-review-card__reply p {
  margin: 6px 0 0;
}

.customer-review-card__reply time {
  display: block;
  margin-top: 6px;
  color: #b8b8b8;
  font-size: 11.6px;
  text-align: right;
}

/*
 * รูปแบบข้อความภายในการ์ดหน้าแรก
 */

/*
 * จำกัด testimonial_text ไม่เกิน 3 บรรทัด
 */

.customer-stories
  .customer-review-card__message {
  display: -webkit-box;
  max-height: calc(1.45em * 3);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

/*
 * คงพื้นที่ตอบกลับไว้ทุกการ์ด
 */

.customer-stories
  .customer-review-card__reply {
  box-sizing: border-box;
  min-height: 105px;
  flex: 0 0 105px;
}

/*
 * จำกัด staff_reply ไม่เกิน 2 บรรทัด
 */

.customer-stories
  .customer-review-card__reply
  p {
  display: -webkit-box;
  max-height: calc(1.45em * 2);
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.customer-stories
  .customer-review-card__reply--empty
  strong {
  display: block;
}

/* ลูกศร */

.customer-stories__arrow {
  position: absolute;
  top: 41%;
  z-index: 2;
  display: inline-flex;
  width: 37px;
  height: 37px;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: #ffffff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgb(0 0 0 / 7%);
  cursor: pointer;
  transform: translateY(-50%);

  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

.customer-stories__arrow--previous {
  left: -48px;
}

.customer-stories__arrow--next {
  right: -48px;
}

.customer-stories__arrow img {
  display: block;
  width: 16.5px;
  height: auto;
  opacity: 0.72;
  filter: none;
  object-fit: contain;

  transition:
    filter 0.25s ease,
    opacity 0.25s ease;
}

.customer-stories__arrow:not(:disabled):hover,
.customer-stories__arrow:not(:disabled):focus-visible {
  background-color: #0098dc;
  box-shadow: none;
}

.customer-stories__arrow:not(:disabled):hover img,
.customer-stories__arrow:not(:disabled):focus-visible img {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.customer-stories__arrow:disabled,
.customer-stories__dot:disabled {
  cursor: default;
}

.customer-stories__arrow:disabled {
  opacity: 0.55;
}

/* Pagination และปุ่มทั้งหมด */

.customer-stories__pagination {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(42px, 6.4svh, 48px);
}

.customer-stories__dot {
  width: 11.05px;
  height: 11.05px;
  margin: 0;
  padding: 0;
  background: #d2d2d2;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 250ms ease;
}

.customer-stories__dot.is-active {
  background: #ffffff;
  border: 0;
  box-shadow: inset 0 0 0 1.7px var(--stories-primary);
}

.customer-stories__all-button {
  display: inline-flex;
  min-width: 170px;
  height: 40.8px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  align-self: center;
  margin-top: clamp(30px, 4.4svh, 39px);
  padding-inline: 20.4px;
  color: var(--stories-primary);
  background: var(--stories-yellow);
  border-radius: 5.1px;
  font-family: var(--font-brand-medium);
  font-size: 17px;
  line-height: 1;
  transition:
    color 250ms ease,
    background-color 250ms ease;
}

.customer-stories__all-button:hover,
.customer-stories__all-button:focus-visible {
  color: #ffffff;
  background: var(--stories-primary);
}

.review-summary__stars--5 {
  --stars-fill: 100%;
}

.review-summary__stars--4 {
  --stars-fill: 80%;
}

.review-summary__stars--3 {
  --stars-fill: 60%;
}

.review-summary__stars--2 {
  --stars-fill: 40%;
}

.review-summary__stars--1 {
  --stars-fill: 20%;
}

/* Responsive ของ Customer stories */

@media (max-width: 1200px) {
  .customer-stories {
    --stories-card-gap: 18px;
  }

  .customer-stories__arrow {
    top: 50%;
  }

  .customer-stories__arrow--previous {
    left: -12px;
  }

  .customer-stories__arrow--next {
    right: -12px;
  }

  .review-summary {
    padding-inline: 22px;
  }

  .review-summary__score {
    gap: 18px;
    transform: none;
  }
}

@media (max-width: 1024px) {
  .customer-stories {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .customer-stories__content {
    padding-top: 34px;
    padding-bottom: 48px;
  }

  .customer-stories__grid {
    height: auto;
    grid-template-columns:
      minmax(280px, 0.8fr)
      minmax(0, 1.2fr);
  }

  .review-summary {
    min-height: 430px;
  }

  .customer-reviews__page {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-review-card {
    min-height: 390px;
  }
}

@media (max-width: 700px) {
  .customer-stories__content {
    padding-top: 56px;
  }

  .customer-stories__heading {
    flex-wrap: wrap;
    justify-content: center;
  }

  .customer-stories__heading h2 {
    width: 100%;
    font-size: 36px;
    text-align: center;
  }

  .customer-stories__heading-line {
    display: none;
  }

  .customer-stories__feedback-button {
    width: 100%;
    min-width: 0;
    height: 42px;
    margin-left: 0;
    font-size: 12.6px;
    transform: none;
  }

  .customer-stories__carousel {
    margin-top: 18px;
  }

  .customer-stories__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-summary {
    min-height: 0;
  }

  /* Mobile ใช้ swipe/touch แทนปุ่มลูกศรเหมือนเว็บต้นฉบับ */
  .customer-stories__arrow {
    display: none;
  }

  .customer-reviews__viewport {
    touch-action: pan-y;
    transition: height 220ms ease;
  }

  .customer-reviews__track {
    --stories-mobile-slide-gap: 20px;

    align-items: flex-start;
    gap: var(--stories-mobile-slide-gap);
  }

  .customer-reviews__page {
    align-items: start;
    align-self: flex-start;
  }

  .customer-stories__pagination {
    margin-top: 36px;
  }

  .customer-stories__all-button {
    width: 100%;
    min-width: 0;
    align-self: stretch;
  }
}

/* Branch locator --------------------------------------------------------- */

.branch-locator {
  --branch-primary: #0098dc;
  --branch-primary-hover: #007fba;
  --branch-panel: #b9e1f7;
  --branch-heading-dark: #565656;
  --branch-input-gray: #757575;
  --branch-divider: #e0e0e0;
  --branch-body-text: #3f3f3f;
  --branch-content-width: 1100px;
  --branch-stats-width: 1100px;

  width: 100%;
  height: auto;
  min-height: 0;
  overflow: hidden;
  color: var(--branch-body-text);
  background: #ffffff;
  font-family: var(--font-brand);
}

.branch-locator__inner {
  display: flex;
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--branch-content-width)
  );
  height: auto;
  flex-direction: column;
  justify-content: flex-start;
  margin-inline: auto;
  padding-block: 38px 30px;
}

/* หัวข้อ --------------------------------------------------------------- */

.branch-locator__title {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  justify-content: center;
  gap: 13px;
  margin: 0;
  font-family: var(--font-brand);
  font-size: 35px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.branch-locator__title-brand {
  color: var(--branch-primary);
}

.branch-locator__title-description {
  color: var(--branch-heading-dark);
}

/* สถิติ 3 ชุด ---------------------------------------------------------- */

.branch-locator__stats {
  display: grid;
  width: min(100%, var(--branch-stats-width));
  flex: 0 0 auto;
  grid-template-columns:
    minmax(0, 1fr)
    1px
    minmax(0, 1fr)
    1px
    minmax(0, 1fr);
  align-items: center;
  margin: 64px auto 0;
}

.branch-stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* โครงร่วมของไอคอนแบบ CSS Mask */

.branch-stat__icon,
.branch-search__pin {
  display: block;
  flex: 0 0 auto;
  background-color: var(--branch-primary);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.branch-stat__icon {
  width: 70px;
  height: 70px;
}

/* ปรับขนาดรายไอคอนให้ใกล้ภาพอ้างอิง */

.branch-stat__icon--age {
  width: 65px;
  height: 65px;
  background:
    transparent
    url("https://muangthaicap.com/mtc-public/assets/images/icons/branch-age.webp")
    center / contain
    no-repeat;
  -webkit-mask-image: none;
  mask-image: none;
}

.branch-stat__icon--count {
  width: 58px;
  height: 58px;
  -webkit-mask-image:
    url("https://muangthaicap.com/mtc-public/assets/images/icons/branch-count.svg");
  mask-image:
    url("https://muangthaicap.com/mtc-public/assets/images/icons/branch-count.svg");
}

.branch-stat__icon--rating {
  width: 65px;
  height: 54px;
  -webkit-mask-image:
    url("https://muangthaicap.com/mtc-public/assets/images/icons/branch-rating.svg");
  mask-image:
    url("https://muangthaicap.com/mtc-public/assets/images/icons/branch-rating.svg");
}

.branch-stat__value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 9px 0 0;
  color: var(--branch-primary);
  font-family: var(--font-brand);
  line-height: 1;
}

/* เฉพาะตัวเลขใช้ Modern Medium */

.branch-stat__value strong {
  font-family: var(--font-brand-medium);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.3px;
}

.branch-stat__value span {
  font-family: var(--font-brand-medium);
  font-size: 16px;
  font-weight: 400;
}

.branch-stat__label {
  margin: 9px 0 0;
  color: var(--branch-body-text);
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

/* เส้นคั่นพร้อมวงกลมบนและล่าง */

.branch-locator__separator {
  position: relative;
  display: block;
  width: 0;
  height: 138px;
  justify-self: center;
  background: transparent;
  border-left: 1px solid var(--branch-divider);
}

.branch-locator__separator::before,
.branch-locator__separator::after {
  position: absolute;
  left: 0;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--branch-divider);
  border-radius: 50%;
}

.branch-locator__separator::before {
  top: 0;
  transform: translate(-50%, -50%);
}

.branch-locator__separator::after {
  bottom: 0;
  transform: translate(-50%, 50%);
}

/* แถบค้นหาสาขา -------------------------------------------------------- */

.branch-search {
  display: grid;
  width: 100%;
  min-height: 114px;
  flex: 0 0 auto;
  grid-template-columns:
    370px
    340px
    128px
    174px;
  align-items: center;
  column-gap: 14px;
  margin-top: 36px;
  padding: 16px;
  background: var(--branch-panel);
  border-radius: 10px;
}

.branch-search__prompt {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.branch-search__pin {
  width: 38px;
  height: 46px;
  -webkit-mask-image:
    url("https://muangthaicap.com/mtc-public/assets/images/icons/location-pin.png");
  mask-image:
    url("https://muangthaicap.com/mtc-public/assets/images/icons/location-pin.png");
}

.branch-search__prompt p {
  margin: 0;
  color: var(--branch-heading-dark);
  font-family: var(--font-brand);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.15;
  white-space: nowrap;
}

.branch-search__prompt strong {
  color: var(--branch-primary);
  font-family: var(--font-brand);
  font-weight: 400;
}

/* Label สำหรับ Screen Reader แต่ไม่แสดงบนหน้าจอ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.branch-search__field {
  min-width: 0;
}

.branch-search__field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: var(--branch-heading-dark);
  background: #ffffff;
  border: 0;
  border-radius: 5px;
  appearance: none;
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.branch-search__field input::placeholder {
  color: var(--branch-input-gray);
  opacity: 1;
}

.branch-search__field input:focus-visible {
  outline: 3px solid var(--branch-primary);
  outline-offset: 2px;
}

/* ปุ่มค้นหาและปุ่มค้นหาจากตำแหน่ง */

.branch-search__submit,
.branch-search__location {
  display: inline-flex;
  width: 100%;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition:
    color 200ms ease,
    background-color 200ms ease,
    border-color 200ms ease;
}

.branch-search__submit {
  color: #ffffff;
  background: var(--branch-primary);
  border: 1px solid var(--branch-primary);
}

.branch-search__location {
  color: var(--branch-primary);
  background: #ffffff;
  border: 1px solid var(--branch-primary);
}

.branch-search__submit:hover,
.branch-search__submit:focus-visible {
  background: var(--branch-primary-hover);
  border-color: var(--branch-primary-hover);
}

.branch-search__location:hover,
.branch-search__location:focus-visible {
  color: #ffffff;
  background: var(--branch-primary);
}

/* Responsive ของ Branch locator ---------------------------------------- */

@media (max-width: 1160px) {
  .branch-locator {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .branch-locator__inner {
    padding-block: 48px 24px;
  }

  .branch-search {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, 1fr);
    min-height: 0;
    padding: 24px;
  }

  .branch-search__prompt,
  .branch-search__field {
    grid-column: 1 / -1;
  }

  .branch-search__prompt {
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .branch-locator__inner {
    padding-bottom: 0;
  }

  .branch-locator__title {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 36px;
  }

  .branch-locator__stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 38px;
  }

  .branch-locator__separator {
    width: min(70%, 240px);
    height: 1px;
    margin-inline: auto;
    background: var(--branch-divider);
    border-left: 0;
  }

  .branch-locator__separator::before,
  .branch-locator__separator::after {
    top: 50%;
    bottom: auto;
  }

  .branch-locator__separator::before {
    right: auto;
    left: 0;
    transform: translate(-50%, -50%);
  }

  .branch-locator__separator::after {
    right: 0;
    left: auto;
    transform: translate(50%, -50%);
  }

  .branch-search {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 42px;
  }

  .branch-search__prompt,
  .branch-search__field,
  .branch-search__submit,
  .branch-search__location {
    grid-column: 1;
  }

  .branch-search__prompt {
    justify-content: flex-start;
  }

  .branch-search__prompt p {
    white-space: normal;
  }

  /* Mobile: full-bleed branch search panel to match the original site. */
  .branch-search {
    width: 100vw;
    max-width: none;
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
    padding: 20px 17px 30px;
    border-radius: 0;
  }

  .branch-search__prompt {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
  }

  .branch-search__pin {
    margin-inline: auto;
  }

  .branch-search__prompt p {
    width: 100%;
    font-size: 18.2px;
    text-align: center;
    line-height: 1.35;
  }

  .branch-search__submit,
  .branch-search__location {
    font-size: 14.4px;
  }
}

/* Loan services ---------------------------------------------------------- */

.loan-services {
  --loan-primary: #0098dc;
  --loan-primary-hover: #007fba;
  --loan-yellow: #fff03d;
  --loan-heading: #4e4e4e;
  --loan-muted: #bfbfbf;
  --loan-content-width: 1375px;
  --loan-card-gap: 20px;

  /* ระยะ Toggle–Card ปัจจุบัน */
  --loan-panel-gap-current:
    calc(clamp(35px, 5.2svh, 38px) + 2px);

  /* เพิ่มขึ้น 58% จากระยะปัจจุบัน */
  --loan-panel-gap-increase:
    clamp(
      21.46px,
      calc(3.016svh + 1.16px),
      23.2px
    );

  position: relative;
  width: 100%;
  height: auto;
  min-height: 950px;
  overflow: hidden;
  color: var(--loan-heading);
  background-color: #eef8fd;
  background-image:
    url("https://muangthaicap.com/mtc-public/assets/images/loans/loan-services-background.jpg");
  background-position: 58% center;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: var(--font-brand);
}

.loan-services__inner {
  display: flex;
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--loan-content-width)
  );
  flex-direction: column;
  align-items: center;
  margin-inline: auto;
  padding-block:
    clamp(46px, 6.6svh, 58px)
    44px;
}

/* ข้อความแนะนำ --------------------------------------------------------- */

.loan-services__intro {
  width: 100%;
  text-align: center;
}

.loan-services__title {
  margin: 0;
  color: var(--loan-heading);
  font-family: var(--font-brand);
  font-size: clamp(42px, 2.4vw, 48px);
  font-weight: 400;
  line-height: 1;
}

.loan-services__lead {
  margin: 26px 0 0;
  color: var(--loan-heading);
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  text-align: center;
}

.loan-services__lead-line {
  display: block;
}

.loan-services__lead-line--highlight {
  color: var(--loan-primary);
}

/* หัวข้อและปุ่มเลือกประเภทสินเชื่อ ------------------------------------ */

.loan-services__selector {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(74px, 10.6svh, 88px);
}

.loan-services__selector-title {
  margin: 0;
  color: var(--loan-heading);
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}

.loan-services__tabs {
  display: grid;
  width: min(100%, 368px);
  height: 40px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 19px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--loan-primary);
  border-radius: 6px;
}

.loan-services__tab {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 18px;
  color: var(--loan-primary);
  background: #ffffff;
  border: 0;
  cursor: pointer;
  font-family: var(--font-brand-medium);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  transition:
    color 200ms ease,
    background-color 200ms ease;
}

.loan-services__tab + .loan-services__tab {
  border-left: 1px solid var(--loan-primary);
}

.loan-services__tab.is-active {
  color: #ffffff;
  background: var(--loan-primary);
}

.loan-services__tab:not(.is-active):hover {
  background: #eef9fe;
}

.loan-services__tab:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--color-focus);
  outline-offset: -4px;
}

/* กลุ่มการ์ด ----------------------------------------------------------- */

.loan-products__panel {
  width: min(100%, 1100px);
  margin-top:
    calc(
      var(--loan-panel-gap-current)
      + var(--loan-panel-gap-increase)
    );
}

.loan-products__panel[hidden] {
  display: none;
}

.loan-products__grid {
  display: grid;
  width: 100%;
  grid-template-columns:
    repeat(auto-fit, minmax(200px, 260px));
  justify-content: center;
  gap: var(--loan-card-gap);
}

.loan-products__viewport {
  width: 100%;
  overflow: hidden;
}

.loan-products__track {
  display: flex;
  width: 100%;
  align-items: stretch;
  gap: var(--loan-card-gap);
  transform: translate3d(0, 0, 0);
  transition:
    transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.loan-products__track > .loan-card {
  flex: 0 0 calc(25% - 15px);
}

/*
 * เมื่อเปิดหน้าที่ 2:
 * เลื่อน Track ไปทางซ้ายเท่ากับ
 * ความกว้างการ์ด 1 ใบ + Gap 1 ช่อง
 */
.loan-products__track.is-shifted {
  transform: translate3d(
    calc(-25% - 5px),
    0,
    0
  );
}

.loan-card {
  display: flex;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 7px 21px rgb(44 88 112 / 7%);
}

.loan-card__image {
  display: block;
  width: 100%;
  height:
    calc(
      225.6px
      - var(--loan-panel-gap-increase)
    );
  aspect-ratio: auto;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center;
}

.loan-card__body {
  display: flex;
  min-height: 158px;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  padding: 22px 19px 24px;
  text-align: center;
}

.loan-card__title {
  margin: 0;
  color: var(--loan-heading);
  font-family: var(--font-brand);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.25;
}

.loan-card__button {
  display: inline-flex;
  width: min(100%, 160px);
  min-height: 35px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 6px 14px;
  color: #ffffff;
  background: var(--loan-primary);
  border-radius: 5px;
  font-family: var(--font-brand);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1;
  transition:
    color 200ms ease,
    background-color 200ms ease;
}

.loan-card__button:hover,
.loan-card__button:focus-visible {
  background: var(--loan-primary-hover);
}

.loan-card__sustainability {
  display: inline-block;
  margin-top: 12px;
  padding: 0;
  color: var(--loan-muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  appearance: none;
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.loan-card__sustainability:hover,
.loan-card__sustainability:focus-visible {
  color: var(--loan-primary);
}

.loan-card__sustainability:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

/* Sustainability dialog ----------------------------------------------- */

html.has-sustainability-dialog {
  overflow: hidden;
}

.sustainability-dialog {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 24px;
  overflow: hidden;
  color: #404040;
  background: transparent;
  border: 0;
}

.sustainability-dialog[open] {
  display: grid;
  place-items: center;
  animation:
    sustainability-dialog-fade-in
    350ms
    ease
    both;
}

.sustainability-dialog[open]::backdrop {
  background: rgb(0 0 0 / 70%);
  animation:
    sustainability-backdrop-fade-in
    350ms
    ease
    both;
}

/*
 * สถานะกำลังปิด
 * JavaScript จะเพิ่ม Class นี้ก่อนปิด Dialog จริง
 */
.sustainability-dialog[open].is-closing {
  pointer-events: none;
  animation-name: sustainability-dialog-fade-out;
}

.sustainability-dialog[open].is-closing::backdrop {
  animation-name: sustainability-backdrop-fade-out;
}

/* Dialog และกล่องสีขาว: จากไม่มีไปเป็นแสดงผลเต็มที่ */
@keyframes sustainability-dialog-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Dialog และกล่องสีขาว: จากแสดงผลเต็มที่ไปเป็นไม่มี */
@keyframes sustainability-dialog-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Layer พื้นหลังสีดำ: Fade-in */
@keyframes sustainability-backdrop-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Layer พื้นหลังสีดำ: Fade-out */
@keyframes sustainability-backdrop-fade-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/*
 * ลด Animation สำหรับผู้ใช้ที่ตั้งค่า
 * Reduce motion ไว้ในระบบปฏิบัติการ
 */
@media (prefers-reduced-motion: reduce) {
  .sustainability-dialog[open],
  .sustainability-dialog[open]::backdrop {
    animation-duration: 1ms;
  }
}

/* Homepage content feed: database fallback states ---------------------- */

.content-feed-empty {
  margin: 0;
  padding: 28px 24px;
  color: #666666;
  background-color: #f5f7f8;
  border: 1px solid #d9d9d9;
  border-radius: 9px;
  font-family: var(--font-brand);
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
}

.article-card__media.is-placeholder,
.news-card__media.is-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgb(0 152 220 / 16%), rgb(255 240 61 / 38%));
}

.article-card__media.is-placeholder::after,
.news-card__media.is-placeholder::after {
  color: var(--color-primary);
  content: "เมืองไทย แคปปิตอล";
  font-family: var(--font-brand-medium);
  font-size: clamp(18px, 2vw, 26px);
}

/*
 * กล่องสีขาว
 * ขนาดใกล้เคียงต้นฉบับประมาณ 625 × 706px
 */
.sustainability-dialog__window {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(100%, 625px);
  max-height: min(706px, calc(100dvh - 48px));
  padding: 32px 36px 50px;
  overflow: hidden;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 22%);
}

/* ส่วนหัว -------------------------------------------------------------- */

.sustainability-dialog__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.sustainability-dialog__title {
  margin: 0;
  color: #404040;
  font-family: var(--font-brand-medium);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
}

/* ปุ่มปิด -------------------------------------------------------------- */

.sustainability-dialog__close {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin: -4px -7px 0 0;
  padding: 0;
  color: #262626;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.sustainability-dialog__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  background: currentcolor;
  border-radius: 999px;
}

.sustainability-dialog__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.sustainability-dialog__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.sustainability-dialog__close:hover {
  color: var(--color-primary);
  background: rgb(0 152 220 / 8%);
}

.sustainability-dialog__close:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
}

/* เนื้อหาภายใน --------------------------------------------------------- */

.sustainability-dialog__content {
  min-height: 0;
  margin-top: 18px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

/*
 * ซ่อน Scrollbar ใน Chrome, Edge และ Safari
 * แต่ยังสามารถเลื่อนได้ในกรณีหน้าจอเตี้ยมาก
 */
.sustainability-dialog__content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.sustainability-dialog__content {
  scrollbar-width: none;
}

.sustainability-dialog__paragraphs {
  display: grid;
  gap: 17px;
}

.sustainability-dialog__paragraph {
  margin: 0;
  color: #404040;
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.44;
}

.sustainability-dialog__paragraph strong {
  color: #262626;
  font-family: var(--font-text-medium);
  font-weight: 400;
}

.sustainability-dialog__paragraph strong::after {
  content: " ";
}

/* Mobile --------------------------------------------------------------- */

@media (max-width: 700px) {
  .sustainability-dialog {
    padding: 16px;
  }

  .sustainability-dialog__window {
    width: 100%;
    max-height: calc(100dvh - 32px);
    padding: 25px 23px 27px;
    border-radius: 14px;
  }

  .sustainability-dialog__title {
    font-size: 27px;
  }

  .sustainability-dialog__close {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    margin: -3px -5px 0 0;
  }

  .sustainability-dialog__close span {
    width: 20px;
  }

  .sustainability-dialog__content {
    margin-top: 16px;
  }

  .sustainability-dialog__paragraphs {
    gap: 15px;
  }

  .sustainability-dialog__paragraph {
    font-size: 16px;
    line-height: 1.5;
  }
}

/* จุดบอกหน้าปัจจุบันและปุ่มสินเชื่อทั้งหมด ---------------------------- */

.loan-products__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 41px;
}

.loan-products__dot {
  display: block;
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  margin: 0;
  padding: 0;
  background: #cfd2d6;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  appearance: none;
  transition: background-color 150ms ease;
}

button.loan-products__dot {
  cursor: pointer;
}

.loan-products__dot.is-active {
  background: #ffffff;
  border: 0;
  box-shadow: inset 0 0 0 1.6px var(--loan-primary);
  cursor: default;
}

button.loan-products__dot:focus-visible {
  outline: 0;
}

.loan-services__all-button {
  display: inline-flex;
  width: 195px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: clamp(28px, 4svh, 35px);
  padding: 6px 19px;
  color: var(--loan-primary);
  background: var(--loan-yellow);
  border-radius: 5px;
  font-family: var(--font-brand-medium);
  font-size: 15.6px;
  font-weight: 400;
  line-height: 1;
  transition:
    color 200ms ease,
    background-color 200ms ease;
}

.loan-services__all-button:hover,
.loan-services__all-button:focus-visible {
  color: #ffffff;
  background: var(--loan-primary);
}

/* Responsive ของ Loan services ----------------------------------------- */

@media (max-width: 1400px) {
  .loan-services {
    min-height: 0;
  }

  .loan-services__all-button {
    width: 250px;
    min-height: 56px;
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 20px;
  }

  .loan-services__inner {
    padding-block: 64px 56px;
  }

  .loan-services__lead-line {
    display: inline;
  }

  .loan-services__selector {
    margin-top: 64px;
  }

  /* ลบ .loan-products__panel { margin-top: 64px; } */
}

@media (max-width: 1024px) {
  .loan-products__grid {
    grid-template-columns:
      repeat(2, minmax(0, 260px));
  }

  .loan-products__panel .loan-products__viewport {
    overflow: visible;
  }

  .loan-products__track {
    display: grid;
    grid-template-columns:
      repeat(2, minmax(0, 260px));
    justify-content: center;
    transform: none;
    transition: none;
  }

  .loan-products__track.is-shifted {
    transform: none;
  }

  .loan-products__track > .loan-card {
    width: 100%;
  }

  .loan-products__pagination:not(.loan-products__pagination--mobile) {
    display: none;
  }

  .loan-services__title {
    font-size: 44px;
  }

  .loan-services__lead {
    font-size: 18px;
  }
}

@media (max-width: 700px) {
  .loan-services {
    background-position: 62% center;
  }

  .loan-services__inner {
    padding-block: 48px;
  }

  .loan-services__title {
    font-size: 38px;
  }

  .loan-services__lead {
    margin-top: 18px;
    font-size: 17px;
    line-height: 1.45;
  }

  .loan-services__selector {
    margin-top: 48px;
  }

  .loan-services__selector-title {
    font-size: 28px;
  }

  .loan-services__tabs {
    height: 48px;
  }

  .loan-services__tab {
    padding-inline: 10px;
    font-size: 17px;
  }

  .loan-products__panel {
    width: min(100%, 420px);
    margin-top: 48px;
  }

  .loan-products__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .loan-products__track {
    grid-template-columns: minmax(0, 1fr);
  }

  .loan-products__pagination {
    margin-top: 38px;
  }

  .loan-services__all-button {
    width: min(100%, 250px);
    min-height: 52px;
    margin-top: 28px;
  }

  .loan-card__image {
    height: auto;
    aspect-ratio: 325 / 282;
  }

  .loan-card__body {
    min-height: 160px;
  }
}

/* Installment calculator ------------------------------------------------ */

.installment-calculator {
  --calculator-blue: #0098dc;
  --calculator-yellow: #fff03d;
  --calculator-dark: #4f4f4f;
  --calculator-placeholder: #b8b8b8;
  --calculator-field-background: #ffffff;
  --calculator-field-border: #d2d2d7;
  --calculator-content-width: 1100px;

  display: grid;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
  color: #ffffff;
  background: var(--calculator-blue);
  font-family: var(--font-brand);
}

.installment-calculator__inner {
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--calculator-content-width)
  );
  margin-inline: auto;
  padding-block: 64px;
}

/* หัวข้อหลัก ------------------------------------------------------------ */

.installment-calculator__title {
  margin: 0 0 clamp(30px, 4.32svh, 38px);
  color: var(--calculator-yellow);
  font-family: var(--font-brand-medium);
  font-size: clamp(37px, 2.24vw, 43px);
  font-weight: 400;
  line-height: 1;
}

/* Layout สองฝั่ง -------------------------------------------------------- */

.installment-calculator__content {
  display: grid;
  width: min(100%, 1087px);
  grid-template-columns:
    minmax(0, 480px)
    minmax(0, 571px);
  align-items: start;
  gap: 36px;
  margin-inline: auto;
}

/* แบบฟอร์มฝั่งซ้าย ----------------------------------------------------- */

.installment-calculator__form {
  min-width: 0;
  padding-top: 14px;
}

.calculator-field + .calculator-field {
  margin-top: 14px;
}

.calculator-field__label {
  display: block;
  margin-bottom: 7px;
  color: #ffffff;
  font-family: var(--font-brand);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.15;
}

.calculator-field__control {
  position: relative;
  width: 100%;
}

.calculator-field__input {
  display: block;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 74px 0 25px;
  color: var(--calculator-dark);
  background: var(--calculator-field-background);
  border: 1px solid var(--calculator-field-border);
  border-radius: 4px;
  outline: none;
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}

.calculator-field__input::placeholder {
  color: var(--calculator-placeholder);
  opacity: 1;
  font-family: var(--font-text);
}

.calculator-field__input:focus,
.calculator-field__input:focus-visible {
  border-color: #000000;
  box-shadow: none;
  outline: 0;
}

.calculator-field__suffix {
  position: absolute;
  top: 50%;
  right: 24px;
  color: var(--calculator-dark);
  font-family: var(--font-brand);
  font-size: 14.5px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ปุ่มเลือกระยะเวลาผ่อนชำระ ------------------------------------------- */

.calculator-term {
  min-width: 0;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.calculator-term__legend {
  margin: 0 0 10px;
  padding: 0;
  color: #ffffff;
  font-family: var(--font-brand);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.15;
}

.calculator-term__options {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
}

.calculator-term__option {
  display: inline-flex;
  height: 30px;
  align-items: center;
  justify-content: center;
  color: var(--calculator-yellow);
  background: var(--calculator-blue);
  border: 1px solid var(--calculator-yellow);
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-brand);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1;
}

/*
 * Radio ที่ถูกเลือก:
 * พื้นเหลืองและตัวเลขสีฟ้า
 */
.calculator-term__input:checked
  + .calculator-term__option {
  color: var(--calculator-blue);
  background: var(--calculator-yellow);
}

/* Focus สำหรับ Keyboard โดยไม่มี Hover effect */
.calculator-term__input:focus-visible
  + .calculator-term__option {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* ปุ่มคำนวณและล้างข้อมูล ----------------------------------------------- */

.installment-calculator__submit {
  display: inline-flex;
  width: 100%;
  height: 41px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 0 19px;
  color: var(--calculator-blue);
  background: var(--calculator-yellow);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-brand);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.installment-calculator__submit:hover {
  color: #ffffff;
  background-color: #0070c0;
}

.installment-calculator__submit:focus-visible {
  color: #ffffff;
  background-color: #0070c0;
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.installment-calculator__reset {
  display: block;
  width: max-content;
  margin: 22px auto 0;
  padding: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--font-brand);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* กล่องผลคำนวณฝั่งขวา ------------------------------------------------- */

.calculator-result {
  width: 100%;
  min-height: 362px;
  padding: 69px 35px 45px;
  color: var(--calculator-dark);
  background: var(--calculator-yellow);
  border-radius: 10px;
}

.calculator-result__title {
  margin: 0;
  color: var(--calculator-dark);
  font-family: var(--font-brand-medium);
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
}

.calculator-result__rows {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.calculator-result__row {
  display: grid;
  grid-template-columns:
    minmax(0, 231px)
    minmax(0, 252px);
  align-items: center;
  gap: 16px;
}

.calculator-result__label {
  color: var(--calculator-blue);
  font-family: var(--font-brand);
  font-size: 21.5px;
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;
}

.calculator-result__value-box {
  display: grid;
  height: 50px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 0 20px;
  background: var(--calculator-field-background);
  border: 1px solid var(--calculator-field-border);
  border-radius: 4px;
}

.calculator-result__number {
  color: var(--calculator-blue);
  font-family: var(--font-brand);
  font-size: 25.5px;
  line-height: 1;
}

.calculator-result__unit {
  color: var(--calculator-dark);
  font-family: var(--font-brand);
  font-size: 14.5px;
  line-height: 1;
  white-space: nowrap;
}

.calculator-result__remark {
  margin: 19px 0 0;
  color: var(--calculator-dark);
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

/* หมายเหตุด้านล่าง ----------------------------------------------------- */

.installment-calculator__note {
  margin-top: 18px;
  color: #ffffff;
}

.installment-calculator__note-title {
  margin: 0;
  font-family: var(--font-text);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.3;
}

.installment-calculator__note-text {
  margin: 14px 0 0;
  font-family: var(--font-text);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.45;
}

/*
 * Desktop refinement:
 * - เปลี่ยนหัวข้อเป็น MuangthaicapModern-Regular
 * - เพิ่มขนาด 10%
 * - เพิ่มช่องว่างด้านล่าง 36%
 * - ชดเชยการจัดกึ่งกลาง เพื่อรักษาขอบล่างหัวข้อไว้ที่เดิม
 */
@media (min-width: 1201px) {
  .installment-calculator__inner {
    transform: translateY(
      calc(
        clamp(5.4px, 0.7776svh, 6.84px)
        -
        clamp(1.85px, 0.112vw, 2.15px)
      )
    );
  }

  .installment-calculator__title {
    margin-bottom: clamp(
      40.8px,
      5.8752svh,
      51.68px
    );

    font-family: var(--font-brand);

    font-size: clamp(
      40.7px,
      2.464vw,
      47.3px
    );
  }
}

/* Responsive ของเครื่องคำนวณ ------------------------------------------ */

@media (max-width: 1200px) {
  .installment-calculator {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .installment-calculator__inner {
    padding-block: 64px;
  }

  .installment-calculator__content {
    width: min(100%, 760px);
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    margin-inline: auto;
  }

  .installment-calculator__title {
    text-align: center;
  }

  .calculator-result {
    min-height: 0;
  }

  .calculator-result__row {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 315px);
  }

  .installment-calculator__note {
    width: min(100%, 760px);
    margin: 42px auto 0;
  }
}

@media (max-width: 700px) {
  .installment-calculator__inner {
    padding-block: 48px;
  }

  .installment-calculator__title {
    margin-bottom: 36px;
    font-size: 40px;
  }

  .installment-calculator__form {
    padding-top: 0;
  }

  .calculator-field__input {
    height: 58px;
    padding-left: 20px;
    font-size: 16px;
  }

  .calculator-field__suffix {
    right: 20px;
  }

  .calculator-term__options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .calculator-result {
    padding: 40px 24px;
  }

  .calculator-result__title {
    font-size: 34px;
  }

  .calculator-result__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .calculator-result__label {
    font-size: 23px;
  }

  .calculator-result__value-box {
    width: 100%;
  }

  .installment-calculator__note-text {
    margin-top: 12px;
  }
}

/* Other services -------------------------------------------------------- */

.other-services {
  --other-services-content-width: 1100px;
  --other-services-button-hover: #0070c0;
  --other-services-text: #4f4f4f;

  display: grid;
  width: 100%;
  height: auto;
  min-height: 0;
  padding-block: 72px;
  overflow: visible;
  color: var(--other-services-text);
  background-color: #f8fbfd;

  background-image:
    linear-gradient(
      rgb(255 255 255 / 80%),
      rgb(255 255 255 / 80%)
    ),
    url("https://muangthaicap.com/mtc-public/assets/images/services/other-services-background.jpg");

  background-position:
    center center,
    center center;

  background-size:
    cover,
    cover;

  background-repeat:
    no-repeat,
    no-repeat;
  font-family: var(--font-brand);
}

.other-services__inner {
  display: grid;
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--other-services-content-width)
  );
  grid-template-columns:
    minmax(0, 530px)
    minmax(0, 534px);
  align-items: start;
  gap: 36px;
  margin-inline: auto;
}

/* ฝั่งซ้าย -------------------------------------------------------------- */

.other-services__content {
  min-width: 0;
  align-self: center;
}

.other-services__eyebrow {
  margin: 0;
  color: var(--other-services-text);
  font-family: var(--font-brand);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
}

.other-services__title {
  margin: 18px 0 0;
  color: var(--color-primary);
  font-family: var(--font-brand-medium);
  font-size: 42px;
  font-weight: 500;
  line-height: 1.28;
}

.other-services__title span {
  display: block;
}

.other-services__lead {
  margin: 31px 0 0;
  color: var(--color-primary);
  font-family: var(--font-brand-medium);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

.other-services__list {
  display: grid;
  gap: 17px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.other-services__list li {
  position: relative;
  padding-left: 16px;
  color: var(--other-services-text);
  font-family: var(--font-text);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.15;
}

.other-services__list li::before {
  position: absolute;
  top: 0;
  left: 0;
  content: "-";
}

.other-services__broker {
  margin: 22px 0 0;
  color: var(--color-primary);
  font-family: var(--font-brand-medium);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

.other-services__list--insurance {
  margin-top: 17px;
}

/* ฝั่งขวา --------------------------------------------------------------- */

.other-services__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;

  /*
   * ในต้นแบบ ขอบบนของการ์ดต่ำกว่าขอบบนหัวข้อ
   * "บริการอื่นๆ" เล็กน้อย
   */
  padding-top: 12px;
}

.other-service-card {
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
  border-radius: 9px;
  box-shadow: 0 8px 20px rgb(0 72 110 / 7%);
}

/*
 * ไม่มีการกำหนด :hover ให้ .other-service-card
 * ตัวการ์ดจึงไม่ขยับ ไม่ขยาย และไม่เปลี่ยน Shadow
 */

.other-service-card__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 496;
  object-fit: cover;
  object-position: center;
}

.other-service-card__body {
  display: flex;
  height: 159px;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 47px;
}

.other-service-card__title {
  margin: 0;
  color: var(--other-services-text);
  font-family: var(--font-brand-medium);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1.25;
  text-align: center;
}

.other-service-card__button {
  display: inline-flex;
  width: 160px;
  height: 35px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #ffffff;
  background-color: var(--color-primary);
  border: 0;
  border-radius: 5px;
  font-family: var(--font-brand);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1;
  transition: background-color 0.35s ease;
}

.other-service-card__button:hover,
.other-service-card__button:focus-visible {
  color: #ffffff;
  background-color: var(--other-services-button-hover);
}

/* Responsive ของ Other services ---------------------------------------- */

@media (max-width: 1200px) {
  .other-services {
    height: auto;
    min-height: 0;
    padding-block: 72px;
    overflow: visible;
  }

  .other-services__inner {
    width: min(
      calc(100% - (var(--container-gutter) * 2)),
      760px
    );
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .other-services__cards {
    width: min(100%, 534px);
    margin-inline: auto;
    padding-top: 0;
  }
}

@media (max-width: 700px) {
  .other-services {
    padding-block: 52px;
  }

  .other-services__eyebrow {
    font-size: 25px;
  }

  .other-services__title {
    margin-top: 14px;
    font-size: clamp(30px, 8.2vw, 36px);
    line-height: 1.24;
  }

  .other-services__lead {
    margin-top: 25px;
    font-size: 17px;
    line-height: 1.5;
  }

  .other-services__list {
    gap: 14px;
    margin-top: 20px;
  }

  .other-services__list li {
    padding-left: 18px;
    font-size: 16px;
    line-height: 1.45;
  }

  .other-services__broker {
    margin-top: 26px;
    font-size: 17px;
    line-height: 1.5;
  }

  .other-services__cards {
    width: min(100%, 320px);
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .other-service-card__body {
    height: 159px;
  }
}

/* News and events ------------------------------------------------------- */

.news-events {
  --news-content-width: 1100px;
  --news-image-width: 40%;
  --news-card-border: #d9d9d9;
  --news-summary-color: #595959;
  --news-date-color: #9e979f;

  width: 100%;
  padding: 76px 0 74px;
  color: var(--news-summary-color);
  background-color: #ffffff;
  font-family: var(--font-brand);
}

.news-events__inner {
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--news-content-width)
  );
  margin-inline: auto;
}

.news-events__title {
  margin: 0;
  color: #4f4f4f;
  font-family: var(--font-brand);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.1;
}

.news-events__list {
  display: grid;
  gap: 16px;
  margin-top: 52px;
}

/* การ์ดข่าว ------------------------------------------------------------- */

.news-card {
  display: grid;

  /*
   * จากภาพต้นแบบ พื้นที่รูปใกล้เคียง 40%
   * และพื้นที่ข้อความใกล้เคียง 60%
   */
  grid-template-columns:
    var(--news-image-width)
    minmax(0, 1fr);

  /* คงสัดส่วนการ์ด Desktop ให้เท่ากับเวอร์ชัน Notebook */
  height: 250px;

  min-width: 0;
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid var(--news-card-border);
  border-radius: 9px;

  transition:
    background-color 0.35s ease,
    border-color 0.35s ease;
}

/* ฝั่งรูป --------------------------------------------------------------- */

.news-card__media {
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.news-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ฝั่งข้อความ ------------------------------------------------------------ */

.news-card__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px 19px 19px;
}

.news-card__title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  transition: color 0.35s ease;
}

.news-card__summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 15px 0 0;
  color: var(--news-summary-color);
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;

  transition: color 0.35s ease;
}

.news-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: auto;
}

.news-card__date {
  min-width: 0;
  color: var(--news-date-color);
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;

  transition: color 0.35s ease;
}

/* ปุ่มอ่านเพิ่มเติม ------------------------------------------------------ */

.news-card__button {
  display: inline-flex;
  width: 134px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: #ffffff;
  background-color: var(--color-primary);
  border-radius: 5px;
  font-family: var(--font-brand-medium);
  font-size: 15.5px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;

  transition:
    color 0.35s ease,
    background-color 0.35s ease;
}

/* Hover และ Keyboard focus ---------------------------------------------- */

.news-card:hover,
.news-card:focus-within {
  background-color: var(--color-primary);
}

.news-card:hover .news-card__title,
.news-card:hover .news-card__summary,
.news-card:hover .news-card__date,
.news-card:focus-within .news-card__title,
.news-card:focus-within .news-card__summary,
.news-card:focus-within .news-card__date {
  color: #ffffff;
}

.news-card:hover .news-card__button,
.news-card:focus-within .news-card__button {
  color: var(--color-primary);
  background-color: #ffffff;
}

/* ปุ่มข่าวสารและกิจกรรมทั้งหมด ----------------------------------------- */

.news-events__action {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

.news-events__all-button {
  display: inline-flex;
  min-width: 203px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 23px;
  color: var(--color-primary);
  background-color: var(--color-accent);
  border-radius: 3.6px;
  font-family: var(--font-brand-medium);
  font-size: 16.2px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;

  transition:
    color 0.35s ease,
    background-color 0.35s ease;
}

.news-events__all-button:hover,
.news-events__all-button:focus-visible {
  color: #ffffff;
  background-color: var(--color-primary);
}

/* Responsive ของ News and events --------------------------------------- */

@media (max-width: 900px) {
  .news-events {
    padding-block: 64px;
  }

  .news-events__inner {
    width: min(
      calc(100% - (var(--container-gutter) * 2)),
      760px
    );
  }

  .news-events__title {
    font-size: 38px;
  }

  .news-events__list {
    margin-top: 44px;
  }

  .news-card {
    height: 300px;
    grid-template-columns:
      40%
      minmax(0, 1fr);
  }

  .news-card__title {
    font-size: 19px;
  }

  .news-card__summary {
    font-size: 15px;
  }
}

@media (max-width: 700px) {
  .news-events {
    padding-block: 52px;
  }

  .news-events__title {
    font-size: 34px;
  }

  .news-events__list {
    gap: 28px;
    margin-top: 36px;
  }

  .news-card {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .news-card__media {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .news-card__content {
    min-height: 0;
    padding: 24px 22px 22px;
  }

  .news-card__title {
    line-height: 1.45;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .news-card__summary {
    margin-top: 16px;
    line-height: 1.65;
  }

  .news-card__footer {
    align-items: center;
    margin-top: 20px;
  }

  .news-events__action {
    margin-top: 44px;
  }
}

@media (max-width: 420px) {
  .news-card__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .news-card__content {
    min-height: 0;
  }

  .news-card__button {
    align-self: flex-end;
  }

  .news-events__all-button {
    width: 100%;
    min-width: 0;
  }
}

/* Knowledge articles ---------------------------------------------------- */

.knowledge-articles {
  width: 100%;
  height: auto;
  min-height: 0;
  overflow: visible;
  color: #4f4f4f;
  background-color: #f2f2f2;
  font-family: var(--font-brand);
}

.knowledge-articles__inner {
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    1100px
  );
  height: auto;
  margin-inline: auto;
  padding: 48px 0 32px;
}

.knowledge-articles__title {
  margin: 0;
  color: #4f4f4f;
  font-family: var(--font-brand);
  font-size: 40.25px;
  font-weight: 400;
  line-height: 1.1;
}

/* Carousel -------------------------------------------------------------- */

.article-carousel {
  --articles-visible-cards: 3;
  --article-card-gap: 15px;

  position: relative;
  margin-top: 34px;
}

.article-carousel__viewport {
  width: 100%;
  overflow: hidden;
}

.article-carousel__track {
  display: flex;
  align-items: stretch;
  gap: var(--article-card-gap);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.article-carousel__track.is-animating {
  transition:
    transform var(--article-duration, 350ms)
    ease-in-out;
}

/* การ์ดบทความ ----------------------------------------------------------- */

.article-card {
  flex:
    0 0
    calc(
      (
        100% -
        (
          var(--article-card-gap) *
          (var(--articles-visible-cards) - 1)
        )
      ) /
      var(--articles-visible-cards)
    );

  min-width: 0;
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 7px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}

.article-card__link {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.article-card__media {
  overflow: hidden;
  aspect-ratio: 1.9 / 1;
  background-color: #dfe5e8;
}

.article-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transition: transform 0.3s ease;
}

.article-card__body {
  display: flex;
  min-height: 160px;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 20px 20px 18px;
  background-color: #ffffff;

  transition:
    color 0.3s ease,
    background-color 0.3s ease;
}

.article-card__title {
  display: -webkit-box;
  min-height: 3.3em;
  overflow: hidden;
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  transition: color 0.3s ease;
}

.article-card__summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 0;
  color: #555555;
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;

  transition: color 0.3s ease;
}

/* Hover การ์ด ----------------------------------------------------------- */

.article-card:hover .article-card__image,
.article-card:focus-within .article-card__image {
  transform: scale(1.045);
}

.article-card:hover .article-card__body,
.article-card:focus-within .article-card__body {
  background-color: var(--color-primary);
}

.article-card:hover .article-card__title,
.article-card:hover .article-card__summary,
.article-card:focus-within .article-card__title,
.article-card:focus-within .article-card__summary {
  color: #ffffff;
}

/* ลูกศร ---------------------------------------------------------------- */

.article-carousel__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  width: 37px;
  height: 37px;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: #ffffff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgb(0 0 0 / 7%);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
}

.article-carousel__arrow--previous {
  left: -55px;
}

.article-carousel__arrow--next {
  right: -55px;
}

.article-carousel__arrow img {
  display: block;
  width: 16.5px;
  height: auto;
  opacity: 0.72;
  filter: none;

  transition:
    filter 0.25s ease,
    opacity 0.25s ease;
}

.article-carousel__arrow:not(:disabled):hover,
.article-carousel__arrow:not(:disabled):focus-visible {
  background-color: #0098dc;
  box-shadow: none;
}

.article-carousel__arrow:not(:disabled):hover img,
.article-carousel__arrow:not(:disabled):focus-visible img {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.article-carousel__arrow:disabled,
.article-carousel__dot:disabled {
  cursor: default;
}

.article-carousel__arrow:disabled {
  opacity: 0.55;
}

/* Pagination ------------------------------------------------------------ */

.article-carousel__pagination {
  display: flex;
  min-height: 16px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.article-carousel__dot {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.article-carousel__dot::before {
  width: 10px;
  height: 10px;
  background-color: #d4d5da;
  border: 0 solid transparent;
  border-radius: 50%;
  content: "";
  transition:
    width 0.25s ease,
    height 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.article-carousel__dot.is-active::before {
  width: 16px;
  height: 16px;
  background-color: #ffffff;
  border: 3px solid var(--color-primary);
}

.article-carousel__dot:not(.is-active):hover::before {
  background-color: #bfc1c7;
}

/* ปุ่มบทความทั้งหมด ----------------------------------------------------- */

.knowledge-articles__action {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.knowledge-articles__all-button {
  display: inline-flex;
  min-width: 148px;
  height: 43px;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  color: var(--color-primary);
  background-color: var(--color-accent);
  border-radius: 4px;
  font-family: var(--font-brand-medium);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;

  transition:
    color 0.35s ease,
    background-color 0.35s ease;
}

.knowledge-articles__all-button:hover,
.knowledge-articles__all-button:focus-visible {
  color: #ffffff;
  background-color: var(--color-primary);
}

/* Article index --------------------------------------------------------- */

.article-index {
  color: #4f4f4f;
  background-color: #ffffff;
}

.article-index__section {
  padding: 52px 0 64px;
}

.article-index__inner {
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--container-width)
  );
  margin-inline: auto;
}

.article-index__title {
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-brand);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.article-index__categories {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin: 61px auto 0;
  border-bottom: 3px solid #eeeeee;
}

.article-index__category {
  position: relative;
  display: inline-flex;
  min-height: 37px;
  align-items: flex-start;
  justify-content: center;
  padding: 0 20px 15px;
  color: #8a8a8a;
  font-family: var(--font-text);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.article-index__category::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 3px;
  background-color: transparent;
  content: "";
  transition: background-color 0.2s ease;
}

.article-index__category:hover,
.article-index__category:focus-visible,
.article-index__category.is-active {
  color: var(--color-primary);
}

.article-index__category.is-active::after {
  background-color: var(--color-primary);
}

.article-index__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-top: 39px;
}

.article-index .article-card {
  height: 100%;
}

.article-index .article-card__body {
  min-height: 206px;
}

.article-card__read-more {
  display: inline-flex;
  min-width: 88px;
  height: 35px;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: auto;
  color: #ffffff;
  background-color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition:
    color 0.3s ease,
    background-color 0.3s ease;
}

.article-card:hover .article-card__read-more,
.article-card:focus-within .article-card__read-more {
  color: var(--color-primary);
  background-color: #ffffff;
}

.article-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 35px;
  font-family: var(--font-brand);
}

.article-pagination__page,
.article-pagination__control,
.article-pagination__ellipsis {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  color: #a8adb3;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.article-pagination__page,
.article-pagination__control {
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.article-pagination__page:hover,
.article-pagination__page:focus-visible,
.article-pagination__control:not(.is-disabled):hover,
.article-pagination__control:not(.is-disabled):focus-visible,
.article-pagination__page.is-active {
  color: #ffffff;
  background-color: var(--color-primary);
}

.article-pagination__control {
  color: var(--color-primary);
  font-family: Arial, sans-serif;
  font-size: 28px;
}

.article-pagination__control.is-disabled {
  pointer-events: none;
  visibility: hidden;
}

@media (max-width: 900px) {
  .article-index__section {
    padding-block: 44px 52px;
  }

  .article-index__title {
    font-size: 34px;
  }

  .article-index__categories {
    margin-top: 42px;
  }

  .article-index__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .article-index__section {
    padding-block: 36px 44px;
  }

  .article-index__title {
    font-size: 30px;
  }

  .article-index__categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 10px 12px;
    margin-top: 30px;
    border-bottom: 0;
  }

  .article-index__category {
    min-height: 48px;
    align-items: center;
    padding: 8px 6px 10px;
    border-bottom: 3px solid #eeeeee;
    line-height: 1.3;
    white-space: normal;
    text-wrap: balance;
  }

  .article-index__grid {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }

  .article-index .article-card__body {
    min-height: 210px;
  }

  .article-index .article-card__summary {
    margin-bottom: 18px;
  }

  .article-pagination {
    gap: 5px;
    margin-top: 28px;
  }
}

/* News index ------------------------------------------------------------ */

.news-index {
  --news-image-width: 40%;
  --news-card-border: #d9d9d9;
  --news-summary-color: #595959;
  --news-date-color: #9e979f;

  color: #3f3f3f;
  background-color: #ffffff;
}

.news-index__section {
  width: 100%;
  padding: 52px 0 74px;
}

.news-index__inner {
  width: min(calc(100% - (var(--container-gutter) * 2)), 1140px);
  margin-inline: auto;
}

.news-index__title {
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-brand);
  font-size: 39px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.news-index__categories {
  display: flex;
  width: 470px;
  min-height: 46px;
  align-items: flex-end;
  justify-content: center;
  margin: 53px auto 0;
  border-bottom: 4px solid #f0f0f0;
}

.news-index__category {
  position: relative;
  display: inline-flex;
  min-width: 0;
  flex: 1 1 0;
  justify-content: center;
  padding: 0 10px 17px;
  color: #8c8c8c;
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-index__category::after {
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 4px;
  background-color: transparent;
  content: "";
  transition: background-color 0.2s ease;
}

.news-index__category:hover,
.news-index__category:focus-visible,
.news-index__category.is-active {
  color: var(--color-primary);
}

.news-index__category.is-active::after {
  background-color: var(--color-primary);
}

.news-index__list {
  display: grid;
  gap: 16px;
  margin-top: 39px;
}

.news-index__card {
  height: clamp(250px, 36vh, 330px);
  height: clamp(250px, 36svh, 330px);
}

.news-index .article-pagination {
  margin-top: 37px;
}

@media (max-width: 900px) {
  .news-index__section {
    padding-block: 44px 58px;
  }

  .news-index__title {
    font-size: 34px;
  }

  .news-index__categories {
    margin-top: 42px;
  }

  .news-index__card {
    height: 300px;
  }
}

@media (max-width: 640px) {
  .news-index__section {
    padding-block: 36px 44px;
  }

  .news-index__title {
    font-size: 30px;
  }

  .news-index__categories {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 64px;
    width: 100%;
    min-height: 54px;
    align-items: stretch;
    margin-top: 30px;
  }

  .news-index__category {
    min-width: 0;
    align-items: center;
    padding: 8px 5px 14px;
    font-size: clamp(13px, 3.5vw, 15px);
    line-height: 1.25;
    text-align: center;
    text-wrap: balance;
  }

  .news-index__list {
    margin-top: 30px;
  }

  .news-index__card {
    height: auto;
  }
}

/* News detail ----------------------------------------------------------- */
.news-detail__subheader { display:flex; align-items:center; justify-content:space-between; margin-top:25px; }
.news-detail__date { color:#4c4946; font-family:var(--font-text); font-size:14px; line-height:1; }
.news-detail__subheader .article-share { width:auto; margin-top:0; }
.news-detail .article-detail__content { color:#555; }
.news-detail .article-detail__content strong, .news-detail .article-detail__content b { color:#4a4a4a; }
@media (max-width:640px) { .news-detail__subheader { align-items:flex-start; flex-direction:column; gap:18px; } }

.news-detail__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.news-detail__gallery-item { margin: 0; }

.news-detail__gallery-item img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .news-detail__gallery { grid-template-columns: 1fr; }
}

/* Article detail -------------------------------------------------------- */

.article-detail {
  color: #3f3f3f;
  background-color: #ffffff;
}

.article-detail__inner,
.related-articles__inner {
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--container-width)
  );
  margin-inline: auto;
}

.article-detail__inner {
  padding: 0;
}

.article-detail__breadcrumbs {
  width: 100%;
  background: #ffffff;
}

.article-detail__breadcrumbs-list {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 21.4px 0 42.24px;
  overflow: hidden;
  color: #0098dc;
  font-family: var(--font-brand-medium);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  list-style: none;
  white-space: nowrap;
}

.article-detail__breadcrumbs-link {
  color: #a6a6a6;
  transition: color 180ms ease;
}

.article-detail__breadcrumbs-link:hover,
.article-detail__breadcrumbs-link:focus-visible {
  color: var(--color-primary);
}

.article-detail__breadcrumbs-link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

.article-detail__breadcrumbs-separator {
  color: #404040;
}

.article-detail__breadcrumbs-current {
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-detail__header {
  min-height: 0;
}

.article-detail__title {
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-brand);
  font-size: 30.6px;
  font-weight: 400;
  line-height: 1.3;
}

.article-share {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  margin-top: 25px;
  padding-bottom: 3px;
}

.article-share__label {
  color: #4c4946;
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.article-share__button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #404040;
  background-color: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.article-share__button:hover,
.article-share__button:focus-visible {
  color: #ffffff;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.article-share__button--line span {
  font-family: Arial, sans-serif;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.article-share__button--copy svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.article-share__status {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  color: var(--color-primary);
  font-family: var(--font-text);
  font-size: 12px;
  white-space: nowrap;
}

.article-detail__divider {
  position: relative;
  height: 1px;
  margin-top: 25px;
  background-color: #dedede;
}

.article-detail__divider::before,
.article-detail__divider::after {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  background-color: #dedede;
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}

.article-detail__divider::before {
  left: 0;
}

.article-detail__divider::after {
  right: 0;
}

.article-detail__featured-media {
  margin: 61px 0 0;
}

.article-detail__featured-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.article-detail__content {
  margin-top: 25px;
  color: #414141;
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.article-detail__content > :first-child {
  margin-top: 0;
}

.article-detail__content > :last-child {
  margin-bottom: 0;
}

.article-detail__content h1,
.article-detail__content h2,
.article-detail__content h3,
.article-detail__content h4,
.article-detail__content h5,
.article-detail__content h6 {
  margin: 30px 0 12px;
  color: var(--color-primary);
  font-family: var(--font-brand);
  font-weight: 400;
  line-height: 1.38;
}

/* Retain WordPress' semantic yellow text colour after migration. */
.article-detail__content .has-luminous-vivid-amber-color,
.article-detail__content .has-vivid-yellow-color,
.article-detail__content .has-amber-color {
  color: #f6c600 !important;
}

.article-detail__content h1 {
  font-size: 28px;
}

.article-detail__content h2 {
  font-size: 25px;
}

.article-detail__content h3 {
  font-size: 22px;
}

.article-detail__content h4,
.article-detail__content h5,
.article-detail__content h6 {
  color: #f6c600;
  font-size: 20px;
}

.article-detail__content p,
.article-detail__content ul,
.article-detail__content ol,
.article-detail__content blockquote,
.article-detail__content table {
  margin: 0 0 20px;
}

.article-detail__content ul,
.article-detail__content ol {
  padding-left: 28px;
}

.article-detail__content li + li {
  margin-top: 3px;
}

.article-detail__content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-detail__content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 25px auto;
}

.article-detail__content figure {
  max-width: 100%;
  margin: 25px 0;
}

.article-detail__content figcaption {
  margin-top: 8px;
  color: #777777;
  font-size: 14px;
  text-align: center;
}

.article-detail__content iframe,
.article-detail__content video {
  display: block;
  max-width: 100%;
  margin: 25px auto;
}

.article-detail__meta {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 66px;
  margin-top: 81px;
  border-top: 1px solid #e2e2e2;
  border-bottom: 1px solid #e2e2e2;
  color: #7f8790;
  font-family: var(--font-brand);
  font-size: 14px;
}

.article-detail__meta-icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  color: #7f8790;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.article-detail__meta a {
  color: inherit;
}

.article-detail__meta a:hover,
.article-detail__meta a:focus-visible {
  color: var(--color-primary);
}

.related-articles {
  margin-top: 16px;
  padding: 62px 0 73px;
  background-color: #f5f5f5;
}

.related-articles__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.related-articles__heading h2 {
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-brand);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.3;
}

.related-articles__controls {
  display: flex;
  gap: 8px;
}

.related-articles__controls button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #ffffff;
  background-color: var(--color-primary);
  border: 0;
  border-radius: 50%;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    opacity 0.25s ease;
}

.related-articles__controls button svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.related-articles__controls button:not(:disabled):hover,
.related-articles__controls button:not(:disabled):focus-visible {
  color: var(--color-primary);
  background-color: #ffffff;
}

.related-articles__controls button:disabled {
  cursor: default;
  opacity: 0.4;
}

.related-articles__pages {
  position: relative;
  margin-top: 31px;
  overflow: hidden;
}

.related-articles__page {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
}

.related-articles__page[hidden] {
  display: none;
}

.related-article-card .article-card__body {
  min-height: 224px;
  padding: 19px 20px 18px;
}

.related-article-card .article-card__title {
  min-height: 3.3em;
}

.article-card__date {
  display: block;
  margin-top: 9px;
  color: #7f8790;
  font-family: var(--font-text);
  font-size: 13px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.related-article-card .article-card__summary {
  margin-top: 10px;
}

.related-article-card .article-card__read-more {
  min-width: 89px;
  height: 34px;
  margin-top: auto;
  font-size: 13px;
}

.related-article-card:hover .article-card__date,
.related-article-card:focus-within .article-card__date {
  color: #ffffff;
}

@media (max-width: 900px) {
  .article-detail__breadcrumbs-list {
    padding-bottom: 38.72px;
  }

  .article-detail__title {
    max-width: none;
    font-size: 30px;
  }

  .article-detail__featured-media {
    margin-top: 45px;
  }

  .article-detail__content {
    font-size: 15px;
  }

  .related-articles__page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .article-detail__breadcrumbs-list {
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 36.08px;
    font-size: 15px;
    line-height: 1.3;
    white-space: normal;
  }

  .article-detail__title {
    font-size: 27px;
  }

  .article-share {
    flex-wrap: wrap;
  }

  .article-detail__divider {
    margin-top: 24px;
  }

  .article-detail__featured-media {
    margin-top: 34px;
  }

  .article-detail__content {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.75;
  }

  .article-detail__content h1 {
    font-size: 24px;
  }

  .article-detail__content h2 {
    font-size: 22px;
  }

  .article-detail__content h3,
  .article-detail__content h4,
  .article-detail__content h5,
  .article-detail__content h6 {
    font-size: 20px;
  }

  .article-detail__meta {
    margin-top: 54px;
  }

  .related-articles {
    padding-block: 45px 54px;
  }

  .related-articles__heading h2 {
    font-size: 24px;
  }

  .related-articles__page {
    grid-template-columns: 1fr;
  }
}

/* Responsive: Knowledge articles ---------------------------------------- */

/*
 * หน้าจอ Notebook ที่พื้นที่ด้านข้างไม่พอสำหรับวางลูกศรนอก Container
 * ให้ย้ายลูกศรเข้ามาทับอยู่บริเวณขอบซ้ายและขวาของ Carousel
 *
 * จำนวนการ์ดยังคงเป็น 3 ใบ
 */
@media (max-width: 1220px) {
  .article-carousel__arrow--previous {
    left: 12px;
  }

  .article-carousel__arrow--next {
    right: 12px;
  }

  .article-carousel__arrow {
    box-shadow: 0 3px 12px rgb(0 0 0 / 18%);
  }
}

/*
 * Tablet
 *
 * เปลี่ยนจาก 3 การ์ดเป็น 2 การ์ด
 * และยกเลิกความสูงแบบตายตัวหนึ่งหน้าจอ
 * เพื่อไม่ให้เนื้อหาและปุ่มด้านล่างถูกตัด
 */
@media (max-width: 900px) {
  .knowledge-articles {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .knowledge-articles__inner {
    padding-block: 52px;
  }

  .knowledge-articles__title {
    font-size: 30px;
  }

  .article-carousel {
    --articles-visible-cards: 2;
  }
}

/*
 * Mobile
 *
 * เปลี่ยนจาก 2 การ์ดเป็น 1 การ์ด
 */
@media (max-width: 640px) {
  .knowledge-articles__inner {
    padding-block: 42px;
  }

  .knowledge-articles__title {
    font-size: 27px;
  }

  .article-carousel {
    --articles-visible-cards: 1;
  }

  .article-card__body {
    min-height: 160px;
  }

  .knowledge-articles__all-button {
    height: 43px;
  }
}

/* Site footer ----------------------------------------------------------- */

.site-footer {
  --site-footer-width: var(--container-width);
  --site-footer-reveal: 8px;
  --site-footer-bottom-height: 52px;
  --site-footer-accent: #fff03d;

  display: flex;
  width: 100%;
  min-height: 0;
  flex-direction: column;
  color: #ffffff;
  font-family: var(--font-brand);
}

/*
 * ใช้ความกว้างเดียวกับ Container หลัก
 * เพื่อให้ Footer ตรงกับขอบเขตของ Header
 */
.site-footer__container {
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--site-footer-width)
  );
  margin-inline: auto;
}

/* ส่วนสีฟ้า ------------------------------------------------------------- */

.site-footer__main {
  display: flex;
  flex: 0 0 auto;
  background-color: var(--color-primary);
}

.site-footer__main > .site-footer__container {
  padding-block: 72px 58px;
}

.site-footer__grid {
  display: grid;
  width: 100%;
  grid-template-columns:
    22%
    20%
    15%
    minmax(15.6%, max-content)
    minmax(0, 1fr);
  column-gap: 0;
}

.site-footer__column {
  min-width: 0;
  padding-right: 12px;
}

.site-footer__column:last-child {
  padding-right: 0;
}

/* ชุดเมนู --------------------------------------------------------------- */

.site-footer__group {
  margin: 0;
}

.site-footer__group + .site-footer__group {
  margin-top: 30px;
}

/*
 * Column 1 เว้นระยะก่อนมาตรฐานรับรองมากกว่าชุดเมนูทั่วไป
 */
.site-footer__group + .site-footer__group--certification {
  margin-top: 58px;
}

.site-footer__heading {
  margin: 0;
  color: var(--site-footer-accent);
  cursor: default;
  font-family: var(--font-brand-medium);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
}

.site-footer__accordion-toggle {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: default;
  font: inherit;
  line-height: inherit;
  text-align: left;
  pointer-events: none;
}

.site-footer__accordion-toggle::after {
  display: none;
  content: "";
}

.site-footer__menu {
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
}

.site-footer__menu li {
  margin: 0;
  padding: 0;
}

.site-footer__menu a {
  display: inline;
  color: #ffffff;
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  cursor: pointer;
}

/*
 * ไม่บังคับ white-space: nowrap
 * เพื่อป้องกันข้อความยาวของ Column 4 ทับ Column 5
 */
.site-footer__menu a:hover,
.site-footer__menu a:focus-visible {
  color: #ffffff;
}

/* มาตรฐานรับรอง --------------------------------------------------------- */

.site-footer__certification-logos {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 17px;
}

.site-footer__certification-logos img {
  display: block;
  width: auto;
  max-width: calc(50% - 5px);
  height: 40px;
  background-color: #ffffff;
  border-radius: 5px;
  object-fit: contain;
}

.site-footer__registration-number {
  margin: 4px 0 0;
  color: #ffffff;
  font-family: var(--font-brand);
  font-size: 14px;
  line-height: 1.2;
}

/* ติดต่อและ Social Media ------------------------------------------------ */

.site-footer__contact-heading {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-footer__contact-heading .site-footer__heading {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.site-footer__socials {
  display: flex;
  align-items: center;
  gap: 13px;
}

.site-footer__socials a {
  display: inline-flex;
  width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.site-footer__socials img {
  display: block;
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

.site-footer__phone {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  color: var(--site-footer-accent);
  font-family: var(--font-brand-medium);
  cursor: default;
}

.site-footer__phone img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.site-footer__phone span {
  font-size: clamp(48px, 3.25vw, 63px);
  font-weight: 400;
  line-height: 0.8;
}

/* ปุ่มดาวน์โหลดแอปพลิเคชัน --------------------------------------------- */

.site-footer__download {
  margin-top: 23px;
}

.site-footer__store-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
}

.site-footer__store-links a {
  display: block;
}

.site-footer__store-links img {
  display: block;
  width: 160px;
  height: 50px;
  object-fit: fill;
}

/* ต่อต้านคอร์รัปชัน ----------------------------------------------------- */

.site-footer__anti-corruption {
  margin-top: 37px;
}

.site-footer__cac-logo {
  display: block;
  width: 124px;
  height: auto;
  margin-top: 18px;
}

/* ส่วนสีเหลือง ---------------------------------------------------------- */

.site-footer__bottom {
  display: flex;
  min-height: var(--site-footer-bottom-height);
  flex: 0 0 var(--site-footer-bottom-height);
  align-items: stretch;
  color: #595959;
  background-color: var(--site-footer-accent); 
  font-family: var(--font-text);
}

.site-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-footer__copyright {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

.site-footer__policies {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 27px;
  font-size: 13px;
  line-height: 1.35;
}

.site-footer__policies a {
  color: #595959;

  transition: color 0.3s ease;
}

.site-footer__policies a:hover,
.site-footer__policies a:focus-visible {
  color: var(--color-primary);
}

/* Responsive: Compact footer accordion --------------------------------- */

@media (max-width: 1180px) {
  .site-footer__main > .site-footer__container {
    width: 100%;
    padding:
      16px
      clamp(32px, 5vw, 48px)
      24px;
  }

  .site-footer__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .site-footer__column {
    display: contents;
  }

  .site-footer__group,
  .site-footer__group + .site-footer__group,
  .site-footer__group + .site-footer__group--certification {
    margin-top: 0;
  }

  .site-footer__heading {
    font-size: 18px;
  }

  .site-footer__group--accordion {
    width: 100%;
  }

  .site-footer__group--accordion .site-footer__heading {
    width: 100%;
  }

  .site-footer__accordion-toggle {
    width: 100%;
    min-height: 55px;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 0;
    cursor: pointer;
    pointer-events: auto;
  }

  .site-footer__accordion-toggle::after {
    display: block;
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    margin-right: 4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 180ms ease;
  }

  .site-footer__accordion-toggle[aria-expanded="true"]::after {
    transform: rotate(225deg);
  }

  .site-footer__group--accordion .site-footer__menu {
    margin: -2px 0 0;
    padding: 0 0 15px;
  }

  .site-footer__group--accordion .site-footer__menu a {
    font-size: 14px;
    line-height: 1.72;
  }

  .site-footer__group--accordion[aria-labelledby="footer-loan-title"] {
    order: 1;
  }

  .site-footer__group--accordion[aria-labelledby="footer-services-title"] {
    order: 2;
  }

  .site-footer__group--accordion[aria-labelledby="footer-articles-title"] {
    order: 3;
  }

  .site-footer__group--accordion[aria-labelledby="footer-network-title"] {
    order: 4;
  }

  .site-footer__group--accordion[aria-labelledby="footer-other-title"] {
    order: 5;
    margin-bottom: 20px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgb(255 255 255 / 72%);
  }

  .site-footer__contact-heading {
    order: 6;
    align-items: center;
    flex-direction: column;
    gap: 10px;
  }

  .site-footer__socials {
    justify-content: center;
    gap: 13px;
  }

  .site-footer__phone {
    order: 7;
    align-self: center;
    margin-top: 20px;
  }

  .site-footer__download {
    order: 8;
    margin-top: 27px;
    text-align: center;
  }

  .site-footer__store-links {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
  }

  .site-footer__store-links img {
    width: min(160px, 36vw);
    height: auto;
    aspect-ratio: 16 / 5;
  }

  .site-footer__group + .site-footer__group--certification {
    order: 9;
    margin-top: 36px;
    text-align: center;
  }

  .site-footer__certification-logos {
    justify-content: center;
    margin-top: 18px;
  }

  .site-footer__certification-logos img {
    width: auto;
    max-width: min(132px, 34vw);
    height: 40px;
  }

  .site-footer__registration-number {
    font-size: 13px;
    text-align: center;
  }

  .site-footer__anti-corruption {
    order: 10;
    margin-top: 28px;
    text-align: center;
  }

  .site-footer__cac-logo {
    margin: 14px auto 0;
  }

  .site-footer__bottom {
    min-height: 76px;
    flex-basis: auto;
  }

  .site-footer__bottom-inner {
    width: 100%;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 12px 18px;
    text-align: center;
  }

  .site-footer__policies {
    order: 1;
    flex-direction: row;
    justify-content: center;
    gap: 0;
    font-size: 10px;
  }

  .site-footer__policies a + a {
    margin-left: 17px;
    padding-left: 17px;
    border-left: 1px solid rgb(89 89 89 / 55%);
  }

  .site-footer__copyright {
    order: 2;
    font-size: 10px;
  }
}

@media (max-width: 520px) {
  .site-footer__main > .site-footer__container {
    padding-inline: 32px;
  }

  .site-footer__store-links img {
    width: min(160px, 36vw);
  }

  .site-footer__phone span {
    font-size: 48px;
  }

  .site-footer__policies {
    flex-wrap: wrap;
    row-gap: 5px;
  }
}

/* Floating LINE contact -------------------------------------------------- */

.line-contact {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: var(--z-floating-contact);
  display: block;
  width: 61px;
  height: 61px;
  overflow: hidden;
  background: var(--color-white);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 7px 22px rgb(0 0 0 / 18%);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.line-contact img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.line-contact:hover,
.line-contact:focus-visible {
  box-shadow: 0 9px 28px rgb(0 0 0 / 25%);
  transform: translateY(-3px);
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* Responsive preparation: desktop design above remains unchanged. */

@media (max-width: 1400px) {
  .utility-bar__inner {
    gap: 16px;
  }

  .utility-nav {
    gap: 15px;
    font-size: 14px;
  }

  .brand {
    width: 245px;
  }

  .primary-nav {
    font-size: 18px;
  }
}

@media (max-width: 1024px) {
  :root {
    --primary-nav-height: 56px;
  }

  .utility-bar {
    display: none;
  }

  .brand {
    width: 225px;
  }

  .primary-bar__mobile-actions {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
  }

  .mobile-branch-locator {
    display: inline-flex;
    justify-self: end;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    visibility: hidden;
    width: 100%;
    max-height: calc(100vh - var(--primary-nav-height));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    margin: 0;
    padding: 10px var(--container-gutter) 20px;
    background: var(--color-primary);
    box-shadow: 0 9px 18px rgb(0 0 0 / 14%);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity 160ms ease,
      transform 160ms ease,
      visibility 160ms ease;
  }

    /*
   * Mobile ใช้รูปแบบเดิม:
   * เมนูเรียงลงมาเต็มความกว้าง และไม่แสดง Mega Menu
   */
  .primary-nav__item {
    display: contents;
    height: auto;
  }

  .primary-nav > .primary-nav__link {
    flex: 0 0 auto;
  }

  .primary-nav__link {
    width: auto;
    height: auto;
  }

  .mega-menu {
    display: none;
  }

  .primary-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .primary-nav__link {
    justify-content: space-between;
    padding: 13px 0;
    border-bottom: 1px solid rgb(255 255 255 / 25%);
  }

  .line-contact {
    right: 18px;
    bottom: 18px;
    width: 62px;
    height: 62px;
  }
}

@media (max-width: 520px) {
  :root {
    --container-gutter: 16px;
  }

  .brand {
    width: min(200px, calc(100% - 102px));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive containment and homepage hardening ------------------------- */

/*
 * ป้องกันองค์ประกอบย่อยดันหน้าเว็บให้กว้างกว่า Viewport
 * โดยยังคงให้แต่ละ Section จัดการ Overflow ของตัวเองได้ตามเดิม
 */
html,
body {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

main,
.site-footer,
.container,
.customer-stories__container,
.branch-locator__inner,
.loan-services__inner,
.installment-calculator__inner,
.other-services__inner,
.news-events__inner,
.knowledge-articles__inner,
.site-footer__container {
  min-width: 0;
  max-width: 100%;
}

img,
video,
svg,
canvas,
iframe {
  max-width: 100%;
}

input,
select,
textarea,
button {
  min-width: 0;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
a,
span,
strong {
  overflow-wrap: anywhere;
}

.language-switcher--mobile {
  display: none;
}

/* Tablet แนวนอนที่ยังใช้ Header แบบเต็ม */
@media (min-width: 1025px) and (max-width: 1180px) {
  .utility-nav {
    font-size: 11.5px;
  }

  .utility-bar .language-switcher__item {
    font-size: 11.5px;
  }

  .brand {
    width: 205px;
  }

  .primary-nav {
    font-size: 13.5px;
  }

  .primary-nav__link {
    padding-inline: clamp(12px, 1.4vw, 17px);
  }
}

@media (max-width: 1160px) {
  .branch-search {
    row-gap: 14px;
  }
}

@media (max-width: 1180px) {
  .site-footer__contact-heading,
  .site-footer__socials {
    flex-wrap: wrap;
  }

  .site-footer__contact-heading {
    row-gap: 12px;
  }
}

@media (max-width: 1024px) {
  html.has-mobile-navigation {
    overflow: hidden;
  }

  .primary-bar__inner {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
  }

  .brand {
    width: min(177px, calc(100% - 108px));
    justify-content: center;
    justify-self: center;
    margin: 0 auto;
  }

  .brand img {
    width: 100%;
  }

  .primary-nav {
    max-height: calc(100vh - var(--primary-nav-height));
    max-height: calc(100dvh - var(--primary-nav-height));
    overscroll-behavior: contain;
  }

  .primary-nav__link {
    white-space: normal;
  }

  .primary-nav .dropdown-icon {
    display: none;
  }

  .primary-nav .language-switcher--mobile {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 8px;
    padding-top: 14px;
  }

  .language-switcher--mobile .language-switcher__item {
    color: #ffffff;
    background: transparent;
    border-color: rgb(255 255 255 / 72%);
  }

  .language-switcher--mobile .language-switcher__item.is-active {
    color: var(--color-primary);
    background: var(--color-accent);
    border-color: var(--color-accent);
  }

  /*
   * Tablet วางกล่องสรุปคะแนนเต็มแถว แล้วคงรีวิวสองใบในแถวถัดไป
   * จึงไม่เกิดกล่องสรุปคะแนนที่ถูกยืดสูงตามรีวิวสองใบด้านข้าง
   */
  .customer-stories__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-summary {
    min-height: 0;
    padding: 32px clamp(24px, 5vw, 48px);
  }

  .review-summary__description {
    transform: none;
  }

  .review-summary__distribution {
    margin: 20px 0 0;
  }

  .customer-reviews__page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-review-card {
    min-height: 390px;
  }

  .customer-review-card__categories {
    flex-wrap: wrap;
    overflow: visible;
  }

  .calculator-result__value-box {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .calculator-result__number {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 760px) {
  .site-footer__contact-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-footer__socials {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .customer-reviews__page {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-review-card {
    height: auto;
    min-height: min(365px, 83vw);
    align-self: start;
    padding: 22px 20px;
  }

  .customer-review-card__categories {
    margin-top: auto;
    padding-top: 22px;
  }

  .customer-stories
    .customer-review-card__reply {
    display: flex;
    min-height: 105px;
    flex: 0 0 105px;
    flex-direction: column;
    margin-top: 10px;
  }

  .customer-stories
    .customer-review-card__reply time {
    margin-top: auto;
  }

  .review-summary__total {
    white-space: nowrap;
    text-align: center;
  }

  .branch-search {
    padding: 20px;
  }

  .branch-search__submit,
  .branch-search__location {
    min-height: 44px;
    height: auto;
    padding-block: 9px;
    white-space: normal;
  }

  /* Refine spacing between the centered prompt and the search field only. */
  .branch-search__prompt {
    margin-bottom: 2px;
  }

  /* Hide the pale seam where the next section's background begins. */
  .branch-search {
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 0 var(--branch-panel);
  }

  .news-card__footer {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .brand {
    width: min(200px, calc(100% - 56px));
  }

  .customer-stories__heading h2,
  .branch-locator__title,
  .loan-services__title,
  .installment-calculator__title,
  .news-events__title {
    font-size: clamp(31px, 10vw, 36px);
  }

  .review-summary {
    padding: 30px 24px 18px;
  }

  .review-summary__score {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
    gap: 58px;
    margin-inline: 0;
  }

  .review-summary__description {
    min-width: 150px;
    align-items: center;
    transform: translateY(1px);
  }

  .review-summary__maximum {
    margin-top: 8px;
  }

  .review-summary__total {
    margin-top: 5px;
  }

  .review-summary__score > strong {
    font-size: clamp(62px, 22vw, 82px);
    letter-spacing: -2px;
  }

  .review-summary__grade {
    font-size: clamp(30px, 10vw, 36px);
  }

  .review-summary__distribution {
    width: 100%;
    margin: 24px 0 0;
  }

  .review-summary__distribution li {
    grid-template-columns: minmax(82px, 108px) minmax(0, 1fr);
    gap: 15px;
  }

  .customer-review-card__profile {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .customer-review-card__profile time {
    grid-column: auto;
    justify-self: end;
  }

  .branch-locator__title {
    gap: 12px;
    font-size: 34px;
    line-height: 1.15;
  }

  .loan-services__selector-title {
    font-size: clamp(24px, 8vw, 28px);
  }

  .calculator-result {
    padding-inline: 20px;
  }

  .calculator-result__title {
    font-size: clamp(29px, 9vw, 34px);
  }

  .other-service-card__button,
  .site-footer__store-links img {
    width: min(160px, 100%);
  }

  .site-footer__bottom-inner,
  .site-footer__policies {
    min-width: 0;
    max-width: 100%;
  }

  .line-contact {
    right: 12px;
    bottom: 12px;
    width: 50px;
    height: 50px;
  }
}

/* Keep the compact footer alignment authoritative over later page rules. */
@media (max-width: 1180px) {
  .site-footer .site-footer__contact-heading {
    align-items: center;
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .site-footer .site-footer__store-links img {
    width: min(160px, 36vw);
  }
}

/* Homepage content refinements for iPad Mini portrait and smaller ------- */

.loan-services__lead-line.loan-services__lead-line--highlight {
  display: block;
  width: 100%;
  text-align: center;
}

@media (max-width: 768px) {
  .loan-services__inner,
  .other-services__inner {
    box-sizing: border-box;
    width: 100%;
    padding-inline: clamp(28px, 5vw, 40px);
  }

  .loan-services__title {
    font-size: 40px;
  }

  .loan-services__lead {
    font-size: 16.5px;
  }

  .loan-services__selector-title {
    font-size: 22px;
  }

  .loan-services__tab {
    font-size: 15px;
  }

  .loan-card__title,
  .loan-card__button {
    font-size: 13.5px;
  }

  .other-services__eyebrow {
    font-size: 27px;
  }

  .other-services__title {
    font-size: 38px;
  }

  .other-services__lead {
    font-size: 15px;
  }

  .other-services__list li {
    font-size: 13.5px;
  }

  .other-services__broker {
    font-size: 15px;
  }

  .other-service-card__title,
  .other-service-card__button {
    font-size: 14.25px;
  }
}

@media (max-width: 700px) {
  .loan-services__title {
    font-size: 34px;
  }

  .loan-services__lead {
    font-size: 15.5px;
  }

  .other-services__eyebrow {
    font-size: 23px;
  }

  .other-services__title {
    font-size: clamp(28px, 7.5vw, 33px);
  }

  .other-services__lead {
    font-size: 15.5px;
  }

  .other-services__list li {
    font-size: 13.05px;
  }

  .other-services__broker {
    font-size: 15.5px;
  }
}

@media (max-width: 700px) {
  .customer-stories__feedback-button img {
    width: 24px;
    height: 24px;
  }
}

.language-switcher__item.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

@media (max-width: 520px) {
  .primary-bar .brand {
    width: min(167px, calc(100% - 108px));
  }
}

/* Homepage loan services: mobile typography and vertical rhythm ---------- */
@media (max-width: 700px) {
  .loan-services__inner {
    padding-top: 54px;
  }

  .loan-services__title {
    font-size: 32px;
    line-height: 1;
  }

  .loan-services__lead {
    margin-top: 26px;
    font-size: 15px;
    line-height: 1.75;
  }

  .loan-services__lead-line--highlight {
    margin-top: 24px;
  }

  .loan-services__selector {
    margin-top: 72px;
  }
}


.loan-products__pagination--mobile {
  display: none;
}

/* Homepage loan product cards: mobile horizontal carousel --------------- */
@media (max-width: 700px) {
  .loan-products__panel {
    width: calc(100% + 28px);
    max-width: none;
    margin-top: 58px;
    margin-inline: -14px;
  }

  .loan-products__viewport {
    width: 100%;
    overflow: visible;
  }

  .loan-products__grid,
  .loan-products__track {
    display: flex;
    width: 100%;
    grid-template-columns: none;
    justify-content: flex-start;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 18px;
    margin-bottom: -18px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .loan-products__grid::-webkit-scrollbar,
  .loan-products__track::-webkit-scrollbar {
    display: none;
  }

  .loan-products__track,
  .loan-products__track.is-shifted {
    transform: none;
    transition: none;
  }

  .loan-products__grid > .loan-card,
  .loan-products__track > .loan-card {
    width: 85%;
    max-width: none;
    flex: 0 0 85%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .loan-card {
    border-radius: 10px;
  }

  .loan-card__image {
    height: auto;
    aspect-ratio: 350 / 268;
    object-fit: cover;
  }

  .loan-card__body {
    min-height: 160px;
    padding: 22px 19px 20px;
  }

  .loan-card__title,
  .loan-card__button {
    font-size: 14px;
  }

  .loan-products__pagination:not(.loan-products__pagination--mobile) {
    display: none !important;
  }

  .loan-products__pagination--mobile {
    display: flex;
    margin-top: 38px;
  }
}

.other-services__pagination {
  display: none;
}

/* Homepage mobile carousel refinements: unsecured loans + other services */
@media (max-width: 700px) {
  /* Override the older tablet rule that hid unsecured-loan pagination. */
  #loan-panel-unsecured .loan-products__pagination--mobile {
    display: flex;
  }

  /* Other services use the same peek-card carousel language as loan cards. */
  .other-services__cards {
    display: flex;
    width: calc(100% + 28px);
    max-width: none;
    grid-template-columns: none;
    justify-content: flex-start;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    margin-inline: -14px;
    margin-bottom: -18px;
    padding: 0 0 18px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .other-services__cards::-webkit-scrollbar {
    display: none;
  }

  .other-services__cards > .other-service-card {
    width: 85%;
    max-width: none;
    flex: 0 0 85%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    border-radius: 10px;
  }

  .other-service-card__image {
    height: auto;
    aspect-ratio: 350 / 268;
    object-fit: cover;
  }

  .other-service-card__body {
    min-height: 160px;
    height: auto;
    padding: 22px 19px 20px;
  }

  .other-service-card__title,
  .other-service-card__button {
    font-size: 14px;
  }

  .other-services__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: -10px;
  }

  .other-services__dot {
    display: block;
    box-sizing: border-box;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    appearance: none;
    background: #cfd2d6;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
    transition: background-color 150ms ease;
  }

  .other-services__dot.is-active {
    cursor: default;
    background: #ffffff;
    border: 0;
    box-shadow: inset 0 0 0 1.6px var(--color-primary);
  }

  .other-services__dot:focus-visible {
    outline: 0;
  }
}



/* Carousel pagination dots: avoid dark focus/border flashes during active changes. */
button[class*="__dot"]:focus,
button[class*="__dot"]:focus-visible {
  outline: 0 !important;
}

/* ----------------------------------------------------------------------
 * Home mobile News + Articles refinements (2026-10-26)
 * Mobile only: preserve desktop/tablet layouts.
 * ---------------------------------------------------------------------- */
.news-card__meta-mobile,
.article-card__meta-mobile,
.article-card__button-mobile {
  display: none;
}

@media (max-width: 700px) {
  /* Section headings */
  .news-events__title,
  .knowledge-articles__title {
    text-align: center;
  }

  /* News cards: image -> 2-line title -> date/category -> summary -> CTA */
  .news-card__content {
    padding: 24px 16px 18px;
  }

  .news-card__title {
    display: -webkit-box;
    min-height: 0;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .news-card__meta-mobile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 7px;
    margin-top: 15px;
    color: var(--news-date-color);
    font-family: var(--font-brand);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.3;
  }

  .news-card__summary {
    margin-top: 13px;
    font-size: 14.5px;
    line-height: 1.7;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .news-card__footer {
    display: block;
    margin-top: 20px;
  }

  .news-card__footer .news-card__date {
    display: none;
  }

  .news-card__button {
    width: 100%;
    height: 36px;
    align-self: stretch;
    justify-content: center;
    padding-inline: 14px;
  }

  /* Article cards: same mobile information hierarchy as News cards. */
  .article-card__body {
    min-height: 0;
    padding: 24px 16px 18px;
  }

  .article-card__title {
    display: -webkit-box;
    min-height: 0;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .article-card__meta-mobile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 7px;
    margin-top: 15px;
    color: #9e979f;
    font-family: var(--font-brand);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.3;
  }

  .article-card__summary {
    margin-top: 13px;
    font-size: 14.5px;
    line-height: 1.7;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .article-card__button-mobile {
    display: inline-flex;
    width: 100%;
    height: 36px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-inline: 14px;
    color: #ffffff;
    background: var(--color-primary);
    border-radius: 5px;
    font-family: var(--font-brand-medium);
    font-size: 15.5px;
    font-weight: 400;
    line-height: 1;
  }

  /* Keep mobile card hover/focus readable if a touch device emulates hover. */
  .article-card:hover .article-card__meta-mobile,
  .article-card:focus-within .article-card__meta-mobile {
    color: #ffffff;
  }

  .article-card:hover .article-card__button-mobile,
  .article-card:focus-within .article-card__button-mobile {
    color: var(--color-primary);
    background: #ffffff;
  }
}


/* ----------------------------------------------------------------------
 * Home mobile Articles carousel: device-balanced cards + touch swipe
 * 2026-10-26
 * Mobile only. Desktop/tablet carousel behavior remains unchanged.
 * ---------------------------------------------------------------------- */
@media (max-width: 700px) {
  .knowledge-articles__inner {
    width: min(calc(100% - 32px), 420px);
    max-width: none;
    margin-inline: auto;
  }

  .article-carousel {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
  }

  .article-carousel__viewport {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    touch-action: pan-y;
  }

  .article-carousel__track {
    max-width: none;
  }

  .article-card {
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .article-carousel__arrow {
    display: none !important;
  }
}

/* Homepage loan products: desktop 5-card carousel controls ---------------- */
.loan-products__panel {
  position: relative;
}

.loan-products__arrow {
  display: none;
}

@media (min-width: 1025px) {
  #loan-panel-secured .loan-products__viewport {
    cursor: grab;
    user-select: none;
  }

  #loan-panel-secured .loan-products__viewport.is-dragging {
    cursor: grabbing;
  }

  #loan-panel-secured .loan-card,
  #loan-panel-secured .loan-card img {
    user-select: none;
    -webkit-user-drag: none;
  }

  #loan-panel-secured .loan-products__arrow {
    position: absolute;
    top: calc((100% - 53px) / 2);
    z-index: 4;
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px;
    color: #a8adb2;
    background: #ffffff;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgb(0 0 0 / 10%);
    font-family: Arial, sans-serif;
    font-size: 34px;
    font-weight: 300;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
    transition:
      color 160ms ease,
      background-color 160ms ease,
      opacity 160ms ease,
      box-shadow 160ms ease;
  }

  #loan-panel-secured .loan-products__arrow--previous {
    left: -48px;
  }

  #loan-panel-secured .loan-products__arrow--next {
    right: -48px;
  }

  #loan-panel-secured .loan-products__arrow:hover:not(:disabled),
  #loan-panel-secured .loan-products__arrow:focus-visible:not(:disabled) {
    color: var(--loan-primary);
    background: #ffffff;
    box-shadow: 0 5px 16px rgb(0 0 0 / 14%);
    outline: 0;
  }

  #loan-panel-secured .loan-products__arrow:disabled {
    opacity: 0.55;
    cursor: default;
  }

  #loan-panel-secured .loan-products__dot {
    cursor: pointer;
  }

  #loan-panel-secured .loan-products__dot.is-active {
    cursor: default;
  }
}

@media (min-width: 1025px) and (max-width: 1220px) {
  #loan-panel-secured .loan-products__arrow--previous {
    left: 8px;
  }

  #loan-panel-secured .loan-products__arrow--next {
    right: 8px;
  }
}


/* Homepage news cards: make the whole card open the detail page. */
.news-events .news-card.is-clickable {
  cursor: pointer;
}


/* Other services: 3-card responsive carousel -------------------------------- */
.other-services__carousel {
  position: relative;
  min-width: 0;
}

.other-services__carousel .other-services__cards {
  display: flex;
  width: 100%;
  max-width: none;
  grid-template-columns: none;
  justify-content: flex-start;
  gap: 20px;
  overflow-x: hidden;
  overflow-y: hidden;
  margin: 0 0 -18px;
  padding: 12px 0 18px;
  scroll-behavior: auto;
  scroll-snap-type: none;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-y;
}

.other-services__carousel .other-services__cards::-webkit-scrollbar {
  display: none;
}

.other-services__carousel .other-service-card {
  flex: 0 0 calc((100% - 20px) / 2);
  width: calc((100% - 20px) / 2);
  max-width: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.other-services__carousel .other-services__cards {
  cursor: grab;
}

.other-services__carousel .other-services__cards.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.other-services__carousel .other-service-card,
.other-services__carousel .other-service-card img {
  user-select: none;
  -webkit-user-drag: none;
}

.other-services__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  color: #a8adb2;
  background: #ffffff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgb(0 0 0 / 10%);
  font-family: Arial, sans-serif;
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  transition:
    color 160ms ease,
    opacity 160ms ease,
    box-shadow 160ms ease;
}

.other-services__arrow--previous {
  left: -48px;
}

.other-services__arrow--next {
  right: -48px;
}

.other-services__arrow:hover:not(:disabled),
.other-services__arrow:focus-visible:not(:disabled) {
  color: var(--color-primary);
  outline: 0;
  box-shadow: 0 5px 16px rgb(0 0 0 / 14%);
}

.other-services__arrow:disabled {
  opacity: 0.45;
  cursor: default;
}

.other-services__carousel .other-services__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.other-services__carousel .other-services__dot {
  display: block;
  box-sizing: border-box;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  appearance: none;
  background: #cfd2d6;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  transition: background-color 150ms ease;
}

.other-services__carousel .other-services__dot.is-active {
  background: #ffffff;
  box-shadow: inset 0 0 0 1.6px var(--color-primary);
}

.other-services__carousel .other-services__dot:focus-visible {
  outline: 0;
}

@media (max-width: 1200px) {
  .other-services__carousel {
    width: min(100%, 534px);
    margin-inline: auto;
  }

  .other-services__carousel .other-services__cards {
    width: 100%;
    margin-inline: 0;
  }
}

/* Portrait mobile keeps the existing one-card/peek pattern and no arrows. */
@media (max-width: 700px) and (orientation: portrait) {
  .other-services__carousel {
    /*
     * Use the full mobile content width instead of capping the carousel at
     * 320px. The existing +28px scroller bleed then lets the active card sit
     * close to the viewport edge while still revealing the next card.
     */
    width: 100%;
    margin-inline: auto;
  }

  .other-services__carousel .other-services__cards {
    width: calc(100% + 28px);
    max-width: none;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    margin-inline: -14px;
    margin-bottom: -18px;
    padding: 0 0 18px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    touch-action: auto;
    cursor: auto;
    -webkit-overflow-scrolling: touch;
  }

  .other-services__carousel .other-services__cards > .other-service-card {
    width: 85%;
    max-width: none;
    flex: 0 0 85%;
    transform: none !important;
    transition: none !important;
  }

  .other-services__arrow {
    display: none !important;
  }

  .other-services__carousel .other-services__pagination {
    margin-top: 30px;
  }
}

/* ----------------------------------------------------------------------
 * Home mobile section heading alignment (2026-10-27)
 * Keep News and Articles headings at the same size on mobile.
 * News is 10% smaller than its previous mobile scale.
 * ---------------------------------------------------------------------- */
@media (max-width: 700px) {
  .news-events__title,
  .knowledge-articles__title {
    font-size: clamp(27.9px, 9vw, 32.4px);
  }
}

/* =========================================================
   Global mobile-portrait navigation path cleanup
   - Hide every breadcrumb/navigation path on portrait phones.
   - Preserve a modest top breathing space inside the following
     content surface so its own background continues to cover it.
   - Product/service details and article details already have
     page-specific mobile spacing rules, so they are excluded
     from the generic replacement gap to avoid double spacing.
   ========================================================= */
@media (max-width: 520px) and (orientation: portrait) {
  nav[class*="breadcrumb"] {
    display: none !important;
  }

  nav[class*="breadcrumb"]:not(.loan-product-breadcrumb):not(.article-detail__breadcrumbs)
    + :is(section, article, header, div) {
    border-top: 24px solid transparent !important;
    background-clip: border-box;
  }
}

/* Mobile expanded navigation -------------------------------------------------
 * Full mobile menu mirrors the legacy/original structure: primary navigation,
 * utility links, language, social channels and the 1455 contact bar.
 */
.mobile-menu__utility,
.mobile-menu__section-label,
.mobile-menu__social-row,
.mobile-menu__call {
  display: none;
}

@media (max-width: 1024px) {
  .primary-nav {
    display: flex;
    max-height: calc(100dvh - var(--primary-nav-height));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    padding: 16px 18px 0;
    color: #444444;
    background: #ffffff;
    box-shadow: 0 8px 20px rgb(0 0 0 / 12%);
    scrollbar-width: thin;
  }

  .primary-nav__item {
    display: contents;
  }

  .primary-nav__link,
  .primary-nav > .primary-nav__link {
    min-height: 0;
    justify-content: center;
    gap: 10px;
    padding: 7px 0;
    color: #343434;
    background: transparent;
    border: 0;
    font-family: var(--font-brand);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.25;
    text-align: center;
  }

  .primary-nav__link:hover,
  .primary-nav__link:focus-visible,
  .primary-nav__link[aria-current="page"],
  .primary-nav__item:hover > .primary-nav__link,
  .primary-nav__item:focus-within > .primary-nav__link {
    color: var(--color-primary);
    background: transparent;
  }

  .primary-nav .dropdown-icon {
    display: block;
    width: 11px;
    height: 8px;
    flex: 0 0 auto;
    filter: brightness(0) saturate(100%);
    opacity: 0.76;
  }

  .mobile-menu__utility {
    display: grid;
    gap: 0;
    margin-top: 12px;
    padding: 13px 0 12px;
    border-top: 1px solid #dddddd;
    border-bottom: 1px solid #dddddd;
  }

  .mobile-menu__utility a {
    display: block;
    padding: 6px 0;
    color: #4d4d4d;
    font-family: var(--font-brand);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none;
  }

  .mobile-menu__utility a:hover,
  .mobile-menu__utility a:focus-visible {
    color: var(--color-primary);
  }

  .mobile-menu__section-label {
    display: block;
    margin: 11px 0 6px;
    color: #555555;
    font-family: var(--font-brand);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
  }

  .primary-nav .language-switcher--mobile {
    display: flex;
    justify-content: flex-start;
    gap: 9px;
    margin: 0;
    padding: 0 0 10px;
    border-bottom: 1px solid #dddddd;
  }

  .language-switcher--mobile .language-switcher__item {
    min-width: 38px;
    height: 28px;
    padding: 0 8px;
    color: var(--color-primary);
    background: #ffffff;
    border: 1px solid var(--color-primary);
    border-radius: 5px;
    font-family: var(--font-text);
    font-size: 13px;
    font-weight: 400;
    line-height: 26px;
    text-align: center;
  }

  .language-switcher--mobile .language-switcher__item.is-active {
    color: var(--color-accent);
    background: var(--color-primary);
    border-color: var(--color-primary);
  }

  .mobile-menu__social-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0 2px;
  }

  .mobile-menu__section-label--inline {
    margin: 0;
    flex: 0 0 auto;
  }

  .mobile-menu__socials {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-menu__social {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
  }

  .mobile-menu__social img {
    display: block;
    width: 17px;
    height: 17px;
    filter: brightness(0) invert(1);
  }

  .mobile-menu__social--facebook {
    background: #4267b2;
  }

  .mobile-menu__social--line {
    background: #16c400;
  }

  .mobile-menu__social--youtube {
    background: #ff1010;
  }

  .mobile-menu__call {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    width: calc(100% + 36px);
    min-height: 64px;
    flex: 0 0 64px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 16px -18px 0;
    color: var(--color-primary);
    background: var(--color-accent);
    font-family: var(--font-brand);
    font-size: 29px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
  }

  .mobile-menu__call svg {
    width: 25px;
    height: 25px;
    max-width: none;
    fill: currentColor;
    stroke: none;
  }

  html.has-mobile-navigation .line-contact {
    display: none;
  }
}

@media (max-width: 520px) {
  .primary-nav {
    padding-top: 14px;
  }

  .primary-nav__link,
  .primary-nav > .primary-nav__link {
    font-size: 19px;
  }

  .mobile-menu__utility a,
  .mobile-menu__section-label {
    font-size: 13.5px;
  }
}

/* Keep CMS-preserved mobile menu extras hidden outside the compact header. */
.mobile-menu__extras {
  display: none;
}

@media (max-width: 1024px) {
  .primary-nav .mobile-menu__extras {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    min-width: 0;
  }
}


/* Mobile expanded menu: accordion mega menus --------------------------------
 * Reuse the desktop mega-menu content on compact navigation. The top-level
 * links toggle their panels; the image inside each panel remains a landing link.
 */
.mobile-menu__language-row {
  display: none;
}

.mega-menu__media-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .primary-nav__item {
    display: flex;
    width: 100%;
    height: auto;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
  }

  .primary-nav__item > .primary-nav__link--dropdown {
    position: relative;
    width: 100%;
    padding-right: 34px;
    padding-left: 34px;
  }

  /* Replace the small raster arrow with a larger, heavier CSS chevron. */
  .primary-nav__item > .primary-nav__link--dropdown .dropdown-icon {
    display: none !important;
  }

  .primary-nav__item > .primary-nav__link--dropdown::after {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 10px;
    height: 10px;
    content: "";
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-67%) rotate(45deg);
    transform-origin: center;
    transition: transform 180ms ease;
  }

  .primary-nav__item.is-mobile-submenu-open > .primary-nav__link--dropdown::after {
    transform: translateY(-28%) rotate(225deg);
  }

  /* Override the older mobile rule that hides mega menus completely. */
  .primary-nav__item > .mega-menu {
    position: static;
    z-index: auto;
    display: block;
    visibility: hidden;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    color: #6f6f6f;
    opacity: 0;
    pointer-events: none;
    transform: none;
    transition:
      max-height 260ms ease,
      opacity 180ms ease,
      visibility 0s linear 260ms;
  }

  .primary-nav__item.is-mobile-submenu-open > .mega-menu {
    visibility: visible;
    max-height: 1450px;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
  }

  .primary-nav__item > .mega-menu .mega-menu__panel {
    width: calc(100% - 28px);
    overflow: hidden;
    margin: 8px auto 4px;
    padding: 28px 24px 30px;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 26px rgb(0 0 0 / 10%);
    transform: none;
    transition: none;
  }

  .primary-nav__item > .mega-menu .mega-menu__grid,
  .primary-nav__item > .mega-menu .mega-menu__grid--two,
  .primary-nav__item > .mega-menu .mega-menu__grid--three {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .primary-nav__item > .mega-menu .mega-menu__cell {
    min-width: 0;
    padding: 0;
    border: 0;
  }

  .primary-nav__item > .mega-menu .mega-menu__cell + .mega-menu__cell {
    padding: 0;
    border: 0;
  }

  .primary-nav__item > .mega-menu .mega-menu__cell + .mega-menu__cell::before {
    display: none;
  }

  .primary-nav__item > .mega-menu .mega-menu__media {
    width: 100%;
  }

  .primary-nav__item > .mega-menu .mega-menu__media-link {
    width: min(100%, 300px);
    margin-inline: auto;
  }

  .primary-nav__item > .mega-menu .mega-menu__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    object-position: center;
  }

  .primary-nav__item > .mega-menu .mega-menu__heading {
    margin: 0 0 8px;
    color: #2f2f2f;
    font-family: var(--font-brand-medium);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.45;
  }

  .primary-nav__item > .mega-menu .mega-menu__list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  .primary-nav__item > .mega-menu .mega-menu__link {
    display: block;
    padding: 6px 0;
    color: #888888;
    font-family: var(--font-brand);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    white-space: normal;
    text-decoration: none;
  }

  .primary-nav__item > .mega-menu .mega-menu__link:hover,
  .primary-nav__item > .mega-menu .mega-menu__link:focus-visible {
    color: var(--color-primary);
  }

  /* Keep the language selector on the same row as its label, aligned right. */
  .mobile-menu__language-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0 10px;
    border-bottom: 1px solid #dddddd;
  }

  .mobile-menu__language-row .mobile-menu__section-label {
    margin: 0;
  }

  .primary-nav .mobile-menu__language-row .language-switcher--mobile {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    gap: 9px;
    margin: 0;
    padding: 0;
    border: 0;
  }
}

@media (max-width: 520px) {
  .primary-nav__item > .mega-menu .mega-menu__panel {
    width: calc(100% - 28px);
    padding: 28px 24px 30px;
  }

  .primary-nav__item > .mega-menu .mega-menu__media-link {
    width: min(100%, 300px);
  }

  .primary-nav__item > .mega-menu .mega-menu__link {
    font-size: 13.5px;
  }
}
