/* PC 화면 (1024px 이상). 모바일(앱 웹뷰) 화면에 영향이 없도록 레이아웃은 전부 아래 @media 안에만 쓴다.
   pc_ 로 시작하는 클래스는 페이지에서 PC 배치를 지정하는 표시이며, 모바일에서는 아무 효과가 없다. */

/* PC 에서만 보이는 요소 (상세 페이지의 왼쪽 메뉴: 모바일 상세에는 하단 탭이 없다) */
footer.pc_only {display: none;}
.pc_brand {display: none;}

@media (min-width: 1024px) {
  /* reset.css 의 2vw 는 넓은 화면에서 글자가 1.5배까지 커지므로 고정한다 */
  html {font-size: 12px;}
  body {background: #F5F7F6;}
  body * {letter-spacing: -.02em;}

  /* 글자 크기: 모바일 기준 크기를 PC 에서 읽기 좋은 크기로 올린다 */
  .text-10 {font-size: 13px;}
  .text-12 {font-size: 14px;}
  .text-14 {font-size: 16px;}
  .text-16 {font-size: 18px;}
  .text-18 {font-size: 20px;}
  .text-20 {font-size: 24px;}
  .text-24 {font-size: 28px;}
  .text-32 {font-size: 36px;}
  .text-\[9px\] {font-size: 11px;}
  main h2.text-16 {font-size: 22px;}
  main h3.text-16 {font-size: 19px;}

  footer.pc_only {display: block;}

  /* 하단 탭 → 상단 메뉴 (높이 6rem) */
  footer.fixed {top: 0; bottom: auto; height: 6rem; border-top: 0; border-bottom: 1px solid #E5EBE7;}
  footer .inner {display: flex; align-items: center; gap: 4rem; height: 100%;}
  .pc_brand {display: flex; align-items: center; gap: .8rem; flex-shrink: 0; font-size: 20px; font-weight: 700; color: #087F5B; white-space: nowrap;}
  .pc_brand img {width: 3rem;}
  .pc_brand span {color: inherit;}
  footer ul.grid {display: flex; gap: 3.2rem; height: 100%;}
  footer li {height: 100%;}
  footer li a.flex {flex-direction: row; height: 100%; padding: 0 .2rem; border-bottom: 3px solid transparent; border-top: 3px solid transparent;}
  footer li a.flex:has(p.text-main) {border-bottom-color: #087F5B;}
  footer li img.w-24 {display: none;}
  footer li p.text-10 {font-size: 16px; line-height: 1;}
  footer li p.text-border {color: #202B26;}
  footer li a.flex:hover p {color: #087F5B;}

  /* 검색창은 상단 메뉴 오른쪽에 겹쳐 둔다. 뒤로가기만 있는 페이지(상세·계산)는 메뉴 아래 본문 맨 위에 둔다 */
  #wrap > header {z-index: 1000; top: 1rem; left: auto; right: max(2.4rem, calc((100% - 102rem) / 2 + 2.4rem)); width: 32rem; padding: 0; background: none;}
  #wrap > header .inner {max-width: none; padding: 0;}
  #wrap > header .inner > img[src*="icon-logo"], #wrap > header .inner > a:has(img[src*="icon-logo"]) {display: none;}
  #wrap > header .js-search-form {padding: .9rem 1.4rem; background: #F5F7F6; box-shadow: none;}
  #wrap > header .js-search-form img.w-20 {width: 1.8rem;}
  #wrap > header .boot_sk {height: 3.6rem !important;}
  #wrap > header:not(:has(.js-search-form)):not(:has(.boot_sk)) {position: absolute; top: 6rem; left: 0; right: auto; width: 100%; z-index: 1;}
  #wrap > header:not(:has(.js-search-form)):not(:has(.boot_sk)) .inner {max-width: 102rem; padding: 0 2.4rem;}
  #wrap > header .border-b {padding-top: 1.6rem; padding-bottom: 0; border-bottom: 0;}

  /* 본문: 메뉴 아래 가운데 */
  #wrap {margin-bottom: 0;}
  #wrap > main.mt-100 {margin-top: 8.8rem;}
  #wrap > main.mt-85 {margin-top: 11rem;}
  .inner {max-width: 102rem; padding-left: 2.4rem; padding-right: 2.4rem;}

  /* 흰 카드 + 옅은 회색 바탕 */
  main [class*="shadow-"] {background-color: #FFF; box-shadow: 0 0 0 1px #E5EBE7;}
  main a[class*="shadow-"], main button[class*="shadow-"] {transition: box-shadow .15s;}
  main a[class*="shadow-"]:hover, main button[class*="shadow-"]:hover {box-shadow: 0 0 0 1px #087F5B;}
  main .inner > section:has(canvas), main .inner > section:has(table), main .pc_2col > section:has(canvas) {margin-top: 1.6rem; padding: 2.4rem; background: #FFF; border: 1px solid #E5EBE7; border-radius: 1.2rem;}
  main table th, main table td {padding-top: 1.1rem; padding-bottom: 1.1rem;}
  /* 흰 패널 사이의 광고: 모바일용 구분선을 빼고 위아래 간격만 둔다 */
  main .inner > .ads_wrap {margin: 2.4rem 0; padding: 0; border-bottom: 0;}

  /* 전체 폭으로 늘어나던 매매·전세·월세 / 지역 전환 탭은 내용만큼만 */
  main ul.flex.items-center.bg-sub2 {width: fit-content; max-width: 100%;}
  main ul.flex.items-center.bg-sub2 > li {width: auto;}
  main ul.flex.items-center.bg-sub2 > li > * {padding-left: 2.6rem; padding-right: 2.6rem; white-space: nowrap;}

  /* 폼·결과처럼 넓으면 읽기 어려운 화면 */
  main .pc_narrow {max-width: 76rem;}

  /* 분석 조건은 두 줄 대신 한 줄로 (지역·유형 / 면적·기간) */
  main form:has(> .grid-cols-3 + .flex) {display: grid; grid-template-columns: 3fr 2fr; gap: .8rem;}
  main form:has(> .grid-cols-3 + .flex) > .flex {margin-top: 0;}
  main form:has(> .grid-cols-3 + .flex) > #customRange, main form:has(> .grid-cols-3 + .flex) > p {grid-column: 1 / -1; margin-top: 0;}

  /* 지도: 메뉴를 뺀 나머지 전체. map.php 가 하단 탭 높이로 넣는 bottom 값을 덮어쓴다 */
  #wrap > main.fixed {bottom: 0 !important; padding-top: 7.2rem;}
  main.fixed #mapCard .inner {max-width: 46rem; margin-left: max(0px, calc((100% - 102rem) / 2));}
  #periodMenu {right: 2.4rem;}

  /* 카드 목록 2열. 광고는 한 줄을 다 쓴다 */
  main ul.flex.flex-col.gap-10 {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));}
  main ul.flex.flex-col.gap-10 > li:has(.ads_wrap) {grid-column: 1 / -1;}
  main ul.flex.flex-col.gap-10 > li > a {height: 100%;}

  /* 좌우 2단 (홈의 거래·청약, 청약 달력과 그날 공고). 칸이 좁으니 안쪽 목록은 1열 */
  .pc_2col {display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3.2rem; align-items: start;}
  .pc_2col > * {min-width: 0;}
  .pc_2col > section.pt-24 {padding-top: 1.6rem;}
  .pc_2col > .ads_wrap {grid-column: 1 / -1; order: 3;}
  .pc_2col ul.flex.flex-col.gap-10 {display: flex;}

  ul.pc_4col {grid-template-columns: repeat(4, minmax(0, 1fr));}

  /* 그래프는 폭이 넓어진 만큼 높게 */
  .h-180 {height: 28rem;}

  /* 마우스 사용 */
  select, label {cursor: pointer;}
}

/* 좁은 PC: 메뉴와 검색창이 한 줄에 들어가도록 줄인다 */
@media (min-width: 1024px) and (max-width: 1279px) {
  footer .inner {gap: 2.4rem;}
  footer ul.grid {gap: 2rem;}
  #wrap > header {width: 24rem;}
}
