/* ==========================================================================
   style_ir.css — สไตล์เฉพาะหน้า index_ir.html (แยกออกมาจาก style.css)

   ⚠️ ต้องโหลด "หลัง" style.css เสมอ เพราะไฟล์นี้พึ่งพา:
     - :root design tokens (--kpn-green-* / --fc-minimal-*) จาก style.css
     - คอมโพเนนต์ร่วม: .hero, .btn-more, .ir__stock, .ir__docs, .ir__feature,
       .ir-doc, .ir-grad, .ir-feature-btn, .ir-navbtn ฯลฯ (ยังอยู่ใน style.css)

   ลำดับใน <head>:
     <link rel="stylesheet" href="style.css">
     <link rel="stylesheet" href="style_ir.css">
   ========================================================================== */

/* ==========================================================================
   IR LANDING — หน้า index_ir.html
   Component: นักลงทุนสัมพันธ์ | New Landing Page Design (Figma node 210:19009)
   ใช้ token สี/ฟอนต์จาก :root | reuse .btn-more / .ir__stock / .ir__docs / .ir-doc
   ========================================================================== */

/* ตัวช่วยข้อความไล่เฉดเขียว (green-200 -> green-600) — ใช้กับหัวข้อ IR */
.ir-grad-green {
  background-image: linear-gradient(0deg, var(--kpn-green-green-green-600) 0%, var(--kpn-green-green-green-200) 76%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--kpn-green-green-green-600);
  /* fallback */
}

/* ไอคอน IR (ดึงจาก Figma → assets/images/ir/icons) เรนเดอร์ด้วย CSS mask
   เพื่อ recolor ตาม currentColor และทำ hover ได้ */
.ir-ico {
  display: inline-block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.ir-ico--alarm {
  width: 18px;
  height: 18px;
  -webkit-mask-image: url("../images/ir/icons/alarm.svg");
  mask-image: url("../images/ir/icons/alarm.svg");
}

.ir-ico--calendar {
  width: 20px;
  height: 20px;
  color: var(--kpn-green-green-green-600);
  -webkit-mask-image: url("../images/ir/icons/calendar.svg");
  mask-image: url("../images/ir/icons/calendar.svg");
}

.ir-ico--arrow {
  width: 22px;
  height: 22px;
  -webkit-mask-image: url("../images/ir/icons/arrow-link.svg");
  mask-image: url("../images/ir/icons/arrow-link.svg");
}

/* --------------------------------------------------------------------------
   Hero - IR (Figma node 210:18451)
   variant ของ .hero: คอลัมน์, หัวข้อกึ่งกลาง + แถบหุ้นด้านล่าง
   -------------------------------------------------------------------------- */
.hero.ir-hero {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  text-align: center;
  gap: 40px;
  min-height: 100vh;
  min-height: 100svh;
  /* padding แนวนอนตรงกับ .ir-news เพื่อให้แถบหุ้นเรียงขอบตรงกับปฏิทิน/ข่าวด้านล่าง */
  padding: clamp(140px, 20vh, 240px) clamp(20px, 6vw, 300px) clamp(32px, 5vh, 56px);
}

/* gradient มืดจากบนลงล่าง (แทน overlay ทึบของ .hero) ให้แถบหุ้นอ่านชัด */
/* Keep the fallback visible while the first video frames buffer. */
.hero.ir-hero .hero__video {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.hero.ir-hero .hero__video.is-playback-ready {
  opacity: 1;
}

.hero.ir-hero::after {
  background-color: transparent;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 28%, rgba(0, 0, 0, 0.85) 92%);
}

.ir-hero__content {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ir-hero__title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
}

.ir-hero__title {
  margin: 0;
  font-weight: 500;
  /* FC Minimal Medium */
  font-size: clamp(36px, 5vw, var(--fc-minimal-display-64-medium));
  line-height: 1.15;
  color: #ffffff;
}

.ir-hero__subtitle {
  margin: 0;
  font-weight: 400;
  /* FC Minimal Regular */
  font-size: clamp(18px, 2.2vw, var(--fc-minimal-paragraph-large-regular));
  line-height: 1.4;
  color: #ffffff;
}

.ir-hero__stock {
  position: relative;
  z-index: 2;
  width: 100%;
  /* เต็มความกว้าง content เท่ากับ .ir-news__grid (ไม่ cap max-width) */
}

/* --------------------------------------------------------------------------
   ข่าวสารและปฏิทินกิจกรรม (Figma node 210:14245)
   -------------------------------------------------------------------------- */
.ir-news {
  font-family: "FC Minimal", sans-serif;
  padding: clamp(48px, 8vw, 80px) clamp(20px, 6vw, 300px);
  background-color: var(--bg-color, #FAFBFD);
}

.ir-news__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 48px);
  align-items: stretch;
}

.ir-news__col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ir-news__title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(28px, 4vw, var(--fc-minimal-heading-48-medium));
}

/* การ์ดปฏิทินกิจกรรม: ภาพพื้นหลัง + แผง glass ด้านล่าง */
.event-card {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  min-height: 540px;
  border-radius: 36px;
  background-color: var(--kpn-green-grey-grey-100);
  overflow: hidden;
}

/* รูปพื้นหลัง — ใช้ค่าตำแหน่ง/สเกลตาม Figma (node 210:17420) */
.event-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../images/ir/event-agm.png');
  background-size: cover;
  background-position: 65% 50%;
  background-repeat: no-repeat;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* hover การ์ด -> รูป zoom เบา ๆ (ตาม pattern การ์ดของระบบ) */
.event-card:hover .event-card__bg {
  transform: scale(1.06);
}

.event-card__glass {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 24px 30px 28px;
  background-color: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.event-badge {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px 2px 8px;
  border-radius: 30px;
  color: #ffffff;
  font-weight: 400;
  font-size: var(--fc-minimal-paragraph-small-regular);
  /* สี bg ตามที่กำหนด */
  background: linear-gradient(180deg, var(--kpn-green-blue-blue-500, #1D9CCF) 0%, var(--kpn-green-blue-blue-400, #4DBCE9) 100%);
}

/* แถบแสงกวาดผ่าน (shine) — overlay เพื่อไม่ทับสี bg */
.event-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: kpnBadgeShine 3s ease-in-out infinite;
}

/* shine sweep ของ .event-badge */
@keyframes kpnBadgeShine {
  0% {
    background-position: 150% 0;
  }

  100% {
    background-position: -50% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .event-badge::before {
    animation: none;
  }
}

.event-badge svg {
  position: relative;
  width: 18px;
  height: 18px;
}

.event-card__heading {
  margin: 0;
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, var(--fc-minimal-heading-30-medium));
  line-height: 1.25;
  color: var(--kpn-green-grey-grey-900);
}

.event-card__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 400;
  font-size: var(--fc-minimal-paragraph-detail-regular);
  color: var(--kpn-green-grey-grey-900);
}

.event-card__date svg {
  width: 20px;
  height: 20px;
  color: var(--kpn-green-green-green-600);
}

.event-card__desc {
  margin: 0;
  font-weight: 400;
  font-size: var(--fc-minimal-paragraph-small-regular);
  line-height: 1.5;
  color: var(--kpn-green-grey-grey-700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ลิงก์ "อ่านเพิ่มเติม / ดูข่าวทั้งหมด" + ลูกศร */
.ir-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  font-size: var(--fc-minimal-paragraph-regular-regular);
  color: var(--kpn-green-grey-grey-900);
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.ir-link svg {
  width: 22px;
  height: 22px;
}

.ir-link:hover {
  color: var(--kpn-green-orange-orange-500);
  gap: 14px;
}

/* แผงข่าวสารและประกาศ */
.news-board {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px;
  border: 1px solid rgba(220, 220, 220, 0.6);
  border-radius: 36px;
  background-color: #ffffff;
}

.news-board__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.news-board__divider {
  height: 1px;
  width: 100%;
  background-color: var(--kpn-green-grey-grey-50);
}

.news-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--kpn-green-grey-grey-50);
  border-radius: 32px;
  background-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 20px 0 rgba(245, 245, 255, 0.25);
  font-weight: 400;
  font-size: var(--fc-minimal-paragraph-small-regular);
  color: var(--kpn-green-green-green-600);
}

.news-board__heading {
  margin: 0;
  font-weight: 500;
  font-size: var(--fc-minimal-paragraph-regular-medium);
  line-height: 1.35;
  color: var(--kpn-green-grey-grey-900);
}

/* หัวข้อข่าวจริงจาก API เป็นลิงก์ไปหน้ารายละเอียด (index-ir.aspx) — คงหน้าตาเดิมของดีไซน์ */
.news-board__heading a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-board__heading a:hover,
.news-board__heading a:focus-visible {
  color: var(--kpn-green-green-green-600);
}

.news-board__desc {
  margin: 0;
  font-weight: 400;
  font-size: var(--fc-minimal-paragraph-small-regular);
  line-height: 1.5;
  color: var(--kpn-green-grey-grey-700);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   IR Section: ข้อมูลสำคัญทางการเงิน + เอกสาร (Figma node 300:10994)
   พื้นหลังมืด + overlay | แท็บ + การ์ดสถิติ + กราฟ + บล็อกเอกสาร (reuse)
   -------------------------------------------------------------------------- */
.ir-fin {
  position: relative;
  font-family: "FC Minimal", sans-serif;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 6vw, 80px);
  padding: clamp(48px, 8vw, 80px) clamp(20px, 6vw, 300px);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.ir-fin::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  /* background-color: rgba(13, 30, 38, 0.82); */
}

.ir-fin>* {
  position: relative;
  z-index: 1;
}

.ir-fin__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.ir-fin__title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(28px, 4vw, var(--fc-minimal-heading-48-medium));
  color: #ffffff;
}

/* แท็บการเงิน (pill) */
.fin-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  background-color: #f2f2f8;
}

.fin-tab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 24px;
  font-family: inherit;
  font-weight: 500;
  font-size: var(--fc-minimal-paragraph-small-medium);
  color: var(--kpn-green-grey-grey-900);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.fin-tab--active {
  background-color: var(--kpn-green-green-green-600);
  color: #ffffff;
  font-weight: 600;
}

.ir-fin__content {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 32px;
  align-items: stretch;
}

/* การ์ดสรุปตัวเลขสำคัญ (จาก Figma node 210:13697) */
.fin-stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
  padding: 36px;
  border-radius: 36px;
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.fin-stat {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* วงกลมไอคอน 60px ขอบบาง (ตาม Figma "main icon style") | ไอคอนสีดำ grey-900 */
.fin-stat__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(220, 220, 220, 0.6);
  border-radius: 99px;
}

.fin-stat__icon svg {
  width: 35px;
  height: 35px;
}

.fin-stat__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fin-stat__label {
  margin: 0;
  font-weight: 400;
  /* FC Minimal Regular 16 */
  font-size: var(--fc-minimal-paragraph-detail-regular);
  color: var(--kpn-green-grey-grey-700);
}

.fin-stat__value {
  margin: 0;
  font-weight: 500;
  /* FC Minimal Medium 24 */
  font-size: var(--fc-minimal-paragraph-large-medium);
  color: var(--kpn-green-grey-grey-900);
}

/* "ข้อมูล ณ วันที่" — หมายเหตุท้ายการ์ด ชิดขวา (เหมือนหน้า financial-highlight)
   margin-top auto ทั้ง stat แรกและบรรทัดนี้ → บรรทัดนี้ติดล่าง ตัวเลขอยู่กลางพื้นที่ด้านบน */
.fin-stats > .fin-stat:first-child {
  margin-top: auto;
}

.fin-stats__asof {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin: auto 0 0;
  color: var(--kpn-green-grey-grey-500);
  font-size: 14px; /* ไม่มี token 14px — ตาม docs/design-system.md ให้ใส่ค่าตรง */
  font-weight: 400;
}

.fin-stats__asof-icon {
  flex: none;
  width: 15px;
  height: 15px;
}

/* การ์ดกราฟ (ECharts) */
.fin-chart-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 32px;
  border-radius: 36px;
  background-color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.fin-chart-card__title {
  margin: 0;
  font-weight: 500;
  /* FC Minimal Medium 20 (ตาม Figma node 210:13505) */
  font-size: var(--fc-minimal-paragraph-regular-medium);
  color: var(--kpn-green-grey-grey-900);
}

.fin-chart-card__unit {
  margin: 0;
  font-weight: 400;
  font-size: var(--fc-minimal-paragraph-detail-regular);
  color: var(--kpn-green-grey-grey-700);
}

.fin-chart-card__canvas {
  width: 100%;
  height: 388px;
  margin-top: 8px;
  transition: opacity 0.3s ease;
}

/* บล็อกเอกสาร (reuse .ir__docs) ให้แน่ใจว่าอยู่เหนือ overlay */
.ir-fin__docs {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   ข้อมูลสำหรับนักลงทุน (Figma node 210:14173)
   -------------------------------------------------------------------------- */
.ir-invest {
  font-family: "FC Minimal", sans-serif;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: clamp(48px, 8vw, 80px) clamp(20px, 6vw, 300px);
  background-color: var(--bg-color, #FAFBFD);
}

.ir-invest__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.ir-invest__eyebrow {
  margin: 0;
  font-weight: 500;
  font-size: var(--fc-minimal-paragraph-small-regular);
  color: var(--kpn-green-grey-grey-300);
}

.ir-invest__title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(28px, 4vw, var(--fc-minimal-heading-48-medium));
  line-height: normal;
}

.ir-invest__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

/* การ์ดข้อมูลนักลงทุน: ภาพ + overlay มืด + footer (title + ปุ่มวงกลม) */
.invest-card {
  position: relative;
  grid-column: span 2;
  display: flex;
  align-items: flex-end;
  height: 300px;
  padding: 24px;
  border-radius: 36px;
  background-color: var(--kpn-green-grey-grey-100);
  overflow: hidden;
  text-decoration: none;
}

.invest-card--wide {
  grid-column: span 3;
}

/* รูปพื้นหลัง — แยก layer เพื่อ zoom เฉพาะรูปตอน hover */
.invest-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.invest-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0.25%, rgba(0, 0, 0, 0.46) 81%);
  transition: background-color 0.3s ease;
}

.invest-card__footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.invest-card__title {
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, var(--fc-minimal-heading-30-medium));
  color: #ffffff;
}

.invest-card__btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--kpn-green-grey-grey-50);
  border-radius: 100px;
  color: #ffffff;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.invest-card__btn svg {
  width: 16px;
  height: 16px;
}

/* hover: ภาพ zoom + ปุ่มเป็นส้ม (สอดคล้องทั้งเว็บ) */
.invest-card:hover .invest-card__bg {
  transform: scale(1.06);
}

.invest-card:hover .invest-card__btn {
  background-color: var(--kpn-green-orange-orange-500);
  border-color: var(--kpn-green-orange-orange-500);
}

/* --------------------------------------------------------------------------
   IR LANDING — Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .ir-news__grid {
    grid-template-columns: 1fr;
  }

  .ir-fin__content {
    grid-template-columns: 1fr;
  }

  /* กราฟขึ้นก่อน การ์ดตัวเลขตามมาเป็น 2×2 (หมายเหตุวันที่เต็มแถวล่าง) */
  .fin-chart-card {
    order: -1;
  }

  .fin-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .fin-stats > .fin-stat:first-child {
    margin-top: 0;
  }

  .fin-stats__asof {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  /* แท็บเล็ต (576–991): 2 การ์ดต่อแถว */
  .ir-invest__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .invest-card,
  .invest-card--wide {
    grid-column: span 1;
  }
}

@media (max-width: 575.98px) {
  /* มือถือ: กลับเป็น 1 การ์ดต่อแถว */
  .ir-invest__grid {
    grid-template-columns: 1fr;
  }

  /* มือถือ: การ์ดตัวเลขกลับเป็นคอลัมน์เดียว (2×2 ใช้เฉพาะ 576–991), padding เท่าหน้า financial-highlight */
  .fin-stats {
    grid-template-columns: 1fr;
    padding: 24px;
    border-radius: 24px;
  }

  .fin-tabs {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* flex-basis ตามความยาวข้อความ (ไม่ใช่ 1 = แบ่งเท่ากัน) — "สินทรัพย์รวม" ยาวกว่าแท็บอื่น
     ถ้าแบ่งเท่ากันจะถูกบีบจนตัดเป็น 2 บรรทัด */
  .fin-tab {
    flex: 1 1 auto;
    padding: 8px 10px;
    font-size: 16px;
    white-space: nowrap;
  }

  .fin-chart-card__canvas {
    height: 300px;
  }
}


/* ==========================================================================
   IR HERO STOCK — Responsive ตั้งแต่ 1200px ลงไป (เฉพาะ index_ir.html)
   ดีไซน์ใหม่: รวมแถบหุ้นเป็น "การ์ดกระจกฝ้า" (glass) วางลอยบนวิดีโอ hero
   จัด layout แบบ dashboard ไล่ระดับ 3 ขั้น ให้อ่านง่าย ไม่รก
     - <= 1199.98px : การ์ด glass | แถวบน [ชื่อหุ้น | ปุ่ม] / แถวล่าง ค่าหุ้น 3 คอลัมน์
     - <=  767.98px : ปุ่มย้ายลงเต็มความกว้างล่างสุด
     - <=  575.98px : ราคาเด่นเต็มแถว + (เปลี่ยนแปลง | ปริมาณ) 2 คอลัมน์
   scope ใต้ .ir-hero__stock เท่านั้น เพื่อไม่กระทบ .ir__stock บนหน้า index.html
   ========================================================================== */

/* ----- <= 1199.98px : การ์ดกระจก + header row + ค่าหุ้น 3 คอลัมน์ ----- */
@media (max-width: 1199.98px) {
  .ir-hero__stock .ir__stock {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    gap: 0;
    row-gap: 4px;
    padding: clamp(20px, 3vw, 32px);
    border-radius: 24px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  /* แถวบน-ซ้าย: ชื่อย่อหุ้น + วันที่อัปเดต (กิน 2/3 ซ้าย) */
  .ir-hero__stock .ir__stock-item--symbol {
    grid-row: 1;
    grid-column: 1 / 3;
    padding: 0 0 16px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  /* แถวบน-ขวา: ปุ่ม "ราคาหลักทรัพย์" ชิดขวา อยู่แถวเดียวกับชื่อหุ้น */
  .ir-hero__stock .ir__stock-action {
    grid-row: 1;
    grid-column: 3;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  }

  /* แถวล่าง: ราคา / เปลี่ยนแปลง / ปริมาณ เรียง 3 คอลัมน์ */
  .ir-hero__stock .ir__stock-item:not(.ir__stock-item--symbol) {
    grid-row: 2;
    padding: 16px 12px 0;
    border-right: none;
  }
  .ir-hero__stock .ir__stock-item:nth-child(2) {
    grid-column: 1;
  }
  .ir-hero__stock .ir__stock-item:nth-child(3) {
    grid-column: 2;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
  }
  .ir-hero__stock .ir__stock-item:nth-child(4) {
    grid-column: 3;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
  }

  /* ปรับขนาดฟอนต์ให้พอดีคอลัมน์ เลขยาวไม่ล้น */
  .ir-hero__stock .ir__stock-symbol {
    font-size: clamp(26px, 3vw, 36px);
  }
  .ir-hero__stock .ir__stock-label {
    font-size: 14px;
    /* ไม่มี token 14px -> ใส่ค่าตรง */
  }
  .ir-hero__stock .ir__stock-value {
    font-size: clamp(18px, 2vw, 22px);
  }
}

/* ----- <= 767.98px : เลิก 3 คอลัมน์ -> ลิสต์ "ป้ายซ้าย–ค่าขวา" ทีละแถว -----
   แก้อาการรก: จอแคบไม่ต้องยัด 3 คอลัมน์ + ป้าย TH ยาวไม่ต้องตัดบรรทัดมั่ว
   เปลี่ยนการ์ดจาก grid -> flex column (เรียงตาม DOM: ชื่อหุ้น / ราคา / เปลี่ยนแปลง / ปริมาณ / ปุ่ม) */
@media (max-width: 767.98px) {
  .ir-hero__stock .ir__stock {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  /* แถวหัว: ชื่อย่อหุ้น + วันที่ (ไม่ต้องมีเส้นล่าง เพราะแถวราคาด้านล่างมีเส้นบนคั่นให้แล้ว) */
  .ir-hero__stock .ir__stock-item--symbol {
    padding: 0 0 14px;
    border: none;
  }

  /* แต่ละค่าหุ้น = 1 แถว: ป้ายชิดซ้าย (จาง) / ค่าชิดขวา (เด่น) + เส้นคั่นบน */
  .ir-hero__stock .ir__stock-item:not(.ir__stock-item--symbol) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    padding: 14px 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  /* ป้าย: ยืดได้/ตัดบรรทัดได้ ทำสีจางลงให้ค่าหุ้นเด่น */
  .ir-hero__stock .ir__stock-label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.72);
  }

  /* ค่า: ชิดขวา ไม่ตัดบรรทัด */
  .ir-hero__stock .ir__stock-value {
    flex: 0 0 auto;
    text-align: right;
    font-size: 20px;
    white-space: nowrap;
  }

  /* ปุ่มอยู่ล่างสุด จัดกึ่งกลาง + เส้นคั่นบน (คงขนาดปุ่มเดิม ไม่ยืดเต็มความกว้าง) */
  .ir-hero__stock .ir__stock-action {
    justify-content: center;
    padding: 16px 0 0;
    margin-top: 4px;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }
}

/* ----- <= 575.98px : ใช้ลิสต์เดิม แค่ย่อระยะ/ฟอนต์ให้กระชับขึ้น ----- */
@media (max-width: 575.98px) {
  .ir-hero__stock .ir__stock {
    padding: 18px;
    border-radius: 20px;
  }

  .ir-hero__stock .ir__stock-symbol {
    font-size: 24px;
  }
  .ir-hero__stock .ir__stock-updated {
    font-size: 13px;
    /* ไม่มี token 13px -> ใส่ค่าตรง */
  }
  .ir-hero__stock .ir__stock-item:not(.ir__stock-item--symbol) {
    padding: 12px 0;
  }
  .ir-hero__stock .ir__stock-label {
    font-size: 14px;
    /* ไม่มี token 14px -> ใส่ค่าตรง */
  }
  .ir-hero__stock .ir__stock-value {
    font-size: 18px;
  }
}
/* KPN typography audit --------------------------------------------------- */
.ir-grad-green {
  background-image: linear-gradient(0deg, var(--kpn-green-green-green-200) 0%, var(--kpn-green-green-green-600) 76%);
  color: var(--kpn-green-green-green-600);
}
.ir-news__title {
  font-size: clamp(28px, 4vw, var(--fc-minimal-heading-48-medium));
  font-weight: 500;
  line-height: 1.3;
}
.event-card__desc,
.news-board__desc {
  font-size: var(--fc-minimal-paragraph-detail-regular);
  font-weight: 400;
}
