/* stats section — editorial two-column layout + flipboard counter */
.stats-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #071c36 0%, #09284B 52%, #04101f 100%);
  padding: 10rem 0;
}

/* 병원 사진을 은은한 듀오톤 텍스처로 */
.stats-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/tour/18.jpg") no-repeat 50% 40% / cover;
  opacity: 0.1;
  mix-blend-mode: luminosity;
  pointer-events: none;
}

/* 우상단 블루 글로우 */
.stats-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px 420px at 84% 8%, rgba(0, 85, 184, 0.4), transparent 62%),
    radial-gradient(560px 380px at 4% 96%, rgba(0, 85, 184, 0.22), transparent 60%);
  pointer-events: none;
}

.stats-inner {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 4rem));
  margin: 0 auto;
}

.stats-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 6rem;
  align-items: start;
}

/* ---------- 왼쪽: 메시지 ---------- */
.stats-head {
  min-width: 0;
  text-align: left;
}

.stats-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #ffbe2c;
}

.stats-eyebrow::before {
  content: "";
  width: 3.4rem;
  height: 2px;
  background: #ffbe2c;
}

.stats-tagline {
  margin: 2.2rem 0 0;
  font-size: clamp(2.4rem, 2.9vw, 3.6rem);
  font-weight: 800;
  line-height: 1.38;
  letter-spacing: -0.03em;
  color: #fff;
  word-break: keep-all;
}

.stats-sub {
  margin: 3.4rem 0 0;
  font-size: clamp(1.5rem, 1.6vw, 1.8rem);
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.68);
  word-break: keep-all;
}

/* ---------- 오른쪽: 지표 카드 ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.2rem;
  min-width: 0;
}

.stats-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 0;
  max-width: 100%;
  padding: 2.8rem 3rem 3rem 3.4rem;
  border-radius: 1.8rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 44px rgba(2, 12, 26, 0.4);
  backdrop-filter: blur(10px);
  container-type: inline-size;
  container-name: stats-card;
}

/* 카드 왼쪽 포인트 바 */
.stats-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2.6rem;
  bottom: 2.6rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #ffbe2c 0%, rgba(255, 190, 44, 0.15) 100%);
}

.stats-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.6rem;
  flex-wrap: wrap;
}

/* common.css의 전역 h2 스타일(flex 중앙정렬·영문 캡션) 리셋 */
.stats-label {
  display: block;
  margin: 0;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  letter-spacing: -0.02em;
  text-align: left;
  word-break: keep-all;
}

.stats-label::after {
  content: none !important;
}

.stats-card .stats-date {
  margin: 0;
  flex: 0 0 auto;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.45);
}

.stats-figure {
  display: flex;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.c1_count_wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #09284B;
  font-size: clamp(2.4rem, 12.2cqi, 7.6rem);
  font-weight: 800;
  line-height: 1;
  filter: drop-shadow(0 14px 30px rgba(2, 12, 26, 0.55));
}

/* 플립보드 슬롯: 흰 카드 + 네이비 숫자 */
.slot {
  position: relative;
  width: 1.02em;
  height: 1.28em;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f2f6fb 48%, #e8eef6 52%, #f8fafd 100%);
  border-radius: 0.14em;
  box-shadow:
    0 0.1em 0.28em rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  font-weight: 800;
}

/* 플립보드 중앙 접힘선 */
.slot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(9, 40, 75, 0.12);
  pointer-events: none;
  z-index: 2;
}

.digits {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}

.digit {
  height: 1.28em;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
}

.comma {
  font-size: 1em;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0.03em;
}

/* 단위: 숫자 옆 한 줄 캡션 */
.stats-unit {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.9rem;
  margin: 0 0 0.18em;
  padding: 0 0 0 1.1rem;
  border-left: 2px solid rgba(255, 190, 44, 0.7);
  font-size: clamp(1.3rem, 3.8cqi, 1.9rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: left;
}

.stats-unit .unit-main {
  font-size: clamp(1.7rem, 5.2cqi, 2.9rem);
  font-weight: 800;
  color: #fff;
}

.stats-unit .unit-sub {
  font-size: clamp(1.3rem, 3.8cqi, 1.9rem);
  font-weight: 700;
  color: #ffbe2c;
}

/* 카드가 좁아지면 단위를 숫자 아래로 */
@container stats-card (max-width: 340px) {
  .stats-figure {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .c1_count_wrap {
    font-size: clamp(2rem, 13cqi, 4.2rem);
    gap: 0.24rem;
  }

  .slot {
    width: 0.98em;
  }

  .stats-unit {
    margin: 0;
    padding: 0;
    border-left: none;
    flex-direction: row;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 1.4rem;
  }

  .stats-unit .unit-main {
    font-size: 1.6rem;
  }

  .stats-unit .unit-sub {
    font-size: 1.35rem;
  }
}

@container stats-card (max-width: 220px) {
  .c1_count_wrap {
    font-size: clamp(1.8rem, 13.5cqi, 2.9rem);
    gap: 0.16rem;
  }

  .slot {
    width: 0.94em;
  }

  .stats-label {
    font-size: 1.5rem;
  }
}

/* ---------- 반응형 ---------- */
@media (min-width: 0px) and (max-width: 1100px) {
  .stats-section {
    padding: 8rem 0;
  }

  .stats-layout {
    gap: 4.5rem;
  }

  .stats-card {
    padding: 2.4rem 2.4rem 2.6rem 2.8rem;
  }

  .stats-label {
    font-size: 2.2rem;
  }
}

@media (min-width: 0px) and (max-width: 900px) {
  .stats-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 4rem;
  }

  .stats-inner {
    width: min(100%, calc(100% - 3rem));
  }

  .stats-head {
    text-align: center;
  }

  .stats-eyebrow::before {
    display: none;
  }

  .stats-tagline {
    margin-top: 1.6rem;
    font-size: clamp(2.2rem, 4.6vw, 3rem);
  }

  .stats-sub {
    margin-top: 1.4rem;
  }
}

@media (min-width: 0px) and (max-width: 500px) {
  .stats-section {
    padding: 6rem 0 5.5rem;
  }

  .stats-inner {
    width: calc(100% - 2.4rem);
  }

  .stats-layout {
    gap: 3.2rem;
  }

  .stats-eyebrow {
    font-size: 1.2rem;
    letter-spacing: 0.18em;
  }

  .stats-tagline {
    font-size: clamp(1.9rem, 5.4vw, 2.3rem);
  }

  .stats-sub {
    font-size: clamp(1.3rem, 3.8vw, 1.5rem);
  }

  .stats-grid {
    gap: 1.6rem;
  }

  .stats-card {
    gap: 1.6rem;
    padding: 2rem 1.8rem 2.2rem 2.2rem;
    border-radius: 1.4rem;
  }

  .stats-card::before {
    top: 2rem;
    bottom: 2rem;
  }

  .stats-label {
    font-size: 1.95rem;
  }

  .stats-card .stats-date {
    font-size: 1.15rem;
  }
}

@media (min-width: 0px) and (max-width: 360px) {
  .stats-inner {
    width: calc(100% - 1.6rem);
  }

  .stats-card {
    padding: 1.8rem 1.4rem 1.9rem 1.8rem;
  }

  .stats-label {
    font-size: 1.8rem;
  }
}
