/* ============================================================
   Clearlii — Blog index, Article, FAQ
   ============================================================ */

/* ---- blog index ---- */
.blog-hero { padding: 40px 0 20px; }
.blog-hero .eyebrow { margin-bottom: 18px; }
.blog-hero h1 { max-width: 16ch; }
.blog-hero p { color: var(--muted); font-size: 18px; max-width: 56ch; margin: 20px 0 0; }

/* search */
.blog-search { position: relative; max-width: 520px; margin-top: 34px; }
.blog-search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.blog-search input { width: 100%; height: 54px; border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; padding: 0 46px 0 50px; font-family: inherit; font-size: 15.5px; color: var(--ink); outline: none; transition: border-color .18s, box-shadow .18s; }
.blog-search input:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(121,33,129,.1); }
.blog-search .bs-clear { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: none; border-radius: 50%; background: var(--surface-2); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.blog-search .bs-clear:hover { background: var(--purple); color: #fff; }

.blog-empty { text-align: center; color: var(--muted); font-size: 16px; padding: 50px 0; }

/* pagination */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 48px; }
.pager .pg { min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-family: inherit; font-size: 14.5px; font-weight: 500; color: var(--ink); cursor: pointer; transition: .16s; }
.pager .pg:hover:not(:disabled):not(.current) { border-color: var(--purple); color: var(--purple); }
.pager .pg.current { background: var(--purple); border-color: var(--purple); color: #fff; cursor: default; }
.pager .pg.pg-nav { color: var(--muted); font-weight: 600; }
.pager .pg:disabled { opacity: .38; cursor: not-allowed; }
.pager .pg-gap { min-width: 24px; text-align: center; color: var(--muted-2); }

.tag.news { background: #7a1874; }

.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 10px; }
.blog-cat { height: 38px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; transition: .18s; }
.blog-cat.active { background: var(--purple); border-color: var(--purple); color: #fff; }

.feature-post {
  position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 0; border-radius: var(--r-lg); overflow: hidden;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-soft); margin-bottom: 40px;
}
.feature-post .fp-media { position: relative; min-height: 380px; }
.feature-post .fp-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-post .fp-body { padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.feature-post .fp-body .tag { align-self: flex-start; }
.feature-post h2 { font-size: 34px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); margin: 18px 0 14px; text-wrap: balance; }
.feature-post p { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0 0 26px; }
.post-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted-2); margin-bottom: 22px; }
.post-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

.tag { display: inline-flex; padding: 5px 13px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 500; color: #fff; }
.tag.purple { background: var(--purple); } .tag.blue { background: var(--blue); } .tag.science { background: #b31aef; }
.tag.tips { background: var(--blue); } .tag.health { background: #1f8a5b; } .tag.guide { background: #c2410c; } .tag.support { background: #555; }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--sh-card); }
.post-card .pc-media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.post-card .pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .pc-media img { transform: scale(1.05); }
.post-card .pc-media .tag { position: absolute; top: 14px; left: 14px; }
.post-card .pc-media.noimg { aspect-ratio: 16/10; background: linear-gradient(150deg, var(--purple), var(--blue)); display: grid; place-items: center; }
.post-card .pc-media.noimg svg { width: 54px; height: 54px; color: rgba(255,255,255,.85); }
.post-card .pc-body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 10px; line-height: 1.25; }
.post-card p { font-size: 14px; line-height: 1.55; color: var(--muted); margin: 0 0 18px; flex: 1; }
.post-card .more { color: var(--purple); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.post-card .more svg { width: 14px; height: 14px; flex: none; }

/* ---- article ---- */
.article-hero { padding: 30px 0 0; }
.article-head { max-width: 760px; margin: 0 auto; text-align: center; }
.article-head h1 { font-size: clamp(32px, 4.4vw, 56px); font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; color: var(--ink); margin: 18px 0 0; text-wrap: balance; }
.article-cover { max-width: 1000px; margin: 44px auto 0; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 21/9; box-shadow: var(--sh-card); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { max-width: 720px; margin: 0 auto; padding: 56px 0 20px; }
.article-body > p { font-size: 17px; line-height: 1.75; color: #2b2b30; margin: 0 0 22px; }
.article-body .lead-p { font-size: 20px; line-height: 1.6; color: var(--ink); }
.article-body h2 { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); margin: 44px 0 16px; }
.article-body h3 { font-size: 21px; font-weight: 600; color: var(--ink); margin: 32px 0 12px; }
.article-body ul { margin: 0 0 22px; padding-left: 0; list-style: none; }
.article-body ul li { position: relative; padding-left: 30px; margin-bottom: 12px; font-size: 17px; line-height: 1.65; color: #2b2b30; }
.article-body ul li::before { content: ''; position: absolute; left: 4px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--purple); }
.article-body .callout { background: var(--surface); border-radius: var(--r-md); padding: 28px 32px; margin: 32px 0; border-left: 4px solid var(--purple); }
.article-body .callout p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink); font-style: italic; }
.article-share { max-width: 720px; margin: 30px auto 0; padding-top: 26px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.article-share .lbl { font-size: 14px; color: var(--muted); }
.article-share .sh { display: flex; gap: 8px; }
.article-share .sh a { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--muted); transition: .2s; }
.article-share .sh a:hover { background: var(--purple); color: #fff; }

/* ---- FAQ ---- */
.faq-hero { text-align: center; padding: 40px 0 10px; }
.faq-hero .eyebrow { margin-bottom: 20px; }
.faq-hero h1 { max-width: 18ch; margin: 0 auto; }
.faq-hero p { color: var(--muted); font-size: 18px; max-width: 56ch; margin: 20px auto 0; }
.faq-layout { display: grid; grid-template-columns: 240px 1fr; gap: 50px; align-items: start; }
.faq-side { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 4px; }
.faq-side a { padding: 11px 16px; border-radius: 12px; font-size: 14.5px; color: var(--muted); transition: .15s; }
.faq-side a:hover, .faq-side a.active { background: var(--surface); color: var(--purple); font-weight: 500; }
.faq-cat { margin-bottom: 44px; scroll-margin-top: 120px; }
.faq-cat h2 { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 18px; }
.faq-q { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 12px; overflow: hidden; transition: border-color .2s; }
.faq-q.open { border-color: rgba(120,33,129,.35); }
.faq-q summary { list-style: none; cursor: pointer; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 16.5px; font-weight: 500; color: var(--ink); }
.faq-q summary::-webkit-details-marker { display: none; }
.faq-q .qico { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--purple); box-shadow: inset 0 0 0 1.5px rgba(120,33,129,.25); transition: .3s; }
.faq-q[open] .qico { transform: rotate(45deg); background: var(--purple); color: #fff; box-shadow: none; }
.faq-q .qico svg { width: 14px; height: 14px; }
.faq-q .ans { padding: 0 24px 24px; }
.faq-q .ans p { margin: 0; font-size: 15.5px; line-height: 1.7; color: var(--muted); }
.faq-q .ans ol { margin: 8px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.7; color: var(--muted); }

@media (max-width: 1000px) {
  .feature-post { grid-template-columns: 1fr; }
  .feature-post .fp-media { min-height: 240px; }
  .feature-post .fp-body { padding: 32px; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .faq-layout { grid-template-columns: 1fr; gap: 24px; }
  .faq-side { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
  .article-body > p, .article-body ul li { font-size: 16px; }
}
