/* ============================================================
   SECTION: PROGRAM (滞在型健康増進プログラムとは)
   Nền navy gradient, chữ dọc "PROGRAM" viền, 3 ảnh nghiêng + bóng tím.
   Mobile-first.
   ============================================================ */

.program {
  position: relative;
  background: linear-gradient(160deg, #102a7e 0%, #080054 46%);
  color: var(--color-text-muted);
  overflow-x: clip; /* chặn tràn ngang, vẫn cho ảnh tràn xuống dưới (không bị cắt) */
  padding: 200px 0 0;
  margin: -155px 0 -50px;
}

/* Chữ dọc trang trí "PROGRAM" (viền, trong suốt) */
/* Chữ "PROGRAM" dùng SVG gốc từ Figma (viền liền, không lộ mối nối) */
.program__deco {
  position: absolute;
  top: 200px;
  left: -1px;
  height: 460px;
  width: auto;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.program__inner {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 16px;
}

/* ---- Tiêu đề ---- */
.program__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 24px;
  color: #fff;
  line-height: 1.5;
}
.program__divider {
  display: block;
  width: 40px;
  height: 1px;
  background: #bda054;
  margin-top: 16px;
}

/* ---- Nội dung ---- */
.program__text {
  margin-top: 32px;
}
.program__text p {
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.03em;
}
.program__text p + p {
  margin-top: 24px;
}

/* ---- Ảnh hình bình hành (clip-path: ảnh KHÔNG bị méo) + bóng tím ---- */
/* Đổi 4 điểm polygon để chỉnh hướng/góc. Hiện: nghiêng cạnh trên/dưới (kiểu skewY). */
.program__photo {
  position: relative;
  z-index: 1;
}
/* Lớp lót tím phía sau (KHÔNG bị cắt vì cha không có clip-path) */
.program__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #6c6794;
  clip-path: var(--clip);
  transform: translate(-10px, 20px); /* đáy lòi dày hơn (20) so với trái (10) */
  z-index: -1;
}
.program__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: var(--clip);
}

/* Hình bình hành riêng cho từng ảnh (chỉnh % để đổi độ nghiêng) */
.program__photo--1 {
  /* 2 cạnh dọc nghiêng cùng chiều "\ \" — đáy lệch phải */
  --clip: polygon(0 0, 88% 0, 100% 100%, 12% 100%);
}
.program__photo--2 {
  /* cạnh trái nghiêng "\", cạnh phải thẳng đứng (gắn lề phải) */
  --clip: polygon(0 0, 100% 0, 100% 100%, 14% 100%);
}
.program__photo--3 {
  /* 2 cạnh dọc nghiêng cùng chiều "/ /" — đỉnh lệch phải */
  --clip: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
}

/* SP: ảnh xếp theo dòng */
.program__photo--1 {
  width: 170px;
  margin: 0 0 28px -16px;
}
.program__photo--2 {
  width: 165px;
  margin-left: auto;
  margin-top: 28px;
}
.program__photo--3 {
  width: 210px;
  margin-left: 25%;
  margin-top: 0;
}

/* ============================================================
   PC ( >= 1024px ) — chữ to, ảnh định vị tuyệt đối bên phải
   ============================================================ */
@media (min-width: 1024px) {
  .program {
    padding: 300px 0 120px;
    margin: -150px 0 0; /* kéo nền navy lên, lấn vào đáy Hero */
    z-index: 1; /* dưới ảnh Hero (z-index:5), trên nền sáng Hero */
  }
  .program__deco {
    top: 220px;
    left: -12px;
    height: 760px;
  }
  .program__inner {
    max-width: none;
    padding-inline: 0;
  }
  .program__body {
    /* Khớp mép trái ảnh Hero: ảnh Hero rộng 80vw canh phải → mép trái ở 20vw.
       Nếu đổi max-width ảnh Hero thì sửa lại số này cho khớp. */
    margin-left: 20vw;
    max-width: 600px;
  }
  .program__title {
    font-size: 36px;
  }
  .program__divider {
    margin-top: 20px;
  }
  .program__text {
    margin-top: 44px;
  }
  .program__text p {
    font-size: 20px;
    line-height: 2;
  }
  .program__text p + p {
    margin-top: 32px;
  }

  /* Ảnh: định vị tuyệt đối bên phải */
  .program__photo {
    position: absolute;
    margin: 0;
  }
  .program__photo::after {
    transform: translate(-10px, 24px);
  }
  .program__photo--1 {
    top: 250px;
    right: 60px;
    width: 316px;
  }
  .program__photo--2 {
    top: auto;
    bottom: 100px;
    right: -20px;
    width: 317px;
  }
  .program__photo--3 {
    top: auto;
    bottom: -80px;
    right: 180px;
    width: 382px;
  }
}

@media (min-width: 1440px) {
  .program__deco { font-size: 180px; }
  .program__body {
    max-width: 680px;
  }
}

/* ============================================================
   SECTION: FIELDS (健康プログラムを構成する6つの分野)
   Nền tối (navy-deep), chữ dọc "FIELDS" viền mờ.
   Lưới 6 ô chuyên đề (Field Cards) dạng 2 cột PC, 1 cột SP.
   ============================================================ */

.fields {
  position: relative;
  background-color: var(--color-navy-deep);
  color: #fff;
  padding: 50px 0 20px;
  overflow-x: clip;
  z-index: 2; /* Trên bóng của supervision */
}

/* Chữ dọc trang trí "FIELDS" (SVG) */
.fields__deco {
  position: absolute;
  left: 0;
  top: 10px;
  height: 359px;
  width: auto;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.fields__inner {
  position: relative;
  z-index: 2;
}

/* Badge màu cam/vàng */
.fields__badge {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-navy-deep);
  background: linear-gradient(90deg, #996213 0%, #e7cd59 55%, #996213 100%);
  padding: 6px 20px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Tiêu đề */
.fields__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 24px;
  color: #fff;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.fields__title span {
  font-size: 28px;
}

.fields__divider {
  display: block;
  width: 40px;
  height: 1px;
  background: #bda054;
  margin-top: 16px;
}

/* Mô tả */
.fields__desc {
  margin-top: 24px;
  max-width: 760px;
}

.fields__desc p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.02em;
}

.fields__desc p + p {
  margin-top: 16px;
}

/* Lưới thẻ chuyên đề */
.fields__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-top: 48px;
}

/* Thẻ chuyên đề (Field Card) */
.field-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: visible; /* Cho phép chữ Kanji và label lồi ra ngoài */
}

.field-card__img-wrapper {
  position: relative;
  width: 94%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 4px;
}

.field-card__img-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.field-card:hover .field-card__img-wrapper img {
  transform: scale(1.05);
}

/* Nhãn đè lên ảnh */
.field-card__label {
  position: absolute;
  bottom: 60px; /* Nhô lên đè ranh giới ảnh */
  left: 45px;
  z-index: 4;
}

.field-card__label-line {
  display: block;
  width: fit-content;
  background-color: rgba(255, 255, 255, 0.6); /* #FFFFFF99 */
  color: #080052;
  padding: 6px 12px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 2px;
  backdrop-filter: blur(44px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.field-card__label-line:nth-child(2) {
  margin-left: 20px; /* Thụt vào so với dòng 1 */
}

/* Hàng dưới của thẻ */
.field-card__bottom {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 28px; /* chừa khoảng trống cho label */
  min-height: 52px;
}

/* Chữ Kanji lớn bằng SVG */
.field-card__kanji {
  position: absolute;
  left: -10px;
  bottom: 16px; /* Cho lên trên một chút */
  width: 80px;
  height: 80px;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.field-card__kanji svg {
  display: block;
  width: 100%;
  height: auto;
}

.field-card__kanji svg text {
  font-family: var(--font-serif);
  font-size: 95px;
  font-weight: 700;
  fill: rgba(255, 255, 255, 0.25);
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 1.5;
  transition: fill 0.3s, stroke 0.3s;
}

.field-card:hover .field-card__kanji svg text {
  fill: rgba(255, 255, 255, 0.8);
  stroke: rgba(255, 255, 255, 0.8);
}

/* Link "詳しく見る" */
.field-card__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s;
}

.field-card:hover .field-card__link {
  color: #fff;
}

/* Mũi tên nghiêng giống supervision */
.field-card__arrow {
  width: 32px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: skewX(-15deg);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
  color: #fff;
}

.field-card__arrow span {
  display: inline-block;
  transform: skewX(15deg); /* khử nghiêng mũi tên */
  font-family: var(--font-latin);
  font-size: 14px;
  font-weight: bold;
}

.field-card:hover .field-card__arrow {
  background-color: #fff;
  border-color: #fff;
  color: var(--color-navy-deep);
}

/* ============================================================
   PC ( >= 1024px )
   ============================================================ */
@media (min-width: 1024px) {
  .fields {
    padding: 70px 0 120px;
  }

  .fields__deco {
    left: -1px;
    top: 20px;
    height: 587px;
  }

  .fields__title {
    font-size: 38px;
  }

  .fields__title span {
    font-size: 42px;
  }

  .fields__divider {
    width: 48px;
    margin-top: 20px;
  }

  .fields__desc {
    margin-top: 32px;
  }

  .fields__desc p {
    font-size: 16px;
  }

  .fields__grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 80px;
    row-gap: 60px;
    margin-top: 64px;
  }

  .field-card__img-wrapper {
    height: 176px;
    aspect-ratio: auto;
  }

  .field-card__label {
    bottom: 80px; /* Điều chỉnh cho hợp lý với chiều cao ảnh 176px */
    left: 36px;
  }

  .field-card__label-line {
    font-size: 16px;
    padding: 8px 16px;
  }

  .field-card__bottom {
    padding-top: 36px;
    min-height: 64px;
  }

  .field-card__kanji {
    bottom: 16px; /* Cho lên trên một chút trên PC */
    left: -50px;
    width: 110px;
    height: 110px;
  }

  .field-card__link {
    font-size: 14px;
  }
}
