.uiw-image-text-block {
  font-family: 'Unbeatable','Arial','Helvetica Neue','Helvetica',sans-serif;
  width: 100%;
  /* Figma 7519:37329 (node design ĐÚNG — bản trước dựng nhầm node 2535:41776) khai card 824px.
     Nới rộng 12px mỗi bên bằng margin âm để dành chỗ cho bóng NGANG của card: track buộc dùng
     `overflow-x:auto`, nên bóng nào nằm ngoài padding-box của track đều bị cắt. Nới ở WRAPPER
     (không phải ở track) để bề rộng card vẫn đúng 792px như trước — nới ở track sẽ làm slide
     `flex: 0 0 100%` phình theo. */
  max-width: 848px;
  width: 100%;
  margin: 0 auto;
}

.uiw-image-text-block-track {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  /* Không có dòng này, trình duyệt snap slide vào mép SCROLLPORT (bỏ qua padding-left), tự cuộn
     12px và card lại dán sát mép track — bóng trái bị cắt đúng như khi chưa có padding.
     `scroll-padding` thu snapport vào 12px mỗi bên để slide dừng ĐÚNG trong vùng padding. */
  scroll-padding: 0 12px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* `overflow-x:auto` (cần cho carousel) ép luôn overflow-y thành clip, nên box-shadow của card bị
     CẮT SẠCH cả 4 phía — đo pixel trên trang live: ngay sát mép card đã là màu nền, trong khi Figma
     có bóng lan ~11px dưới / ~8px ngang / ~6px trên. Chừa chỗ bằng padding rồi bù lại bằng margin
     âm ĐÚNG BẰNG padding, để hộp ngoài của track không đổi (giữ nguyên nhịp dọc 40px của trang và
     khoảng cách 24px tới dãy dot).
     CHỈ làm được theo TRỤC DỌC: mỗi slide là `flex: 0 0 100%` nên bám theo bề rộng track — thêm
     padding/margin ngang khiến card phình từ 792 lên 812px (đo trên live) mà bóng ngang VẪN bị cắt,
     vì card lấp kín padding-box. Chọn giữ đúng bề rộng card theo Figma và chấp nhận mất bóng
     trái/phải (delta chỉ ~16/255 ≈ 6%); xem gap D5. */
  padding: 8px 12px 14px;
  margin: -8px 0 -14px;
  /* Các slide phải HỞ nhau, nếu không bóng phải của slide N bị slide N+1 (nền trắng đục) đè mất.
     24px = 2 × 12px padding ngang của track, nên slide vẫn snap khít vào khung nhìn. */
  gap: 24px;
}
.uiw-image-text-block-track::-webkit-scrollbar { display: none; }

.uiw-image-text-block-card {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  /* Figma 7519:37329 dùng `items-start`: ảnh (228px) và cột chữ (240px) căn theo MÉP TRÊN,
     không phải căn giữa như node cũ. Ảnh vì thế nằm sát top padding thay vì bị đẩy xuống 6px. */
  align-items: flex-start;
  gap: 30px;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 20px;
  /* Figma node 7519:37329 effect DROP_SHADOW radius 10 = box-shadow blur 10px.
     Dev-mode xuất `drop-shadow(0 3px 5px)` vì filter dùng stdDeviation = blur/2 — cùng một bóng. */
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
}

/* Figma 7519:37330 — khung ảnh 370x228, bo góc 4px, overflow-clip (ảnh gốc 391x253 bị crop). */
.uiw-image-text-block-media {
  flex: 0 0 370px;
  width: 370px;
  height: 228px;
  border-radius: 4px;
  overflow: hidden;
}

.uiw-image-text-block-img {
  width: 100%;
  height: 228px;
  object-fit: cover;
  display: block;
}

/* Figma 7519:37332 — cột chữ là auto-layout dọc gap 20px (chữ 240px, rồi nút). */
.uiw-image-text-block-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

/* AB#131808 — nút CTA được nhấc ra khỏi flow (absolute, xem .uiw-image-text-block-cta), nên cột chữ
   phải tự chừa chỗ: 48px chiều cao nút + 20px khoảng hở đáy card. Chỉ chừa khi slide THẬT SỰ có nút:
   SRS Part11 Table 8 #3 cho phép ẩn nút theo từng slide (buttonlabel/buttonurl rỗng), và template
   chỉ render <a> trong trường hợp đó — chừa vô điều kiện sẽ để lại 68px trống ở slide không có nút.
   Dùng class do template gắn (`--has-cta`) thay vì `:has()`: `:has()` vắng mặt trên Firefox < 121 và
   một số WebView Android cũ, ở đó padding sẽ không áp và nút absolute đè lên chữ. */
.uiw-image-text-block-body--has-cta {
  padding-bottom: 68px;
}

/* AB#131808 (round 2) — the 68px above only grows BODY. `.uiw-image-text-block-card` is
   `display:flex; align-items:flex-start` with no direction set (row), so its height is
   max(media, body), not body alone. When the slide's text is short enough that body's height stays
   under media height + 68px, the image is still the tallest child, the card never grows the extra
   68px, and the CTA (`bottom:20px` measured against the CARD, see below) overlaps the image's
   bottom 48px instead of sitting under it (measured ctaTop=1607 inside imgBottom=1655). Mirror the
   same 68px reservation under the image so the card is always tall enough for the CTA regardless of
   which child is taller. */
.uiw-image-text-block-card--has-cta .uiw-image-text-block-media {
  margin-bottom: 68px;
}

/* AB#132269 — an unbreakable long string (no spaces) forced this block to its max-content width
   instead of wrapping, growing the whole card (measured 4975px vs the 823px design). `min-width:0`
   removes the flex-item min-content floor (body is `flex-direction:column`, default
   `align-items:stretch`, so without this the box refuses to shrink below its own min-content).
   `anywhere` lowers that min-content further so the string actually wraps inside the box — same fix
   already applied to Animation Tile (widget.css:80-84) and Full Width Banner (widget.css:56-68). */
.uiw-image-text-block-content {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.uiw-image-text-block-content h3 {
  color: #FF7B00;
  font-family: 'Unbeatable','Arial','Helvetica Neue','Helvetica',sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  margin: 0 0 4px;
}
.uiw-image-text-block-content h3:not(:first-child) {
  margin-top: 24px;
}
.uiw-image-text-block-content p {
  color: #000000;
  font-family: 'Unbeatable','Arial','Helvetica Neue','Helvetica',sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  margin: 0;
}
.uiw-image-text-block-content h1,
.uiw-image-text-block-content h2 {
  color: #FF7B00;
  font-family: 'Unbeatable','Arial','Helvetica Neue','Helvetica',sans-serif;
  font-weight: 700;
  line-height: 24px;
  margin: 0 0 4px;
}
.uiw-image-text-block-content h1 { font-size: 20px; }
.uiw-image-text-block-content h2 { font-size: 18px; }
.uiw-image-text-block-content h4 {
  color: #000000;
  font-family: 'Unbeatable','Arial','Helvetica Neue','Helvetica',sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  margin: 0 0 4px;
}
.uiw-image-text-block-content h1:not(:first-child),
.uiw-image-text-block-content h2:not(:first-child),
.uiw-image-text-block-content h4:not(:first-child) {
  margin-top: 24px;
}
.uiw-image-text-block-content ul,
.uiw-image-text-block-content ol {
  color: #000000;
  font-family: 'Unbeatable','Arial','Helvetica Neue','Helvetica',sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  margin: 8px 0 0;
  padding-left: 20px;
}
.uiw-image-text-block-content li { margin: 0 0 4px; }
.uiw-image-text-block-content a {
  color: #FF7300;
  font-weight: 700;
  text-decoration: underline;
}

.uiw-image-text-block-cta {
  /* AB#131808 — nút phải căn giữa theo TOÀN BỘ card, không phải theo cột chữ.
     Figma node 7519:37334 đặt nút ở x=275..529 (tâm 402) trong card 824px (tâm card 412),
     tức designer kéo nút ra khỏi cột chữ (cột chữ bắt đầu ở x=421). `align-self: center` chỉ
     căn giữa trong cột chữ 382px nên vẫn lệch phải — phải neo absolute theo card.
     Chốt 2026-08-16 (user): giữ căn giữa CARD (left:50%), không bám 10px lệch trái của Figma vì
     vị trí đó không bám mốc layout nào (không thẳng ảnh, không thẳng cột chữ) => coi là kéo tay.
     Ghi gap NON-BLOCKING trong gap-image-text-block.md. */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* AB#132272 — Figma khai 48px (desktop 2535:41776 · mobile 2670:9089). Trước đây chiều cao là
     kết quả cộng dồn (24 line-height + 24 padding + 2 border = 50px) vì 48px của Figma bị hiểu là
     vùng BÊN TRONG viền, trong khi absoluteBoundingBox đã gồm viền. Chốt cứng height + border-box
     để cả padding lẫn viền nằm TRONG 48px; giữ nguyên token padding 12/16 của Figma. */
  height: 48px;
  padding: 12px 16px;
  border-radius: 24px;
  font-family: 'Unbeatable','Arial','Helvetica Neue','Helvetica',sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-decoration: none;
  box-sizing: border-box;
  min-width: 254px;
  /* AB#132269 — this CTA is `position:absolute` (AB#131808), so it's out of flow and sized by the
     shrink-to-fit algorithm: with no wrap point, an unbreakable label forced it to its content
     width (measured 4924px, landing off-screen at x=-1650). `anywhere` lets the label wrap; the
     containing block for an absolute child is the CARD's padding box, which INCLUDES the card's own
     20px padding on each side, so `max-width:100%` alone would let the button touch the card
     edges — subtract 40px (2 × 20px card padding) to keep it inset like the design. */
  max-width: calc(100% - 40px);
  overflow-wrap: anywhere;
}
.uiw-image-text-block-cta-orange {
  background: #FF7300;
  color: #FFFFFF;
  border: 1px solid #FF7300;
}
.uiw-image-text-block-cta-white {
  background: #FFFFFF;
  color: #FF7300;
  border: 1px solid #FF7300;
}

.uiw-image-text-block-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  /* Nhiều slide thì xuống hàng thay vì tràn ngang: 19 dot × 48px = 912px > bề rộng card.
     Figma chỉ vẽ 1 slide nên không khai hành vi này. */
  flex-wrap: wrap;
}
.uiw-image-text-block-dot {
  width: 40px;
  height: 8px;
  border-radius: 100px;
  background: #FDB88C;
  display: inline-block;
  /* Figma khai dot CỐ ĐỊNH 40×8. Thiếu flex-shrink:0 thì flexbox bóp dot khi tổng bề rộng vượt
     container — đo trên trang live (19 slide) ra 32px ở desktop và 9.56px ở mobile. */
  flex-shrink: 0;
}
.uiw-image-text-block-dot-active {
  background: #FF7300;
}

@media (max-width: 767px) {
  /* Mobile: khung trang luôn hẹp hơn max-width nên `margin:0 auto` không còn chỗ để căn giữa —
     ở đây phải nới bằng margin âm, nếu không card mất 24px bề rộng cho chỗ đặt bóng. Trên desktop
     thì ngược lại: margin âm sẽ phá căn giữa (đo được lề trái 16px / lề phải 440px ở 1440px). */
  .uiw-image-text-block {
    width: calc(100% + 24px);
    margin: 0 -12px;
  }
  .uiw-image-text-block-card {
    flex-direction: column;
    align-items: stretch;
    /* AB#132248 — Figma mobile node 2670-9089 khai itemSpacing = 30. Desktop đã đúng 30px,
       chỉ nhánh mobile còn 20px (tái hiện trên S8 / A51 / iPhone14). */
    gap: 30px;
  }
  /* Figma mobile 7257:5704 — ảnh full-width, cao 200px, vẫn bo 4px (kế thừa từ base). */
  .uiw-image-text-block-media {
    flex: 0 0 auto;
    width: 100%;
    height: 200px;
  }
  .uiw-image-text-block-img {
    width: 100%;
    height: 200px;
  }
  /* Mobile: nút trở lại full-width trong flow nên KHÔNG cần chừa chỗ. Override phải nhắm đúng
     class `--has-cta` của desktop, vì `.uiw-image-text-block-body` trần có specificity thấp hơn. */
  .uiw-image-text-block-body,
  .uiw-image-text-block-body--has-cta {
    padding-bottom: 0;
  }
  /* AB#131808 (round 2) — mobile stacks media/body in column flow with its own 30px gap already,
     so the desktop-only 68px reserve under the image (for the absolute CTA) would add an extra,
     unwanted gap here. Reset it: mobile CTA is `position:static` (below), no reserve needed. */
  .uiw-image-text-block-card--has-cta .uiw-image-text-block-media {
    margin-bottom: 0;
  }
  .uiw-image-text-block-cta {
    position: static;
    transform: none;
    width: 100%;
    min-width: 0;
    /* AB#132269 — reset the desktop `calc(100% - 40px)` cap: on mobile the CTA is back in flow as a
       flex item of `.uiw-image-text-block-body`, so percentages resolve against body's already-
       inset content box, not the card's padding box — the extra 40px subtraction doesn't apply. */
    max-width: 100%;
  }
}
