/*
Theme Name: Planc Info
Description: 정보 블로그 테마
Version: 1.0.1
Requires PHP: 8.0
*/

:root {
  --ink: #191f28;
  --title: #333d4b;
  --text: #4e5968;
  --sub: #8b95a1;
  --line: #e5e8eb;
  --soft: #f2f4f6;
  --foot: #f9fafb;
  --accent: #3182f6; /* 브랜드 색은 이 한 줄만 바꾸면 된다 */
  --wrap: 1460px;
  --pad: 80px;
  --gap: 100px;
  --radius: 10px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

/* 머리 */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 40px; min-height: 60px; }
.site-logo { font-size: 20px; font-weight: 800; color: var(--ink); }
.site-nav { display: flex; gap: 28px; font-size: 16px; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); }
.site-search { margin-left: auto; display: flex; padding: 8px; color: var(--text); }

/* 썸네일 틀(대표 이미지가 없으면 빈 박스로 남는다)·광고 자리 */
.ph { overflow: hidden; background: var(--soft); border-radius: var(--radius); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ad-slot { width: 100%; margin: 0 auto; text-align: center; }
/* 높이를 미리 잡아 광고가 늦게 떠도 글이 밀리지 않게 한다 */
.ad-wide { max-width: 970px; min-height: 250px; }
.ad-inline { min-height: 280px; margin: 40px auto; }
.ad-side { max-width: 336px; min-height: 280px; margin: 48px 0 0; }
.ad-rail { width: 300px; height: 600px; }

/* 홈 */
.front { display: grid; gap: var(--gap); padding-top: 40px; padding-bottom: var(--gap); }
.sec-title { font-size: 32px; line-height: 46px; font-weight: 600; color: var(--title); margin-bottom: 24px; }

.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  background: var(--soft); border-radius: 18px; padding: 24px;
}
.feature .ph { aspect-ratio: 616 / 420; border-radius: 14px; background: var(--line); }
.feature-badge { font-size: 14px; font-weight: 700; color: var(--accent); }
.feature h2 { font-size: 40px; line-height: 54px; font-weight: 700; color: var(--ink); margin-top: 16px; }
.feature p { font-size: 20px; line-height: 30px; font-weight: 500; margin-top: 16px; }

.duo { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 64px; align-items: start; }
.duo.one { grid-template-columns: minmax(0, 1fr); }
.rank { counter-reset: rank; }
.rank a {
  display: flex; gap: 16px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  font-size: 18px; line-height: 26px; font-weight: 500;
}
.rank a::before {
  counter-increment: rank; content: counter(rank);
  font-size: 20px; font-weight: 700; color: var(--accent); min-width: 14px;
}

.row-list { display: grid; gap: 40px; }
.row-card { display: flex; gap: 32px; align-items: center; justify-content: space-between; }
.row-card .ph { width: 275px; aspect-ratio: 275 / 190; flex: none; }
.row-card h3 { font-size: 22px; line-height: 33px; font-weight: 700; color: var(--title); }
.row-card p { font-size: 17px; line-height: 27px; margin-top: 8px; }
.meta { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 15px; color: var(--sub); }
.deal-end { font-size: 13px; font-weight: 700; color: #e42939; background: #ffeeee; border-radius: 6px; padding: 3px 8px; }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.card a { display: block; }
.card .ph { aspect-ratio: 290 / 194; }
.card .cat { display: block; margin-top: 16px; font-size: 15px; color: var(--sub); }
.card h3 { margin-top: 4px; font-size: 20px; line-height: 30px; font-weight: 600; color: var(--title); }
.card time { display: block; margin-top: 8px; font-size: 15px; color: var(--sub); }
.card a:hover h3, .row-card:hover h3, .rank a:hover { color: var(--accent); }

.more { display: flex; justify-content: center; margin-top: 48px; }
.more a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 20px;
  border-radius: 20px; background: var(--soft); font-size: 15px; font-weight: 600;
}

/* 글 상세 */
.post { padding-top: 56px; padding-bottom: var(--gap); }
.post-layout {
  display: grid; grid-template-columns: minmax(0, 700px) 300px; gap: 64px;
  justify-content: center;
}
.post-head .cat { font-size: 15px; font-weight: 700; color: var(--accent); }
.post-head h1 { margin-top: 12px; font-size: 44px; line-height: 1.4; font-weight: 600; color: var(--ink); }
.post-head .meta { margin-top: 16px; }
.disclosure { margin-top: 24px; padding: 12px 16px; border-radius: 8px; background: var(--soft); font-size: 14px; line-height: 21px; }
.post-cover { aspect-ratio: 700 / 394; margin-top: 32px; }

.post-body { font-size: 17px; line-height: 27.2px; color: var(--title); overflow-wrap: anywhere; }
.post-body p { margin: 24px 0 8px; }
.post-body h2 { margin: 56px 0 4px; font-size: 24px; line-height: 38.4px; font-weight: 700; color: var(--ink); scroll-margin-top: 84px; }
.post-body ul { list-style: disc; padding-left: 22px; margin: 16px 0; }
.post-body li { margin: 6px 0; }
.post-body p a, .post-body li a { color: var(--accent); text-decoration: underline; }

.deal-box { margin: 32px 0; padding: 24px; border: 1px solid var(--line); border-radius: 14px; }
.deal-box dl { display: grid; grid-template-columns: 88px 1fr; gap: 10px 16px; font-size: 16px; line-height: 24px; }
.deal-box dt { color: var(--sub); }
.deal-box dd { color: var(--ink); font-weight: 600; }
.btn {
  display: flex; align-items: center; justify-content: center; height: 52px; margin-top: 20px;
  border-radius: 12px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 700;
}

.post-body .btn { color: #fff; text-decoration: none; }
.deal-box p { margin: 0; }

.post-rail { display: flex; flex-direction: column; gap: 32px; }
.toc { font-size: 14px; line-height: 20px; }
.toc-title { margin-bottom: 12px; font-weight: 700; color: var(--title); }
.toc a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); color: var(--sub); }
.toc a:hover { color: var(--accent); border-color: var(--accent); }

.related { margin-top: var(--gap); }
.post-layout.solo { grid-template-columns: minmax(0, 700px); }
.post-body h3 { margin: 32px 0 0; font-size: 20px; line-height: 30px; font-weight: 700; color: var(--ink); }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.post-body figure { margin: 24px 0; }
.post-body figcaption { margin-top: 8px; font-size: 14px; color: var(--sub); text-align: center; }
.post-body blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--line); color: var(--text); }
.post-body table { width: 100%; margin: 24px 0; border-collapse: collapse; font-size: 16px; }
.post-body th, .post-body td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.post-body th { background: var(--soft); }
.post-body ol { list-style: decimal; padding-left: 22px; margin: 16px 0; }

/* 목록(카테고리·검색·2쪽 이후) */
.list { padding-top: 56px; padding-bottom: var(--gap); }
.page-title { font-size: 44px; line-height: 1.4; font-weight: 600; color: var(--title); margin-bottom: 40px; }
.term-desc { margin: -24px 0 40px; font-size: 17px; line-height: 27px; }
.empty { padding: 40px 0; color: var(--sub); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 20px; background: var(--soft); font-size: 15px; font-weight: 600; }
.page-numbers.current { background: var(--accent); color: #fff; }
.search-form { display: flex; gap: 8px; max-width: 480px; margin-bottom: 40px; }
.search-form label { flex: 1; }
.search-field { width: 100%; height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.search-submit { height: 48px; padding: 0 20px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }

/* 바닥 */
.site-foot { padding: 48px 0; background: var(--foot); font-size: 14px; line-height: 22px; color: var(--sub); }
.site-foot ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; font-weight: 600; color: var(--text); }

@media (max-width: 1199px) {
  :root { --pad: 40px; --gap: 72px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .duo { grid-template-columns: minmax(0, 1fr); gap: 72px; }
  .post-layout { grid-template-columns: minmax(0, 700px); }
  .post-rail, .ad-side { display: none; }
  /* 숨긴 자리에서는 광고 요청 자체가 나가지 않게 ins 도 숨긴다 */
  .post-rail ins.adsbygoogle, .ad-side ins.adsbygoogle { display: none !important; }
}

@media (max-width: 767px) {
  :root { --pad: 20px; --gap: 56px; }
  .site-head .wrap { flex-wrap: wrap; gap: 0 16px; padding-top: 12px; }
  .site-search { padding: 0; }
  .site-nav { order: 3; width: 100%; gap: 20px; padding: 12px 0; overflow-x: auto; white-space: nowrap; }
  .front { padding-top: 20px; }
  .sec-title { font-size: 24px; line-height: 34px; margin-bottom: 8px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px; }
  .feature h2 { font-size: 25px; line-height: 32.5px; margin-top: 8px; }
  .feature p { font-size: 16px; line-height: 24px; margin-top: 8px; }
  .duo { gap: 56px; }
  .rank a { padding: 16px 0; font-size: 17px; line-height: 24px; }
  .row-list { gap: 0; }
  .row-card { gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .row-card .ph, .card .ph { width: 112px; aspect-ratio: 4 / 3; flex: none; }
  .row-card h3, .card h3 { font-size: 17px; line-height: 24px; }
  .row-card p { display: none; }
  .meta, .card .cat, .card time { font-size: 13px; }
  .meta { margin-top: 8px; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .card a { display: flex; flex-direction: row-reverse; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .card .cat { margin-top: 0; }
  .more { margin-top: 24px; }
  .ad-wide { min-height: 280px; }
  .post { padding-top: 32px; }
  .post-head h1, .page-title { font-size: 32px; line-height: 43px; }
  .page-title { margin-bottom: 24px; }
  .list { padding-top: 32px; }
  .post-cover { margin-top: 24px; }
  .deal-box { padding: 20px; }
}
