/* ==============================================
   mfarm-garlic.css — 마늘먹인 의령메추리농장 마늘먹인메추리
   ============================================== */


/* ──────────────────────────────────────────────
   ① 브랜드 스토리
   ────────────────────────────────────────────── */

.garlic-story { background: #fff; }

.garlic-story__inner {
  max-width: var(--max-width, 1920px);
  margin: 0 auto;
  padding: 100px var(--content-padding, 200px);
  display: flex;
  align-items: flex-start;
  gap: 80px;
}

.garlic-story__title-col {
  flex-shrink: 0;
  width: 460px;
}

.garlic-story__title {
  margin: 0;
  font-size: 48px;
  font-weight: 800;
  line-height: 140%;
  color: #111111;
  word-break: keep-all;
}

.garlic-story__body-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 10px;
}

.garlic-story__sub {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 135%;
  color: #111111;
}

.garlic-story__desc {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.garlic-story__desc p {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 150%;
  color: #111111;
}

.garlic-story__desc strong { font-weight: 700; }


/* ──────────────────────────────────────────────
   ② 왜 마늘을?
   ────────────────────────────────────────────── */

.garlic-why {
  background-color: #F0E6D8;
  background-image:
    linear-gradient(180deg, rgba(235, 220, 204, 0.7) 0%, rgba(235, 220, 204, 0.1) 60%),
    url('../img/mfarm/about/garlic-bg.jpg');
  background-size: cover;
  background-position: center;
}

.garlic-why__inner {
  max-width: var(--max-width, 1920px);
  margin: 0 auto;
  padding: 80px var(--content-padding, 200px);
  display: flex;
  flex-direction: column;
  gap: 70px;
}

.garlic-why__title {
  margin: 0;
  font-size: 42px;
  font-weight: 800;
  line-height: 125%;
  color: #111111;
}

.garlic-why__cards { display: flex; gap: 30px; }

.why-card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px 50px;
  height: 300px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(74, 58, 42, 0.15);
}

.why-card__top { display: flex; flex-direction: column; gap: 10px; }

.why-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 15px;
  border-radius: 4px;
  background: #4A3A2A;
  font-size: 16px;
  font-weight: 500;
  line-height: 135%;
  color: #ffffff;
  width: fit-content;
}

.why-card__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 135%;
  color: #4A3A2A;
}

.why-card__desc {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 140%;
  color: #111111;
}


/* ──────────────────────────────────────────────
   ③ 성분 비교 차트
   ────────────────────────────────────────────── */

.garlic-chart-section { background: #fff; }

.garlic-chart__inner {
  max-width: var(--max-width, 1920px);
  margin: 0 auto;
  padding: 100px var(--content-padding, 200px);
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.garlic-chart__heading {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.garlic-chart__title {
  margin: 0;
  font-size: 42px;
  font-weight: 800;
  line-height: 125%;
  color: #111111;
}

.garlic-chart__subtitle {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 135%;
  color: #333333;
}

.garlic-chart__legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 400;
  color: #111111;
  line-height: 135%;
}

.chart-legend-item__dot {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  flex-shrink: 0;
}

.chart-legend-item__dot--garlic { background: #8AA955; }
.chart-legend-item__dot--normal  { background: #F0924D; }

/* 가로 스크롤 래퍼 — overflow-x:auto가 overflow-y:auto를 강제하므로 분리 */
.garlic-chart__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.garlic-chart__body {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.chart-y {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
  padding-bottom: 52px;
}

.chart-y__title {
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  white-space: nowrap;
  align-self: center;
}

.chart-y__labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 340px;
  align-items: flex-end;
}

.chart-y__labels span {
  font-size: 13px;
  font-weight: 500;
  color: #333333;
  line-height: 1;
}

.chart-cols {
  flex: 1;
  min-width: 480px;
  display: flex;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* content-box에서 border-left 1px → 총 너비가 100%+1px이 되어 overflow 발생
   width: calc(100%-1px)로 보정하면 content+border = 100% (overflow 없음) */
.chart-col + .chart-col .chart-col__inner {
  border-left: 1px dashed #cccccc;
  width: calc(100% - 1px);
}

/* padding-top으로 배지 공간 확보. box-sizing:content-box → height가 순수 바 영역 높이 */
.chart-col__inner {
  width: 100%;
  height: 340px;
  padding-top: 60px;
  box-sizing: content-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  overflow: visible;
  border-bottom: 1px solid #999999;
}

.chart-col__badge {
  position: absolute;
  left: calc(50% - 45px);
  bottom: calc(var(--max-h) + 32px);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #35502E;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(53, 80, 46, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: 0;
  transform: scale(0.5);
  transform-origin: center center;
  transition:
    opacity  0.4s ease,
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.garlic-chart__body.is-animated .chart-col__badge {
  opacity: 1;
  transform: scale(1);
}

.chart-col__badge svg { flex-shrink: 0; }

.chart-col__badge-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff;
  line-height: 1.25;
}

.chart-col__badge-text strong {
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.chart-col__badge-text span {
  font-size: 13px;
  font-weight: 700;
}

.chart-col__bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.chart-col__bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chart-col__val {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.garlic-chart__body.is-animated .chart-col__val { opacity: 1; }

.chart-col__bar {
  width: 52px;
  height: 0;
  border-radius: 3px 3px 0 0;
  transition: height 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.garlic-chart__body.is-animated .chart-col__bar--garlic { height: var(--g-h); }
.garlic-chart__body.is-animated .chart-col__bar--normal  { height: var(--n-h); }

.chart-col__bar--garlic { background: #8AA955; }
.chart-col__bar--normal  { background: #F0924D; }

.chart-col:nth-child(1) .chart-col__bar   { transition-delay: 0s; }
.chart-col:nth-child(2) .chart-col__bar   { transition-delay: 0.12s; }
.chart-col:nth-child(3) .chart-col__bar   { transition-delay: 0.24s; }
.chart-col:nth-child(4) .chart-col__bar   { transition-delay: 0.36s; }
.chart-col:nth-child(5) .chart-col__bar   { transition-delay: 0.48s; }

.chart-col:nth-child(1) .chart-col__val   { transition-delay: 0.72s; }
.chart-col:nth-child(2) .chart-col__val   { transition-delay: 0.84s; }
.chart-col:nth-child(3) .chart-col__val   { transition-delay: 0.96s; }
.chart-col:nth-child(4) .chart-col__val   { transition-delay: 1.08s; }
.chart-col:nth-child(5) .chart-col__val   { transition-delay: 1.20s; }

.chart-col:nth-child(1) .chart-col__badge { transition-delay: 0.78s; }
.chart-col:nth-child(2) .chart-col__badge { transition-delay: 0.90s; }
.chart-col:nth-child(3) .chart-col__badge { transition-delay: 1.02s; }
.chart-col:nth-child(4) .chart-col__badge { transition-delay: 1.14s; }
.chart-col:nth-child(5) .chart-col__badge { transition-delay: 1.26s; }

.chart-col__label {
  margin-top: 12px;
  height: 40px;
  font-size: 15px;
  font-weight: 700;
  color: #111111;
  text-align: center;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.chart-col__label span {
  font-size: 12px;
  font-weight: 400;
  color: #666666;
}

.garlic-chart__source {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 160%;
  color: #35502E;
}


/* ──────────────────────────────────────────────
   모션 클래스
   ────────────────────────────────────────────── */

.motion-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.motion-fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.motion-fade-up.motion-visible  { opacity: 1; transform: translateY(0); }
.motion-fade-in.motion-visible  { opacity: 1; }

.motion-delay-1 { transition-delay: 0.12s; }
.motion-delay-2 { transition-delay: 0.24s; }
.motion-delay-3 { transition-delay: 0.36s; }


/* ──────────────────────────────────────────────
   반응형
   ────────────────────────────────────────────── */

@media (max-width: 1600px) {
  .garlic-story__title-col { width: 380px; }
  .garlic-story__title     { font-size: 42px; }
}

@media (max-width: 1280px) {
  .garlic-story__title-col { width: 300px; }
  .garlic-story__title     { font-size: 36px; }
  .garlic-story__sub       { font-size: 20px; }
  .garlic-story__desc p    { font-size: 16px; }

  .garlic-why__title       { font-size: 36px; }
  .why-card                { padding: 40px 36px; }
  .why-card__title         { font-size: 20px; }
  .why-card__desc          { font-size: 16px; }

  .garlic-chart__title     { font-size: 36px; }
  .garlic-chart__subtitle  { font-size: 20px; }

  .chart-col__bar          { width: 44px; }
  .chart-col__label        { font-size: 13px; }
}

@media (max-width: 1024px) {
  .garlic-story__inner     { gap: 48px; }
  .garlic-story__title-col { width: 260px; }
  .garlic-story__title     { font-size: 30px; }

  .why-card { height: auto; min-height: 260px; }

  .chart-col__bar   { width: 38px; }
  .chart-col__badge { width: 76px; height: 76px; left: calc(50% - 38px); }
  .chart-col__badge-text strong { font-size: 17px; }
}

@media (max-width: 768px) {
  .garlic-story__inner {
    flex-direction: column;
    gap: 32px;
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .garlic-story__title-col { width: 100%; }
  .garlic-story__title     { font-size: 28px; }
  .garlic-story__body-col  { padding-top: 0; }
  .garlic-story__sub       { font-size: 18px; }
  .garlic-story__desc p    { font-size: 15px; }

  .garlic-why__inner   { gap: 36px; padding-top: 60px; padding-bottom: 60px; }
  .garlic-why__title   { font-size: 26px; }
  .garlic-why__cards   { flex-direction: column; gap: 16px; }
  .why-card            { height: auto; min-height: auto; padding: 32px 28px; }
  .why-card__badge     { font-size: 14px; }
  .why-card__title     { font-size: 18px; }
  .why-card__desc      { font-size: 15px; }

  .garlic-chart__inner     { gap: 28px; padding-top: 60px; padding-bottom: 60px; }
  .garlic-chart__title     { font-size: 24px; }
  .garlic-chart__subtitle  { font-size: 15px; }

  .chart-y      { display: none; }
  .chart-cols   { min-width: 520px; }

  .chart-col__bar   { width: 34px; }
  .chart-col__val   { font-size: 11px; }
  .chart-col__badge { width: 68px; height: 68px; left: calc(50% - 34px); }
  .chart-col__badge-text strong { font-size: 15px; }
  .chart-col__badge-text span   { font-size: 11px; }
  .chart-col__label             { font-size: 12px; }
  .chart-col__label span        { font-size: 10px; }

  .garlic-chart__source { font-size: 13px; }

  .motion-fade-up { transform: translateY(20px); transition-duration: 0.5s; }
}


/* ──────────────────────────────────────────────
   접근성: 모션 비선호
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .motion-fade-up,
  .motion-fade-in { opacity: 1; transform: none; transition: none; }

  .chart-col__bar,
  .chart-col__badge,
  .chart-col__val {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .garlic-chart__body.is-animated .chart-col__bar--garlic { height: var(--g-h); }
  .garlic-chart__body.is-animated .chart-col__bar--normal  { height: var(--n-h); }
  .why-card { transition: none; }
}
