/* 촌픽 공용 헤더 (로고 / 내비게이션 / 서비스 둘러보기) — 전 페이지 공통 */
:root {
  color-scheme: light;
  --header-h: 68px;
  --ink: #1d2b22;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Pretendard, "Noto Sans KR", sans-serif;
  word-break: keep-all;
}

  .cp-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(211, 239, 164, .92);
    border-bottom: 1px solid #b8db86;
    backdrop-filter: blur(12px);
  }
  .cp-header-inner {
    max-width: 1160px;
    margin: auto;
    padding: 0 32px;
    height: 68px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
  }

  .cp-logo {
    justify-self: start;
    display: flex;
    align-items: center;
  }
  .cp-logo img {
    width: auto;
    height: 60px;          /* 원하는 로고 크기 */
    object-fit: contain;
    display: block;
  }

.cp-nav {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid #b8db86;
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
  color: #37662f;
  font-size: 15px;
  font-weight: 600;
}

.cp-logo,
.cp-nav a,
.cp-cta {
  text-decoration: none;
}

  .cp-nav a {
    padding: 8px 16px;
    border-radius: 999px;
    white-space: nowrap;
  }
  .cp-nav a:hover {
    background: rgba(63, 148, 87, .14);
    color: #276b34;
  }
  .cp-nav a.active {
    background: rgba(63, 148, 87, .18);
    color: #276b34;
  }

/* .cp-cta {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    border: 1px solid #fff;
    border-radius: 99px;
    padding: 10px 20px;
    background: #B8DD8A;
    color: #314c31;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(46, 107, 60, .12);
  }
  .cp-cta:hover {
    background: #fff;
    color: #20401f;
  } */

/* 모바일 햄버거/드로어는 css/mobile-nav.css 에서 처리 (PC UI 유지) */

@media (max-width: 760px) {
  .cp-header-inner {
    padding: 0 16px;
  }
  .cp-logo img {
    height: 44px;
  }
}

/* ── 모바일 전용 레이아웃 (PC 인라인 스타일 유지, 여기만 덮어씀) ── */
@media (max-width: 900px) {
  :root {
    --header-h: 62px;
  }

  body {
    overflow-x: hidden;
  }

  main {
    padding-top: var(--header-h);
    overflow-x: hidden;
  }

  /* 히어로: 2열 → 1열, 로고를 위로 */
  main > section:first-of-type {
    grid-template-columns: 1fr !important;
    padding: 28px 18px 32px !important;
    gap: 20px !important;
    text-align: center !important;
    align-items: stretch !important;
  }

  main > section:first-of-type > div:first-child {
    order: 2;
    padding-top: 0 !important;
  }

  main > section:first-of-type > div:last-child {
    order: 1;
  }

  main > section:first-of-type > div:last-child img {
    max-width: min(260px, 72vw) !important;
    margin: 0 auto;
  }

  main > section:first-of-type h1 {
    font-size: clamp(24px, 7vw, 30px) !important;
    line-height: 1.3 !important;
  }

  main > section:first-of-type h1 br {
    display: none;
  }

  main > section:first-of-type p {
    font-size: 15px !important;
    line-height: 1.65 !important;
  }

  main > section:first-of-type p br {
    display: none;
  }

  main > section:first-of-type > div:first-child > div {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  main > section:first-of-type a {
    min-height: 48px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  /* 공통 섹션 패딩 */
  main > section {
    padding-left: 18px !important;
    padding-right: 18px !important;
    max-width: 100% !important;
  }

  main > section > div {
    max-width: 100%;
  }

  /* 카드형 섹션 내부 패딩 */
  main > section > div[style*="border-radius"] {
    padding: 28px 18px !important;
    border-radius: 22px !important;
  }

  main > section h2 {
    font-size: clamp(22px, 6vw, 26px) !important;
    line-height: 1.35 !important;
  }

  /* 3열(공공데이터 / 알고리즘 / 수치) → 1열 */
  main > section div[style*="1fr 1.1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* 파이 차트 SVG 넘침 방지 */
  main > section svg {
    max-width: 100%;
    height: auto;
  }

  /* auto-fit 카드: 좁은 화면에서 1열 */
  main > section div[style*="minmax(180px"] ,
  main > section div[style*="minmax(220px"] ,
  main > section div[style*="minmax(260px"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* 추천 방법 카드(가로 이미지+텍스트) → 세로 스택 */
  main > section article[style*="display: flex"] {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: left !important;
  }

  /* test1.png 등 안내 문구가 새겨진 이미지가 잘리지 않도록 원본 비율 유지.
     max-height + cover 조합은 정사각 이미지를 가로로 잘라내 글자를 없앤다. */
  main > section article[style*="display: flex"] > img {
    width: min(100%, 220px) !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto;
    border-radius: 12px;
  }

  main > section article[style*="display: flex"] br {
    display: none;
  }

  /* how 플로우 칩 */
  main > section div[style*="flex-wrap: wrap"] {
    gap: 12px !important;
  }

  main > section div[style*="min-width: 180px"],
  main > section div[style*="min-width:180px"] {
    min-width: 0 !important;
    width: 100%;
    text-align: center;
  }
}