/* ===== Section heading — SP 94:2688, PC 56:60 ===== */
.c-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.c-heading__title {
  color: var(--color-navy);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.c-heading::after {
  content: '';
  align-self: stretch;
  height: 3px;
  background: var(--color-cyan);
}

@media (min-width: 1200px) {
  .c-heading {
    display: inline-flex;
  }

  .c-heading__title {
    font-size: 35px;
    line-height: 49px;
    white-space: nowrap;
  }
}

/* ===== Button — SP 94:2776, PC 56:102 (hover opacity 0.8) ===== */
.c-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 260px;
  height: 50px;
  padding: 0 38px;
  border: 0.8px solid var(--color-chart-blue);
  border-radius: var(--radius-25);
  background: var(--color-white);
  color: var(--color-chart-text);
  font-size: 15px;
  font-weight: 500;
  line-height: 21px;
  text-align: center;
  white-space: nowrap;
}

@media (hover: hover) {
  .c-button {
    transition:
      background-color 0.2s,
      color 0.2s;
  }

  .c-button:hover {
    background: var(--color-chart-blue);
    color: var(--color-white);
  }
}

@media (min-width: 1200px) {
  .c-button {
    border-color: var(--color-arrow);
  }
}

/* ===== Value card — component 56:22 (instance SP 94:2716, PC 56:78) ===== */
.c-value {
  --value-color: var(--color-green);
  --value-shadow: rgba(109, 193, 155, 0.35);
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-bottom: 7.967px;
}

.c-value--2 {
  --value-color: var(--color-orange);
  --value-shadow: rgba(244, 167, 85, 0.35);
}

.c-value--3 {
  --value-color: var(--color-pink);
  --value-shadow: rgba(234, 124, 161, 0.35);
}

.c-value--4 {
  --value-color: var(--color-purple);
  --value-shadow: rgba(181, 147, 195, 0.35);
}

.c-value__caption {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: -33.49px;
  padding: 0 37.347px;
  border-radius: 10.085px;
  background: var(--color-white);
  box-shadow: inset 0 0 0 1.743px var(--value-color);
  color: var(--value-color);
  white-space: nowrap;
}

.c-value__label {
  font-size: 20.04px;
  line-height: 28.056px;
}

.c-value__num {
  font-size: 37.217px;
  font-weight: 700;
  line-height: 39.454px;
}

.c-value__body {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 40.53px 10px 16px;
  border-radius: 7.057px;
  background: var(--color-white);
  box-shadow:
    inset 0 0 0 1.743px var(--value-color),
    7.967px 7.967px 0 var(--value-shadow);
  color: var(--color-body);
  font-size: 15px;
  line-height: 27px;
  text-align: center;
}

@media (min-width: 1200px) {
  .c-value--1 .c-value__caption {
    color: #58c291;
  }

  .c-value__body {
    height: 111.071px;
    padding: 40.526px 10px 0;
    font-size: 20px;
    white-space: nowrap;
    font-weight: 350;
  }
}

/* ===== Fade-up khi cuộn — JS gắn .is-animated cho .js-c-anime-elem (common.js).
   Figma không có số liệu motion → 0.8s, dịch 40px, easing theo la-class.entetsu.org.
   Chỉ ẩn khi JS đã chạy (html.is-anime-ready) và người dùng không giảm chuyển động. ===== */
@media (prefers-reduced-motion: no-preference) {
  .is-anime-ready .c-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition:
      opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
      transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .is-anime-ready .c-fade-up.is-animated {
    opacity: 1;
    transform: none;
  }

  .is-anime-ready .c-fade-up.is-delay-1 {
    transition-delay: 0.15s;
  }

  .is-anime-ready .c-fade-up.is-delay-2 {
    transition-delay: 0.3s;
  }

  .is-anime-ready .c-fade-up.is-delay-3 {
    transition-delay: 0.45s;
  }

  .is-anime-ready .c-fade-up.is-delay-4 {
    transition-delay: 0.6s;
  }
}

/* ===== Zoom ảnh map (hero 53:79, vision map 53:172) — phương án A (user 2026-10-23):
   phóng 100% → 110% trong 8s rồi thu về (alternate, không nhảy — R-12). Easing sine (mềm hơn ease-in-out
   của Figma ở chỗ đổi chiều), will-change để Chrome không vẽ lại ảnh khi đổi chiều.
   Gốc mép trên (R-04). Mọi màn hình; tắt khi prefers-reduced-motion. ===== */
@keyframes c-zoom {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .c-zoom {
    transform-origin: center top;
    animation: c-zoom 8s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate;
    will-change: transform;
  }
}

/* ===== Map kéo/zoom (giống Google Maps) — JS: common.js =====
   Trước khi JS chạy: ảnh phủ kín khung như cũ. Khi đã zoom thì 1 ngón tay kéo map
   (touch-action: none); ở mức nhỏ nhất vẫn cho vuốt dọc để cuộn trang (pan-y). */
.c-map {
  position: relative;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.c-map.is-zoomed {
  touch-action: none;
}

.c-map.is-pannable {
  cursor: grab;
}

.c-map.is-dragging {
  cursor: grabbing;
}

.c-map__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  -webkit-user-drag: none;
}

/* JS gán width/height thật + transform */
.c-map.is-ready .c-map__img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
  will-change: transform;
}

.c-map.is-animating .c-map__img {
  transition: transform 0.25s ease-out;
}

.c-map__controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-map__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--color-white);
  box-shadow: 0 1px 4px rgb(0 0 0 / 30%);
  color: var(--color-ink);
  font-family: var(--font-latin);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.c-map__btn:disabled {
  color: rgb(0 0 0 / 25%);
  cursor: default;
}

@media (hover: hover) {
  .c-map__btn {
    transition: background-color 0.2s;
  }

  .c-map__btn:not(:disabled):hover {
    background: #f2f2f2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-map.is-animating .c-map__img {
    transition: none;
  }
}
